aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/updisplay
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-02-08 17:18:39 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-02-08 17:18:39 +0300
commit5617b764bf63346711337ea9eaaa3c5335bcf6dd (patch)
tree16d0db9189aa5d0f0020ba44435200cff3914a31 /dotfiles/.local/bin/updisplay
parent2a190c8508e5543be22a0aeb86fc39ef26ba2e9d (diff)
downloadswayrice-5617b764bf63346711337ea9eaaa3c5335bcf6dd.tar.gz
swayrice-5617b764bf63346711337ea9eaaa3c5335bcf6dd.zip
Script to update display config
Without having to reload all of Sway's config.
Diffstat (limited to 'dotfiles/.local/bin/updisplay')
-rwxr-xr-xdotfiles/.local/bin/updisplay8
1 files changed, 8 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/updisplay b/dotfiles/.local/bin/updisplay
new file mode 100755
index 0000000..e9a7f69
--- /dev/null
+++ b/dotfiles/.local/bin/updisplay
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+IFS=$'\n'
+outputcf=$(grep '^output .*$' ~/.config/sway/$(uname -n))
+
+for line in $outputcf; do
+ swaymsg $line
+done