summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules6
m---------tmux/.config/tmux/plugins/tmux-continuum0
m---------tmux/.config/tmux/plugins/tmux-resurrect0
-rw-r--r--tmux/.config/tmux/tmux.conf36
4 files changed, 33 insertions, 9 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..257cfb1
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "tmux/.config/tmux/plugins/tmux-resurrect"]
+ path = tmux/.config/tmux/plugins/tmux-resurrect
+ url = https://github.com/tmux-plugins/tmux-resurrect
+[submodule "tmux/.config/tmux/plugins/tmux-continuum"]
+ path = tmux/.config/tmux/plugins/tmux-continuum
+ url = https://github.com/tmux-plugins/tmux-continuum
diff --git a/tmux/.config/tmux/plugins/tmux-continuum b/tmux/.config/tmux/plugins/tmux-continuum
new file mode 160000
+Subproject 0698e8f4b17d6454c71bf5212895ec055c578da
diff --git a/tmux/.config/tmux/plugins/tmux-resurrect b/tmux/.config/tmux/plugins/tmux-resurrect
new file mode 160000
+Subproject cff343cf9e81983d3da0c8562b01616f12e8d54
diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf
index 67d585e..5372817 100644
--- a/tmux/.config/tmux/tmux.conf
+++ b/tmux/.config/tmux/tmux.conf
@@ -1,5 +1,9 @@
# Adapted from https://www.tonybtw.com/tutorial/tmux/
+# Shortcut to reload configuration.
+unbind r
+bind r source-file $HOME/.config/tmux/tmux.conf
+
# Tells tmux to advertise itself as a 256-color terminal.
set -g default-terminal "tmux-256color"
# Enable true color (24-bit RGB) support.
@@ -22,14 +26,14 @@ bind k select-pane -UZ
bind l select-pane -RZ
# Alt+cursor keys to switch panes without prefix.
-bind -n M-LEFT select-pane -LZ
-bind -n M-DOWN select-pane -DZ
-bind -n M-UP select-pane -UZ
-bind -n M-RIGHT select-pane -RZ
+bind -n M-Left select-pane -LZ
+bind -n M-Down select-pane -DZ
+bind -n M-Up select-pane -UZ
+bind -n M-Right select-pane -RZ
-# Split with v and s (in the same directory)
-bind v split-window -h -c "#{pane_current_path}"
-bind s split-window -v -c "#{pane_current_path}"
+# Split with | and - (in the same directory)
+bind | split-window -h -c "#{pane_current_path}"
+bind - split-window -v -c "#{pane_current_path}"
# Change from 0 based to 1 based because keyboard layout.
set -g base-index 1
@@ -44,8 +48,7 @@ bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
unbind -T copy-mode-vi MouseDragEnd1Pane
-# Hide the status bar until I need it.
-set -g status off
+set -g status on
# Position the status bar at the top when shown.
set -g status-position top
@@ -53,6 +56,9 @@ set -g status-position top
# Toggle showing the status bar
bind SPACE set-option status
+# Alphabetical session list.
+bind s choose-tree -s -O name
+
# Theme colors based on Nord.
black_bright="#4c566a"
gray_light="#D8DEE9"
@@ -76,3 +82,15 @@ set -g window-status-current-format ""
# Set border colors.
set -g pane-border-style "fg=${gray_dark}"
set -g pane-active-border-style "fg=${gray_medium}"
+
+# Style the choose-tree / session picker
+set -g mode-style "fg=#2e3440,bg=#88c0d0" # Dark text on Frost background
+# Style the command line / prompts (Nord 0 background, Nord 8 foreground)
+set -g message-style "fg=#88c0d0,bg=#2e3440,bold"
+
+# Style the command line when in command mode (the ':' prompt)
+set -g message-command-style "fg=#88c0d0,bg=#2e3440"
+
+# Plugins.
+run-shell ~/.config/tmux/plugins/tmux-resurrect/resurrect.tmux
+run-shell ~/.config/tmux/plugins/tmux-continuum/continuum.tmux