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 to visually show the current state, so the script can check whether to enable or disable the mode. See https://github.com/srvg/dotfiles/blob/master/bin/presentation-mode On 8 November 2015 at 10:16, Zenny <garbytr...@gmail.com> wrote: > Hi, > > I am trying to use a keybinding to pause a process temporily, > > bindsym $mod+p exec pkill -SIGSTOP <processname> > > But I could not figure out how to make pressing to same keybinding to > restart the process? > > Currenlty I am using, > > bindsym $mod+c exec pkill -SIGCONT <processname> > > Instead, I want something like re-pressing $mod+p executes pkill > -SIGCONT <processname>. > > Thanks! > > /z >