Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to define a command to be executed after the release of a modifier key #3794

Open
okraits opened this issue Sep 16, 2019 · 3 comments

Comments

@okraits
Copy link
Contributor

commented Sep 16, 2019

I'm submitting a…

[ ] Bug
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

Currently, there's the --release flag which makes i3 execute the specified command when the specified key is released:

bindsym [--release] [<Group>+][<Modifiers>+]<keysym> command

Desired Behavior

There should be the possibility to specify an additional command which will be executed when a specified modifier key is released.

Usecase:
I use a script to cycle through the list of most recently focused windows (I'd like to have a behaviour similar to the alt-tab function of openbox).
With that script, I keep the Alt key pressed and hit the Tab key several times until the desired window is focused. Then I also release the Alt key. Unfortunately, it's not possible to bind a command to the release of the Alt key (in this case to trigger the update of the focus history after the desired window has been selected). So I'm using a timer to update the focus history after a certain amount of time after the Tab key has been released.

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.13 (2016-11-08) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.13 (2016-11-08) (pid 17317) abort…)
Loaded i3 config: /home/okraits/.config/i3/config (Last modified: Mo 16 Sep 2019 17:31:34 CEST, 10365 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
- Linux Distribution & Version: Debian Stretch
- Are you using a compositor (e.g., xcompmgr or compton): None
@i3bot i3bot added the enhancement label Sep 16, 2019
@xzfc

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2019

Usecase:
I use a script to cycle through the list of most recently focused windows (I'd like to have a behaviour similar to the alt-tab function of openbox).

Have you tried using https://github.com/sagb/alttab?

@okraits

This comment has been minimized.

Copy link
Contributor Author

commented Oct 3, 2019

Usecase:
I use a script to cycle through the list of most recently focused windows (I'd like to have a behaviour similar to the alt-tab function of openbox).

Have you tried using https://github.com/sagb/alttab?

No, as I don't see any sense in using third party tools when i3 provides an IPC interface to interact with it via scripts. It just doesn't expose the event needed for this usecase.

@okraits

This comment has been minimized.

Copy link
Contributor Author

commented Oct 9, 2019

Have you tried using https://github.com/sagb/alttab?

@xzfc I tried out alttab. In general, it's nice but it lacks one feature I want to have:

You can only define wether you want to switch between windows on all workspaces or only between windows on the current workspace.

But I would like to be able to switch between windows on all visible workspaces. So that windows on a not focused workspace on a second monitor are also included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.