Skip to content

Instantly share code, notes, and snippets.

@erikh
Created April 25, 2021 20:57
Show Gist options
  • Save erikh/b598ebba78afcaad10d42e66dceefd15 to your computer and use it in GitHub Desktop.
Save erikh/b598ebba78afcaad10d42e66dceefd15 to your computer and use it in GitHub Desktop.
#!env bash
case "$1" in
boot)
(sleep 5 && bash $0 fix) &
;;
fix)
xrandr --dpi 192 \
--output DisplayPort-2 --dpi 192 --primary --auto --rotate right --left-of DisplayPort-0 \
--output DisplayPort-1 --dpi 192 --auto --left-of DisplayPort-2 --rotate right \
--output DisplayPort-0 --auto --rotate left --dpi 192
# reset workspace positioning
exec &>/dev/null
i3-msg '[workspace=1] move workspace to output DisplayPort-1'
i3-msg '[workspace=2] move workspace to output DisplayPort-2'
i3-msg '[workspace=3] move workspace to output DisplayPort-0'
i3-msg '[workspace=4] move workspace to output DisplayPort-1'
i3-msg '[workspace=5] move workspace to output DisplayPort-2'
i3-msg '[workspace=6] move workspace to output DisplayPort-0'
i3-msg '[workspace=7] move workspace to output DisplayPort-1'
i3-msg '[workspace=8] move workspace to output DisplayPort-2'
i3-msg '[workspace=9] move workspace to output DisplayPort-0'
i3-msg 'workspace 1'
i3-msg 'workspace 3'
i3-msg 'workspace 2'
;;
share)
xrandr \
--output DisplayPort-2 --off \
--output DisplayPort-1 --off \
--output DisplayPort-0 --dpi 192 --primary --auto --rotate normal
;;
focus)
xrandr \
--output DisplayPort-1 --off \
--output DisplayPort-0 --off \
--output DisplayPort-2 --dpi 192 --primary --auto --rotate right
;;
esac
picom -b
wal --theme zenburn -q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment