Tmux for mere mortals

Tmux has liberated me from tiling window mangers. Not that I didn’t like those, but I occasionally have to work with macOS or default GNOME setups. And over the...
Tmux for mere mortals

Tmux has liberated me from tiling window mangers. Now not that I didn’t like these, but I as soon as quickly must work with macOS or default GNOME setups. And over the years I realised that I handiest need a terminal multiplexor to attain terminal tiling for me, the comfort of the windows are factual magnificent to be corpulent-camouflage in separate workspaces.

So, I finished up doing 80% of my work in terminals with tmux. Nonetheless, the prefix factor? Pardonnez-moi, but usability issues. Urgent a chorded prefix hotkey handiest to press one other chorded hotkey to invent a single motion is certain nonsense.

With this in mind, I determined to customise my tmux to expend handiest easy chorded hotkeys with out a prefix for loads of basic actions, and to assemble them easy to set in mind. Additionally, my honest used to be now not to override something in the default tmux configuration in explain to expend default tmux as well, if I’ve to (i.e. when ssh’ed to a pair distant server). Finally, I needed it to be associated in German/US keyboards, as well to work for MacBooks and long-established laptops.

Right here’s what I came up with:

  • Mod+1..9: switch windows from 1 to 9
  • Mod+, and Mod+.: switch to next/prev windows
  • Mod+HJKL or arrows: switch between panes
  • Mod+N: manufacture original window
  • Mod+F: toggle corpulent-camouflage
  • Mod+V: spoil up vertically
  • Mod+B: spoil up horizontally (“bisect”)
  • Mod+X: shut pane
  • Mod+/: enter reproduction and scroll mode

Intuitive? Now, same hotkeys with Shift key are former to regulate things:

  • Mod+< and Mod+>: circulation latest window to the left/simply
  • Mod+Shift+HJKL or arrows: circulation pane to the left/simply/up/down
  • Mod+Shift+X: shut window
  • Mod+Shift+R: rename window

That’s somewhat noteworthy the total lot I ever wanted from tmux. For other, less frequent actions I accept to expend the default bindings, every infrequently.

Additionally, I’d like tmux to expend my primary clipboard on all programs, so that I’d handiest must reproduction textual snarl with my mouse or keyboard need. Resizing panes will more than seemingly be usable with a mouse.

As for the space bar, I’m now not a gargantuan fan of being overloaded with knowledge, so I handiest repeat window names there, or in the case then window has handiest an originate shell – latest itemizing title.

Nothing else.

Right here’s the tmux.conf (otherwise you may maybe maybe well well presumably constantly have a have a examine my dotfiles for a more recent model:

space-choice -g default-terminal camouflage-256coloration
space -g ancient past-restrict 10000
space -g contaminated-index 1
space-choice -g renumber-windows on
space -s spoil out-time 0
bind-key -n M-n original-window -c "#{pane_current_path}"
bind-key -n M-1 dispose of-window -t :1
bind-key -n M-2 dispose of-window -t :2
bind-key -n M-3 dispose of-window -t :3
bind-key -n M-4 dispose of-window -t :4
bind-key -n M-5 dispose of-window -t :5
bind-key -n M-6 dispose of-window -t :6
bind-key -n M-7 dispose of-window -t :7
bind-key -n M-8 dispose of-window -t :8
bind-key -n M-9 dispose of-window -t :9
bind-key -n M-0 dispose of-window -t :0
bind-key -n M-. dispose of-window -n
bind-key -n M-, dispose of-window -p
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key -n M-X verify-sooner than "extinguish-window"
bind-key -n M-v spoil up-window -h -c "#{pane_current_path}"
bind-key -n M-b spoil up-window -v -c "#{pane_current_path}"
bind-key -n M-R uncover-suggested -I "" "rename-window '%%'"
bind-key -n M-f resize-pane -Z
bind-key -n M-h dispose of-pane -L
bind-key -n M-l dispose of-pane -R
bind-key -n M-k dispose of-pane -U
bind-key -n M-j dispose of-pane -D
bind-key -n M-Left dispose of-pane -L
bind-key -n M-Correct dispose of-pane -R
bind-key -n M-Up dispose of-pane -U
bind-key -n M-Down dispose of-pane -D
bind-key -n "M-H" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -L; tmux swap-pane -t $dilapidated'
bind-key -n "M-J" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -D; tmux swap-pane -t $dilapidated'
bind-key -n "M-Ok" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -U; tmux swap-pane -t $dilapidated'
bind-key -n "M-L" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -R; tmux swap-pane -t $dilapidated'
bind-key -n "M-S-Left" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -L; tmux swap-pane -t $dilapidated'
bind-key -n "M-S-Down" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -D; tmux swap-pane -t $dilapidated'
bind-key -n "M-S-Up" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -U; tmux swap-pane -t $dilapidated'
bind-key -n "M-S-Correct" race-shell 'dilapidated=`tmux show -p "#{pane_index}"`; tmux dispose of-pane -R; tmux swap-pane -t $dilapidated'
bind-key -n M-x verify-sooner than "extinguish-pane"
bind-key -n M-/ reproduction-mode

# Linux system clipboard
bind -T reproduction-mode-vi Enter ship-keys -X reproduction-pipe-and-abolish "xclip -in -need clipboard"
bind-key -T reproduction-mode-vi MouseDragEnd1Pane ship -X reproduction-pipe-and-abolish "xclip -in -need clipboard"

# macOS system clipboard
#bind -T reproduction-mode-vi Enter ship-keys -X reproduction-pipe-and-abolish "pbcopy"
#bind-key -T reproduction-mode-vi MouseDragEnd1Pane ship -X reproduction-pipe-and-abolish "pbcopy"

space -g mouse on
space-choice -g space-keys vi
space-choice -g space-titles on
space-choice -g space-titles-string 'tmux - #W'
space -g bell-motion any
space-choice -g visual-bell off
space-choice -g space-clipboard off
setw -g mode-keys vi
setw -g display screen-exercise on
space -g visual-exercise on
space -g space-style fg=coloration15
space -g space-define centre
space -g space-left ''
space -g space-simply ''
space -g space-interval 1
space -g message-style fg=colour0,bg=colour3
setw -g window-space-bell-style fg=colour1
setw -g window-space-latest-style fg=yellow,audacious
setw -g window-space-style fg=coloration250
setw -g window-space-latest-format ' #{?#{==:#W,#{b:SHELL}},#{b:pane_current_path},#W} '
setw -g window-space-format ' #{?#{==:#W,#{b:SHELL}},#{b:pane_current_path},#W} '
# For older tmux:
#setw -g window-space-format ' #W '
#setw -g window-space-latest-format ' #W '

Now tmux feels like a typical desktop app and in truth boosts the productiveness in the terminal. What attain you imagine?

Apr 25, 2020

like
 
tweet
 
rss
 
@me
 
me

Be taught Extra

Categories
Internet of Things
76 Comments on this post.
  • EdwardSen
    1 December 2020 at 1:03 am
  • Angelomaina
    3 December 2020 at 2:24 pm

    generic cialis no doctor’s prescription cialis generic generic cialis available

  • Angelomaina
    3 December 2020 at 10:12 pm
  • Angelomaina
    4 December 2020 at 6:37 am

    online drugstore Cipro best pill for ed

  • Angelomaina
    4 December 2020 at 3:47 pm

    viagra amazon viagra buying viagra online

  • Angelomaina
    5 December 2020 at 1:06 am
  • Angelomaina
    5 December 2020 at 10:12 am

    viagra generic viagra viagra over the counter

  • Angelomaina
    5 December 2020 at 7:21 pm
  • GregoryUTect
    7 December 2020 at 7:40 am
  • GregoryUTect
    7 December 2020 at 4:17 pm
  • GregoryUTect
    8 December 2020 at 1:40 am

    real cialis without a doctor’s prescription: buy ed drugs legal to buy prescription drugs without prescription

  • GregoryUTect
    8 December 2020 at 10:57 am
  • GregoryUTect
    9 December 2020 at 5:35 am
  • Masonnaiva
    9 December 2020 at 8:34 pm
  • Masonnaiva
    10 December 2020 at 4:41 am
  • Masonnaiva
    10 December 2020 at 12:51 pm
  • Masonnaiva
    10 December 2020 at 9:15 pm
  • Masonnaiva
    11 December 2020 at 5:30 am
  • Masonnaiva
    11 December 2020 at 1:45 pm
  • Masonnaiva
    11 December 2020 at 10:08 pm
  • Willieroyar
    12 December 2020 at 3:34 pm
  • Willieroyar
    12 December 2020 at 11:20 pm
  • Willieroyar
    13 December 2020 at 7:36 am
  • MichaelStype
    15 December 2020 at 4:18 pm
  • MichaelStype
    16 December 2020 at 12:30 am
  • MichaelStype
    16 December 2020 at 8:52 am
  • MichaelStype
    16 December 2020 at 5:17 pm
  • MichaelStype
    17 December 2020 at 1:50 am
  • CharlesDerly
    17 December 2020 at 3:41 pm

    anti fungal pills without prescription impotance ed meds online without prescription or membership

  • CharlesDerly
    18 December 2020 at 12:21 am
  • CharlesDerly
    18 December 2020 at 9:26 pm
  • CharlesDerly
    19 December 2020 at 6:12 am
  • exhache
    19 December 2020 at 1:11 pm

    Cialis Faut Il Une Ordonnance Mogsadia [url=https://bansocialism.com/]best place to buy cialis online reviews[/url] musLuccups Kamagra Efectos Secundarios

  • CharlesDerly
    19 December 2020 at 2:48 pm
  • CharlesDerly
    19 December 2020 at 11:37 pm
  • CharlesDerly
    20 December 2020 at 7:57 am

    prescription drugs online without doctor lipitor buy lipitor online

  • WilliamVar
    21 December 2020 at 4:56 pm
  • WilliamVar
    22 December 2020 at 12:48 am
  • WilliamVar
    22 December 2020 at 9:07 am

    cbkwgfqq cheap viagra best place to buy generic viagra online

  • Robertdek
    23 December 2020 at 9:21 pm
  • Robertdek
    24 December 2020 at 5:59 am
  • Robertdek
    24 December 2020 at 2:48 pm
  • Robertdek
    24 December 2020 at 11:56 pm

    how much is zithromax 250 mg bactrim zithromax over the counter canada

  • Robertdek
    25 December 2020 at 9:59 am
  • Robertdek
    25 December 2020 at 6:44 pm
  • Robertdek
    26 December 2020 at 3:33 am
  • Robertdek
    26 December 2020 at 12:18 pm
  • Robertdek
    26 December 2020 at 9:21 pm
  • RichardSof
    29 December 2020 at 11:18 am
  • RichardSof
    29 December 2020 at 8:37 pm
  • RichardSof
    30 December 2020 at 5:57 am
  • RichardSof
    30 December 2020 at 3:14 pm
  • RichardSof
    31 December 2020 at 12:37 am
  • JesseCaunk
    3 January 2021 at 5:27 pm
  • JesseCaunk
    4 January 2021 at 2:11 am
  • Jasonsoync
    5 January 2021 at 6:44 pm
  • Jasonsoync
    6 January 2021 at 3:44 am
  • Jasonsoync
    6 January 2021 at 1:23 pm
  • Jasonsoync
    6 January 2021 at 11:09 pm
  • Jasonsoync
    7 January 2021 at 8:31 am
  • Jasonsoync
    7 January 2021 at 6:00 pm
  • Jasonsoync
    8 January 2021 at 3:36 am
  • Jasonsoync
    8 January 2021 at 2:35 pm
  • Jasonsoync
    9 January 2021 at 8:34 am
  • Nllpreete
    10 January 2021 at 1:54 am
  • Fgvdreete
    10 January 2021 at 8:52 am
  • Aqwshaify
    10 January 2021 at 2:53 pm
  • Khthcory
    10 January 2021 at 11:10 pm
  • MichaelMup
    11 January 2021 at 3:33 pm
  • Lokuhaify
    11 January 2021 at 10:03 pm
  • MichaelMup
    12 January 2021 at 12:33 am
  • Jtmfhaify
    13 January 2021 at 2:43 am
  • Jasonimmes
    15 January 2021 at 7:10 am

    the effects of cialis on women cialis generic vdjhaake cialis coupons

  • Jasonimmes
    15 January 2021 at 2:11 pm
  • Jasonimmes
    15 January 2021 at 9:45 pm
  • Jasonimmes
    16 January 2021 at 5:07 am

    cialis lowest price 20mg cheap cialis dgfykkim does medicaid cover cialis

  • Leave a Reply

    *

    *

    RELATED BY