UWSM Rant
I've been recently playing with UWSM and I'd like to share my experience using it, both to help newcomers and get feedback.
So, why do you even need UWSM? In simple terms, it wraps everything you launch into set of systemd units, ensuring clean startup and clean exit (along with many other things). The setup is straightforward and described here: https://wiki.hyprland.org/Useful-Utilities/Systemd-start/.
The fun part begins with
Prefix application startup commands with
uwsm app --
because it really depends on what you are launching.
- If it is a straightforward application,
firefox
for example, just do that. - If it is some sort of command (
systemctl start ...
,brigtnessctl ...
etc), there is no need to wrap it. - Now, scripts. Something like
#! /bin/bash
firefox
- If you wrap the script itself, it will be managed by
uwsm
, while the application you intended will be all by itself. So you will need to be careful about what exactly you are wrapping (you can still leave the script managed though, it's nothing bad. - App launchers. They launch apps. Apps need to be wrapped. How to do this depends entirely on what you are using and is described here: https://github.com/Vladimir-csp/uwsm. It also seems you do not need to wrap launcher itself, but I am not sure.
If everything works and you do not see any errors, it means nothing. To truly see if everything is managed as it should be, use this script https://github.com/Vladimir-csp/uwsm/blob/master/scripts/uuctl.sh. It allows to see which processes are being managed by uwsm
.
That's it, hope it helped.