Closed euglevi closed 1 year ago
exec-once=sleep 2 && /home/eugenio/.config/hypr/hyprland_firefox.sh
Alas, it is not working. Not even if I put a delay of 20 seconds rather than 2.
oh wait, iirc, the HIS is not passed to execs. That might be an issue. Check if echo $HYPRLAND_INSTANCE_SIGNATURE
returns the sig.
Mmmm not sure how I should check. If I check in a shell, then I get the value. The log does not say anything about it.
exec-once=echo $HYPRLAND_INSTANCE_SIGNATURE > ~/myfile.txt
?
Sorry, it has been a long week...
Anyway, the file has the proper value of HIS. So this rules out the script not working because of the environmental variable, right?
yeah. Huh, odd. Can you try to pipe the script itself into a file? See if it outputs any errors
That I had already tried with no luck. An empty file.
Now I tried a slightly modified script:
#!/bin/bash
function handle {
if [[ ${1:0:20} == "createworkspace>>web" ]]; then
echo "2"
firefox
else
echo "1"
fi
}
socat - UNIX-CONNECT:/tmp/hypr/$(echo $HYPRLAND_INSTANCE_SIGNATURE)/.socket2.sock | while read line;do handle $line; done
What I got - and I tried several times - was a log file with 22 1s. Always the same number.
What I got - and I tried several times - was a log file with 22 1s. Always the same number.
maybe try logging the actual provided value instead of a useless 1
? You're actively doing things that do not help, lol
You are right, I thought 1s were more fun :)
This is what I get:
activelayout>>Video
activelayout>>Video
activelayout>>Power
activelayout>>Power
activelayout>>Sleep
activelayout>>Sleep
activelayout>>Integr
activelayout>>Integr
activelayout>>Integr
activelayout>>Integr
activelayout>>DELL09
activelayout>>DELL09
activelayout>>Intel
activelayout>>Intel
activelayout>>Intel
activelayout>>Intel
activelayout>>Dell
activelayout>>Dell
activelayout>>AT
activelayout>>AT
openlayer>>hyprpaper
openlayer>>waybar
Sorry and thank you (also for your patience...)
what in the name of fuck
Seems like the events.... stop? Can you try to trigger some distinct event and verify it doesnt log? e.g. opening a window
I tried with opening a window. Again, if I start the script from the terminal everything works fine, if I set it as a startup script then it interrupts after opening hyprpaper and waybar (now I have 26 lines rather than 22 in the log file because I have two monitors).
I solved the issue. Socat was stopping because, apparently, it has a timeout of 0.5 seconds. So it was sufficient to add the option "-t 1000" to the socat command in the script to keep it working.
I made a very simple script to open firefox as soon as I create a workspace.
When I run it in the terminal, everything works fine. When I attach it to my config file in an exec command (exec=/home/eugenio/.config/hypr/hyprland_firefox.sh), it does not work. When I look if the pid that Hyprland set is active, I cannot seem to find it. Any ideas? Could it be something related to environment variables or to path? But what?
Thank you!