2 set -e; .
/usr
/local
/lib
/err
; set +e
4 if xrandr |
grep -q '^HDMI2 disconnected' &>/dev
/null
; then
7 xrandr
--output HDMI2
--right-of eDP1
--mode 3840x2160
9 for i
in 1 2 4 5 6 7 8 9 10; do
10 # if the workspace is already there, this will fail
11 i3-msg
'[workspace="'$i'"]' move workspace to output HDMI2 ||
: