Skip to content

use uwsm to properly wrap applications as systemd units - #182

Merged
dhh merged 3 commits into
omacom:devfrom
abenz1267:uwsm
Jul 16, 2025
Merged

dhh merged 3 commits into
omacom:devfrom
abenz1267:uwsm

Conversation

@abenz1267

Copy link
Copy Markdown
Contributor

@ryanrhughes

Copy link
Copy Markdown
Collaborator

Should we take care of some of the items (waybar) in default/hypr/autostart.conf as well?

@abenz1267

Copy link
Copy Markdown
Contributor Author

Generally: yes. Autostart-applications should be handled as such + moving all the env to ~/.config/uwsm/env. I just thought small PRs would be better.

@dhh

dhh commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

Hmm, I don't think this is necessary for all user-land apps that are started and closed by the user directly. We won't have this in all the .desktop files either.

But I'm open to doing this for the long running processes we have in exec-ones, like waybar.

@dhh dhh closed this Jul 16, 2025
@abenz1267

Copy link
Copy Markdown
Contributor Author

It shouldn't be added to the desktop files. It's something that gets handled by the launcher and whatever else actually opens the desktop files.

This is needed, f.e. otherwise your browser tabs won't be preserved when shutting down etc.

There's no real downside to this. Systemd can't manage system resources, if you start all applications under the hyprland process. It's discouraged on the hyprland wiki for a reason.

@dhh

dhh commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

So when wofi launches an app via .desktop, this is already applied? It's only not when hyprland does the opening of the app?

@abenz1267

abenz1267 commented Jul 16, 2025 •

Copy link
Copy Markdown
Contributor Author

That's what the wofi keybind change is for, yeah. Usually every other launcher has an appropriate setting, but wofi is ... basically unmaintained, hence the wild exec for the keybind (copied from the uwsm readme).

@dhh dhh reopened this Jul 16, 2025
@dhh

dhh commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

We need to change all the exec-once instances too, no?

@abenz1267

Copy link
Copy Markdown
Contributor Author

We need to change all the exec-once instances too, no?

Generally: yes. exec-once is a crutch for what normally would be xdg autostart applications in other DE's. UWSM handles xdg-autostart applications.

But as i wrote above: i thought a smaller PR is better.

@dhh

dhh commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

Wapping the exec-once autostarts in uwm app won't get us the same effect? Would prefer to try this as a whole switchover, run it for a bit, see if there's anything that's not right.

@abenz1267

Copy link
Copy Markdown
Contributor Author

Wapping the exec-once autostarts in uwm app won't get us the same effect? Would prefer to try this as a whole switchover, run it for a bit, see if there's anything that's not right.

Kiiinda... as in: xdg-autostart applications also get started in specific order etc.. It's a whole spec.

Generally it's a more portable approach anyways, since you just define the autostart files in ~/.config/autostart as every other DE would normally do it. Now if you dont wanna use hyprland for whatever insane reason... no problem. All good.

@dhh

dhh commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

Hmm, don't want to go that far. I like how Hyprland has it set up with exec-once. But if we can wrap that, happy to give it a try.

@abenz1267
abenz1267 force-pushed the uwsm branch 2 times, most recently from 5c901c0 to a54e163 Compare July 16, 2025 20:57
@abenz1267

Copy link
Copy Markdown
Contributor Author

Done. I've only wrapped the GUI exec-once though.

@dhh
dhh merged commit 65933ad into omacom:dev Jul 16, 2025
@dhh

dhh commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

The wofi starter isn't working right. It doesn't start Alacritty stuff like Activity and it throws an error message if you escape out of it without selecting.

@abenz1267
abenz1267 deleted the uwsm branch July 17, 2025 05:57
@abenz1267

Copy link
Copy Markdown
Contributor Author

ah damn. although there's this PR now #202 which i hope gets merged.

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

Successfully merging this pull request may close these issues.

3 participants