dk icon indicating copy to clipboard operation
dk copied to clipboard

Floating windows with x=center y=center not centered on secondary monitor

Open BaconIsAVeg opened this issue 11 months ago • 3 comments

I have the following in my dkrc

dkcmd rule class="scratchpad" x=center y=center float=true focus=true stick=true
dkcmd rule class="^(qalculate-gtk|blueman-manager|org.gnome.DejaDup|steam_app_1086940|Galculator|pavucontrol|lxappearance|xfce4-appfinder)$" float=true x=center y=center

And they work fine on the primary monitor, however when launched on the second monitor the windows are mid-y but stuck to the left edge of the screen.

Full config:

{
    dkcmd set numws=10

    dkcmd set ws=_  apply layout=tile master=1 stack=3 gap=15 msplit=0.55 ssplit=0.6
    dkcmd set ws=1  msplit=0.62 ssplit=0.62

    dkcmd set ws=8  layout=rtile msplit=0.4
    dkcmd set ws=9  layout=rtile msplit=0.4
    dkcmd set ws=10 layout=rtile msplit=0.4

    mon1='DisplayPort-0'
    mon2='HDMI-A-0'

    dkcmd set static_ws=true \
        ws=1  name="1" mon=$mon1 \
        ws=2  name="2" mon=$mon1 \
        ws=3  name="3" mon=$mon1 \
        ws=4  name="4" mon=$mon1 \
        ws=5  name="5" mon=$mon1 \
        ws=6  name="6" mon=$mon1 \
        ws=7  name="7" mon=$mon1 \
        ws=8  name="8" mon=$mon2 \
        ws=9  name="9" mon=$mon2 \
        ws=10 name="10" mon=$mon2

    dkcmd set focus_open=true focus_urgent=true focus_mouse=true
    dkcmd set tile_tohead=0 tile_hints=false
    dkcmd set win_minwh=50 win_minxy=10
    dkcmd set smart_gap=false smart_border=true
    dkcmd set mouse mod=super move=button1 resize=button3
    dkcmd set obey_motif=true

    dkcmd set border width=$border_width outer_width=$border_outer_width \
        colour \
        focus='#718062' \
        unfocus='#444444' \
        urgent='#ee5555' \
        outer_focus='#222222' \
        outer_unfocus='#222222' \
        outer_urgent='#222222'

    dkcmd rule class="scratchpad" x=center y=center float=true focus=true stick=true

    dkcmd rule class="^(qalculate-gtk|blueman-manager|org.gnome.DejaDup|steam_app_1086940|Galculator|pavucontrol|lxappearance|xfce4-appfinder)$" float=true x=center y=center

    dkcmd rule apply '*'
}
$ xrandr | grep ' connected'
DisplayPort-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
HDMI-A-0 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 697mm x 392mm

BaconIsAVeg avatar Apr 13 '25 09:04 BaconIsAVeg

Sorry for the late reply I've been off grid for a while.

I'll look into this and see what I can do, don't have a secondary monitor to test and debug but perhaps you'd be willing to help with that. Otherwise I'm sure I can set up something or borrow a monitor from a friend for a bit.

natemaia avatar May 15 '25 17:05 natemaia

No worries, I've been bouncing between dk/leftwm/niri over the past month, and this issue only affects my scratch terminal if I try to open it on the second monitor, so it's very low priority.

I did want to log it in case someone else ran into the same thing however.

BaconIsAVeg avatar May 15 '25 23:05 BaconIsAVeg

Yea DK still has some issues with certain setups and it's good to bring it up, even if I don't get to it immediately it's still there for others looking and for me to have some fixes when the time comes so I really appreciate you opening the issue.

natemaia avatar May 15 '25 23:05 natemaia