-
Notifications
You must be signed in to change notification settings - Fork 13
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
Improve detection of launched applications #2
Comments
What are you thoughts on using systemd-run for launching applications and Downside is that this requires the launcher / context be aware of that app_id. (AFAICT the "ApplicationID" should roughly map to the desktop file name). |
I stopped looking into that direction when I found that none of the launchers I'm aware of can provide It is possible to take a command name instead of app_id, and here's a script that I use to start CLI apps this way. I just don't want to resort to that for GUI apps. BTW, if you have a .desktop file name and your glib2 package is built with https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1596 (I know that at least Fedora applies that patch), |
I stopped looking into that direction when I found that none of the launchers I'm aware of can provide `app_id`. I.e. if you take `rofi -show drun`, `wofi`, `fuzzel`, `nwg-`anything, etc, you won't be able to pass the selected .desktop file name to an arbitrary wrapper command.
Yeah, I know. I've opened an issue for fuzzel and the maintainer is not
opposed to it (in the form of an environment variable), I just need to
write the patch. (I'll do. Eventually)
It's not exactly a standard yet, so maintainers are not necessarily
going to be okay with that.
It is possible to take a command name instead of app_id, and here's [a script](https://github.com/alebastr/dotfiles/blob/master/scripts/scoped) that I use to start CLI apps this way. I just don't want to resort to that for GUI apps.
Why do you treat those differently if I may ask ?
…--
Max Gautier
|
So I implemented this in fuzzel : https://codeberg.org/dnkl/fuzzel/pulls/145 systemd-run-desktop-id #!/bin/bash
systemd-run --user \
--unit=app-fuzzel-${FUZZEL_DESKTOP_FILE_ID%.desktop}@${RANDOM} \
--slice=app-${FUZZEL_DESKTOP_FILE_ID%.desktop}-${RANDOM} \
-- $@ I'm not really sure what should be in (as proposed in https://systemd.io/DESKTOP_ENVIRONMENTS/ ) though. Maybe rather $XDG_CURRENT_DESKTOP than "fuzzel" ? |
I'm also wondering if this could help with #6 , by using the launcher to set environment variable 🤔 ... |
Detection of apps for assign-cgroups script is currently completely reliant on an i3 IPC interface provided by the compositor/window manager. That is fine and it should cover most of resource intensive applications.
Assuming that the autostart is already handled by
systemd-xdg-autostart-generator
, there are still a few things I'd like to put into cgroups:The text was updated successfully, but these errors were encountered: