From bfaf299b7f41c6ff4d315f1cfd368e04177a75ab Mon Sep 17 00:00:00 2001 From: thuan Date: Mon, 6 Sep 2021 16:36:12 +0700 Subject: [PATCH] add tmux support close #7 --- extras/tmux/zenbones.tmux | 16 +++++++++++++++ lua/zenbones/build.lua | 2 +- lua/zenbones/build/tmux.lua | 40 +++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 extras/tmux/zenbones.tmux create mode 100644 lua/zenbones/build/tmux.lua diff --git a/extras/tmux/zenbones.tmux b/extras/tmux/zenbones.tmux new file mode 100644 index 0000000..008c80c --- /dev/null +++ b/extras/tmux/zenbones.tmux @@ -0,0 +1,16 @@ +set -g base-index 1 +set -g pane-base-index 1 +set -g renumber-windows on +set -g status-position top +set -as terminal-overrides ",gnome*:Tc" +set -g status-left ' #[fg='#88507D',bold]#{s/root//:client_key_table} ' +set -g status-right '#[fg='#88507D',bold] [#S]#[fg='#88507D',bold] [%d/%m] #[fg='#88507D',bold][%I:%M%p] ' +set -g status-style fg='#88507D',bg='#F0EDEC' +set -g window-status-current-style fg='#88507D',bg='#F0EDEC',bold +set -g pane-border-style fg='#88507D' +set -g pane-active-border-style fg='#88507D' +set -g message-style fg='#2C363C',bg='#D2DFE7' +set -g display-panes-active-colour '#88507D' +set -g display-panes-colour '#88507D' +set -g clock-mode-colour '#88507D' +set -g mode-style fg='#2C363C',bg='#D2DFE7' diff --git a/lua/zenbones/build.lua b/lua/zenbones/build.lua index ca58955..825bdfd 100644 --- a/lua/zenbones/build.lua +++ b/lua/zenbones/build.lua @@ -17,7 +17,7 @@ local function write_template(path, template, values) end local function build() - local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine", "lightline" } + local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" } for _, t in ipairs(templates) do write_template(unpack(require("zenbones.build." .. t))) end diff --git a/lua/zenbones/build/tmux.lua b/lua/zenbones/build/tmux.lua new file mode 100644 index 0000000..cac9066 --- /dev/null +++ b/lua/zenbones/build/tmux.lua @@ -0,0 +1,40 @@ +local template = [[set -g base-index 1 +set -g pane-base-index 1 +set -g renumber-windows on +set -g status-position top +set -as terminal-overrides ",gnome*:Tc" +set -g status-left ' #[fg='${color5}',bold]#{s/root//:client_key_table} ' +set -g status-right '#[fg='${color5}',bold] [#S]#[fg='${color5}',bold] [%d/%m] #[fg='${color5}',bold][%I:%M%p] ' +set -g status-style fg='${color5}',bg='${color7}' +set -g window-status-current-style fg='${color5}',bg='${color7}',bold +set -g pane-border-style fg='${color5}' +set -g pane-active-border-style fg='${color5}' +set -g message-style fg='${color0}',bg='${selection_background}' +set -g display-panes-active-colour '${color5}' +set -g display-panes-colour '${color5}' +set -g clock-mode-colour '${color5}' +set -g mode-style fg='${color0}',bg='${selection_background}' +]] + +local theme = require "zenbones" +local terminal = require "zenbones.terminal" + +local bg = theme.Normal.bg.hex +local fg = theme.Normal.fg.hex +local values = { + background = bg, + foreground = fg, + selection_background = theme.Visual.bg.hex, + selection_foreground = fg, + url_color = terminal.colors[14].hex, + cursor = fg, + active_tab_background = theme.Search.bg.hex, + active_tab_foreground = fg, + inactive_tab_background = theme.StatusLine.bg.hex, + inactive_tab_foreground = fg, +} +for i, v in ipairs(terminal.colors) do + values["color" .. (i - 1)] = v.hex +end + +return { "extras/tmux/zenbones.tmux", template, values }