Re: [i3] binding the same key to revert the command?

2015-11-08 Thread Ingo Bürk
Hi, one possible solution: save the following as /some/path/stopcont.sh and bind bindsym $mod+p exec --no-startup-id /some/path/stopcont.sh Script: === #!/usr/bin/env bash PROCESS=${1} FILE="/tmp/${PROCESS}.signal" if [[ -f "${FILE}" ]]; then rm ${FILE} pkill -SIGCONT

Re: [i3] binding the same key to revert the command?

2015-11-08 Thread Ingo Bürk
Hi, sorry, my last email didn't go to the mailing list which I diidn't even notice until this email. Below is my previous email as a quote which also has a script using /proc/../stat. Never hurts to have multiple solutions :) > Hi, > > here's a script using /proc/.../stat. The usage is as before.

Re: [i3] binding the same key to revert the command?

2015-11-08 Thread Zenny
Hi Sege, On 11/8/15, Serge van Ginderachter wrote: > I have a script that does that, to pause dunst (whilst locking) and/or > disabling the autolock screensaver (for a presentation mode). > > The trick is to be able to check for a state, which I do by using gtrayicon >

Re: [i3] binding the same key to revert the command?

2015-11-08 Thread Joep van Delft
Elaborating on Ingo's hints: Something like this could be used to not to have to maintain the state somewhere on disk: === #!/usr/bin/env bash process_name=$1 for pid in $(pgrep --exact $process_name); do # Assumes there is no space in the command name if awk '$3=="T"{exit 1}'

Re: [i3] Weird keybinding issue after suspend

2015-11-08 Thread Michael Stapelberg
On Sun, Nov 8, 2015 at 6:01 AM, Benjamin Kaiser wrote: > So the issue popped up again, these were the steps I did to debug it: > > - jump to TTY3 > - run: `DISAPLY=:1 setxkbmap | tee /tmp/setxkbmap.out` (not sure if I > should have been passing any arguments