From 55f866412270f117a4c6f17b4ef3b1463642f975 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Tue, 27 Sep 2022 18:35:04 +0300 Subject: [PATCH] sway: use `swww` for wallpapers its awesome --- bin/wall.sh | 18 ++++++++++++++++++ config/.config/sway/config | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 bin/wall.sh diff --git a/bin/wall.sh b/bin/wall.sh new file mode 100755 index 0000000..a5de9c1 --- /dev/null +++ b/bin/wall.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +__set_image() { + swww img "$1" --transition-fps 60 +} + +if [[ "$1" == "--restore" ]]; then + image=$(cat ~/.config/.wallpaper) + __set_image "$image" + exit +fi + +image="$1" + +__set_image "$image" + +full_path="$PWD/$image" +echo "$full_path" >~/.config/.wallpaper diff --git a/config/.config/sway/config b/config/.config/sway/config index 0a6ee01..a454036 100644 --- a/config/.config/sway/config +++ b/config/.config/sway/config @@ -135,10 +135,11 @@ assign [class="Slack"] workspace $ws4 # /_/ \_\___/ |_| \___/|____/ |_/_/ \_\_| \_\|_| # exec --no-startup-id swaync +exec --no-startup-id swww init +exec_always --no-startup-id $HOME/dotfiles/bin/wall.sh --restore exec_always --no-startup-id swaync-client -R exec_always --no-startup-id xrdb -load $HOME/.Xresources exec_always --no-startup-id $HOME/.config/waybar/launch.sh -exec_always --no-startup-id $HOME/go/bin/walle --restore exec_always --no-startup-id $HOME/dotfiles/bin/swayidle.sh exec_always --no-startup-id libinput-gestures-setup restart exec_always --no-startup-id $HOME/dotfiles/bin/initial-mic-state.sh