From b3318da576333bd5caf32506b6706638e40ca458 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Tue, 18 Aug 2020 14:45:57 +0300 Subject: Easier to set different wallpapers on my desktop * Change setbg script so that it can copy and set wallpapers to different monitors depending on my sway config * Add key shortcut to sxiv to set second monitor's wallaper * Make the wallpaper of the second output different in sway config --- dotfiles/.local/bin/setbg | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'dotfiles/.local') diff --git a/dotfiles/.local/bin/setbg b/dotfiles/.local/bin/setbg index 351ac3d..eb319d0 100755 --- a/dotfiles/.local/bin/setbg +++ b/dotfiles/.local/bin/setbg @@ -1,4 +1,13 @@ #!/bin/sh -cp $1 ~/.config/wall1.png -swaymsg output "*" background ~/.config/wall1.png fill +mon="1" +[ -n "$2" ] && mon="$2" + +cp $1 "$HOME/.config/wall$mon.png" + +IFS=$'\n' +outputcf=$(grep '^output .* background.*$' ~/.config/sway/config) + +for line in $outputcf; do + swaymsg $line +done -- cgit v1.2.3