tmux clears, shortcuts

This commit is contained in:
Christoph J. Scherr 2023-02-05 13:49:18 +01:00
parent ea0fbbcf84
commit c7f0221567
3 changed files with 56 additions and 26 deletions

View File

@ -22,19 +22,26 @@ unbind % # Split vertically
unbind '"' # Split horizontally
# split horizontal with prefix-h or prefix-"
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -h -c "#{pane_current_path}"
bind '"' split-window -h -c "#{pane_current_path}"
# split vertical with prefix-v or prefix-%
bind h split-window -v -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
bind % split-window -v -c "#{pane_current_path}"
# navigate panels with vim keys
# navigate panels with vim or arrow keys
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
# reorder panels with prefix+shift+{jk}
bind C-K swap-pane -U
bind C-J swap-pane -D
# rotate panels with prefix+ctrl+o and prefix+ctrl+shift+o (reversed)
# default
# rename window with prefix-n
unbind n #DEFAULT KEY: Move to next split-window
bind n command-prompt "rename-window '%%'"
@ -67,7 +74,7 @@ bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection
# magic tweaks for better use with vim or neovim
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
#s#et -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
@ -79,6 +86,14 @@ bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# shell comaptability stuff
is_shell="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(zsh|bash|sh)(diff)?$'"
# clear panel with ctrl-l (like bash or zsh)
unbind C-l # Default for go to last window
bind -n C-l if-shell "$is_shell" "bind -n C-l send-keys C-l ; run 'sleep 0.1' ; clear-history"
# theming, See https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-dark.conf
#### COLOUR (Solarized dark)

View File

@ -22,19 +22,26 @@ unbind % # Split vertically
unbind '"' # Split horizontally
# split horizontal with prefix-h or prefix-"
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -h -c "#{pane_current_path}"
bind '"' split-window -h -c "#{pane_current_path}"
# split vertical with prefix-v or prefix-%
bind h split-window -v -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
bind % split-window -v -c "#{pane_current_path}"
# navigate panels with vim keys
# navigate panels with vim or arrow keys
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
# reorder panels with prefix+shift+{jk}
bind C-K swap-pane -U
bind C-J swap-pane -D
# rotate panels with prefix+ctrl+o and prefix+ctrl+shift+o (reversed)
# default
# rename window with prefix-n
unbind n #DEFAULT KEY: Move to next split-window
bind n command-prompt "rename-window '%%'"
@ -70,7 +77,7 @@ bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
# magic tweaks for better use with vim or neovim
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
#s#et -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
@ -82,6 +89,14 @@ bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# shell comaptability stuff
is_shell="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(zsh|bash|sh)(diff)?$'"
# clear panel with ctrl-l (like bash or zsh)
unbind C-l # Default for go to last window
bind -n C-l if-shell "$is_shell" "bind -n C-l send-keys C-l ; run 'sleep 0.1' ; clear-history"
# theming, See https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-dark.conf
#### COLOUR (Solarized dark)

View File

