diff options
author | mynacol | 2021-05-29 17:24:51 +0200 |
---|---|---|
committer | mynacol | 2021-05-29 17:24:51 +0200 |
commit | 8e520b2abd8c1aaa0f23f6d7c56fac26cf9e4606 (patch) | |
tree | 272e337ea3c7e8231bae6398d287fabbcebeaa32 /dark-theme.sh | |
parent | 94dd7b416b6ba59b9af1005ef11b4cb29a88ea8b (diff) | |
download | aur-8e520b2abd8c1aaa0f23f6d7c56fac26cf9e4606.tar.gz |
Use swaymsg to set background under sway
So we don't have to execute and kill swaybg ourselves
Diffstat (limited to 'dark-theme.sh')
-rwxr-xr-x | dark-theme.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dark-theme.sh b/dark-theme.sh index 0bbba28a1c7c..be4bfcb74629 100755 --- a/dark-theme.sh +++ b/dark-theme.sh @@ -29,14 +29,14 @@ if [ "$1" = "dark" ]; then UI_VSCODE="Default Dark+" UI_ALACRITTY="dark" BG_X11="-B black ${HOME}/.wallpaper/light.png" - BG_SWAY="--color #000000 --image ${HOME}/.wallpaper/light.png" + BG_SWAY="output * background ~/.wallpaper/light.png center #000000" elif [ "$1" = "light" ]; then UI_THEME_GTK="Adwaita" UI_THEME_QT="Adwaita" UI_VSCODE="Default Light+" UI_ALACRITTY="light" BG_X11="-B white ${HOME}/.wallpaper/dark.png" - BG_SWAY="--color #ffffff --image ${HOME}/.wallpaper/dark.png" + BG_SWAY="output * background ~/.wallpaper/dark.png center #FFFFFF" elif [ "$1" = "toggle" ]; then if echo "$CURRENT" | grep -q "dark"; then exec $0 light @@ -89,8 +89,7 @@ fi if [ "$XDG_SESSION_TYPE" = "x11" ]; then feh --no-fehbg --bg-center ${BG_X11} elif [ -n "$SWAYSOCK" ]; then - killall -q swaybg || true - swaybg --mode center $BG_SWAY & + swaymsg "$BG_SWAY" else echo "No supported window manager." echo "Not setting background." |