reve/utility/nemo/set_wallpaper.sh
Yigid BALABAN 0602eb1bf7
update background logic
backgrounds saved for light/dark modes are now stored as the absolute
path, so config keys chore.bg_dark and chore.bg_light now contain the
string of absolute path to image files.

in addition to this update, swww_single chore now copies the current
background image to the location of chore.current_bg, which can be used
to directly access the image of the current background.
2024-10-22 16:58:40 +03:00

22 lines
595 B
Bash
Executable File

#!/usr/bin/env bash
# reve desktop environment framework
# Yigid BALABAN <fyb@fybx.dev> 2024
# cp utility/nemo/set_wallpaper.sh ~/.local/share/nemo/scripts
# chmod +x ~/.local/share/nemo/scripts/set_wallpaper.sh
# shellcheck source=../../_reve.sh
source "$(reve where)/_reve"
mode=$(util_read_config base.desktop_mode)
if [ "$NEMO_SCRIPT_SELECTED_FILE_PATHS" = "" ]; then
first=$1
else
first=$(echo "$NEMO_SCRIPT_SELECTED_FILE_PATHS" | head -n 1)
fi
util_write_config "chore.bg_$mode" "$first"
reload mode/swww_single "$mode"