You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to display a text when a process is running or not, so I added this line to the plasmoid command:
if pgrep -af 'My Process' &>/dev/null; then echo "Running"; else echo "Not running"; fi
The line above works fine on bash and zsh, but when running it with the plasmoid it never evaluates to false, so it never pronts "Not running" when the process is not running.
The text was updated successfully, but these errors were encountered:
That's because you're running a single command/process, not a bash script. If you want a bash script, you need to run the bash command with the script as an argument.
I am trying to display a text when a process is running or not, so I added this line to the plasmoid command:
if pgrep -af 'My Process' &>/dev/null; then echo "Running"; else echo "Not running"; fi
The line above works fine on bash and zsh, but when running it with the plasmoid it never evaluates to false, so it never pronts "Not running" when the process is not running.
The text was updated successfully, but these errors were encountered: