From 50ef825788a68cea1de4e2a654e79bc06337400d Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Mon, 7 Jul 2025 20:25:19 -0500 Subject: - themes - removed cycle wall - added wallpaper setter - added wallpaper run from set-theme - fixed wallpaper targets - made names a bit more consistant --- setwll | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 setwll (limited to 'setwll') diff --git a/setwll b/setwll new file mode 100755 index 0000000..1500472 --- /dev/null +++ b/setwll @@ -0,0 +1,87 @@ +#!/bin/bash +# may be moved to theme setter +cd "$(dirname "$0")" + +listwalls=0 +unload=0 +secondary="" +primary="" +all="" + +while getopts "h?lup:s:a:" opt; do + case "$opt" in + h) + printf -- "-l list wallpapers +-u unload current wall after switching +-p set primary mon wallpaper +-s set secondary mon wallpaper +-a set all mon wallpaper + +unloading only applies to hyprpaper +add scripts to wallpaper_scripts for easier switching\n" + exit 0 + ;; + l) listwalls=1 + ;; + u) unload=1 + ;; + p) primary="$OPTARG" + ;; + s) secondary="$OPTARG" + ;; + a) all="$OPTARG" + ;; + esac +done + +shift $((OPTIND-1)) +[ "${1:-}" = "--" ] && shift + +if [ $listwalls == 1 ]; then + ls ./wallpaper_scripts + exit 0 +fi + +if [ "$all" ]; then + primary="$all" + secondary="$all" +fi + +if [ -z "$primary" ]; then + primary="$(./wallpaper_scripts/default-primary.sh)" +else + if [ -f "./wallpaper_scripts/$primary.sh" ]; then + primary="$(./wallpaper_scripts/$primary.sh)" + fi +fi + +if [ -z "$secondary" ]; then + secondary="$(./wallpaper_scripts/default-secondary.sh)" +else + if [ -f "./wallpaper_scripts/$secondary.sh" ]; then + secondary="$(./wallpaper_scripts/$secondary.sh)" + fi +fi + + +if [ "$WAYLAND_DISPLAY" ]; then + current_wal="$(hyprctl hyprpaper listactive | grep HDMI-A-1 | sed 's/HDMI-A-1 = //')" + hyprctl hyprpaper preload $primary + hyprctl hyprpaper wallpaper "HDMI-A-1,$primary" + if [ $unload == 1 ]; then + hyprctl hyprpaper unload "$current_wal" + fi + + current_wal="$(hyprctl hyprpaper listactive | grep DP-1 | sed 's/DP-1 = //')" + hyprctl hyprpaper preload $secondary + hyprctl hyprpaper wallpaper "DP-1,$secondary" + if [ $unload == 1 ]; then + hyprctl hyprpaper unload "$current_wal" + fi +else + if [ -z "$1" ]; then + nitrogen --head=0 --set-zoom-fill $primary + + nitrogen --head=1 --set-zoom-fill $secondary + fi +fi -- cgit v1.3