lcpz / lain

Awesome WM complements
GNU General Public License v2.0
1.06k stars 210 forks source link

Quake clients windows not shown on rofi #553

Closed lpanebr closed 1 year ago

lpanebr commented 1 year ago

rofi has a window switcher run with rofi -show window.

I noticed that windows spawned with the quake util are not show with the rofi command.

Below are the xprop of both.

Any ideas of how to get quake clients to show?

Thanks!

Quake client:

WM_HINTS(WM_HINTS):
_NET_WM_DESKTOP(CARDINAL) = 9
  _NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_ABOVE
awful.client.property.floating(CARDINAL) = 0
_NET_FRAME_EXTENTS(CARDINAL) = 2, 2, 2, 2
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
awful.client.property.single_instance_id(UTF8_STRING) = 
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING
_NET_WM_ICON(CARDINAL) =    Icon (64 x 64):
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified size: 800 by 600
        program specified resize increment: 8 by 15
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
WM_CLIENT_MACHINE(STRING) = "cortex"
_NET_WM_PID(CARDINAL) = 1815274
WM_CLASS(STRING) = "QuickShell", "QuickShell"
XdndAware(ATOM) = BITMAP
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
_NET_WM_NAME(UTF8_STRING) = "QuickShell"
WM_NAME(STRING) = "QuickShell"

Regular client:

WM_HINTS(WM_HINTS):
_NET_WM_DESKTOP(CARDINAL) = 9
_NET_FRAME_EXTENTS(CARDINAL) = 3, 3, 3, 3
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
awful.client.property.single_instance_id(UTF8_STRING) = 
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING
_NET_WM_ICON(CARDINAL) =    Icon (64 x 64):
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified size: 800 by 600
        program specified resize increment: 7 by 14
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
WM_CLIENT_MACHINE(STRING) = "cortex"
_NET_WM_PID(CARDINAL) = 3031294
WM_CLASS(STRING) = "x-terminal-emulator", "x-terminal-emulator"
XdndAware(ATOM) = BITMAP
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
_NET_WM_NAME(UTF8_STRING) = "Alacritty"
WM_NAME(STRING) = "Alacritty"

output of awesome -v and lua -v

awesome v4.3 (Too long)
 • Compiled against Lua 5.3.3 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.6
 • LGI version: 0.9.2
lpanebr commented 1 year ago

My problem was that rofi only shows windows that appear on the taskbar what by default does not happen with quake windows. (see the _NET_WM_STATE_SKIP_TASKBAR in xprop output).

I've read the documentation and code again and found that the settings attribute let's me do this:

local qQuickShell = lain.util.quake({
    app = "wezterm",
    name = "QuickShell",
    argname = "",
    extra = "start --class 'QuickShell'",
    followtag = true,
    width = 0.5,
    height = 1,
    border = 2,
    settings = function(c)
        c.skip_taskbar = false
    end,
})