diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2023-10-06 13:03:50 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2023-10-06 13:03:50 +0200 |
| commit | 872615941ef71eefc86c3e637959a2ede7f33c20 (patch) | |
| tree | 9fb507ca0d45ba976163f97b35e7a4f3b3c7a0de /kanshi/home_tv.sh | |
| parent | 9b7d09d161e3000c8c440059040348466b16811c (diff) | |
.
Diffstat (limited to 'kanshi/home_tv.sh')
| -rwxr-xr-x | kanshi/home_tv.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/kanshi/home_tv.sh b/kanshi/home_tv.sh new file mode 100755 index 0000000..5cb1392 --- /dev/null +++ b/kanshi/home_tv.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +display1=eDP-1 +display3=$(swaymsg -t get_outputs -r | + jq -r '.[] | select(.model == "LG TV") | .name') +display2=$(swaymsg -t get_outputs -r | + jq -r ".[] | .name | select(. != \"$display1\" and . != \"$display3\")") + +swaymsg -q reload + +swaymsg -q output $display1 pos 0 0 \ + res 1920x1080 \ + bg ~/.pictures/bg1.jpg stretch +swaymsg -q output $display2 pos 1920 0 \ + bg ~/.pictures/bg2.jpg stretch + +display2_width=$(swaymsg -t get_outputs -r | + jq -r ".[] | select(.name == \"$display2\") | .current_mode.width") + +swaymsg -q output $display3 pos $((1920 + $display2_width)) 0 \ + bg ~/.pictures/bg1.jpg stretch + +for workspace in 1:1 3:3 4:4; do + swaymsg -q workspace $workspace output $display1 +done + +for workspace in 5:a 6:s 7:d 8:f; do + swaymsg -q workspace $workspace output $display2 +done + +for workspace in 2:2; do + swaymsg -q workspace $workspace output $display3 +done |
