wip: hyprpaper_single.sh
This commit is contained in:
parent
9fd1a31bdb
commit
85509d556c
35
chores/mode/hyprpaper_single.sh
Normal file
35
chores/mode/hyprpaper_single.sh
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# reve desktop environment framework
|
||||||
|
# Yigid BALABAN <fyb@fybx.dev> 2024
|
||||||
|
|
||||||
|
# chore script
|
||||||
|
# type mode
|
||||||
|
# name hyprpaper_single.sh
|
||||||
|
# desc changes the background depending on the desktop_mode
|
||||||
|
# vars bg_dark, bg_light
|
||||||
|
# reload none
|
||||||
|
|
||||||
|
if ! command -v hyprpaper &>/dev/null; then
|
||||||
|
echo "hyprpaper is not installed. Please install it and try again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# shellcheck source=../../_reve.sh
|
||||||
|
source "$(reve where)/_reve"
|
||||||
|
|
||||||
|
bg="$(util_read_config chore."bg_$RV_CURRENT_MODE")"
|
||||||
|
current_bg="$(util_where_config chore.current_bg)"
|
||||||
|
|
||||||
|
# Only change if different from current
|
||||||
|
if [ "$bg" != "$(readlink -f "$current_bg")" ]; then
|
||||||
|
hyprctl hyprpaper preload "$bg"
|
||||||
|
hyprctl hyprpaper wallpaper ",${bg}"
|
||||||
|
hyprctl hyprpaper unload unused
|
||||||
|
cp "$bg" "$current_bg"
|
||||||
|
|
||||||
|
notify-send --urgency=low --expire-time=1450 --icon="$bg" \
|
||||||
|
--app-name="reve: hyprpaper_single" \
|
||||||
|
"Wallpaper changed" \
|
||||||
|
"Wallpaper changed and saved on $RV_CURRENT_MODE mode."
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user