@ -12,7 +12,7 @@ Switch to Next Keyboard Layout=Meta+Alt+K
AboutApp=
AboutKDE=
Activate Next Tab=Ctrl+]; Ctrl+PgDown
Activate Previous Tab=Ctrl+[; Ctrl+PgUp
Activate Previous Tab=Ctrl+PgUp; Ctrl+[
ActualSize=Ctrl+0
AddBookmark=Ctrl+B
Back=Alt+Left; Back
@ -20,12 +20,12 @@ BackwardWord=Ctrl+Left
Begin=Ctrl+Home
BeginningOfLine=Home
Clear=
Close=Ctrl+W; Ctrl+Esc
Close=Ctrl+Esc; Ctrl+W
ConfigureNotifications=
ConfigureToolbars=
Copy=Ctrl+Ins; Ctrl+C
CreateFolder=F10
Cut=Ctrl+X; Shift+Del
Cut=Shift+Del; Ctrl+X
DeleteFile=Shift+Del
DeleteWordBack=Ctrl+Backspace
DeleteWordForward=Ctrl+Del
@ -49,7 +49,7 @@ Goto=
GotoLine=Ctrl+G
GotoPage=
Help=F1
Home=Alt+Home; Home Page
Home=Home Page; Alt+Home
KeyBindings=Ctrl+Alt+,
Mail=
MoveToTrash=Del
@ -67,7 +67,7 @@ PrintPreview=
Prior=PgUp
Quit=Ctrl+Q
Redo=Ctrl+Shift+Z
Reload=F5; Refresh
Reload=Refresh; F5
RenameFile=F2
Replace=Ctrl+R
ReportBug=
@ -104,7 +104,7 @@ Toggle Touchpad=Touchpad Toggle; Meta+Ctrl+Zenkaku Hankaku
[kded5][Global Shortcuts]
Show System Activity=Ctrl+Esc
display=Meta+P; Display
display=Display; Meta+P
[khotkeys][Global Shortcuts]
{d03619b6-9b3c-48cc-9d9c-a2aadb485550}=
@ -114,7 +114,7 @@ decrease_microphone_volume=Microphone Volume Down
decrease_volume=Volume Down
increase_microphone_volume=Microphone Volume Up
increase_volume=Volume Up
mic_mute=Meta+Volume Mute; Microphone Mute
mic_mute=Microphone Mute; Meta+Volume Mute
mute=Volume Mute
[ksmserver][Global Shortcuts]
@ -128,7 +128,7 @@ Reboot Without Confirmation=
Activate Window Demanding Attention=Meta+Ctrl+A
Decrease Opacity=
Expose=Ctrl+F9
ExposeAll=Launch (C); Ctrl+F10
ExposeAll=Ctrl+F10; Launch (C)
ExposeClass=Ctrl+F7
ExposeClassCurrentDesktop=
Increase Opacity=
@ -145,15 +145,15 @@ Setup Window Shortcut=
Show Desktop=Meta+D
ShowDesktopGrid=Meta+F8
Suspend Compositing=Alt+Shift+F12
Switch One Desktop Down=
Switch One Desktop Up=
Switch One Desktop to the Left=
Switch One Desktop to the Right=
Switch One Desktop Down=Meta+Ctrl+Down
Switch One Desktop Up=Meta+Ctrl+Up
Switch One Desktop to the Left=Meta+Ctrl+Left
Switch One Desktop to the Right=Meta+Ctrl+Right
Switch Window Down=Meta+Alt+Down
Switch Window Left=Meta+Alt+Left
Switch Window Right=Meta+Alt+Right
Switch Window Up=Meta+Alt+Up
Switch to Desktop 1=Ctrl+F1; Meta+1
Switch to Desktop 1=Meta+1; Ctrl+F1
Switch to Desktop 10=Meta+0
Switch to Desktop 11=
Switch to Desktop 12=
@ -164,10 +164,10 @@ Switch to Desktop 16=
Switch to Desktop 17=
Switch to Desktop 18=
Switch to Desktop 19=
Switch to Desktop 2=Ctrl+F2; Meta+2
Switch to Desktop 2=Meta+2; Ctrl+F2
Switch to Desktop 20=
Switch to Desktop 3=Meta+3; Ctrl+F3
Switch to Desktop 4=Ctrl+F4; Meta+4
Switch to Desktop 4=Meta+4; Ctrl+F4
Switch to Desktop 5=Meta+5
Switch to Desktop 6=Meta+6
Switch to Desktop 7=Meta+7
@ -202,7 +202,7 @@ Walk Through Windows of Current Application Alternative (Reverse)=
Window Above Other Windows=
Window Below Other Windows=
Window Close=Alt+F4
Window Fullscreen=
Window Fullscreen=Alt+F11
Window Grow Horizontal=
Window Grow Vertical=
Window Lower=
@ -290,7 +290,7 @@ _launch=Launch (1)
[org.kde.krunner.desktop][Global Shortcuts]
RunClipboard=Alt+Shift+F2
_launch=Alt+F2; Alt+Space; Search
_launch=Alt+Space; Search; Alt+F2
[org.kde.plasma.emojier.desktop][Global Shortcuts]
_launch=Meta+.
@ -301,7 +301,7 @@ CurrentMonitorScreenShot=
FullScreenScreenShot=
OpenWithoutScreenshot=
RectangularRegionScreenShot=Print
WindowUnderCursorScreenShot=Meta+Ctrl+Print; Ctrl+Print
WindowUnderCursorScreenShot=Ctrl+Print; Meta+Ctrl+Print
_launch=
[org_kde_powerdevil][Global Shortcuts]