From 2a3dda49dfd0faae1cbe9dbea14bf0d40623bd6a Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Wed, 3 May 2023 23:18:40 +0200 Subject: . --- kanshi/config | 18 ++++++++++++++++++ kanshi/dual.sh | 22 ++++++++++++++++++++++ kanshi/single.sh | 13 +++++++++++++ kanshi/work.sh | 27 +++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 kanshi/config create mode 100755 kanshi/dual.sh create mode 100755 kanshi/single.sh create mode 100755 kanshi/work.sh (limited to 'kanshi') diff --git a/kanshi/config b/kanshi/config new file mode 100644 index 0000000..af9b675 --- /dev/null +++ b/kanshi/config @@ -0,0 +1,18 @@ + +profile single { + output eDP-1 + exec ~/.config/kanshi/single.sh +} + +profile dual { + output eDP-1 + output DP-6 + exec ~/.config/kanshi/dual.sh +} + +profile work { + output eDP-1 + output 'Dell Inc. DELL U2722DE HFMKDH3' # DP-5 + output 'Dell Inc. DELL U2722D 3ZS8XN3' # DP-6 + exec ~/.config/kanshi/work.sh +} diff --git a/kanshi/dual.sh b/kanshi/dual.sh new file mode 100755 index 0000000..c54143e --- /dev/null +++ b/kanshi/dual.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +display1=eDP-1 +display2=$(swaymsg -t get_outputs -r | + jq "map(select(.name != \"$display1\") | .name)[0]" 2> /dev/null | + tr -d "\"") + +swaymsg reload + +swaymsg output $display1 pos 0 0 \ + res 1920x1080 \ + bg ~/.pictures/bg1.jpg stretch +swaymsg output $display2 pos 1920 0 \ + bg ~/.pictures/bg2.jpg stretch + +for workspace in 1:1 2:2 3:3 4:4; do + swaymsg workspace $workspace output $display1 +done + +for workspace in 5:a 6:s 7:d 8:f; do + swaymsg workspace $workspace output $display2 +done diff --git a/kanshi/single.sh b/kanshi/single.sh new file mode 100755 index 0000000..238c995 --- /dev/null +++ b/kanshi/single.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +display=eDP-1 + +swaymsg reload + +swaymsg output $display pos 0 0 \ + res 1920x1080 \ + bg ~/.pictures/bg1.jpg stretch + +for workspace in 1:1 2:2 3:3 4:4 5:a 6:s 7:d 8:f; do + swaymsg workspace $workspace output $display +done diff --git a/kanshi/work.sh b/kanshi/work.sh new file mode 100755 index 0000000..083cecb --- /dev/null +++ b/kanshi/work.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +display1=eDP-1 +display2=DP-5 +display3=DP-6 + +swaymsg reload + +swaymsg output $display1 pos 0 1440 \ + res 1920x1080 \ + bg ~/.pictures/bg1.jpg stretch +swaymsg output $display2 pos 0 0 \ + res 2560x1440 \ + bg ~/.pictures/bg1.jpg stretch +swaymsg output $display3 pos 2560 0 \ + res 2560x1440 \ + bg ~/.pictures/bg2.jpg stretch + +swaymsg workspace 1:1 output $display1 + +for workspace in 2:2 3:3 4:4; do + swaymsg workspace $workspace output $display2 +done + +for workspace in 5:a 6:s 7:d 8:f; do + swaymsg workspace $workspace output $display3 +done -- cgit v1.2.3-70-g09d2