Compare commits

...

10 Commits

Author SHA1 Message Date
cbffc575a1 Allow session mode key binding to be used to go back to normal mode 2024-08-16 20:40:42 +02:00
bd54c31503 ALlow scrolling in normal mode 2024-08-16 19:56:18 +02:00
500e42a94f Add and change some other key bindings
I like the idea of using CTRL+C as a default shortcut for scrolling to the end of the file and exiting the current command, so I'm adding it to all the modes.
2024-08-16 19:45:25 +02:00
83cfd1f45a Disable tmux key bindings
Comment out tmux mode bindings, this is a better choice that deleting them because it's easier to reverse had I to change my mind in the future.
2024-08-15 17:09:13 +02:00
e9b0a17d62 Add browser-like bindings for panes and tabs
Way easier to remember.
2024-08-15 17:08:04 +02:00
2fb5330371 Disable previous swap layout key binding
What is the point of this if layouts cycle and there are three modes in total? One shortcut is enough.
2024-08-15 17:03:26 +02:00
205d8955fa Change some key bindings
* Use bindings that are more in line with what I'm used to and are also less likely to conflict with my setup
* Disable bindings that would otherwise crash but I can't think of a replacement right now or that I will never use at all
2024-08-15 16:59:13 +02:00
fd4f226231 Remove VIM-like key bindings used as arrows 2024-08-15 15:31:09 +02:00
7780f3512f Automatically unbind removed key bindings
This parameter allows for default key bindings to be cleared before setting custom ones and given the configuration contains all the default bindings, every binding removed from the list will be actually unbinded instead of having to manually do it one by one.
2024-08-15 15:03:27 +02:00
fb6f3fd9d2 Disable copy on select 2024-08-15 14:53:27 +02:00

View File

