Inverted monitors

Hey there!

I’m trying dkwm and so far it’s awesome!

I have just one question regarding workspaces in multi-monitor. As suggested in the dkrc comments, I’m “embracing the default behaviour and allow access to any workspace from any monitor”, so I left “dkmcd set static” to false. :slight_smile:
The problem though is that for some reason my monitor are inverted, so I have workspaces 1, 3, 5, 7, 9 on second monitor and the other ones on the primary.

Is there away to switch them somehow, so the workspace 1 is on the first monitor?

Have a look at Xrandr.
You can use it to set the primary monitor.

Welcome to the forum.

3 Likes

Welcome to the forums @loyak !

2 Likes

Hey, thanks for the answer!
I already use xrandr and I already set a primary monitor with it, but it seems like my xorg.conf somehow overrides it as this it’s ignored.
I was hoping for a way to do it through dkrc or a script…iirc on bspwm there was a way to swap monitors.

EDIT: actually I managed to set the primary monitor in xorg.conf but the issue remains, so i guess it doesn’t have nothing to do with the primary monitor.

Another way will be to call at the end of the dkrc file:

dkcmd mon $mon1; dkcmd ws 1

(ws 1 is the first workspace on monitor 1) So the focus will be right and it will force to start your session with the workspaces in the right order.
Hey @natemaia do you have that “issue” on multi-heads?

1 Like

I can check it out. I don’t use multi-head in my daily setup but it’s strange behaviour. I suspect it’s due to the way X is reporting the monitor order. Dk doesn’t really do any sorting of the arrangement, whatever monitor is given first will be the head of the list and be assigned workspaces first. With static=false it shouldn’t matter and your above dkcmd would be the best solution for now.

1 Like

Thx, I hope you will find out.
For info:

  1. Part of my dkrc
if [[ -n $(pidof nvidia-persistenced) ]]; then
    MONITOR1="DVI-D-0"
    MONITOR2="HDMI-0"
    MONITOR3="DP-0"
else
    MONITOR1="DVI-D-1"
    MONITOR2="HDMI-1"
    MONITOR3="DP-1"
fi
  1. /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
    Identifier "DVI-D-0"
    Option     "PreferredMode" "1920x1080"
    Option     "Position" "0 0"
EndSection

Section "Monitor"
    Identifier "HDMI-0"
    Option     "PreferredMode" "1920x1080"
    Option     "Position" "1920 0"
EndSection

Section "Monitor"
    Identifier "DP-0"
    Option     "PreferredMode" "1920x1080"
    Option     "Position" "3840 0"
EndSection

Section "Extensions"
    Option      "DPSM" "disable"
EndSection

  1. dkcmd status type=full num=1
# number:name:workspace ...
monitors: 1:DVI-D-0:1 2:DP-0:3 *3:HDMI-0:2
	# number:name active_window x y width height wx wy wwidth wheight
	1:DVI-D-0 0x00000000 0 0 1920 1080 0 0 1920 1080
	2:DP-0 0x01806077 3840 0 1920 1080 3840 0 1920 1080
	3:HDMI-0 0x00000000 1920 0 1920 1080 1920 0 1920 1080
2 Likes

Everything I’m seeing here looks like it’s right, I don’t plan on trying to order monitors in dk differently than X so it’s not an issue on my radar.

I’m pretty sure this should be “DPMS”?
https://wiki.archlinux.org/title/Display_Power_Management_Signaling

1 Like

Thx, I don’t remenber if I whrote it myself but I 've just turn it to “false”.

I think you’ve seen that HDMI should be number 2 but it’s 3…anyways I have my workaround to reorder desktops. Maybe it’s a xrandr thing.

xrandr
Screen 0: minimum 8 x 8, current 5760 x 1080, maximum 32767 x 32767
DVI-D-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93  
DP-0 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  74.97    59.94    50.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x720      59.97  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93

Note that I use also i3 & bspwm and no issue there.

The output you have from xrandr would be what dk uses as well (call into the xcb randr library returning a list of monitors)

I could look into the bsp/i3 source (which I do a fair bit when looking for solutions) but AFAIK they do the same thing as dk. They don’t use dynamic workspaces though which is a big difference.