diff --git a/home/file/tmux/module/Copy.nix b/home/file/tmux/module/Copy.nix index 4ff69c70..c9836272 100644 --- a/home/file/tmux/module/Copy.nix +++ b/home/file/tmux/module/Copy.nix @@ -1,17 +1,9 @@ -{ - config, - ... -}: let - fg = config.module.style.color.fg.dark; - selection = config.module.style.color.selection; -in { +{ ... }: { text = '' setw -g mode-keys vi bind -n M-v copy-mode bind -n M-p choose-buffer; bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" - - set -g mode-style "fg=#${fg} bg=#${selection} bold" ''; } diff --git a/home/file/tmux/module/Split.nix b/home/file/tmux/module/Split.nix index 9447a3d0..da56a06c 100644 --- a/home/file/tmux/module/Split.nix +++ b/home/file/tmux/module/Split.nix @@ -1,10 +1,4 @@ -{ - config, - ... -}: let - accent = config.module.style.color.accent; - bg = config.module.style.color.bg.regular; - +{ ... }: let stepHorizontal = 1; stepVertical = 1; in { @@ -33,8 +27,5 @@ in { bind -n M-c kill-pane bind -n M-C kill-pane -a - - set -g pane-border-style "fg=#${bg}" - set -g pane-active-border-style "fg=#${accent}" ''; } diff --git a/home/file/tmux/module/Status.nix b/home/file/tmux/module/Status.nix index e0cc295b..f2260304 100644 --- a/home/file/tmux/module/Status.nix +++ b/home/file/tmux/module/Status.nix @@ -1,26 +1,16 @@ -{ - config, - ... -}: let - accent = config.module.style.color.accent; - fg = config.module.style.color.fg.light; -in { +{ ... }: { text = '' bind-key -n M-f set-option -g status; set -g status-left-length 50 set -g status-position bottom set -g status-justify left - set -g status-style "fg=#${fg}" set -g status-left "#[bold] #H-#S #[default]" set -g status-right "" set-window-option -g window-status-separator "" - setw -g window-status-current-style "fg=#${accent} bold" setw -g window-status-current-format " #W " - - setw -g window-status-style "" setw -g window-status-format " #W " set-window-option -g visual-bell off diff --git a/home/file/tmux/module/Style.nix b/home/file/tmux/module/Style.nix new file mode 100644 index 00000000..6499629b --- /dev/null +++ b/home/file/tmux/module/Style.nix @@ -0,0 +1,34 @@ +{ + config, + ... +}: let + accent = config.module.style.color.accent; + bg = config.module.style.color.bg.regular; + fg = config.module.style.color.fg.light; + selectionBg = config.module.style.color.selection; + selectionFg = config.module.style.color.fg.dark; +in { + # ISSUE: No way to specify `choose` mode style. + # SEE: https://github.com/tmux/tmux/issues/4264 + text = '' + set -g mode-style "fg=#${selectionFg} bg=#${selectionBg} bold" + + setw -g window-status-current-style "fg=#${accent} bold" + setw -g window-status-style "" + + set -g pane-border-style "fg=#${bg}" + set -g pane-active-border-style "fg=#${accent}" + + set -g status-style "fg=#${fg}" + + set -g menu-style "fg=#${fg}" + set -g menu-selected-style "fg=#${fg} bg=#${bg} bold" + set -g menu-border-style "fg=#${bg}" + + set -g popup-style "fg=#${fg}" + set -g popup-border-style "fg=#${bg}" + + set -g display-panes-colour "#${bg}" + set -g display-panes-active-colour "#${accent}" + ''; +}