tofi icon indicating copy to clipboard operation
tofi copied to clipboard

Cannot find the tofi window

Open LordTlasT opened this issue 1 year ago • 3 comments

I am using hyprland, when running hyprctl clients I cannot find the window.

Also when changing focus to another window I cannot focus back to it with the keyboard. I need to click on it with the mouse.

If someone could resolve this, I'd appreciate it a lot. I really like tofi :)

LordTlasT avatar Apr 06 '23 20:04 LordTlasT

Glad you like it! I think this is linked to #90 - it's pretty much by design.

Tofi isn't a normal window, it uses the layer-shell protocol. This means it doesn't interact with other windows in the normal way, and is more like part of the desktop - it's required for doing things like positioning itself on the screen.

It is possible to see the window in Hyprland, but not with hyprctl clients - it's under hyprctl layers, which should give you something like:

Monitor eDP-1:
	Layer level 0 (background):
	Layer level 1 (bottom):
	Layer level 2 (top):
	Layer level 3 (overlay):
		Layer 34d7f7e0: xywh: 0 0 2880 1800, namespace: launcher

(though I'm not sure what you can do with that information, I'm not particularly familiar with Hyprland). What are you trying to do by finding the window?

For focus, you shouldn't be able to move keyboard focus away from tofi in the first place, as it asks for exclusive focus :sweat_smile: How are you managing to do that / what version of Hyprland are you on?

philj56 avatar Apr 07 '23 14:04 philj56

Oh my! Thanks for pointing all this out to me, is there anyway to make a donation? It's possible to define layerrules in hyprland :) This is exactly what I wanted.


For switching focus I simply press the keybinds for movefocus I am on version 0.23.0beta-2 of hyprland-nvidia, (from the aur)

I am using tofi version 0.8.1-1 my tofi config: https://git.craftmenners.men/dotfiles/tree/config/hyprland/tofi/config You'll find my hyprland config there as well if needed.

LordTlasT avatar Apr 07 '23 15:04 LordTlasT

Oh my! Thanks for pointing all this out to me, is there anyway to make a donation?

No problem, I'm happy to help! I'm flattered that you'd ask, but no I haven't got anything like that set up. I've got a full-time job that pays pretty well, so there's no need for donations, but thanks for asking!

For switching focus I simply press the keybinds for movefocus

:facepalm: I'm amazed I didn't try that! For me, that does move focus, but it goes back to tofi as soon as I move the mouse (no clicking required). In either case, I think that's a Hyprland issue - the only thing tofi does is request exclusive keyboard focus, and the rest is up to the compositor.

In Sway, for example, pressing the keybinds to select a different window does nothing when tofi is open. I guess Hyprland should either do the same, or provide a bindable way to select a layer surface.

It's possible to define layerrules in hyprland :)

Ah neat! Useful to know that someone's actually using the namespace: launcher bit. Just a warning that at some point in the future that'll go away when layer-shell becomes a stable protocol: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/28#note_1328417 (though probably not for quite a long time, given the current rate of progress).

philj56 avatar Apr 09 '23 09:04 philj56