-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
executing with rules on other program #8949
Comments
with a daemon I fail to see how we could handle that (other than, well, windowrules) |
Because the window rule applied to the client which just told the demand to spawn a window instead of spawning a window it's self, but the demon isn't affected by the window rule as the demon isn't launched with those rules |
i think we should add a window rule for that for something like "global"(e.g. [global; float]). and instead of getting the PID of that proc process(which is what we're doing rn), do something like a pidof to all of processes with the same name Edit: typo |
...what? |
right now, exec calls
only applying the rules to the PROC that it have just spawned(assuming PROC is it's PID). but.. since instead of that proc spawning the program, the proc is communicating with the daemon with IPC, then the daemon will spawn the process, making the addexecrule useless. so my proposed solution is that we find all the process with same name by it's pid (similar to the also, i think we should delete those rules after it's spawned(maybe as a subprocess after a delay?) since the daemon could have a lot of rules that contradict with each other or chaos |
how would you match it though? We create a process with PID X |
Usually daemons are the same binary such as thunar's daemon is still thunar but with the --daemon argument So I suggested applying the rule to all process names the same as PROC(I'm guessing you can directly filter by that or get its proc id after spawn) |
but how do we know what is the "name" of pid X? |
get it from /proc/pid/comm? |
that's not portable |
from stackoverflow:
|
Note, linprocfs(5) lacks |
Description
for example i have this exec that launches a floating window:
this would work if the program created the window it's self, but for example, thunar have --daemon, then
thunar
with those rules wouldn't work as the windows are opened by the daemon. other applications with similar logics includes alacritty, ghostty(ghostty-org/ghostty#2442) etcso a solution i thought of to this is to temporarily set the rules on another program(user specified)
The text was updated successfully, but these errors were encountered: