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