Add a "Session Switcher" via Ctrl + Tab
Needs ReviewPublic

Authored by tcanabrava on Jan 10 2019, 1:07 PM.

Details

Reviewers
hindenburg
Group Reviewers
Konsole
Summary

Press Ctrl + Tab and a session switcher will appear showing every
tab that you have, you can navigate with buttons, close via
focus out, esq key or selecting an index.

Diff Detail

Repository
R319 Konsole
Branch
altTabBehavior
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6907
Build 6925: arc lint + arc unit
tcanabrava created this revision.Jan 10 2019, 1:07 PM
Restricted Application added a project: Konsole. · View Herald TranscriptJan 10 2019, 1:07 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
tcanabrava requested review of this revision.Jan 10 2019, 1:07 PM
tcanabrava updated this revision to Diff 49152.Jan 10 2019, 1:10 PM
  • Add missing files
lucasew added inline comments.
src/ViewManager.cpp
295

What you think about change the previous context hotkey to shift instead of meta. Some well known software like browsers use this shortcut and I think it will be more natural and intuitive.

thsurrel added a subscriber: thsurrel.EditedJan 11 2019, 9:34 AM

What about merging this with the lastUsedView feature ?
Pressing Ctrl-Tab would open show the switcher ordered according to tabHistory. The tabs would be switched "live" while iterating through the list. The switcher would close when releasing the Ctrl key.
What do you think ?

I like the idea. I'll send a followup review with that.

Actually, I belive that if I do this change, it will conflict with our
other branch. *maybe* this should stay as is for now, untill we merge
the splits rewrite.

Agreed, the code around the lastUsedView has changed quite a bit in the terminatorStyleTabs branch, let's not duplicate the work. Except if terminatorStyleTabs is not ready for 19.04 ...

Yeah, +1 for focusing on one big change at a time for sanity. :)

I thought this had to wait until the split tabs code went in - if not I can review now

No; both are unrelated

Em qua, 30 de jan de 2019 às 14:30, Kurt Hindenburg <
noreply@phabricator.kde.org> escreveu:

hindenburg added a comment. View Revision
https://phabricator.kde.org/D18154

I thought this had to wait until the split tabs code went in - if not I
can review now

*REPOSITORY*
R319 Konsole

*REVISION DETAIL*
https://phabricator.kde.org/D18154

*To: *tcanabrava, hindenburg, Konsole
*Cc: *ngraham, thsurrel, lucasew, mart, konsole-devel, maciejn,
maximilianocuria, hindenburg

A quick look running and I'm not a big fan: 1) It doesn't handle split views (assume that after the split tab changes go in, this could be fix), 2) if only tab, don't show anything, 3) releasing the Ctrl+Tab should close popup and go to selected 4) I'm tempted to have a way to turn off the popup.

Since other people seem to like it, let me use/review it more.

mglb added a subscriber: mglb.Jan 30 2019, 3:38 PM
mglb added inline comments.
src/ListTabbedSessionsPopup.cpp
3

You should place real copyright owner(s) here

mglb added a comment.Jan 30 2019, 6:23 PM
  1. I'm tempted to have a way to turn off the popup.

"last used view" (or "next/prev tab"?) does the same thing without popup. Or have I missed something?

src/ViewManager.cpp
295

I think Alt instead of Meta should be used - KDE applications do not usually use Meta for non-global things (AFAIR).
@lucasew: Shift works as reverse modifier in features like this, so I would expect it to show session switcher in backward mode.

299

Can you change this to be the shortcut from lastUsedViewAction + Shift?