kitty icon indicating copy to clipboard operation
kitty copied to clipboard

Add --background option to run kitty on the Wayland desktop

Open quantum5 opened this issue 4 years ago • 2 comments

This PR adds the --background argument to kitty. When specified, the kitty window runs behind all other windows, effectively making it the desktop background. This uses the zwlr_layer_shell_v1 Wayland protocol.

This is useful for using CLI applications as the desktop wallpaper. For example, kitty --background htop can be used to show htop as the desktop background.

It can be used to create interesting effects, like running cava on the desktop to visualize music in the background:

cava

quantum5 avatar Apr 25 '20 21:04 quantum5

It's a cool idea, I really like it, however, I dont want to add unstable Wayland protocols to kitty. If and when this protocol makes it to wayland-protocols so that kitty does not need to carry around definitions of the protocol in its source code, I will be happy to merge.

kovidgoyal avatar Apr 26 '20 04:04 kovidgoyal

It's a cool idea, I really like it, however, I dont want to add unstable Wayland protocols to kitty. If and when this protocol makes it to wayland-protocols so that kitty does not need to carry around definitions of the protocol in its source code, I will be happy to merge.

I respect your choice, but I'm interested in this feature. have a nice day.

ghost avatar Apr 08 '21 15:04 ghost

Please finish this thing, we are waiting.

Dark-Kernel avatar Jul 10 '23 11:07 Dark-Kernel

Go ask the maintainers of wayland-protocols to merge the protocol then. I was very clear as to what conditions were required for this PR to land.

kovidgoyal avatar Jul 10 '23 12:07 kovidgoyal

This is now implemented in master. Tested with sway, Hyprland and kwin. Run

kitty +kitten panel --edge=background htop

to have kitty render the background. Remember to disable any bg in your sway config otherwise it hides the panel background.

kovidgoyal avatar Mar 25 '24 08:03 kovidgoyal

Can panel be brought to macOS? I'd like htop or btop running on my desktop.

jpmhouston avatar Apr 12 '24 11:04 jpmhouston

No, macOS doesnt support this kind of thing as far as I know.

kovidgoyal avatar Apr 12 '24 11:04 kovidgoyal

https://stackoverflow.com/a/4982619/592739

To display above the desktop but below the desktop icons, you need to do two things:

  1. Call [window setLevel:kCGDesktopWindowLevel] to float below other application windows.
  2. Call [window orderBack:self] to layer behind the window that draws the desktop icons.

Something during app launching brings the application to the front, so you should call orderBack: in your application delegate’s applicationDidFinishLaunching: method.

jpmhouston avatar Apr 13 '24 22:04 jpmhouston

On Sat, Apr 13, 2024 at 03:29:57PM -0700, Pierre Houston wrote:

https://stackoverflow.com/a/4982619/592739

That's not the same thing, for example the window can still grab keyboard focus. It will participate in alt-tab window switching, etc.

kovidgoyal avatar Apr 14 '24 01:04 kovidgoyal