From 1c44669958a39952dc42c268d4cdcb6df10d60e2 Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Tue, 13 Feb 2024 14:59:23 -0300 Subject: [PATCH] update swww script and change colorscheme to accept arguments and handle those very nice change --- desktop/scripts/change-colorscheme.sh | 6 ++--- desktop/scripts/macro.sh | 5 ++-- desktop/scripts/swww.sh | 37 +++++++++++++++++---------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/desktop/scripts/change-colorscheme.sh b/desktop/scripts/change-colorscheme.sh index 81c9246..e4d4c57 100755 --- a/desktop/scripts/change-colorscheme.sh +++ b/desktop/scripts/change-colorscheme.sh @@ -9,8 +9,7 @@ RED_NORMAL_WPP=~/pics/wallpapers/bm3.png if [[ $CURRENT_THEME == *tmux-white.conf ]]; then # change wallpaper - swww img -o HDMI-A-1 $RED_WIDE_WPP - swww img -o DP-3 $RED_NORMAL_WPP + ~/scripts/swww.sh $RED_WIDE_WPP $RED_NORMAL_WPP # change tmux theme and reload @@ -32,8 +31,7 @@ if [[ $CURRENT_THEME == *tmux-white.conf ]]; then killall waybar; waybar > /dev/null & else # change wpp - swww img -o HDMI-A-1 $WHITE_WIDE_WPP - swww img -o DP-3 $WHITE_NORMAL_WPP + ~/scripts/swww.sh $WHITE_WIDE_WPP $WHITE_NORMAL_WPP # change tmux theme and reload ln -sf ~/.config/tmux/tmux-white.conf ~/.config/tmux/theme.conf diff --git a/desktop/scripts/macro.sh b/desktop/scripts/macro.sh index 32c625e..3ade7e2 100755 --- a/desktop/scripts/macro.sh +++ b/desktop/scripts/macro.sh @@ -19,8 +19,9 @@ else # sleep 0.3 # xdotool click 2 # sleep 0.2 - xdotool click 1 - sleep 1 + # xdotool click 1 + # sleep 1 + ydotool click --next-delay 1000 0xC0 done & echo "$!" >"$running" diff --git a/desktop/scripts/swww.sh b/desktop/scripts/swww.sh index ed397b9..9e875a2 100755 --- a/desktop/scripts/swww.sh +++ b/desktop/scripts/swww.sh @@ -1,16 +1,27 @@ -#!/bin/sh -SWWW_TRANSITION_STEP=1 -SWWW_TRANSITION_FPS=60 -SWWW_TRANSITION="grow" - -swww-daemon & +#!/bin/bash +export SWWW_TRANSITION_STEP=90 +export SWWW_TRANSITION_FPS=60 +export SWWW_TRANSITION=wipe +export SWWW_TRANSITION_ANGLE=30 +export SWWW_TRANSITION_POS=center current_theme=$(readlink ~/.config/tmux/theme.conf) - -if [[ $current_theme == *tmux-white.conf ]]; then - swww img -o DP-3 ~/pics/wallpapers/HOLY.png - swww img -o HDMI-A-1 ~/pics/wallpapers/okw\ tf.jpg -else - swww img -o DP-3 ~/pics/wallpapers/a\ carnival.jpg - swww img -o HDMI-A-1 ~/pics/wallpapers/the\ true\ old\ god.jpg + 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 +else + FIRST=$1 + SECOND=$2 fi + + +swww init & +sleep 0.3 + +swww img -o HDMI-A-1 $FIRST +swww img -o DP-3 $SECOND