picom
picom copied to clipboard
Add a --replace option to replace existing compositor.
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.
Totally unnecessary. Kill picom and start again, not that hard. Just bind it to a key.
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.
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.
alias pic="pidof -s picom && killall -9 picom || picom &; disown"
Use this to toggle it
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
Hmm, maybe it would allow new usecases like picom on Gnome with mutter as WM only.
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:
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
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 https://github.com/chjj/compton/pull/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.