@@ -1,31 +1,37 @@
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds {
keybinds clear-defaults=true {
normal {
// uncomment this and adjust key if using copy_on_select=false
// bind "Alt c" { Copy; }
bind "Alt Down" { ScrollDown; }
bind "Alt Up" { ScrollUp; }
bind "PageDown" { PageScrollDown; }
bind "PageUp" { PageScrollUp; }
}
locked {
bind "Ctrl g" { SwitchToMode "Normal"; }
bind "Alt g" { SwitchToMode "Normal"; }
}
resize {
bind "Ctrl n" { SwitchToMode "Normal"; }
bind "h" "Left" { Resize "Increase Left"; }
bind "j" "Down" { Resize "Increase Down"; }
bind "k" "Up" { Resize "Increase Up"; }
bind "l" "Right" { Resize "Increase Right"; }
bind "H" { Resize "Decrease Left"; }
bind "J" { Resize "Decrease Down"; }
bind "K" { Resize "Decrease Up"; }
bind "L" { Resize "Decrease Right"; }
bind "Alt M" { SwitchToMode "Normal"; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "Left" { Resize "Increase Left"; }
bind "Down" { Resize "Increase Down"; }
bind "Up" { Resize "Increase Up"; }
bind "Right" { Resize "Increase Right"; }
// bind "H" { Resize "Decrease Left"; }
// bind "J" { Resize "Decrease Down"; }
// bind "K" { Resize "Decrease Up"; }
// bind "L" { Resize "Decrease Right"; }
bind "=" "+" { Resize "Increase"; }
bind "-" { Resize "Decrease"; }
}
pane {
bind "Ctrl p" { SwitchToMode "Normal"; }
bind "h" "Left" { MoveFocus "Left"; }
bind "l" "Right" { MoveFocus "Right"; }
bind "j" "Down" { MoveFocus "Down"; }
bind "k" "Up" { MoveFocus "Up"; }
bind "Alt p" { SwitchToMode "Normal"; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "Left" { MoveFocus "Left"; }
bind "Right" { MoveFocus "Right"; }
bind "Down" { MoveFocus "Down"; }
bind "Up" { MoveFocus "Up"; }
bind "p" { SwitchFocus; }
bind "n" { NewPane; SwitchToMode "Normal"; }
bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
@@ -38,19 +44,20 @@ keybinds {
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
}
move {
bind "Ctrl h" { SwitchToMode "Normal"; }
bind "Alt m" { SwitchToMode "Normal"; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "n" "Tab" { MovePane; }
bind "p" { MovePaneBackwards; }
bind "h" "Left" { MovePane "Left"; }
bind "j" "Down" { MovePane "Down"; }
bind "k" "Up" { MovePane "Up"; }
bind "l" "Right" { MovePane "Right"; }
bind "Left" { MovePane "Left"; }
bind "Down" { MovePane "Down"; }
bind "Up" { MovePane "Up"; }
bind "Right" { MovePane "Right"; }
}
tab {
bind "Ctrl t" { SwitchToMode "Normal"; }
bind "Alt t" { SwitchToMode "Normal"; }
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
bind "h" "Left" "Up" "k" { GoToPreviousTab; }
bind "l" "Right" "Down" "j" { GoToNextTab; }
bind "Left" "Up" { GoToPreviousTab; }
bind "Right" "Down" { GoToNextTab; }
bind "n" { NewTab; SwitchToMode "Normal"; }
bind "x" { CloseTab; SwitchToMode "Normal"; }
bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
@@ -69,30 +76,30 @@ keybinds {
bind "Tab" { ToggleTab; }
}
scroll {
bind "Ctrl s" { SwitchToMode "Normal"; }
bind "Ctrl f" { SwitchToMode "Normal"; }
bind "e" { EditScrollback; SwitchToMode "Normal"; }
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "Down" { ScrollDown; }
bind "Up" { ScrollUp; }
bind "PageDown" { PageScrollDown; }
bind "PageUp" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
// uncomment this and adjust key if using copy_on_select=false
// bind "Alt c" { Copy; }
}
search {
bind "Ctrl s" { SwitchToMode "Normal"; }
bind "Ctrl f" { SwitchToMode "Normal"; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "Down" { ScrollDown; }
bind "Up" { ScrollUp; }
bind "PageDown" { PageScrollDown; }
bind "PageUp" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "n" { Search "down"; }
bind "p" { Search "up"; }
bind "f" { Search "down"; }
bind "F" { Search "up"; }
bind "c" { SearchToggleOption "CaseSensitivity"; }
bind "w" { SearchToggleOption "Wrap"; }
bind "o" { SearchToggleOption "WholeWord"; }
@@ -110,10 +117,11 @@ keybinds {
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
}
session {
bind "Ctrl o" { SwitchToMode "Normal"; }
bind "Ctrl s" { SwitchToMode "Scroll"; }
bind "Alt s" { SwitchToMode "Normal"; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "Ctrl f" { SwitchToMode "Scroll"; }
bind "d" { Detach; }
bind "w" {
bind "s" {
LaunchOrFocusPlugin "session-manager" {
floating true
move_to_focused_tab true
@@ -121,68 +129,67 @@ keybinds {
SwitchToMode "Normal"
}
}
tmux {
bind "[" { SwitchToMode "Scroll"; }
bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
bind "c" { NewTab; SwitchToMode "Normal"; }
bind "," { SwitchToMode "RenameTab"; }
bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
bind "n" { GoToNextTab; SwitchToMode "Normal"; }
bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
bind "o" { FocusNextPane; }
bind "d" { Detach; }
bind "Space" { NextSwapLayout; }
bind "x" { CloseFocus; SwitchToMode "Normal"; }
}
// tmux {
// bind "[" { SwitchToMode "Scroll"; }
// bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
// bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
// bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
// bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
// bind "c" { NewTab; SwitchToMode "Normal"; }
// bind "," { SwitchToMode "RenameTab"; }
// bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
// bind "n" { GoToNextTab; SwitchToMode "Normal"; }
// bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
// bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
// bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
// bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
// bind "o" { FocusNextPane; }
// bind "d" { Detach; }
// bind "Space" { NextSwapLayout; }
// bind "x" { CloseFocus; SwitchToMode "Normal"; }
// }
shared_except "locked" {
bind "Ctrl g" { SwitchToMode "Locked"; }
bind "Ctrl q" { Quit; }
bind "Alt g" { SwitchToMode "Locked"; }
bind "Alt q" { Quit; }
bind "Alt n" { NewPane; }
bind "Alt i" { MoveTab "Left"; }
bind "Alt o" { MoveTab "Right"; }
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
bind "Alt =" "Alt +" { Resize "Increase"; }
bind "Alt w" { CloseFocus; }
bind "Ctrl t" { NewTab; }
bind "Ctrl w" { CloseTab; }
// bind "Alt i" { MoveTab "Left"; }
// bind "Alt o" { MoveTab "Right"; }
bind "Alt Left" { MoveFocusOrTab "Left"; }
bind "Alt Right" { MoveFocusOrTab "Right"; }
bind "Alt Down" { MoveFocus "Down"; }
bind "Alt Up" { MoveFocus "Up"; }
bind "Alt +" { Resize "Increase"; }
bind "Alt -" { Resize "Decrease"; }
bind "Alt [" { PreviousSwapLayout; }
bind "Alt ]" { NextSwapLayout; }
// bind "Alt L" { PreviousSwapLayout; }
bind "Alt l" { NextSwapLayout; }
}
shared_except "normal" "locked" {
bind "Enter" "Esc" { SwitchToMode "Normal"; }
}
shared_except "pane" "locked" {
bind "Ctrl p" { SwitchToMode "Pane"; }
bind "Alt p" { SwitchToMode "Pane"; }
}
shared_except "resize" "locked" {
bind "Ctrl n" { SwitchToMode "Resize"; }
bind "Alt M" { SwitchToMode "Resize"; }
}
shared_except "scroll" "locked" {
bind "Ctrl s" { SwitchToMode "Scroll"; }
bind "Ctrl f" { SwitchToMode "Scroll"; }
}
shared_except "session" "locked" {
bind "Ctrl o" { SwitchToMode "Session"; }
bind "Alt s" { SwitchToMode "Session"; }
}
shared_except "tab" "locked" {
bind "Ctrl t" { SwitchToMode "Tab"; }
bind "Alt t" { SwitchToMode "Tab"; }
}
shared_except "move" "locked" {
bind "Ctrl h" { SwitchToMode "Move"; }
}
shared_except "tmux" "locked" {
bind "Ctrl b" { SwitchToMode "Tmux"; }
bind "Alt m" { SwitchToMode "Move"; }
}
// shared_except "tmux" "locked" {
// bind "Ctrl b" { SwitchToMode "Tmux"; }
// }
}
plugins {
@@ -330,7 +337,7 @@ serialize_pane_viewport true
// Enable or disable automatic copy (and clear) of selection when releasing mouse
// Default: true
//
// copy_on_select false
copy_on_select false
// Path to the default editor to use to edit pane scrollbuffer
// Default: $EDITOR or $VISUAL