This commit is contained in:
2025-12-08 23:38:11 -08:00
parent baed6a3196
commit ff8a2a982b
3 changed files with 95 additions and 6 deletions

View File

@@ -6,8 +6,9 @@ THEME="$HOME/.config/rofi/launchers/type-3/style-4.rasi"
DIR="$HOME/Pictures/wallpapers/favorites"
SELECTED_WALL=$(cd "$DIR" && for a in *.jpg *.png; do echo -en "$a\0icon\x1f$a\n"; done | rofi -dmenu -i -no-custom -theme "$THEME" -p "Select a wallpaper" -theme-str 'configuration {icon-size: 128; dpi: 96;} window {width: 45%; height: 45%;}')
PTH="$(printf "%s" "$DIR/$SELECTED_WALL" | tr -s '/')"
notify-send -a "rofi-wallpaper" "Wallpaper set to" -i "$PTH" "$PTH"
hyprctl hyprpaper preload "$PTH"
hyprctl hyprpaper wallpaper "DP-1,$PTH"
hyprctl hyprpaper wallpaper "$PTH"
hyprctl hyprpaper unload "$(cat "$HOME/.wallpaper")"
# hyprctl hyprpaper wallpaper "DP-1, $PTH"
notify-send -a "rofi-wallpaper" "Wallpaper set to" -i "$PTH" "$PTH"
echo "$PTH" >"$HOME/.wallpaper"