From ef80709063d193fac7af9ff0f847bef7319f2124 Mon Sep 17 00:00:00 2001 From: Metin Yalcinkaya Date: Fri, 14 Feb 2025 21:36:14 +1100 Subject: [PATCH] feat(extras): add tmux theme (#278) Co-authored-by: Oli --- README.md | 1 + extras/tmux/onedarkpro_onedark.tmux | 36 +++++++++++++++++++ extras/tmux/onedarkpro_onedark_dark.tmux | 36 +++++++++++++++++++ extras/tmux/onedarkpro_onedark_vivid.tmux | 36 +++++++++++++++++++ extras/tmux/onedarkpro_onelight.tmux | 36 +++++++++++++++++++ lua/onedarkpro/extra/init.lua | 1 + lua/onedarkpro/extra/tmux.lua | 42 +++++++++++++++++++++++ 7 files changed, 188 insertions(+) create mode 100644 extras/tmux/onedarkpro_onedark.tmux create mode 100644 extras/tmux/onedarkpro_onedark_dark.tmux create mode 100644 extras/tmux/onedarkpro_onedark_vivid.tmux create mode 100644 extras/tmux/onedarkpro_onelight.tmux create mode 100644 lua/onedarkpro/extra/tmux.lua diff --git a/README.md b/README.md index 8e7beae..02f5831 100644 --- a/README.md +++ b/README.md @@ -811,3 +811,4 @@ The following colorschemes serve as inspiration: - [Catppuccin/nvim](https://github.com/catppuccin/nvim) - For the genius idea of hashing and caching and pushing the envelope of Neovim colorschemes and the kind PRs - [Nightfox](https://github.com/EdenEast/nightfox.nvim) - For the original code structure - [GitHub nvim theme](https://github.com/projekt0n/github-nvim-theme) - For the logo inspiration +- [folke/tokyonight.nvim](https://github.com/folke/tokyonight.nvim) - For the tmux theme design diff --git a/extras/tmux/onedarkpro_onedark.tmux b/extras/tmux/onedarkpro_onedark.tmux new file mode 100644 index 0000000..97ac408 --- /dev/null +++ b/extras/tmux/onedarkpro_onedark.tmux @@ -0,0 +1,36 @@ +# Original layout from https://github.com/folke/tokyonight.nvim + +set -g mode-style "fg=#98c379,bg=#3d4350" + +set -g message-style "fg=#98c379,bg=#3d4350" +set -g message-command-style "fg=#98c379,bg=#3d4350" + +set -g pane-border-style "fg=#3d4350" +set -g pane-active-border-style "fg=#98c379" + +set -g status "on" +set -g status-justify "left" + +set -g status-style "fg=#98c379,bg=#22262d" + +set -g status-left-length "100" +set -g status-right-length "100" + +set -g status-left-style NONE +set -g status-right-style NONE + +set -g status-left "#[fg=#282c34,bg=#98c379,bold] #S #[fg=#98c379,bg=#22262d,nobold,nounderscore,noitalics]" +set -g status-right "#[fg=#22262d,bg=#22262d,nobold,nounderscore,noitalics]#[fg=#98c379,bg=#22262d] #{prefix_highlight} #[fg=#3d4350,bg=#22262d,bold,nounderscore,noitalics]#[fg=#98c379,bg=#3d4350] %Y-%m-%d  %I:%M %p #[fg=#98c379,bg=#3d4350,nobold,nounderscore,noitalics]#[fg=#282c34,bg=#98c379,bold] #h " +if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' { + set -g status-right "#[fg=#22262d,bg=#22262d,nobold,nounderscore,noitalics]#[fg=#98c379,bg=#22262d] #{prefix_highlight} #[fg=#3d4350,bg=#22262d,bold,nounderscore,noitalics]#[fg=#98c379,bg=#3d4350] %Y-%m-%d  %H:%M #[fg=#98c379,bg=#3d4350,nobold,nounderscore,noitalics]#[fg=#282c34,bg=#98c379,bold] #h " +} + +setw -g window-status-activity-style "underscore,fg=#98c379,bg=#22262d" +setw -g window-status-separator "" +setw -g window-status-style "NONE,fg=#98c379,bg=#22262d" +setw -g window-status-format "#[fg=#22262d,bg=#22262d,nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=#22262d,bg=#22262d,nobold,nounderscore,noitalics]" +setw -g window-status-current-format "#[fg=#22262d,bg=#3d4350,nobold,nounderscore,noitalics]#[fg=#98c379,bg=#3d4350,bold] #I  #W #F #[fg=#3d4350,bg=#22262d,nobold,nounderscore,noitalics]" + +# Requires tmux-plugins/tmux-prefix-highlight +set -g @prefix_highlight_output_prefix "#[fg=#61afef]#[bg=#22262d]#[fg=#22262d]#[bg=#61afef]" +set -g @prefix_highlight_output_suffix "" diff --git a/extras/tmux/onedarkpro_onedark_dark.tmux b/extras/tmux/onedarkpro_onedark_dark.tmux new file mode 100644 index 0000000..93b7fe9 --- /dev/null +++ b/extras/tmux/onedarkpro_onedark_dark.tmux @@ -0,0 +1,36 @@ +# Original layout from https://github.com/folke/tokyonight.nvim + +set -g mode-style "fg=#89ca78,bg=#181818" + +set -g message-style "fg=#89ca78,bg=#181818" +set -g message-command-style "fg=#89ca78,bg=#181818" + +set -g pane-border-style "fg=#181818" +set -g pane-active-border-style "fg=#89ca78" + +set -g status "on" +set -g status-justify "left" + +set -g status-style "fg=#89ca78,bg=#0e0e0e" + +set -g status-left-length "100" +set -g status-right-length "100" + +set -g status-left-style NONE +set -g status-right-style NONE + +set -g status-left "#[fg=#000000,bg=#89ca78,bold] #S #[fg=#89ca78,bg=#0e0e0e,nobold,nounderscore,noitalics]" +set -g status-right "#[fg=#0e0e0e,bg=#0e0e0e,nobold,nounderscore,noitalics]#[fg=#89ca78,bg=#0e0e0e] #{prefix_highlight} #[fg=#181818,bg=#0e0e0e,bold,nounderscore,noitalics]#[fg=#89ca78,bg=#181818] %Y-%m-%d  %I:%M %p #[fg=#89ca78,bg=#181818,nobold,nounderscore,noitalics]#[fg=#000000,bg=#89ca78,bold] #h " +if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' { + set -g status-right "#[fg=#0e0e0e,bg=#0e0e0e,nobold,nounderscore,noitalics]#[fg=#89ca78,bg=#0e0e0e] #{prefix_highlight} #[fg=#181818,bg=#0e0e0e,bold,nounderscore,noitalics]#[fg=#89ca78,bg=#181818] %Y-%m-%d  %H:%M #[fg=#89ca78,bg=#181818,nobold,nounderscore,noitalics]#[fg=#000000,bg=#89ca78,bold] #h " +} + +setw -g window-status-activity-style "underscore,fg=#89ca78,bg=#0e0e0e" +setw -g window-status-separator "" +setw -g window-status-style "NONE,fg=#89ca78,bg=#0e0e0e" +setw -g window-status-format "#[fg=#0e0e0e,bg=#0e0e0e,nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=#0e0e0e,bg=#0e0e0e,nobold,nounderscore,noitalics]" +setw -g window-status-current-format "#[fg=#0e0e0e,bg=#181818,nobold,nounderscore,noitalics]#[fg=#89ca78,bg=#181818,bold] #I  #W #F #[fg=#181818,bg=#0e0e0e,nobold,nounderscore,noitalics]" + +# Requires tmux-plugins/tmux-prefix-highlight +set -g @prefix_highlight_output_prefix "#[fg=#61afef]#[bg=#0e0e0e]#[fg=#0e0e0e]#[bg=#61afef]" +set -g @prefix_highlight_output_suffix "" diff --git a/extras/tmux/onedarkpro_onedark_vivid.tmux b/extras/tmux/onedarkpro_onedark_vivid.tmux new file mode 100644 index 0000000..6d1e73d --- /dev/null +++ b/extras/tmux/onedarkpro_onedark_vivid.tmux @@ -0,0 +1,36 @@ +# Original layout from https://github.com/folke/tokyonight.nvim + +set -g mode-style "fg=#89ca78,bg=#3d434f" + +set -g message-style "fg=#89ca78,bg=#3d434f" +set -g message-command-style "fg=#89ca78,bg=#3d434f" + +set -g pane-border-style "fg=#3d434f" +set -g pane-active-border-style "fg=#89ca78" + +set -g status "on" +set -g status-justify "left" + +set -g status-style "fg=#89ca78,bg=#22252c" + +set -g status-left-length "100" +set -g status-right-length "100" + +set -g status-left-style NONE +set -g status-right-style NONE + +set -g status-left "#[fg=#282c34,bg=#89ca78,bold] #S #[fg=#89ca78,bg=#22252c,nobold,nounderscore,noitalics]" +set -g status-right "#[fg=#22252c,bg=#22252c,nobold,nounderscore,noitalics]#[fg=#89ca78,bg=#22252c] #{prefix_highlight} #[fg=#3d434f,bg=#22252c,bold,nounderscore,noitalics]#[fg=#89ca78,bg=#3d434f] %Y-%m-%d  %I:%M %p #[fg=#89ca78,bg=#3d434f,nobold,nounderscore,noitalics]#[fg=#282c34,bg=#89ca78,bold] #h " +if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' { + set -g status-right "#[fg=#22252c,bg=#22252c,nobold,nounderscore,noitalics]#[fg=#89ca78,bg=#22252c] #{prefix_highlight} #[fg=#3d434f,bg=#22252c,bold,nounderscore,noitalics]#[fg=#89ca78,bg=#3d434f] %Y-%m-%d  %H:%M #[fg=#89ca78,bg=#3d434f,nobold,nounderscore,noitalics]#[fg=#282c34,bg=#89ca78,bold] #h " +} + +setw -g window-status-activity-style "underscore,fg=#89ca78,bg=#22252c" +setw -g window-status-separator "" +setw -g window-status-style "NONE,fg=#89ca78,bg=#22252c" +setw -g window-status-format "#[fg=#22252c,bg=#22252c,nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=#22252c,bg=#22252c,nobold,nounderscore,noitalics]" +setw -g window-status-current-format "#[fg=#22252c,bg=#3d434f,nobold,nounderscore,noitalics]#[fg=#89ca78,bg=#3d434f,bold] #I  #W #F #[fg=#3d434f,bg=#22252c,nobold,nounderscore,noitalics]" + +# Requires tmux-plugins/tmux-prefix-highlight +set -g @prefix_highlight_output_prefix "#[fg=#61afef]#[bg=#22252c]#[fg=#22252c]#[bg=#61afef]" +set -g @prefix_highlight_output_suffix "" diff --git a/extras/tmux/onedarkpro_onelight.tmux b/extras/tmux/onedarkpro_onelight.tmux new file mode 100644 index 0000000..3260e6a --- /dev/null +++ b/extras/tmux/onedarkpro_onelight.tmux @@ -0,0 +1,36 @@ +# Original layout from https://github.com/folke/tokyonight.nvim + +set -g mode-style "fg=#1da912,bg=#e1e1e1" + +set -g message-style "fg=#1da912,bg=#e1e1e1" +set -g message-command-style "fg=#1da912,bg=#e1e1e1" + +set -g pane-border-style "fg=#e1e1e1" +set -g pane-active-border-style "fg=#1da912" + +set -g status "on" +set -g status-justify "left" + +set -g status-style "fg=#1da912,bg=#f3f3f3" + +set -g status-left-length "100" +set -g status-right-length "100" + +set -g status-left-style NONE +set -g status-right-style NONE + +set -g status-left "#[fg=#fafafa,bg=#1da912,bold] #S #[fg=#1da912,bg=#f3f3f3,nobold,nounderscore,noitalics]" +set -g status-right "#[fg=#f3f3f3,bg=#f3f3f3,nobold,nounderscore,noitalics]#[fg=#1da912,bg=#f3f3f3] #{prefix_highlight} #[fg=#e1e1e1,bg=#f3f3f3,bold,nounderscore,noitalics]#[fg=#1da912,bg=#e1e1e1] %Y-%m-%d  %I:%M %p #[fg=#1da912,bg=#e1e1e1,nobold,nounderscore,noitalics]#[fg=#fafafa,bg=#1da912,bold] #h " +if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' { + set -g status-right "#[fg=#f3f3f3,bg=#f3f3f3,nobold,nounderscore,noitalics]#[fg=#1da912,bg=#f3f3f3] #{prefix_highlight} #[fg=#e1e1e1,bg=#f3f3f3,bold,nounderscore,noitalics]#[fg=#1da912,bg=#e1e1e1] %Y-%m-%d  %H:%M #[fg=#1da912,bg=#e1e1e1,nobold,nounderscore,noitalics]#[fg=#fafafa,bg=#1da912,bold] #h " +} + +setw -g window-status-activity-style "underscore,fg=#1da912,bg=#f3f3f3" +setw -g window-status-separator "" +setw -g window-status-style "NONE,fg=#1da912,bg=#f3f3f3" +setw -g window-status-format "#[fg=#f3f3f3,bg=#f3f3f3,nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=#f3f3f3,bg=#f3f3f3,nobold,nounderscore,noitalics]" +setw -g window-status-current-format "#[fg=#f3f3f3,bg=#e1e1e1,nobold,nounderscore,noitalics]#[fg=#1da912,bg=#e1e1e1,bold] #I  #W #F #[fg=#e1e1e1,bg=#f3f3f3,nobold,nounderscore,noitalics]" + +# Requires tmux-plugins/tmux-prefix-highlight +set -g @prefix_highlight_output_prefix "#[fg=#118dc3]#[bg=#f3f3f3]#[fg=#f3f3f3]#[bg=#118dc3]" +set -g @prefix_highlight_output_suffix "" diff --git a/lua/onedarkpro/extra/init.lua b/lua/onedarkpro/extra/init.lua index cb8d6fa..1b8d3d9 100644 --- a/lua/onedarkpro/extra/init.lua +++ b/lua/onedarkpro/extra/init.lua @@ -10,6 +10,7 @@ M.extras = { kitty = { ft = "conf", url = "https://github.com/kovidgoyal/kitty", label = "Kitty" }, lazygit = { ft = "yml", url = "https://github.com/jesseduffield/lazygit", label = "Lazygit" }, rio = { ft = "toml", url = "https://github.com/raphamorim/rio", label = "Rio" }, + tmux = { ft = "tmux", url = "https://github.com/tmux/tmux", label = "tmux" }, wezterm = { ft = "toml", url = "https://github.com/wez/wezterm", label = "Wezterm" }, windows_terminal = { ft = "json", diff --git a/lua/onedarkpro/extra/tmux.lua b/lua/onedarkpro/extra/tmux.lua new file mode 100644 index 0000000..f32b83d --- /dev/null +++ b/lua/onedarkpro/extra/tmux.lua @@ -0,0 +1,42 @@ +local M = {} + +M.template = [[ +# Original layout from https://github.com/folke/tokyonight.nvim + +set -g mode-style "fg=${green},bg=${fg_gutter}" + +set -g message-style "fg=${green},bg=${fg_gutter}" +set -g message-command-style "fg=${green},bg=${fg_gutter}" + +set -g pane-border-style "fg=${fg_gutter}" +set -g pane-active-border-style "fg=${green}" + +set -g status "on" +set -g status-justify "left" + +set -g status-style "fg=${green},bg=${bg_statusline}" + +set -g status-left-length "100" +set -g status-right-length "100" + +set -g status-left-style NONE +set -g status-right-style NONE + +set -g status-left "#[fg=${bg},bg=${green},bold] #S #[fg=${green},bg=${bg_statusline},nobold,nounderscore,noitalics]" +set -g status-right "#[fg=${bg_statusline},bg=${bg_statusline},nobold,nounderscore,noitalics]#[fg=${green},bg=${bg_statusline}] #{prefix_highlight} #[fg=${fg_gutter},bg=${bg_statusline},bold,nounderscore,noitalics]#[fg=${green},bg=${fg_gutter}] %Y-%m-%d  %I:%M %p #[fg=${green},bg=${fg_gutter},nobold,nounderscore,noitalics]#[fg=${bg},bg=${green},bold] #h " +if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' { + set -g status-right "#[fg=${bg_statusline},bg=${bg_statusline},nobold,nounderscore,noitalics]#[fg=${green},bg=${bg_statusline}] #{prefix_highlight} #[fg=${fg_gutter},bg=${bg_statusline},bold,nounderscore,noitalics]#[fg=${green},bg=${fg_gutter}] %Y-%m-%d  %H:%M #[fg=${green},bg=${fg_gutter},nobold,nounderscore,noitalics]#[fg=${bg},bg=${green},bold] #h " +} + +setw -g window-status-activity-style "underscore,fg=${green},bg=${bg_statusline}" +setw -g window-status-separator "" +setw -g window-status-style "NONE,fg=${green},bg=${bg_statusline}" +setw -g window-status-format "#[fg=${bg_statusline},bg=${bg_statusline},nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=${bg_statusline},bg=${bg_statusline},nobold,nounderscore,noitalics]" +setw -g window-status-current-format "#[fg=${bg_statusline},bg=${fg_gutter},nobold,nounderscore,noitalics]#[fg=${green},bg=${fg_gutter},bold] #I  #W #F #[fg=${fg_gutter},bg=${bg_statusline},nobold,nounderscore,noitalics]" + +# Requires tmux-plugins/tmux-prefix-highlight +set -g @prefix_highlight_output_prefix "#[fg=${blue}]#[bg=${bg_statusline}]#[fg=${bg_statusline}]#[bg=${blue}]" +set -g @prefix_highlight_output_suffix "" +]] + +return M