Skip to content

i3-cycle-focus.py: cycle through all previously focused windows#78

Merged
acrisci merged 1 commit intoaltdesktop:masterfrom
okraits:master
Mar 5, 2018
Merged

i3-cycle-focus.py: cycle through all previously focused windows#78
acrisci merged 1 commit intoaltdesktop:masterfrom
okraits:master

Conversation

@okraits
Copy link
Copy Markdown
Contributor

@okraits okraits commented Feb 21, 2018

Kind of related to #50, I extended the script focus-last.py to be able to cycle through all previously focused windows.

I wanted to emulate the Alt-Tab behaviour of other window managers like Openbox. But i3 doesn't allow to trigger an action when the Alt key is released.
So I use a timer to update the focus history after a certain span of time after a new window has been focused.

The previous behaviour of the script (toggling between the current and the previously focused window) can be restored by setting --delay 0.0.

@acrisci
Copy link
Copy Markdown
Member

acrisci commented Feb 24, 2018

I think the alt-tab behavior is good, but I don't want to change the default behavior of this script because people seem to be using it.

Can you either make your own example file or keep the default for this script how it is?

@okraits
Copy link
Copy Markdown
Contributor Author

okraits commented Feb 24, 2018

Yes, I can change it into another example file.
I figured I want to add switches to ignore floating windows and to only include windows on the active/visible workspace(s). I will update my pull request when I will have added those.

@okraits
Copy link
Copy Markdown
Contributor Author

okraits commented Mar 2, 2018

@acrisci Extended the script and moved it to a new example.

@okraits okraits changed the title focus-last.py: cycle through all previously focused windows i3-cycle-focus.py: cycle through all previously focused windows Mar 2, 2018
@acrisci
Copy link
Copy Markdown
Member

acrisci commented Mar 5, 2018

Cool, good example script 👍 .

What about alt-shift-tab to cycle forward in the list?

@acrisci acrisci merged commit aa89829 into altdesktop:master Mar 5, 2018
@okraits
Copy link
Copy Markdown
Contributor Author

okraits commented Mar 5, 2018

Thank you :-) I didn't think about that because I never used that with other window manager. But I guess that it's not a big deal so I will add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants