Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Option to have it as a desktop 'widget' #40

Open
Freeplayg opened this issue Feb 3, 2023 · 3 comments
Open

Option to have it as a desktop 'widget' #40

Freeplayg opened this issue Feb 3, 2023 · 3 comments

Comments

@Freeplayg
Copy link

It would be amazing if there was a way to have this show only on the desktop w/ it running on startup, especially if there are going to be more customization options / waves in the future

@fsobolev
Copy link
Owner

fsobolev commented Feb 4, 2023

I wanted to implement this feature when developing the first version of the app. The problem is that there's no universal way to do this. There's one way for X11, but for Wayland it would depend on a compositor and some compositors doesn't support this functionality at all (GNOME, for example). And I don't think it's good idea to force the app to always run in X11 and bundle additional tools in flatpak to set required window hints and window position, because GTK4 doesn't have functions for this AFAIK.
So for example in GNOME Wayland to achieve this the following steps can be made:

  1. Force the app to run in X11 by settings environment variable GDK_BACKEND=x11, enabling --socket=x11 and disabling --socket=fallback-x11 (it's easy to do using Flatseal)
  2. Create a script to run Cavalier and then execute a command to set window hints and position (wmctrl can be used for this)
  3. Optionally, make background completely transparent and disable shadow (Disable window shadow #27)
  4. Add this script to autostart

And for autostart, since there's no universal way to make Cavalier a desktop widget, I don't think having this option in the UI makes sense. Also again, no universal way to do this, because some window managers doesn't autostart programs from ~/.config/autostart/ (Openbox, for example).

@Freeplayg
Copy link
Author

Oh I see, I wonder how https://github.com/jeffshee/hidamari does it then (since that seems to work fine for me on Wayland)

@fsobolev
Copy link
Owner

fsobolev commented Feb 4, 2023

I wonder how https://github.com/jeffshee/hidamari does it then (since that seems to work fine for me on Wayland)

It's forced to run in X11.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants