-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.remote.conf
88 lines (74 loc) · 3.05 KB
/
tmux.remote.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# ----------------------------------------------------------------------------
# Contributors: Eb
# Project name: tmux.remote.conf
# Version: 0.1
# Description:
# These are tmux configs that are loaded when inside a remote tmux session.
# Dependencies:
# - tmux
# Date created: 30/06/2023
# Last updated: 30/06/2023
# ----------------------------------------------------------------------------
# show status bar at top for remote session,
# so it do not stack together with local session's one
set -g status-position top
# Colors:
# Most colors are not used, but kept for when I need to reference gruvbox-material colors
color_bg='#282828'
color_bg2='#a89984'
color_bg3='#3c3836'
color_bg4='#5b534d'
color_bg5='#32302f'
color_fg='#ddc7a1'
color_fg2='#a89984'
color_red='#ea6962'
color_orange='#e78a4e'
color_yellow='#d8a657'
color_green='#a9b665'
color_aqua='#89b482'
color_blue='#7daea3'
color_purple='#d3869b'
# Theme contract
dark_bg="$color_bg"
dark_bg2="$color_bg5"
dark_bg3="$color_bg3"
dark_bg4="$color_bg4"
light_bg2="$color_bg2"
text_on_light_bg="$color_bg"
text_on_dark_bg="$color_fg"
text_on_dark_bg2="$color_fg2"
active_window_bg="$color_aqua"
color_status_text="$dark_bg3"
color_window_off_status_bg="$dark_bg3"
# Status left
set -g status-left-style "none"
# set -g status-left "#[fg=$text_on_dark_bg2,bg=$dark_bg2,bold] #S "
set -g status-left "#{?client_prefix,#[bg=$color_green]#[fg=$text_on_light_bg],} #S "
# Status Right
set -g status-right-style "none"
# right_column_1="#[fg=$text_on_dark_bg2,bg=$dark_bg2, nobold] #(gitmux -cfg $HOME/.config/gitmux/.gitmux.conf #{pane_current_path})"
right_column_2="#[fg=$text_on_dark_bg,bg=$dark_bg2, nobold] #(tmux-battery)"
right_column_3="#[fg=$color_aqua,bg=$dark_bg2, nobold] #h @ #(tmux-ip)"
right_column_4="#[fg=$text_on_dark_bg2,bg=$dark_bg2, nobold] #(tmux-date)"
right_column_5="#[fg=$color_aqua,bg=$dark_bg2, nobold] #(tmux-diskfree)"
set -g status-right " ${right_column_1} ${right_column_5} ${right_column_3} "
# ------------ #
# Tmux Plugins #
# ------------ #
# https://github.com/tmux-plugins/tmux-resurrect
run-shell $HOME/.tmux/plugins/tmux-resurrect/resurrect.tmux
# NOTE:
# resurrect nvim sessions
# SOURCE: https://github.com/tmux-plugins/tmux-resurrect/blob/master/docs/restoring_vim_and_neovim_sessions.md
# Recommended plugin to save nvim sessions automatically: https://github.com/tpope/vim-obsession
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurect-processes 'nvim zsh'
# NOTE:
# SOURCE: https://discourse.nixos.org/t/how-to-get-tmux-resurrect-to-restore-neovim-sessions/30819
# resurrecting nvim sessions does not work without the below:
resurrect_dir="$HOME/.tmux/resurrect"
set -g @resurrect-dir $resurrect_dir
set -g @resurrect-hook-post-save-all 'target=$(readlink -f $resurrect_dir/last); sed "s| --cmd .*-vim-pack-dir||g; s|/etc/profiles/per-user/$USER/bin/||g; s|/home/$USER/.nix-profile/bin/||g" $target | sponge $target'
# https://github.com/tmux-plugins/tmux-continuum
run-shell $HOME/.tmux/plugins/tmux-continuum/continuum.tmux