aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-08-18 14:45:57 +0300
committerYaroslav <contact@yaroslavps.com>2020-08-18 14:45:57 +0300
commitb3318da576333bd5caf32506b6706638e40ca458 (patch)
tree2735e5eb903c6b4da3c9d4b78def7df26ccebe55 /dotfiles/.local
parent7866c246f312d78c9838179aaa21dbc645802f63 (diff)
downloadswayrice-b3318da576333bd5caf32506b6706638e40ca458.tar.gz
swayrice-b3318da576333bd5caf32506b6706638e40ca458.zip
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
Diffstat (limited to 'dotfiles/.local')
-rwxr-xr-xdotfiles/.local/bin/setbg13
1 files changed, 11 insertions, 2 deletions
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