richardgv / skippy-xd

A full-screen Exposé-style standalone task switcher for X11.
GNU General Public License v2.0
340 stars 76 forks source link

Command to close window picker #63

Open avernan opened 8 years ago

avernan commented 8 years ago

Hello,

I'd like to add a keyboard shortcut to close the exposē mode back to the 'starting' situation, i.e. by selecting the window which is under the cursor when the window picker is activated. I would also really like to bind this to the same key combination that I use to activate the window picker, but this is somewhat secondary. Is there a (nice) way to do so? I can only think of emulating a mouse click, but this only works if the mouse pointer wasn't moved.

javl commented 8 years ago

One way to do this is to bind your key to a toggle script, instead of calling skippy-xd directly.

For example, bind your key to a file called something like skippy_toggle.sh with the following contents:

    #!/bin/sh
    # check if skippy-xd is in the list of running processes
    if ps ax | grep -v grep | grep "skippy-xd" > /dev/null
    then
        # it's already running, so kill it
        pkill skippy-xd
    else
       # it's not running, so start it
        /usr/bin/skippy-xd
    fi
mustafaozhan commented 6 years ago

Hello, I write to smilar script also

#! /bin/bash
if pgrep skippy-xd; 
then 
    pkill skippy-xd; 
else 
    skippy-xd;
fi

But the problem is when it is active we are killing it. So for example if i have openned geddit and asume that i am writing something than i active skippy-xd than i have killed with this script geddit losing focus to type back.

The approach should not be killing it. When it is active if I press ESC at this time there is no problem. So we need to send an ESC signal instead of pkill. I tried several thing but couldn't success. Any idea welcomed.