diff --git a/README.md b/README.md index 010a663..fe21c53 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ +# my theme setter and wallpaper setter a set of scripts to set the theme of things i could use pywall. but i wanted to make my own thing # usage - ``set-theme.sh -h`` -- ``cycle-wall.sh "fullpath/to/wallpaper" "dont unload"`` will use hyprwall to cycle a wallpaper and use pywall to get the colors and set them. if the 2nd arg has anything in it. it wont unload the current wallpaper - ``save-theme.sh "name"`` saves the colors from pywall. +- ``setwll -h`` my wallpaper setter # targets when set-theme is run. it will source everything in targets. curently its only set for wezterm and waybar. but if you want other things to be set add a new script there. diff --git a/cycle_wall.sh b/cycle_wall.sh deleted file mode 100755 index 7c39ba2..0000000 --- a/cycle_wall.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -cd "$(dirname "$0")" - -current_wal="$(hyprctl hyprpaper listactive | grep HDMI-A-1 | sed 's/HDMI-A-1 = //')" - -hyprctl hyprpaper preload $1 && hyprctl hyprpaper wallpaper "HDMI-A-1,$1" -if [ "$2" == "" ]; then - hyprctl hyprpaper unload "$current_wal" -fi - -./set-theme.sh -p diff --git a/save-theme.sh b/save-theme similarity index 100% rename from save-theme.sh rename to save-theme diff --git a/set-theme.sh b/set-theme similarity index 100% rename from set-theme.sh rename to set-theme diff --git a/setwll b/setwll new file mode 100755 index 0000000..4f06c61 --- /dev/null +++ b/setwll @@ -0,0 +1,88 @@ +#!/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\n" + printf "u unload current wall after switching\n" + printf "p set primary mon wallpaper\n" + printf "s set secondary mon wallpaper\n" + printf "a set all mon wallpaper\n" + printf "unloading only applies to hyprpaper\n" + printf "\n" + printf "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)" +else + if [ -f "./wallpaper_scripts/$primary" ]; then + primary="$(./wallpaper_scripts/$primary)" + fi +fi + +if [ -z "$secondary" ]; then + secondary="$(./wallpaper_scripts/default-secondary)" +else + if [ -f "./wallpaper_scripts/$secondary" ]; then + secondary="$(./wallpaper_scripts/$secondary)" + 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 + diff --git a/themes/chored-light.sh b/themes/chored-light.sh index 987c44d..1083886 100755 --- a/themes/chored-light.sh +++ b/themes/chored-light.sh @@ -1,6 +1,6 @@ # Shell variables # Generated by 'wal' -wallpaper='/home/iceyrazor/stuff/media/papapa abatademo.png' +wallpaper='/home/iceyrazor/stuff/media/papapa 2.jpg' # Special background='#0F0508' diff --git a/themes/chored.sh b/themes/chored.sh index b6e2e6a..3dbaac1 100755 --- a/themes/chored.sh +++ b/themes/chored.sh @@ -1,6 +1,6 @@ # Shell variables # Generated by 'wal' -wallpaper='/home/iceyrazor/stuff/scripts/bash/youtube-playlist-cli/thumbnails/t8DePOVpJEg.jpg' +wallpaper='/home/iceyrazor/stuff/media/papapa.png' # Special background='#0F0304' diff --git a/themes/hotdog.sh b/themes/hotdog.sh index 82ba9ec..0686bd0 100755 --- a/themes/hotdog.sh +++ b/themes/hotdog.sh @@ -1,3 +1,5 @@ +wallpaper="/home/iceyrazor/stuff/media/wallpapers/hotdogstand.png" + # Special background='#ff0000' foreground='#ffffff' diff --git a/wallpaper_scripts/cho b/wallpaper_scripts/cho new file mode 100755 index 0000000..e5b0db2 --- /dev/null +++ b/wallpaper_scripts/cho @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/papapa.png" diff --git a/wallpaper_scripts/cho2 b/wallpaper_scripts/cho2 new file mode 100755 index 0000000..5506294 --- /dev/null +++ b/wallpaper_scripts/cho2 @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/papapa 2.jpg" diff --git a/wallpaper_scripts/default-primary b/wallpaper_scripts/default-primary new file mode 100755 index 0000000..2898bfb --- /dev/null +++ b/wallpaper_scripts/default-primary @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/4500025-retrowave-vaporwave-car-typography-purple-blue-chromatic-aberration-initial-d-hachi-roku.jpg" diff --git a/wallpaper_scripts/default-secondary b/wallpaper_scripts/default-secondary new file mode 100755 index 0000000..f2f5ee1 --- /dev/null +++ b/wallpaper_scripts/default-secondary @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/tumblr_06bbd355f3e355049446dac24f6e7c44_2c486f77_1280 ninesols.jpg" diff --git a/wallpaper_scripts/drg b/wallpaper_scripts/drg new file mode 100755 index 0000000..49ef5ca --- /dev/null +++ b/wallpaper_scripts/drg @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/6b06108fa3bc46f5.jpg" diff --git a/wallpaper_scripts/drk b/wallpaper_scripts/drk new file mode 100755 index 0000000..297f16a --- /dev/null +++ b/wallpaper_scripts/drk @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/dark_leaves.png" diff --git a/wallpaper_scripts/purple b/wallpaper_scripts/purple new file mode 100755 index 0000000..56333fb --- /dev/null +++ b/wallpaper_scripts/purple @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/purple/IMG_0276.jpg" diff --git a/wallpaper_scripts/spaceship b/wallpaper_scripts/spaceship new file mode 100755 index 0000000..af658f7 --- /dev/null +++ b/wallpaper_scripts/spaceship @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/spaceship-4jskal.png"