|
| 1 | +{{- $shell := "" -}} |
| 2 | +{{- $tmux := "" -}} |
| 3 | +{{- if eq .chezmoi.os "darwin" -}} |
| 4 | + {{- if eq .chezmoi.arch "arm64" -}} |
| 5 | + {{- $shell = "/opt/homebrew/bin/fish" -}} |
| 6 | + {{- $tmux = "/opt/homebrew/bin/tmux" -}} |
| 7 | + {{- else if eq .chezmoi.arch "amd64" -}} |
| 8 | + {{- $shell = "/usr/local/bin/fish" -}} |
| 9 | + {{- $tmux = "/usr/local/bin/tmux" -}} |
| 10 | + {{- end -}} |
| 11 | +{{- else if or (env "DOCKERIZED") (eq .chezmoi.os "linux") -}} |
| 12 | + {{- $shell = "/home/linuxbrew/.linuxbrew/bin/fish" -}} |
| 13 | + {{- $tmux = "/home/linuxbrew/.linuxbrew/bin/tmux" -}} |
| 14 | +{{- end -}} |
| 15 | + |
| 16 | +[bell] |
| 17 | +command = "None" |
| 18 | + |
| 19 | +[colors.primary] |
| 20 | +foreground = "#ffffff" |
| 21 | + |
| 22 | +[env] |
| 23 | +TERM = "xterm-256color" |
| 24 | + |
| 25 | +[font] |
| 26 | +size = 19.0 |
| 27 | + |
| 28 | +[font.normal] |
| 29 | +family = "FiraCode Nerd Font" |
| 30 | + |
| 31 | +[scrolling] |
| 32 | +history = 0 |
| 33 | + |
| 34 | +[window] |
| 35 | +decorations = "none" |
| 36 | +dynamic_padding = true |
| 37 | +dynamic_title = true |
| 38 | +startup_mode = "Maximized" |
| 39 | + |
| 40 | +[terminal.shell] |
| 41 | +program = "{{ $shell }}" |
| 42 | +args = ["-lc", "tmux -u new-session -As main \";\" set-option -g detach-on-destroy off"] |
| 43 | + |
| 44 | +[keyboard] |
| 45 | +bindings = [ |
| 46 | + { key = "N", mods = "Command", action = "CreateNewWindow" }, |
| 47 | + { key = "Period", mods = "Alt", chars = "\u001B." }, |
| 48 | + { key = "D", mods = "Alt", chars = "\u001Bd" }, |
| 49 | + { key = "Tab", mods = "Control", command = { program = "{{ $tmux }}", args = ["select-window", "-t", "+"] } }, # Next window |
| 50 | + { key = "Tab", mods = "Shift|Control", command = { program = "{{ $tmux }}", args = ["select-window", "-t", "-"] } }, # Previous window |
| 51 | + { key = "F", mods = "Command", command = { program = "{{ $tmux }}", args = [ "copy-mode;", "command-prompt", "-i", "-I", "#{pane_search_string}", "-p", "(search down)", "send -X search-forward-incremental \"%%%\"" ] } }, # Search forward incrementally |
| 52 | + { key = "Key0", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 0"] } }, # Switch to window 0 |
| 53 | + { key = "Key1", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 1"] } }, # Switch to window 1 |
| 54 | + { key = "Key2", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 2"] } }, # Switch to window 2 |
| 55 | + { key = "Key3", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 3"] } }, # Switch to window 3 |
| 56 | + { key = "Key4", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 4"] } }, # Switch to window 4 |
| 57 | + { key = "Key5", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 5"] } }, # Switch to window 5 |
| 58 | + { key = "Key6", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 6"] } }, # Switch to window 6 |
| 59 | + { key = "Key7", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 7"] } }, # Switch to window 7 |
| 60 | + { key = "Key8", mods = "Command", command = { program = "{{ $tmux }}", args = ["select-window", "-t 8"] } }, # Switch to window 8 |
| 61 | + { key = "T", mods = "Command", command = { program = "{{ $tmux }}", args = ["new-window", "-c", "#{pane_current_path}"] } }, # Create a new tmux window |
| 62 | + { key = "R", mods = "Command|Shift", command = { program = "{{ $tmux }}", args = ["command-prompt", "rename-session -- '%%'"] } }, # Rename session |
| 63 | + { key = "W", mods = "Command", command = { program = "{{ $tmux }}", args = ["kill-window"] } }, # Kill window |
| 64 | + { key = "X", mods = "Command", command = { program = "{{ $tmux }}", args = ["kill-pane"] } }, # Kill pane |
| 65 | +] |
0 commit comments