From 201c185b6a6063be9fda37363075aa90248836de Mon Sep 17 00:00:00 2001 From: Cristian Miranda Date: Tue, 17 Sep 2024 19:53:58 -0300 Subject: [PATCH] :sparkles: i3: bind workspaces to specific displays --- home/bin/set-display | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/bin/set-display b/home/bin/set-display index 4f319f95..72885183 100755 --- a/home/bin/set-display +++ b/home/bin/set-display @@ -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