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

Allow GoToTab keybind action to focus on latest tab if passed tab idx doesn't exist #3407

Open
cristiand391 opened this issue Jun 8, 2024 · 0 comments

Comments

@cristiand391
Copy link
Contributor

I have the following keybinds to replicate the Alt + tab idx shorcuts available in browsers:

    bind "Alt 1" { GoToTab 1; }
    bind "Alt 2" { GoToTab 2; }
    bind "Alt 3" { GoToTab 3; }
    bind "Alt 4" { GoToTab 4; }
    bind "Alt 5" { GoToTab 5; }
    bind "Alt 6" { GoToTab 6; }
    bind "Alt 7" { GoToTab 7; }
    bind "Alt 8" { GoToTab 8; }
    bind "Alt 9" { GoToTab 9; }

Firefox supports going to the last tab if the tab index doesn't exit. Example:

you have 3 tabs, pressing Alt 8 would fail to find a tab with index 8 so it would focus on the 3rd tab.
if you have 9 tabs, Alt 8 would to go the 8th tab.

For me it's mostly a faster way to go to the last tab (I usually have ~5 tabs per session, so Alt 6-9 are free to use if this is supported)

bind "Alt 9" {
  GoToTab 9 {
    default "latest"
  }
}
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

No branches or pull requests

1 participant