This is modified, alternative tabbed extension for well known urxvt-unicode terminal emulator
Possibility to add named tabs, through the X resources, which represents its class. Without any configuration only default shell class is available under default (
Shift+Down
) shortcut.Fast navigation to first ten tabs (if available) with shortcut
Ctrl+[num]
, where num can be 0 to 9.CTRL+0
will switch to tenth tab.Numbers in tabs can be switched off in by setting resource:
URxvt.tabbedalt.tab-numbers: false
Integrated activity indicator with additional features like colors and different characters instead of simply asterisk depending on time.
Integrated tab renaming from stepb. Default under
Shift+UP
, then type some text and pressRETURN
for accept orESC
for cancel.Added ability to configure own shortcuts using standard
keysym
urxvt option. See below for examples.Autohide tab when there is only one tab at the moment.
Copy tabbedalt into ~/.urxvt/ext
directory.
Add these to your ~/.Xdefaults
:
! Perl extension config URxvt.perl-ext: tabbedalt
And that's it. On some systems, there might be a need to reload X resources:
$ xrdb ~/.Xdefaults
For quickinstall and run urxvt, tabbedalt can be installed using following command:
$ curl --create-dirs https://raw.githubusercontent.com/gryf/tabbedalt/master/tabbedalt -o ~/.urxvt/ext/tabbedalt
$ urxvt -pe tabbedalt
or even without "installing" at all:
$ curl https://raw.githubusercontent.com/gryf/tabbedalt/master/tabbedalt -o /tmp/tabbedalt
$ URXVT_PERL_LIB=/tmp urxvt -pe tabbedalt
There are several additional things you can set contrary to the original tabbed extension.
You can disable [NEW]
button, just to save the space. Just add following
line to yours ~/.Xdefaults
file:
URxvt.tabbedalt.new-button: false
You can change all of the colors regarding tabs appearance. Here are defaults:
URxvt.tabbedalt.tabbar-fg: 15 URxvt.tabbedalt.tabbar-bg: 8 URxvt.tabbedalt.tab-fg: 8 URxvt.tabbedalt.tab-bg: 0 URxvt.tabbedalt.active-fg: 1 URxvt.tabbedalt.actives-fg: 5 URxvt.tabbedalt.actived-fg: 4
Tabs can change colors depending on the activity of terminal under certain tab. Colors can be defined as described in section above. You can change the time for either group of activity:
URxvt.tabbedalt.tabbar-timeouts: 16:.:8:::4:+
The value can should be read as colon separated fields. In this case it would be read as:
- 16 with symbol
.
- 8 with symbol
:
- 4 with symbol
+
Numeric values means amount of seconds, on which three group of activity will be triggered. Those group are:
- Inactive for at least 16 seconds
- Inactive for at least 8 seconds
- Inactive for at least 4 seconds
Activity of the tab is always represented by asterisk sign (*
).
You can change those values but bear in mind, that first group should have timeout in seconds set higher, than middle one. You can also change symbols for those groups.
You can turn off tab numbers and leave only name of the tab. Handy to save the space:
URxvt.tabbedalt.tab-numbers: false
To hide tab bar, when there is a single tab, the following resource need to be set to true:
URxvt.tabbedalt.autohide: true
By default tab bar would be visible even with only one tab. Note, that it will
be visible regardless of this option, when new-button
is set. So to make
that option work, you'll need to also disable new-button.
There are several actions, which tabbedalt supports:
new_tab
- for tab creationrename_tab
- for tab title renamingprev_tab
- for jumping to previous tabnext_tab
- for jumping to next tabmove_tab_left
- for moving tab to the leftmove_tab_right
- for moving tab to the rightjump_to_tab
- for quickly jumping into first tenth tabs
See next sections for examples. This feature was adapted from tabbedex.
By setting:
URxvt.tabbedalt.disable-default-keys: true
you can completely remove default keystrokes for creating and navigating tabs. In fact, if this resource is set to true (default), than tabbedalt will create several keysyms mapped to the actions:
Shift-Down
:new_tab
- create tabShift-Up
:rename_tab
- for tab title renamingShift-Left
:prev_tab
- for jumping to previous tabShift-Right
:next_tab
- for jumping to next tabShift-Left
:move_tab_left
- for moving tab to the leftControl-Right
:move_tab_right
- for moving tab to the rightControl-1..0
:jump_to_tab
- for quickly jumping into first tenth tabs
It might be wise to define own shortcuts before disabling default keys.
new_tab
This action can have up to two arguments separated by colon, in a form:
URxvt.keysym.desired-keys: tabbedalt:new_tab:tab-title:tab-command
In this case for
desired-keys
shortcut there would be new tab created with title set totab-title
, and command which tab run astab-command
, for example:URxvt.keysym.Control-t: tabbedalt:new_tab:htop:htop
where pressing control+t it will run new tab with title
htop
and commandhtop
.Both title and command may be omitted. If so, default title
shell
will be used in absence of title, and default shell will be run on missing command.jump_to_tab
In this action, there is only one argument expected - number of the tab, i.e.:
URxvt.keysym.Control-1: tabbedalt:jump_to_tab:1 URxvt.keysym.Control-2: tabbedalt:jump_to_tab:2 … URxvt.keysym.Control-0: tabbedalt:jump_to_tab:0
Note, that tabs are indexed from 1, and tab 10th is numbered as 0.
The rest
Al the rest of the actions (moving, jumping and renaming) are without argument. For example renaming will look like this:
URxvt.keysym.Control-r: tabbedalt:rename_tab
Let's assume, that one want to add three kind of custom shells:
- simple one (default shell in the system),
- midnight commander,
- root (namely - su command)
A way to do this is to associate keystroke for it in .Xdefaults
using
urxvts keysym
option, and the actions described above:
URxvt.keysym.Control-Shift-N: tabbedalt.new_tab:shell URxvt.keysym.Control-Shift-R: tabbedalt.new_tab:root:su - URxvt.keysym.Control-Shift-M: tabbedalt.new_tab:mc:mc
Resource values are colon separated values, which are in order:
- plugin name, which in case of this very plugin would be always
tabbedalt
. - title of the tab, it could be anything but the colon.
- optional command. If omitted, default shell will be launched.
On runtime, tabs can be renamed using (by default) Shift+Up
- now you can
type name for the tab. Return
accept change, ESC
cancels it. This
feature was taken from stepb tabbedx repository.