Created
April 29, 2021 09:13
-
-
Save erikh/b4244bc899b9caabb0ad1a8cb2a7a4b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!env bash | |
case "$1" in | |
boot) | |
(sleep 1 && bash $0 fix) & | |
;; | |
fix) | |
exec &>/dev/null | |
# transform monitors to form a vertical wall | |
for i in DP-1 DP-2 DP-3 | |
do | |
sway output $i enable | |
sway output $i transform normal | |
sway output $i transform 90 clockwise | |
done | |
# reset workspace positioning | |
sway '[workspace=1] move workspace to output DP-2' | |
sway '[workspace=2] move workspace to output DP-1' | |
sway '[workspace=3] move workspace to output DP-3' | |
sway '[workspace=4] move workspace to output DP-2' | |
sway '[workspace=5] move workspace to output DP-1' | |
sway '[workspace=6] move workspace to output DP-3' | |
sway '[workspace=7] move workspace to output DP-2' | |
sway '[workspace=8] move workspace to output DP-1' | |
sway '[workspace=9] move workspace to output DP-3' | |
sway 'workspace 1' | |
sway 'workspace 3' | |
sway 'workspace 2' | |
;; | |
share) | |
sway output DP-1 enable | |
sway output DP-1 transform normal | |
sway output DP-2 disable | |
sway output DP-3 disable | |
;; | |
focus) | |
sway output DP-2 enable | |
sway output DP-2 transform normal | |
sway output DP-2 transform 90 clockwise | |
sway output DP-1 disable | |
sway output DP-3 disable | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment