feat: add `tmux.conf`

+35
.tmux.conf
··· 1 + set -g default-terminal "xterm-256color" 2 + set -g set-clipboard on 3 + set -ga terminal-overrides "vte*:XT:Ms=\\E]52;c;%p2%s\\7,xterm*:XT:Ms=\\E]52;c;%p2%s\\7" 4 + # set -sa terminal-overrides ",xterm*:Tc" 5 + 6 + set -g base-index 1 7 + set -g status-left-length 30 8 + 9 + bind-key h select-pane -L 10 + bind-key j select-pane -D 11 + bind-key k select-pane -U 12 + bind-key l select-pane -R 13 + unbind '"' 14 + unbind % 15 + bind-key s split-window -v 16 + bind-key v split-window -h 17 + 18 + bind-key r source-file ~/.tmux.conf 19 + 20 + set-window-option -g mode-keys vi 21 + bind-key -T copy-mode-vi v send-keys -X begin-selection 22 + bind-key -T copy-mode-vi V send-keys -X select-line 23 + bind-key -T copy-mode-vi y send-keys -X copy-selection 24 + bind-key -T copy-mode-vi r send-keys -X rectangle-toggle 25 + bind-key -T copy-mode-vi i send-keys -X cancel 26 + bind-key -T copy-mode-vi C-c send-keys -X cancel 27 + 28 + bind-key C-j run-shell "tmux neww -n 'sessionizer' ~/.dotfiles/bin/tmux-sessionizer" 29 + 30 + # bind-key C-j new-window -n "session-switcher" "\ 31 + # tmux list-sessions |\ 32 + # sed -E 's/:.*$//' |\ 33 + # grep -v \"^$(tmux display-message -p '#S')\$\" |\ 34 + # fzf |\ 35 + # xargs tmux switch-client -t"
+3
README.md
··· 25 25 # install fish config 26 26 ln -shf ./fish ~/.config/fish 27 27 28 + # copy tmux config 29 + ln -shf ./tmux.conf ~/.tmux.conf 30 + 28 31 # install lf config 29 32 ln -shf ./lf ~/.config/lf 30 33
+25
bin/tmux-sessionizer
··· 1 + #!/bin/bash 2 + 3 + if [[ $# -eq 1 ]]; then 4 + selected=$1 5 + else 6 + selected=$(find ~/projects ~/repo ~ -mindepth 1 -maxdepth 1 -type d | fzf) 7 + fi 8 + 9 + if [[ -z $selected ]]; then 10 + exit 0 11 + fi 12 + 13 + selected_name=$(basename "$selected" | tr . _) 14 + tmux_running=$(pgrep tmux) 15 + 16 + if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then 17 + tmux new-session -s $selected_name -c $selected 18 + exit 0 19 + fi 20 + 21 + if ! tmux has-session -t=$selected_name 2> /dev/null; then 22 + tmux new-session -ds $selected_name -c $selected 23 + fi 24 + 25 + tmux switch-client -t $selected_name
+2
fish/config.fish
··· 10 10 alias ll="exa -lh --no-user" 11 11 alias la="exa -lha --git --no-user" 12 12 alias nv="foreground_nvim" 13 + alias gs="git status" 14 + alias gb="git checkout" 13 15 alias gr="gh repo clone" 14 16 alias glz="lazygit" 15 17