Skip to content

Commit

Permalink
✨ i3: bind workspaces to specific displays
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianmiranda committed Sep 17, 2024
1 parent e635ade commit 201c185
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions home/bin/set-display
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ xsetroot -xcf /usr/share/icons/breeze_cursors/cursors/left_ptr $CURSOR_SIZE
xrandr --output HDMI-A-0 --set "Colorspace" "Default"
xrandr --output HDMI-A-0 --set "content type" "No Data"

if [[ "$XRANDR_DISPLAY_PROFILE" == "$PROFILE_DUAL" || "$XRANDR_DISPLAY_PROFILE" == "$PROFILE_DUAL_INVERTED" ]]; then
for i in 1 2 3 4 10; do
i3-msg "workspace $i, move workspace to output HDMI-A-0"
done

for i in 5 6 7 8 9; do
i3-msg "workspace $i, move workspace to output DisplayPort-0"
done
fi

# Restart the window manager
$HOME/bin/wm -r

0 comments on commit 201c185

Please sign in to comment.