From 7437d82e3e0fe6a7b67561d34288c94482a5123f Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Wed, 14 Feb 2024 09:37:50 -0300 Subject: [PATCH] add wppengine.sh and refactor change-colorscheme+swww.sh --- desktop/scripts/change-colorscheme.sh | 20 ++++++++++++++++++-- desktop/scripts/choices | 3 +++ desktop/scripts/swww.sh | 23 ++++++++++++++--------- desktop/scripts/wppengine.sh | 24 ++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 desktop/scripts/choices create mode 100755 desktop/scripts/wppengine.sh diff --git a/desktop/scripts/change-colorscheme.sh b/desktop/scripts/change-colorscheme.sh index ff71e61..18c467e 100755 --- a/desktop/scripts/change-colorscheme.sh +++ b/desktop/scripts/change-colorscheme.sh @@ -5,6 +5,11 @@ WHITE_NORMAL_WPP=~/pics/wallpapers/sl2.png RED_WIDE_WPP=~/pics/wallpapers/bm5.jpg RED_NORMAL_WPP=~/pics/wallpapers/bm3.png +RED_WIDE_LIVE=2883426230 +RED_NORMAL_LIVE=2011974721 + +MELANGE_WIDE_LIVE=2980001176 +MELANGE_NORMAL_LIVE=3033188884 CHOICE=$(tofi <$HOME/scripts/choices) @@ -12,6 +17,10 @@ CHOICE=$(tofi <$HOME/scripts/choices) case "$CHOICE" in melange) + # i'll give linux-wppengine a try + ~/scripts/wppengine.sh $MELANGE_WIDE_LIVE $MELANGE_NORMAL_LIVE + + #change tmux theme ln -sf ~/.config/tmux/tmux-melange.conf ~/.config/tmux/theme.conf tmux source-file ~/.config/tmux/tmux.conf @@ -24,6 +33,10 @@ case "$CHOICE" in # change waybar theme killall waybar; waybar -s ~/.config/waybar/style-melange.css > /dev/null & + # neofetch + sed -i 's/image_source=.*/image_source="$HOME\/pics\/neofetch\/melangium.jpg"/g' ~/.config/neofetch/config.conf + + ;; white) @@ -34,7 +47,7 @@ case "$CHOICE" in sed -i 's/color_scheme = .*/color_scheme = "Solarized Light (Gogh)"/g' ~/.config/wezterm/wezterm.lua # neofetch - sed -i 's/red.jpg/rh.jpg/g' ~/.config/neofetch/config.conf + sed -i 's/image_source=.*/image_source="$HOME\/pics\/rh.jpg"/g' ~/.config/neofetch/config.conf sed -i '0,/cl3/{s/cl3/cl11/}' ~/.config/neofetch/config.conf # waybar white css @@ -43,6 +56,9 @@ case "$CHOICE" in ;; red) + # wpp engine? + ~/scripts/wppengine.sh $RED_WIDE_LIVE $RED_NORMAL_LIVE + # change tmux theme and reload ln -sf ~/.config/tmux/tmux-red.conf ~/.config/tmux/theme.conf tmux source-file ~/.config/tmux/tmux.conf @@ -51,7 +67,7 @@ case "$CHOICE" in sed -i 's/color_scheme = .*/color_scheme = "Fahrenheit"/g' ~/.config/wezterm/wezterm.lua # change neofetch pic (yes lmao) - sed -i 's/rh.jpg/red.jpg/g' ~/.config/neofetch/config.conf + sed -i 's/image_source=.*/image_source="$HOME\/pics\/red.jpg"/g' ~/.config/neofetch/config.conf sed -i '0,/cl11/{s/cl11/cl3/}' ~/.config/neofetch/config.conf # waybar black css diff --git a/desktop/scripts/choices b/desktop/scripts/choices new file mode 100644 index 0000000..923c827 --- /dev/null +++ b/desktop/scripts/choices @@ -0,0 +1,3 @@ +white +red +melange diff --git a/desktop/scripts/swww.sh b/desktop/scripts/swww.sh index 9e875a2..e50f393 100755 --- a/desktop/scripts/swww.sh +++ b/desktop/scripts/swww.sh @@ -5,15 +5,20 @@ export SWWW_TRANSITION=wipe export SWWW_TRANSITION_ANGLE=30 export SWWW_TRANSITION_POS=center -current_theme=$(readlink ~/.config/tmux/theme.conf) - if [[ -z "$1" ]]; then - if [[ $current_theme == *tmux-white.conf ]]; then - FIRST=~/pics/wallpapers/sl3.jpg - SECOND=~/pics/wallpapers/sl2.png - else - FIRST=~/pics/wallpapers/bm5.jpg - SECOND=~/pics/wallpapers/bm3.png - fi +CURRENT_THEME=$(cat ~/colorscheme) +if [[ -z "$1" ]]; then + case "$CURRENT_THEME" in + red) + FIRST=~/pics/wallpapers/bm5.jpg + SECOND=~/pics/wallpapers/bm3.png + ;; + melange) #todo + ;; + white) # todo + FIRST=~/pics/wallpapers/sl3.jpg + SECOND=~/pics/wallpapers/sl2.png + ;; + esac else FIRST=$1 SECOND=$2 diff --git a/desktop/scripts/wppengine.sh b/desktop/scripts/wppengine.sh new file mode 100755 index 0000000..5d34031 --- /dev/null +++ b/desktop/scripts/wppengine.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +CURRENT_THEME=$(cat ~/colorscheme) +if [[ -z "$1" ]]; then + case "$CURRENT_THEME" in + red) + FIRST=2883426230 + SECOND=2011974721 + ;; + melange) + FIRST=2980001176 + SECOND=3033188884 + ;; + white) # todo + ;; + esac +else + FIRST=$1 + SECOND=$2 +fi + +killall linux-wallpaperengine +linux-wallpaperengine --silent --no-audio-processing --disable-mouse --screen-root HDMI-A-1 $FIRST > /dev/null & +linux-wallpaperengine --silent --no-audio-processing --disable-mouse --screen-root DP-3 $SECOND > /dev/null &