this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add tmux config

+189
+41
tmux/.config/tmux/scripts/sessionizer
··· 1 + #!/usr/bin/env bash 2 + 3 + SEARCH_DIRS=( 4 + ~/Projects 5 + ) 6 + 7 + dirs="" 8 + for dir in "${SEARCH_DIRS[@]}"; do 9 + [[ -d "$dir" ]] && dirs="$dirs $dir" 10 + done 11 + 12 + selected=$( 13 + { 14 + tmux list-sessions -F "#{session_name}" 2>/dev/null 15 + [[ -n "$dirs" ]] && find $dirs -mindepth 1 -maxdepth 2 -type d 2>/dev/null 16 + } | fzf --reverse --border=none --margin=1 --padding=1 \ 17 + --prompt=' ' --pointer='▌' --no-scrollbar \ 18 + --color=bg:#101010,bg+:#232323,fg:#A0A0A0,fg+:#FFFFFF,hl:#FFC799,hl+:#FFC799,pointer:#FFC799,prompt:#FFC799,info:#5C5C5C 19 + ) 20 + 21 + [[ -z "$selected" ]] && exit 0 22 + 23 + if [[ "$selected" == /* ]]; then 24 + session_name=$(basename "$selected" | tr '.' '_') 25 + session_path="$selected" 26 + else 27 + session_name="$selected" 28 + session_path="" 29 + fi 30 + 31 + if tmux has-session -t="$session_name" 2>/dev/null; then 32 + tmux switch-client -t "$session_name" 33 + else 34 + if [[ -n "$session_path" ]]; then 35 + tmux new-session -ds "$session_name" -c "$session_path" 36 + else 37 + tmux new-session -ds "$session_name" 38 + fi 39 + 40 + tmux switch-client -t "$session_name" 41 + fi
+148
tmux/.config/tmux/tmux.conf
··· 1 + # vesper colors 2 + BG="#101010" 3 + BG_ELEVATED="#1A1A1A" 4 + BG_SELECTED="#232323" 5 + FG="#FFFFFF" 6 + FG_MUTED="#A0A0A0" 7 + FG_DIM="#5C5C5C" 8 + ACCENT="#FFC799" 9 + MINT="#99FFE4" 10 + BORDER="#282828" 11 + 12 + # basics 13 + set -g default-terminal "tmux-256color" 14 + set -g prefix C-a 15 + unbind C-b 16 + bind C-a send-prefix 17 + 18 + set -g base-index 1 19 + setw -g pane-base-index 1 20 + set -g escape-time 0 21 + set -g mouse on 22 + setw -g mode-keys vi 23 + set -g history-limit 50000 24 + 25 + # true color 26 + set -ag terminal-overrides ",*:RGB" 27 + 28 + # renumber windows 29 + set -g renumber-windows on 30 + 31 + # splits in cwd 32 + bind \\ split-window -h -c "#{pane_current_path}" 33 + bind Enter split-window -v -c "#{pane_current_path}" 34 + 35 + # new window in cwd 36 + bind c new-window -c "#{pane_current_path}" 37 + 38 + # pane nav without prefix: alt+hjkl 39 + bind -n M-h select-pane -L 40 + bind -n M-j select-pane -D 41 + bind -n M-k select-pane -U 42 + bind -n M-l select-pane -R 43 + 44 + # pane nav with prefix 45 + bind h select-pane -L 46 + bind j select-pane -D 47 + bind k select-pane -U 48 + bind l select-pane -R 49 + 50 + # resize without prefix: alt+shift+hjkl 51 + bind -n M-H resize-pane -L 5 52 + bind -n M-J resize-pane -D 5 53 + bind -n M-K resize-pane -U 5 54 + bind -n M-L resize-pane -R 5 55 + 56 + # window nav without prefix 57 + bind -n M-1 select-window -t 1 58 + bind -n M-2 select-window -t 2 59 + bind -n M-3 select-window -t 3 60 + bind -n M-4 select-window -t 4 61 + bind -n M-5 select-window -t 5 62 + bind -n M-6 select-window -t 6 63 + bind -n M-7 select-window -t 7 64 + bind -n M-8 select-window -t 8 65 + bind -n M-9 select-window -t 9 66 + bind -n M-n next-window 67 + bind -n M-p previous-window 68 + 69 + # quick actions 70 + bind x kill-pane 71 + bind X kill-window 72 + bind z resize-pane -Z 73 + 74 + # session switcher 75 + bind s display-popup -E -w 40% -h 40% -S "fg=#282828" -b rounded \ 76 + "tmux list-sessions -F '#S' | fzf --reverse --border=none --margin=1 --padding=1 \ 77 + --prompt=' ' --pointer='▌' --no-scrollbar \ 78 + --color=bg:#101010,bg+:#232323,fg:#A0A0A0,fg+:#FFFFFF,hl:#FFC799,hl+:#FFC799,pointer:#FFC799,prompt:#FFC799,info:#5C5C5C \ 79 + | xargs -I{} tmux switch-client -t {}" 80 + 81 + # sessionizer 82 + bind f display-popup -E -w 50% -h 50% -S "fg=#282828" -b rounded \ 83 + "~/.config/tmux/scripts/sessionizer" 84 + 85 + # last session 86 + bind L switch-client -l 87 + 88 + # reload 89 + bind r source-file ~/.config/tmux/tmux.conf \; display "reloaded" 90 + 91 + # copy mode 92 + bind -T copy-mode-vi v send -X begin-selection 93 + bind -T copy-mode-vi y send -X copy-selection-and-cancel 94 + 95 + # no bells 96 + set -g visual-activity off 97 + set -g visual-bell off 98 + set -g visual-silence off 99 + setw -g monitor-activity off 100 + set -g bell-action none 101 + 102 + # status bar 103 + set -g status-position top 104 + set -g status-justify left 105 + set -g status-style "bg=#101010 fg=#A0A0A0" 106 + set -g status-interval 1 107 + 108 + # left: session 109 + set -g status-left "#[fg=#FFC799,bold] #S #[fg=#5C5C5C]│ " 110 + set -g status-left-length 20 111 + 112 + # right: time only 113 + set -g status-right "#[fg=#A0A0A0]%-I:%M %p " 114 + set -g status-right-length 50 115 + 116 + # window format 117 + setw -g window-status-format "#[fg=#5C5C5C] #I #W " 118 + setw -g window-status-current-format "#[fg=#FFFFFF,bold] #I #W " 119 + setw -g window-status-separator "" 120 + 121 + # pane borders 122 + set -g pane-border-lines simple 123 + set -g pane-border-style "fg=#282828" 124 + set -g pane-active-border-style "fg=#FFC799" 125 + 126 + # message style 127 + set -g message-style "bg=#232323 fg=#FFFFFF" 128 + set -g message-command-style "bg=#232323 fg=#FFFFFF" 129 + 130 + # mode style 131 + setw -g mode-style "bg=#232323 fg=#FFFFFF" 132 + 133 + # clock 134 + setw -g clock-mode-colour "#FFC799" 135 + 136 + # plugins 137 + # Requires TPM: https://github.com/tmux-plugins/tpm 138 + set -g @plugin 'tmux-plugins/tpm' 139 + set -g @plugin 'tmux-plugins/tmux-resurrect' 140 + set -g @plugin 'tmux-plugins/tmux-continuum' 141 + 142 + set -g @resurrect-capture-pane-contents 'on' 143 + set -g @resurrect-strategy-nvim 'session' 144 + 145 + set -g @continuum-restore 'on' 146 + set -g @continuum-save-interval '15' 147 + 148 + run '~/.tmux/plugins/tpm/tpm'