Compare commits
3 Commits
66bb08a653
...
62ccbf5d4b
Author | SHA1 | Date |
---|---|---|
Matej Janezic | 62ccbf5d4b | |
Matej Janezic | fc639f1fe4 | |
Matej Janezic | 791500431a |
|
@ -28,6 +28,7 @@ tmux/*
|
||||||
!tmux/tmux.conf
|
!tmux/tmux.conf
|
||||||
!tmux/tmux-sessionizer
|
!tmux/tmux-sessionizer
|
||||||
!tmux/tmux-ggclone
|
!tmux/tmux-ggclone
|
||||||
|
!tmux/tmux-ssher
|
||||||
|
|
||||||
# git
|
# git
|
||||||
!git
|
!git
|
||||||
|
|
|
@ -36,7 +36,7 @@ shape = "Block"
|
||||||
TERM = "xterm-256color"
|
TERM = "xterm-256color"
|
||||||
|
|
||||||
[font]
|
[font]
|
||||||
size = 13
|
size = 15
|
||||||
|
|
||||||
[font.bold]
|
[font.bold]
|
||||||
family = "JetBrainsMono Nerd Font"
|
family = "JetBrainsMono Nerd Font"
|
||||||
|
|
|
@ -1,152 +0,0 @@
|
||||||
# https://gist.github.com/sainnhe/ad5cbc4f05c4ced83f80e54d9a75d22f
|
|
||||||
colors:
|
|
||||||
primary:
|
|
||||||
background: '0x32302f'
|
|
||||||
foreground: '0xd4be98'
|
|
||||||
normal:
|
|
||||||
black: '0x45403d'
|
|
||||||
red: '0xea6962'
|
|
||||||
green: '0xa9b665'
|
|
||||||
yellow: '0xd8a657'
|
|
||||||
blue: '0x7daea3'
|
|
||||||
magenta: '0xd3869b'
|
|
||||||
cyan: '0x89b482'
|
|
||||||
white: '0xd4be98'
|
|
||||||
bright:
|
|
||||||
black: '0x45403d'
|
|
||||||
red: '0xea6962'
|
|
||||||
green: '0xa9b665'
|
|
||||||
yellow: '0xd8a657'
|
|
||||||
blue: '0x7daea3'
|
|
||||||
magenta: '0xd3869b'
|
|
||||||
cyan: '0x89b482'
|
|
||||||
white: '0xd4be98'
|
|
||||||
|
|
||||||
# Any items in the `env` entry below will be added as
|
|
||||||
# environment variables. Some entries may override variables
|
|
||||||
# set by alacritty itself.
|
|
||||||
env:
|
|
||||||
TERM: xterm-256color
|
|
||||||
|
|
||||||
window:
|
|
||||||
# window dimensions
|
|
||||||
dimensions:
|
|
||||||
columns: 150
|
|
||||||
lines: 36
|
|
||||||
|
|
||||||
# allow programs to dynamically change title
|
|
||||||
dynamic_title: true
|
|
||||||
|
|
||||||
scrolling:
|
|
||||||
# Maximum number of lines in the scrollback buffer.
|
|
||||||
history: 10000
|
|
||||||
|
|
||||||
# https://github.com/ryanoasis/nerd-fonts
|
|
||||||
font:
|
|
||||||
size: 14
|
|
||||||
|
|
||||||
normal:
|
|
||||||
family: JetBrainsMono Nerd Font
|
|
||||||
style: Regular
|
|
||||||
|
|
||||||
italic:
|
|
||||||
family: JetBrainsMono Nerd Font
|
|
||||||
style: Italic
|
|
||||||
|
|
||||||
bold:
|
|
||||||
family: JetBrainsMono Nerd Font
|
|
||||||
style: Bold
|
|
||||||
|
|
||||||
bold_italic:
|
|
||||||
family: JetBrainsMono Nerd Font
|
|
||||||
style: Bold Italic
|
|
||||||
|
|
||||||
draw_bold_text_with_bright_colors: true
|
|
||||||
|
|
||||||
cursor:
|
|
||||||
unfocused_hollow: true
|
|
||||||
style:
|
|
||||||
shape: Block
|
|
||||||
blinking: On
|
|
||||||
|
|
||||||
key_bindings:
|
|
||||||
- { key: R, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
|
|
||||||
- { key: PageUp, mode: ~Alt, action: ScrollPageUp }
|
|
||||||
- { key: PageDown, mode: ~Alt, action: ScrollPageDown }
|
|
||||||
# remap option to alt for mac
|
|
||||||
- { key: A, mods: Alt, chars: "\x1ba" }
|
|
||||||
- { key: B, mods: Alt, chars: "\x1bb" }
|
|
||||||
- { key: C, mods: Alt, chars: "\x1bc" }
|
|
||||||
- { key: D, mods: Alt, chars: "\x1bd" }
|
|
||||||
- { key: E, mods: Alt, chars: "\x1be" }
|
|
||||||
- { key: F, mods: Alt, chars: "\x1bf" }
|
|
||||||
- { key: G, mods: Alt, chars: "\x1bg" }
|
|
||||||
- { key: H, mods: Alt, chars: "\x1bh" }
|
|
||||||
- { key: I, mods: Alt, chars: "\x1bi" }
|
|
||||||
- { key: J, mods: Alt, chars: "\x1bj" }
|
|
||||||
- { key: K, mods: Alt, chars: "\x1bk" }
|
|
||||||
- { key: L, mods: Alt, chars: "\x1bl" }
|
|
||||||
- { key: M, mods: Alt, chars: "\x1bm" }
|
|
||||||
- { key: N, mods: Alt, chars: "\x1bn" }
|
|
||||||
- { key: O, mods: Alt, chars: "\x1bo" }
|
|
||||||
- { key: P, mods: Alt, chars: "\x1bp" }
|
|
||||||
- { key: Q, mods: Alt, chars: "\x1bq" }
|
|
||||||
- { key: R, mods: Alt, chars: "\x1br" }
|
|
||||||
- { key: S, mods: Alt, chars: "\x1bs" }
|
|
||||||
- { key: T, mods: Alt, chars: "\x1bt" }
|
|
||||||
- { key: U, mods: Alt, chars: "\x1bu" }
|
|
||||||
- { key: V, mods: Alt, chars: "\x1bv" }
|
|
||||||
- { key: W, mods: Alt, chars: "\x1bw" }
|
|
||||||
- { key: X, mods: Alt, chars: "\x1bx" }
|
|
||||||
- { key: Y, mods: Alt, chars: "\x1by" }
|
|
||||||
- { key: Z, mods: Alt, chars: "\x1bz" }
|
|
||||||
- { key: A, mods: Alt|Shift, chars: "\x1bA" }
|
|
||||||
- { key: B, mods: Alt|Shift, chars: "\x1bB" }
|
|
||||||
- { key: C, mods: Alt|Shift, chars: "\x1bC" }
|
|
||||||
- { key: D, mods: Alt|Shift, chars: "\x1bD" }
|
|
||||||
- { key: E, mods: Alt|Shift, chars: "\x1bE" }
|
|
||||||
- { key: F, mods: Alt|Shift, chars: "\x1bF" }
|
|
||||||
- { key: G, mods: Alt|Shift, chars: "\x1bG" }
|
|
||||||
- { key: H, mods: Alt|Shift, chars: "\x1bH" }
|
|
||||||
- { key: I, mods: Alt|Shift, chars: "\x1bI" }
|
|
||||||
- { key: J, mods: Alt|Shift, chars: "\x1bJ" }
|
|
||||||
- { key: K, mods: Alt|Shift, chars: "\x1bK" }
|
|
||||||
- { key: L, mods: Alt|Shift, chars: "\x1bL" }
|
|
||||||
- { key: M, mods: Alt|Shift, chars: "\x1bM" }
|
|
||||||
- { key: N, mods: Alt|Shift, chars: "\x1bN" }
|
|
||||||
- { key: O, mods: Alt|Shift, chars: "\x1bO" }
|
|
||||||
- { key: P, mods: Alt|Shift, chars: "\x1bP" }
|
|
||||||
- { key: Q, mods: Alt|Shift, chars: "\x1bQ" }
|
|
||||||
- { key: R, mods: Alt|Shift, chars: "\x1bR" }
|
|
||||||
- { key: S, mods: Alt|Shift, chars: "\x1bS" }
|
|
||||||
- { key: T, mods: Alt|Shift, chars: "\x1bT" }
|
|
||||||
- { key: U, mods: Alt|Shift, chars: "\x1bU" }
|
|
||||||
- { key: V, mods: Alt|Shift, chars: "\x1bV" }
|
|
||||||
- { key: W, mods: Alt|Shift, chars: "\x1bW" }
|
|
||||||
- { key: X, mods: Alt|Shift, chars: "\x1bX" }
|
|
||||||
- { key: Y, mods: Alt|Shift, chars: "\x1bY" }
|
|
||||||
- { key: Z, mods: Alt|Shift, chars: "\x1bZ" }
|
|
||||||
- { key: Key1, mods: Alt, chars: "\x1b1" }
|
|
||||||
- { key: Key2, mods: Alt, chars: "\x1b2" }
|
|
||||||
- { key: Key3, mods: Alt, chars: "\x1b3" }
|
|
||||||
- { key: Key4, mods: Alt, chars: "\x1b4" }
|
|
||||||
- { key: Key5, mods: Alt, chars: "\x1b5" }
|
|
||||||
- { key: Key6, mods: Alt, chars: "\x1b6" }
|
|
||||||
- { key: Key7, mods: Alt, chars: "\x1b7" }
|
|
||||||
- { key: Key8, mods: Alt, chars: "\x1b8" }
|
|
||||||
- { key: Key9, mods: Alt, chars: "\x1b9" }
|
|
||||||
- { key: Key0, mods: Alt, chars: "\x1b0" }
|
|
||||||
- { key: Space, mods: Control, chars: "\x00" } # Ctrl + Space
|
|
||||||
- { key: Grave, mods: Alt, chars: "\x1b`" } # Alt + `
|
|
||||||
- { key: Grave, mods: Alt|Shift, chars: "\x1b~" } # Alt + ~
|
|
||||||
- { key: Period, mods: Alt, chars: "\x1b." } # Alt + .
|
|
||||||
- { key: Key8, mods: Alt|Shift, chars: "\x1b*" } # Alt + *
|
|
||||||
- { key: Key3, mods: Alt|Shift, chars: "\x1b#" } # Alt + #
|
|
||||||
- { key: Period, mods: Alt|Shift, chars: "\x1b>" } # Alt + >
|
|
||||||
- { key: Comma, mods: Alt|Shift, chars: "\x1b<" } # Alt + <
|
|
||||||
- { key: Minus, mods: Alt|Shift, chars: "\x1b_" } # Alt + _
|
|
||||||
- { key: Key5, mods: Alt|Shift, chars: "\x1b%" } # Alt + %
|
|
||||||
- { key: Key6, mods: Alt|Shift, chars: "\x1b^" } # Alt + ^
|
|
||||||
- { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \
|
|
||||||
- { key: Backslash, mods: Alt|Shift, chars: "\x1b|" } # Alt + |
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ $# -eq 1 ]]; then
|
||||||
|
selected=$1
|
||||||
|
else
|
||||||
|
selected=$(grep "Host .*" ~/.ssh/config | grep -v "*" | sed "s/Host \(.*\)/\1/" | fzf --cycle --bind 'tab:toggle-up,btab:toggle-down')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $selected ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
selected_name="ssh_$selected"
|
||||||
|
tmux_running=$(pgrep tmux)
|
||||||
|
|
||||||
|
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||||
|
tmux new-session -s $selected_name -c $selected ssh "$selected"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! tmux has-session -t=$selected_name 2> /dev/null; then
|
||||||
|
tmux new-session -ds $selected_name -c $selected ssh "$selected"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux switch-client -t $selected_name
|
|
@ -34,11 +34,8 @@ bind -r j select-pane -D
|
||||||
bind -r h select-pane -L
|
bind -r h select-pane -L
|
||||||
bind -r l select-pane -R
|
bind -r l select-pane -R
|
||||||
|
|
||||||
bind -r D neww -c "#{pane_current_path}" "nvim TODO.md"
|
|
||||||
bind -r t neww -c "~" "nvim ~/.TODO.md"
|
|
||||||
|
|
||||||
bind-key -r f run-shell "tmux neww ~/.config/tmux/tmux-sessionizer"
|
bind-key -r f run-shell "tmux neww ~/.config/tmux/tmux-sessionizer"
|
||||||
bind-key -r g run-shell "tmux neww ~/.config/tmux/tmux-sessionizer $XDG_CONFIG_HOME"
|
bind-key -r F run-shell "tmux neww ~/.config/tmux/tmux-ssher"
|
||||||
bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/temp"
|
bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/temp"
|
||||||
bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~"
|
bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~"
|
||||||
bind-key -r G run-shell "tmux neww ~/.config/tmux/tmux-ggclone"
|
bind-key -r G run-shell "tmux neww ~/.config/tmux/tmux-ggclone"
|
||||||
|
|
|
@ -32,6 +32,8 @@ antigen theme romkatv/powerlevel10k
|
||||||
# apply plugin load
|
# apply plugin load
|
||||||
antigen apply
|
antigen apply
|
||||||
|
|
||||||
|
unsetopt autocd
|
||||||
|
|
||||||
# pyenv
|
# pyenv
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
eval "$(pyenv virtualenv-init -)"
|
eval "$(pyenv virtualenv-init -)"
|
||||||
|
|
Loading…
Reference in New Issue