Skip to content

Commit 1a8cc68

Browse files
committed
feat: add macos tmux light dark theme switching
1 parent b1580a4 commit 1a8cc68

4 files changed

Lines changed: 15 additions & 0 deletions

File tree

.chezmoiignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
.zprofile
2222
Library
2323
Library/**
24+
.config/tmux/oasis-dune-light.conf
25+
.config/tmux/oasis-dune-dark.conf
2426
{{- end }}
2527

2628
# Always ignore these
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set -g @oasis_flavor "dune_dark"
2+
if-shell "test -e ~/.tmux/plugins/tmux-oasis/oasis_tmux.conf" \
3+
"source-file ~/.tmux/plugins/tmux-oasis/oasis_tmux.conf"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set -g @oasis_flavor "dune_light_3"
2+
if-shell "test -e ~/.tmux/plugins/tmux-oasis/oasis_tmux.conf" \
3+
"source-file ~/.tmux/plugins/tmux-oasis/oasis_tmux.conf"

dot_tmux.conf.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ set-window-option -g mode-keys vi
77
set -g @plugin 'tmux-plugins/tpm'
88
set -g @plugin 'tmux-plugins/tmux-sensible'
99
{{- if eq .chezmoi.os "darwin" }}
10+
set -g @plugin 'uhs-robert/tmux-oasis'
1011
set -g @plugin 'erikw/tmux-dark-notify'
12+
set -g @oasis_flavor "dune_dark"
13+
set -g @dark-notify-theme-path-light '$HOME/.config/tmux/oasis-dune-light.conf'
14+
set -g @dark-notify-theme-path-dark '$HOME/.config/tmux/oasis-dune-dark.conf'
1115
{{- else }}
1216
set -g @plugin 'dracula/tmux'
1317
{{- end }}
@@ -26,6 +30,9 @@ bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip
2630
{{- if eq .chezmoi.os "darwin" }}
2731
# macOS: tpm installed via Homebrew (`brew install tpm`)
2832
run -b '/opt/homebrew/opt/tpm/share/tpm/tpm'
33+
34+
if-shell "test -e ~/.local/state/tmux/tmux-dark-notify-theme.conf" \
35+
"source-file ~/.local/state/tmux/tmux-dark-notify-theme.conf"
2936
{{- else }}
3037
# Linux: tpm cloned to ~/.tmux/plugins/tpm via .chezmoiexternal.toml
3138
run -b '~/.tmux/plugins/tpm/tpm'

0 commit comments

Comments
 (0)