exec_cmd + rules regression #14619
-
|
First off I have to say, thank you so much for adding lua. I just converted and man, just like in neovim- the things you can do to remove boilerplate in config is amazing. It's also fun, I did this for binds, it's just great: local app = require('app')
return {
['SUPER + RETURN'] = app.terminal,
...
}Note: This isn't technically a bug since it is noted in wiki, but it is a notable regression from hyprlang to lua. Autostarting apps and particularly TUIs in specific workspaces, simply doesn't work for 95% of what I had before lua. It seems rules are almost never applied with I realize it's likely intended for now:
But, so how did it work before? Also, are there any alternatives? I don't want to use window rules because those are permanent (they're not just autostart). I also don't see an easy way of sourcing the window ids after autostarting them. FYI literally everything else worked fine after porting over though, 10/10 experience! =) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Well, after doing some more debugging I got it to work. TL;DRI checked the source code from before, it seems to do much the same things with PID and rules, I couldn't really see any real difference in actual logic. Now it makes perfect sense why it shouldn't have worked, but it did? So I'll chalk it up to some kind of lucky timing accident or behavior that magically made it work with < 0.55. SolutionThe reason why it shouldn't have worked is because I use my terminal agnostic script In any case it eventually ends up doing this: # This is still faster than relying purely on gtk-single-instance
pgrep -f '^ghostty$' > /dev/null \
&& ghostty +new-window "$@" \
|| ghostty "$@";;Obviously there is no PID to yoink when doing Anyway hope that helps someone with the same issue converting. |
Beta Was this translation helpful? Give feedback.
-
ahem hl.exec_cmd("element-desktop", { workspace = "3 silent" })
hl.exec_cmd("AyuGram", { workspace = "4 silent" })
hl.exec_cmd("firefox", { workspace = "5 silent" })
hl.exec_cmd("spotify-launcher", { workspace = "special silent" })
hl.exec_cmd("qbittorrent", { workspace = "8 silent" })
hl.exec_cmd("nicotine", { workspace = "8 silent" })
hl.exec_cmd("AyuGram", { workspace = "4 silent" })
|
Beta Was this translation helpful? Give feedback.
Well, after doing some more debugging I got it to work.
TL;DR
I checked the source code from before, it seems to do much the same things with PID and rules, I couldn't really see any real difference in actual logic. Now it makes perfect sense why it shouldn't have worked, but it did? So I'll chalk it up to some kind of lucky timing accident or behavior that magically made it work with < 0.55.
Solution
The reason why it shouldn't have worked is because I use my terminal agnostic script
ttwhich handles "daemon" modes in different terminals, also just so I can swap terminals painlessly without changing configurations and shell wrappers left and right.In any case it eventually ends up doing…