Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --replace option to replace existing compositor. #987

Open
Asmageddon opened this issue Dec 31, 2022 · 8 comments
Open

Add a --replace option to replace existing compositor. #987

Asmageddon opened this issue Dec 31, 2022 · 8 comments

Comments

@Asmageddon
Copy link

Many other compositors support this option - it's invaluable for experimenting with replacing your DE's current compositor without having to modify unusual config files and re-login.

@FT-Labs
Copy link

FT-Labs commented Dec 31, 2022

Totally unnecessary. Kill picom and start again, not that hard. Just bind it to a key.

@Asmageddon
Copy link
Author

Some DEs restart their compositor automatically, e.g. xfce4 and xfwm, making it impossible to start picom without modifying configuration that you usually have no good reason to touch.

@Monsterovich
Copy link
Contributor

Totally unnecessary. Kill picom and start again, not that hard. Just bind it to a key.

Why not? It may appear useless, but I'd like to see it too.

@FT-Labs
Copy link

FT-Labs commented Jan 1, 2023

alias pic="pidof -s picom && killall -9 picom || picom &; disown"

Use this to toggle it

@Asmageddon
Copy link
Author

Again, what about replacing a compositor that the DE automatically respawns? You can't just kill it and spawn a picom process. You need --replace for that

@clapbr
Copy link

clapbr commented Jan 8, 2023

Hmm, maybe it would allow new usecases like picom on Gnome with mutter as WM only.

@absolutelynothelix
Copy link
Collaborator

absolutelynothelix commented Jan 9, 2023

Some DEs restart their compositor automatically, e.g. xfce4 and xfwm, making it impossible to start picom without modifying configuration that you usually have no good reason to touch.

in xfce toggling the compositor is just toggling it's checkbox:
image

Again, what about replacing a compositor that the DE automatically respawns? You can't just kill it and spawn a picom process. You need --replace for that

in theory, a good compositor won’t start if there is another one running, so you can kill a compositor and immediately start picom, it should do the trick

btw, i’d like to hear what are those «many other compositors» that support this option

@tryone144
Copy link
Collaborator

btw, i’d like to hear what are those «many other compositors» that support this option

It appears compiz has/had support for --replace.

Ideally something like this works by forcefully acquiring the _NET_WM_CM_Sn selection. Any compositor that follows the spec should free its resources and stop once it looses this selection. picom follows the spec since chjj/compton#320 has been merged.

Hmm, maybe it would allow new usecases like picom on Gnome with mutter as WM only.

This is really dependent on whether these WMs/compositors follow the spec the way you interpret them. I am not sure if mutter is able to let go of just the _NET_WM_CM_Sn selection without also stopping the window managing part... This needs more research.
E.g. it appears that compiz stops completely (WM and compositing) when it looses any selection. Haven't tested it but this is what the code implies.

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

No branches or pull requests

6 participants