2 ms·
Here is a quick clone of this project for Linux using the STOP and CONT signals: #!/bin/bash currentProcess=$(xprop -id $(xprop -root | grep -F '_NET_AC
by iwalton3 11y ago
Here is a quick clone of this project for Linux using the STOP and CONT signals:
#!/bin/bash
currentProcess=$(xprop -id $(xprop -root | grep -F '_NET_ACTIVE_WINDOW(WINDOW)' | awk '{print $5}') | grep -F '_NET_WM_PID(CARDINAL)' | awk '{print $3}')
state=$(grep 'State:' /proc/$currentProcess/status | awk '{print $2}')
if [[ "$state" == "T" ]]
then
kill -CONT $currentProcess
else
kill -STOP $currentProcess
fi