[CC] Close Tab & Switch to Above/Below Tab for Automate Vertical Tabbar
-
This CC tutorial is complement to my Automate Floating Vertical Tabbar for Mouse & Keyboard CSS mod. So, what does it do?
-
Add Close tab & switch to above/below tab (a.k.a. next/previous order tab) commands.
-
Auto-reveal tabbar from hidden or minimized (favicon) state when closing Active tab.
-
Highlight Active tab before closing tab, then auto-hide/minimized tabbar after closed tab.
LSS, it make closing active tab less confusing & let you take control of consecutive active tab after closing current active tab.
How to Command Chains?
Please read this tutorial: https://help.vivaldi.com/desktop/shortcuts/command-chains/
ReadMe
-
First, go to Settings > Tabs > Close Tab Activation, select ONLY Activate Above in Tab Order. Remember to also uncheck Always Activate Related Tab.
-
Next, create 2 new CC with below code:
Close Tab & Switch to Above Tab
Close Tab & Switch to Below Tab
-
Finally, setup 2 new keyboard shortcut or mouse gesture with above CC:
-
Personally I use
1
&2
for switch to above/below tab, thus it's very convenience for me to setupAlt+1
&Alt+2
for Close & switch to above/below tab, just like in good old Opera Presto. -
This CC shortcuts should also work with top/bottom position automate tabbar as long as you are using
:focus-within
to setup automate tabbar, because this CC usingFocus Tab bar
command to reveal the tabbar from hidden/minimized state. -
If you are not using Automate (auto-hide/minimized) Tabbar, you can simplify the CC formula by remove
Focus Tab bar
&Deselect Tabs
. You might wanna keepFocus Page
because it improved access to the web content after closing a tab.
Quirk/Limitation
Obviously, you won't be able to access Always Activate Related Tab & Activate Recently Used Order close tab behavior, but it's a trade-off for better control of active tab. You will know exactly which tab will be activated after closing current active tab, no more unpredictable & confusing guesswork after you closed current tab.
Then, click X button or
Ctrl+W
to close active tab will always switch to above tab. If you preferred always switch to below tab after closing active tab, then do this:-
Select Activate Below in Tab Order in Settings.
-
Swap the 2 CC formula around...
-
Replace the first command of Move Active Tab Forward with Move Active Tab Backward.
That's all for this CC tutorial. Hope this will help u enjoy Automate Vertical Tabbar a lot more!P/S Currently I'm working on Close Tab to 4 ways active tab (above/below/recent/newest) CC. It might render this CC obsolete, but everyone preferred something slightly different, so this tutorial might still be useful for someone... LOL
EDIT: Close Tab to 4 ways active tabs done it completed, get it here: https://forum.vivaldi.net/post/511470
-