From 9ddcf71ef6325e7e20360ff9d2a71523df840f9a Mon Sep 17 00:00:00 2001 From: Joursoir Date: Fri, 10 May 2024 12:10:14 +0300 Subject: dotconfig/i3: support multi-monitor environment --- dotconfig/i3/config | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'dotconfig/i3') diff --git a/dotconfig/i3/config b/dotconfig/i3/config index 3622841..b14aee2 100644 --- a/dotconfig/i3/config +++ b/dotconfig/i3/config @@ -2,6 +2,10 @@ # # Please see https://i3wm.org/docs/userguide.html for a complete reference! +# Run `xrandr --listmonitors` to get a list of monitors +set $monitor1 eDP +set $monitor2 HDMI-A-0 + # Use 'Windows' key as modifier set $mod Mod4 @@ -104,6 +108,19 @@ set $ws8 "8" set $ws9 "9" set $ws10 "10" +# Odd-even approach: Odd workspaces onto first monitor and even on the other. +# If a second monitor isn't connected, then they will go on the first monitor. +workspace $ws1 output $monitor1 +workspace $ws2 output $monitor2 $monitor1 +workspace $ws3 output $monitor1 +workspace $ws4 output $monitor2 $monitor1 +workspace $ws5 output $monitor1 +workspace $ws6 output $monitor2 $monitor1 +workspace $ws7 output $monitor1 +workspace $ws8 output $monitor2 $monitor1 +workspace $ws9 output $monitor1 +workspace $ws10 output $monitor2 $monitor1 + # switch to workspace bindsym $mod+1 workspace number $ws1 bindsym $mod+2 workspace number $ws2 -- cgit v1.2.3-18-g5258