Created
April 28, 2021 22:01
-
-
Save erikh/cf01b7f07486c8db570536e07a913104 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 5 && 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