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

Feature request: display and switch to more than ten active windows #1114

Closed
kaffeekanne opened this issue Jun 5, 2019 · 6 comments
Closed

Feature request: display and switch to more than ten active windows #1114

kaffeekanne opened this issue Jun 5, 2019 · 6 comments
Assignees
Labels
Milestone

Comments

@kaffeekanne
Copy link
Contributor

@kaffeekanne kaffeekanne commented Jun 5, 2019

As of now profanity only allows to jump to 10 active windows via alt-# and /win #. All above are adressed by ther title /win <windowtitle/number>.

Like in irssi it woult be convenient to have the line qwert(yz)uiop line of keys adress windows 11 to 20.

Edit: jumping to high numbers works already, so "just" mapping to further shortcuts would be missing.

@jubalh jubalh added this to the 0.8.0 milestone Jun 5, 2019
@jubalh jubalh added the feature label Jun 5, 2019
@ccxcz

This comment has been minimized.

Copy link

@ccxcz ccxcz commented Jun 7, 2019

There are several ways I'm used to navigate channels in my IRC client. The probably most frequent / useful is alt-a (both Irssi and Weechat) which jumps to next active window. I tend to order my windows based on priority they have to me so I have it set to jump to lowest numbered window with unread message, with highlights taking priority.
The other one that is quite handy is Weechat's alt+j+number for double digits. https://www.weechat.org/files/doc/stable/weechat_user.en.html#key_bindings_buffers_windows This allows for fairly quick jumping without having to erase typed text on the command line and also avoids embarrassing /win messages sent to people as there is no need to press the enter key. This of course needs the ability to handle multi-key sequences, but since alt is already expressed as character sequence in almost every terminal (exception being glass terminals from 70s before 8-bit character sets became the norm) this shouldn't be a problem.
The third and most complex one is the go.py plugin for Weechat https://weechat.org/blog/post/2009/02/08/Script-go which allows you to use fuzzy search among the buffer names (akin to dmenu, anything.el, zaw, fzf and lot of other similar applications/plugins) which is useful when one has really a lot of buffers open.
One more thing to consider is how to display which channels are active. Currently Profanity has list of open windows (called tabs in /help statusbar?) but IRC clients usually instead have hotlist there: just the windows with unread messages / activity. If we want to support having a lot of windows open I think having option to show only those with certain level of activity in the statusbar would be rather practical.

@jubalh

This comment has been minimized.

Copy link
Member

@jubalh jubalh commented Jun 17, 2019

Documenting current findings:

irssi hardcoded the alt + 1234567890qwertyuio into their code: https://github.com/irssi/irssi/blob/master/src/fe-text/gui-readline.c#L1144
They have a BIND command which lets users write plugins like this: https://github.com/irssi/scripts.irssi.org/blob/master/scripts/keybinds.pl

We also have 0-9 hardcoded: https://github.com/profanity-im/profanity/blob/master/src/ui/inputwin.c#L374
We could easily add the qwertyuio there.

jubalh added a commit that referenced this issue Sep 30, 2019
alt-2 brings one ot the window.
irssi supports alt + 1234567890qwertyuio to easily switch to 20 windows
instead of just ten.

Hardcode this too.

Regards #1114
@jubalh

This comment has been minimized.

Copy link
Member

@jubalh jubalh commented Sep 30, 2019

With d6c638c we support alt + 1234567890qwertyuio now.

@jubalh

This comment has been minimized.

Copy link
Member

@jubalh jubalh commented Sep 30, 2019

The probably most frequent / useful is alt-a (both Irssi and Weechat) which jumps to next active window.

Active means a window with unread messages?

jubalh added a commit that referenced this issue Sep 30, 2019
alt-a brings one to the next window with unread messages.

Regards #1114
@jubalh

This comment has been minimized.

Copy link
Member

@jubalh jubalh commented Sep 30, 2019

e8420e7 makes alt-a switch to the next window with unread messages.

@jubalh

This comment has been minimized.

Copy link
Member

@jubalh jubalh commented Sep 30, 2019

There have some nice ideas been mentioned in here.
However I won't implement them. PRs might get accepted.

I'll close this issue since the feature requested from @kaffeekanne is completed. And additionally alt-a has been added.

@jubalh jubalh closed this Sep 30, 2019
@jubalh jubalh self-assigned this Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.