I recently switched from bspwm to hyprland on NixOS on my Thinkpad X230.
I usually use the laptop alone or connected to a docking station with the laptop display off and two external monitors on.
However, I have not been able to use kanshi to automatically switch between these two modes.
This is my kanshi configuration:
profile laptop {
output LVDS-1 enable scale 1
}
profile external_monitors {
output LVDS-1 disable
output DP-2 enable mode 1920x1200@59.950001Hz scale 1 position 1200,385
output HDMI-A-3 enable mode 1920x1200@59.950001Hz scale 1 position 0,0 transform 90
}
This is what I get when I try to run kanshi when my laptop is inserted in the docking station:
garret@nixos ~> kanshi .config/kanshi/config
applying profile 'external_monitors'
applying profile output 'LVDS-1' on connected head 'LVDS-1'
applying profile output 'HDMI-A-3' on connected head 'HDMI-A-3'
applying profile output 'DP-2' on connected head 'DP-2'
failed to apply configuration for profile 'external_monitors'
It seems kanshi recognizes it has to apply the 'external_monitors'
profile but for some reason it fails to do it.
I can see that in reality my laptop monitor and only one of my external monitor are on (while that is not the intended configuration as you can see from the kanshi config above).
This is my monitors section in the hyprland.conf
. I have been wondering if that could be the reason of this issue:
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=DP-2,1920x1200@59.950001,1200x385,1.0
monitor=HDMI-A-3,1920x1200@59.950001,0x0,1.0,transform,1
# monitor=LVDS-1,disable
The only way I can get the 'external_monitors'
profile "to work" is to uncomment the last line in the hyprland.conf
above. However, that has the disadvantage that if I start the laptop without being connected to the docking station, then my laptop display is disabled (exactly the reason why I would like to use kanshi and why this software was created I guess...).
I don't know if it can help to debug the issue but this the hyprctl monitors
command:
garret@nixos ~> hyprctl monitors
Monitor LVDS-1 (ID 0):
1366x768@60.019001 at 3120x0
description: LG Display 0x02D8 (LVDS-1)
make: LG Display
model: 0x02D8
serial:
active workspace: 1 (1)
special workspace: 0 ()
reserved: 0 50 0 0
scale: 1.00
transform: 0
focused: no
dpmsStatus: 1
vrr: 0
Monitor HDMI-A-3 (ID 1):
1920x1200@59.950001 at 0x0
description: Dell Inc. DELL U2412M 0FFXD3CG5HES (HDMI-A-3)
make: Dell Inc.
model: DELL U2412M
serial: 0FFXD3CG5HES
active workspace: 2 (2)
special workspace: 0 ()
reserved: 0 0 0 0
scale: 1.00
transform: 0
focused: no
dpmsStatus: 1
vrr: 0
Monitor DP-2 (ID 2):
1920x1200@59.950001 at 1200x385
description: Dell Inc. DELL U2412M 0FFXD414437L (DP-2)
make: Dell Inc.
model: DELL U2412M
serial: 0FFXD414437L
active workspace: 3 (3)
special workspace: 0 ()
reserved: 0 50 0 0
scale: 1.00
transform: 0
focused: yes
dpmsStatus: 1
vrr: 0
I am not sure but I believe this issue could be related to https://todo.sr.ht/~emersion/kanshi/84 ?
It's a bit quiet in here.