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 --- README.md | 3 +- cycle_wall.sh | 11 ----- save-theme | 10 ++++ save-theme.sh | 10 ---- set-theme | 80 +++++++++++++++++++++++++++++++ set-theme.sh | 71 --------------------------- setwll | 87 ++++++++++++++++++++++++++++++++++ themes/cho.sh | 36 ++++++++++++++ themes/cho2.sh | 36 ++++++++++++++ themes/chored-light.sh | 36 -------------- themes/chored.sh | 36 -------------- themes/feycave.sh | 2 +- themes/hotdog.sh | 2 + themes/redblue.sh | 2 +- themes/spaceship.sh | 2 +- themes/warp.sh | 2 +- wallpaper_scripts/cho.sh | 1 + wallpaper_scripts/cho2.sh | 1 + wallpaper_scripts/default-primary.sh | 1 + wallpaper_scripts/default-secondary.sh | 1 + wallpaper_scripts/drg.sh | 1 + wallpaper_scripts/drk.sh | 1 + wallpaper_scripts/purple.sh | 1 + wallpaper_scripts/spaceship.sh | 1 + 24 files changed, 265 insertions(+), 169 deletions(-) delete mode 100755 cycle_wall.sh create mode 100755 save-theme delete mode 100755 save-theme.sh create mode 100755 set-theme delete mode 100755 set-theme.sh create mode 100755 setwll create mode 100755 themes/cho.sh create mode 100755 themes/cho2.sh delete mode 100755 themes/chored-light.sh delete mode 100755 themes/chored.sh create mode 100755 wallpaper_scripts/cho.sh create mode 100755 wallpaper_scripts/cho2.sh create mode 100755 wallpaper_scripts/default-primary.sh create mode 100755 wallpaper_scripts/default-secondary.sh create mode 100755 wallpaper_scripts/drg.sh create mode 100755 wallpaper_scripts/drk.sh create mode 100755 wallpaper_scripts/purple.sh create mode 100755 wallpaper_scripts/spaceship.sh 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 b/save-theme new file mode 100755 index 0000000..2dfb7c3 --- /dev/null +++ b/save-theme @@ -0,0 +1,10 @@ +#!/bin/bash +cd "$(dirname "$0")" + +if [ "$1" == "" ]; then + echo theme name not set :\< + exit 1 +fi + +cp ~/.cache/wal/colors.sh "./themes/$1.sh" +chmod u+x "./themes/$1.sh" diff --git a/save-theme.sh b/save-theme.sh deleted file mode 100755 index 2dfb7c3..0000000 --- a/save-theme.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -cd "$(dirname "$0")" - -if [ "$1" == "" ]; then - echo theme name not set :\< - exit 1 -fi - -cp ~/.cache/wal/colors.sh "./themes/$1.sh" -chmod u+x "./themes/$1.sh" diff --git a/set-theme b/set-theme new file mode 100755 index 0000000..db06373 --- /dev/null +++ b/set-theme @@ -0,0 +1,80 @@ +#!/bin/bash + +# CONFIG +ignore_background_color="#04000a" +highlight="#08000a" +default_theme="tokyo-night" + +# END CONFIG +cd "$(dirname "$0")" + +ignore_file=0 +list_files=0 +ignore_background=0 +run_pywal=0 +set_wallpaper=0 + +while getopts "h?lpbw" opt; do + case "$opt" in + h) + printf -- "-l list themes +-p run pywall +-b ignore background and use one defined in script +-w set wallpaper with setwll if \$wallpaper exist" + exit 0 + ;; + l) list_files=1 + ;; + b) ignore_background=1 + ;; + p) run_pywal=1 + ignore_file=1 + ;; + w) set_wallpaper=1 + ;; + esac +done + +shift $((OPTIND-1)) +[ "${1:-}" = "--" ] && shift + +theme_file=$1 + +if [ $list_files == 1 ]; then + ls $1 ./themes/ + exit 0 +fi + +if [ "$theme_file" == "" ]; then + theme_file="$default_theme" +fi + +if [ $ignore_file == 0 ]; then + source ./themes/$theme_file.sh || exit 1 +fi + + +if [ $run_pywal == 1 ]; then + if [ $(pgrep hyprpaper) ]; then + wallpaper=$(hyprctl hyprpaper listactive | grep HDMI | sed 's/HDMI-A-1 = //') + wal -seti "$wallpaper" + . "$HOME/.cache/wal/colors.sh" + [ $ignore_background == 1 ] && background="$ignore_background_color" + else + echo NO AVAILABLE WALLPAPER ENGINE + echo please define wallpaper + exit 1 + fi +fi + +[ $ignore_background == 1 ] && background="$ignore_background_color" + +runs_dir="$(find ./targets -mindepth 1 -maxdepth 1 -type f -executable)" +for s in $runs_dir; do + source "$s" +done + +echo $wallpaper +if [ $set_wallpaper == 1 ] && [ "$wallpaper" ]; then + setwll -ua "$wallpaper" +fi diff --git a/set-theme.sh b/set-theme.sh deleted file mode 100755 index c6d30d4..0000000 --- a/set-theme.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -# CONFIG -ignore_background_color="#04000a" -highlight="#08000a" -default_theme="tokyo-night" - -# END CONFIG -cd "$(dirname "$0")" - -ignore_file=0 -list_files=0 -ignore_background=0 -run_pywal=0 - -while getopts "h?lpb" opt; do - case "$opt" in - h) - printf -- "-l list themes --p run pywall --b ignore background and use one defined in script" - exit 0 - ;; - l) list_files=1 - ;; - b) ignore_background=1 - ;; - p) run_pywal=1 - ignore_file=1 - ;; - esac -done - -shift $((OPTIND-1)) -[ "${1:-}" = "--" ] && shift - -theme_file=$1 - -if [ $list_files == 1 ]; then - ls $1 ./themes/ - exit 0 -fi - -if [ "$theme_file" == "" ]; then - theme_file="$default_theme" -fi - -if [ $ignore_file == 0 ]; then - source ./themes/$theme_file.sh || exit 1 -fi - - -if [ $run_pywal == 1 ]; then - if [ $(pgrep hyprpaper) ]; then - wallpaper=$(hyprctl hyprpaper listactive | grep HDMI | sed 's/HDMI-A-1 = //') - wal -seti "$wallpaper" - . "$HOME/.cache/wal/colors.sh" - [ $ignore_background == 1 ] && background="$ignore_background_color" - else - echo NO AVAILABLE WALLPAPER ENGINE - echo please define wallpaper - exit 1 - fi -fi - -[ $ignore_background == 1 ] && background="$ignore_background_color" - -runs_dir="$(find ./targets -mindepth 1 -maxdepth 1 -type f -executable)" -for s in $runs_dir; do - source "$s" -done 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 diff --git a/themes/cho.sh b/themes/cho.sh new file mode 100755 index 0000000..6ea22b4 --- /dev/null +++ b/themes/cho.sh @@ -0,0 +1,36 @@ +# Shell variables +# Generated by 'wal' +wallpaper='/home/iceyrazor/stuff/media/wallpapers/papapa.png' + +# Special +background='#0F0304' +foreground='#ccafc1' +cursor='#ccafc1' + +# Colors +color0='#0F0304' +color1='#5D3B45' +color2='#6E4C5C' +color3='#910C0E' +color4='#9C1D21' +color5='#A24A5A' +color6='#A47A75' +color7='#ccafc1' +color8='#8e7a87' +color9='#5D3B45' +color10='#6E4C5C' +color11='#910C0E' +color12='#9C1D21' +color13='#A24A5A' +color14='#A47A75' +color15='#ccafc1' + +# FZF colors +export FZF_DEFAULT_OPTS=" + $FZF_DEFAULT_OPTS + --color fg:7,bg:0,hl:1,fg+:232,bg+:1,hl+:255 + --color info:7,prompt:2,spinner:1,pointer:232,marker:1 +" + +# Fix LS_COLORS being unreadable. +export LS_COLORS="${LS_COLORS}:su=30;41:ow=30;42:st=30;44:" diff --git a/themes/cho2.sh b/themes/cho2.sh new file mode 100755 index 0000000..a6b502f --- /dev/null +++ b/themes/cho2.sh @@ -0,0 +1,36 @@ +# Shell variables +# Generated by 'wal' +wallpaper='/home/iceyrazor/stuff/media/wallpapers/papapa 2.jpg' + +# Special +background='#0F0508' +foreground='#e2cddd' +cursor='#e2cddd' + +# Colors +color0='#0F0508' +color1='#A70B10' +color2='#A83C4F' +color3='#948A70' +color4='#AB6F8E' +color5='#B191AE' +color6='#CD94B5' +color7='#e2cddd' +color8='#9e8f9a' +color9='#A70B10' +color10='#A83C4F' +color11='#948A70' +color12='#AB6F8E' +color13='#B191AE' +color14='#CD94B5' +color15='#e2cddd' + +# FZF colors +export FZF_DEFAULT_OPTS=" + $FZF_DEFAULT_OPTS + --color fg:7,bg:0,hl:1,fg+:232,bg+:1,hl+:255 + --color info:7,prompt:2,spinner:1,pointer:232,marker:1 +" + +# Fix LS_COLORS being unreadable. +export LS_COLORS="${LS_COLORS}:su=30;41:ow=30;42:st=30;44:" diff --git a/themes/chored-light.sh b/themes/chored-light.sh deleted file mode 100755 index 987c44d..0000000 --- a/themes/chored-light.sh +++ /dev/null @@ -1,36 +0,0 @@ -# Shell variables -# Generated by 'wal' -wallpaper='/home/iceyrazor/stuff/media/papapa abatademo.png' - -# Special -background='#0F0508' -foreground='#e2cddd' -cursor='#e2cddd' - -# Colors -color0='#0F0508' -color1='#A70B10' -color2='#A83C4F' -color3='#948A70' -color4='#AB6F8E' -color5='#B191AE' -color6='#CD94B5' -color7='#e2cddd' -color8='#9e8f9a' -color9='#A70B10' -color10='#A83C4F' -color11='#948A70' -color12='#AB6F8E' -color13='#B191AE' -color14='#CD94B5' -color15='#e2cddd' - -# FZF colors -export FZF_DEFAULT_OPTS=" - $FZF_DEFAULT_OPTS - --color fg:7,bg:0,hl:1,fg+:232,bg+:1,hl+:255 - --color info:7,prompt:2,spinner:1,pointer:232,marker:1 -" - -# Fix LS_COLORS being unreadable. -export LS_COLORS="${LS_COLORS}:su=30;41:ow=30;42:st=30;44:" diff --git a/themes/chored.sh b/themes/chored.sh deleted file mode 100755 index b6e2e6a..0000000 --- a/themes/chored.sh +++ /dev/null @@ -1,36 +0,0 @@ -# Shell variables -# Generated by 'wal' -wallpaper='/home/iceyrazor/stuff/scripts/bash/youtube-playlist-cli/thumbnails/t8DePOVpJEg.jpg' - -# Special -background='#0F0304' -foreground='#ccafc1' -cursor='#ccafc1' - -# Colors -color0='#0F0304' -color1='#5D3B45' -color2='#6E4C5C' -color3='#910C0E' -color4='#9C1D21' -color5='#A24A5A' -color6='#A47A75' -color7='#ccafc1' -color8='#8e7a87' -color9='#5D3B45' -color10='#6E4C5C' -color11='#910C0E' -color12='#9C1D21' -color13='#A24A5A' -color14='#A47A75' -color15='#ccafc1' - -# FZF colors -export FZF_DEFAULT_OPTS=" - $FZF_DEFAULT_OPTS - --color fg:7,bg:0,hl:1,fg+:232,bg+:1,hl+:255 - --color info:7,prompt:2,spinner:1,pointer:232,marker:1 -" - -# Fix LS_COLORS being unreadable. -export LS_COLORS="${LS_COLORS}:su=30;41:ow=30;42:st=30;44:" diff --git a/themes/feycave.sh b/themes/feycave.sh index 483423e..27a40a8 100755 --- a/themes/feycave.sh +++ b/themes/feycave.sh @@ -1,6 +1,6 @@ # Shell variables # Generated by 'wal' -wallpaper='/home/iceyrazor/56uvetgzh2se1.png' +wallpaper='/home/iceyrazor/stuff/media/wallpapers/fey-cave.png' # Special background='#0B0D16' 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/themes/redblue.sh b/themes/redblue.sh index e9bf68b..94b834f 100755 --- a/themes/redblue.sh +++ b/themes/redblue.sh @@ -1,6 +1,6 @@ # Shell variables # Generated by 'wal' -wallpaper='/home/iceyrazor/2025-06-06_19-42.png' +wallpaper='/home/iceyrazor/stuff/media/wallpapers/ado-ussewa.png' # Special background='#02000D' diff --git a/themes/spaceship.sh b/themes/spaceship.sh index 7689cee..24651be 100755 --- a/themes/spaceship.sh +++ b/themes/spaceship.sh @@ -1,6 +1,6 @@ # Shell variables # Generated by 'wal' -wallpaper='/home/iceyrazor/1a7q9jfpuf2f1.png' +wallpaper='/home/iceyrazor/stuff/media/wallpapers/spaceship-4jskal.png' # Special background='#0B092C' diff --git a/themes/warp.sh b/themes/warp.sh index 4b72b1d..c1dab0c 100755 --- a/themes/warp.sh +++ b/themes/warp.sh @@ -1,6 +1,6 @@ # Shell variables # Generated by 'wal' -wallpaper='/home/iceyrazor/1zu6aywxa7vd1.png' +wallpaper='/home/iceyrazor/stuff/media/wallpapers/warp-1.png' # Special background='#040617' diff --git a/wallpaper_scripts/cho.sh b/wallpaper_scripts/cho.sh new file mode 100755 index 0000000..f299f84 --- /dev/null +++ b/wallpaper_scripts/cho.sh @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/papapa.png" diff --git a/wallpaper_scripts/cho2.sh b/wallpaper_scripts/cho2.sh new file mode 100755 index 0000000..5506294 --- /dev/null +++ b/wallpaper_scripts/cho2.sh @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/papapa 2.jpg" diff --git a/wallpaper_scripts/default-primary.sh b/wallpaper_scripts/default-primary.sh new file mode 100755 index 0000000..2898bfb --- /dev/null +++ b/wallpaper_scripts/default-primary.sh @@ -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.sh b/wallpaper_scripts/default-secondary.sh new file mode 100755 index 0000000..f2f5ee1 --- /dev/null +++ b/wallpaper_scripts/default-secondary.sh @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/tumblr_06bbd355f3e355049446dac24f6e7c44_2c486f77_1280 ninesols.jpg" diff --git a/wallpaper_scripts/drg.sh b/wallpaper_scripts/drg.sh new file mode 100755 index 0000000..49ef5ca --- /dev/null +++ b/wallpaper_scripts/drg.sh @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/6b06108fa3bc46f5.jpg" diff --git a/wallpaper_scripts/drk.sh b/wallpaper_scripts/drk.sh new file mode 100755 index 0000000..297f16a --- /dev/null +++ b/wallpaper_scripts/drk.sh @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/dark_leaves.png" diff --git a/wallpaper_scripts/purple.sh b/wallpaper_scripts/purple.sh new file mode 100755 index 0000000..56333fb --- /dev/null +++ b/wallpaper_scripts/purple.sh @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/purple/IMG_0276.jpg" diff --git a/wallpaper_scripts/spaceship.sh b/wallpaper_scripts/spaceship.sh new file mode 100755 index 0000000..af658f7 --- /dev/null +++ b/wallpaper_scripts/spaceship.sh @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/spaceship-4jskal.png" -- cgit v1.3