diff --git a/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix b/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix index 22de194..e7fe2bf 100755 --- a/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix +++ b/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix @@ -18,6 +18,7 @@ in programs = { terminal = { bash = enabled; + tmux = enabled; btop = enabled; direnv = enabled; git = enabled; diff --git a/modules/home/programs/terminal/nvim/config/lua/lualine-config.lua b/modules/home/programs/terminal/nvim/config/lua/lualine-config.lua index 11af6fe..cbb7602 100755 --- a/modules/home/programs/terminal/nvim/config/lua/lualine-config.lua +++ b/modules/home/programs/terminal/nvim/config/lua/lualine-config.lua @@ -3,23 +3,28 @@ local cached_pr_status = "" -- Read process output local function read_output(err, data) - if err then return end - if not data then return end - cached_pr_status = data + if err then + return + end + if not data then + return + end + cached_pr_status = data end -- Spawn process local function execute_command() - local stdout = vim.loop.new_pipe(false) + local stdout = vim.loop.new_pipe(false) - local spawn_opts = { - detached = true, - stdio = {nil, stdout, nil}, - args = {"-c", "gh pr checks | awk -F'\t' '{ print $2 }'"} - } + local spawn_opts = { + detached = true, + stdio = { nil, stdout, nil }, + args = { "-c", "gh pr checks | awk -F'\t' '{ print $2 }'" }, + } - vim.loop.spawn("bash", spawn_opts, - function() stdout:read_start(read_output) end) + vim.loop.spawn("bash", spawn_opts, function() + stdout:read_start(read_output) + end) end -- Spawn & schedule process @@ -28,22 +33,26 @@ vim.fn.timer_start(300000, execute_command) -- Return status from cache function pr_status() - --    - --     - -- - -- PENDING COLOR - #d29922 - -- PASS COLOR - #3fb950 - -- FAIL COLOR - #f85149 - return cached_pr_status:gsub("\n", ""):gsub("fail", " "):gsub("pass", - " ") - :gsub("pending", " "):gsub("skipping", " "):sub(1, -2) + --    + --     + -- + -- PENDING COLOR - #d29922 + -- PASS COLOR - #3fb950 + -- FAIL COLOR - #f85149 + return cached_pr_status + :gsub("\n", "") + :gsub("fail", " ") + :gsub("pass", " ") + :gsub("pending", " ") + :gsub("skipping", " ") + :sub(1, -2) end -require('lualine').setup({ - options = { - theme = "gruvbox_dark" - -- theme = "nord" - -- theme = "OceanicNext", - }, - sections = {lualine_c = {{pr_status}}} +require("lualine").setup({ + options = { + theme = "catppuccin", + -- theme = "nord" + -- theme = "OceanicNext", + }, + sections = { lualine_c = { { pr_status } } }, }) diff --git a/modules/home/programs/terminal/tmux/default.nix b/modules/home/programs/terminal/tmux/default.nix new file mode 100755 index 0000000..93c3c0d --- /dev/null +++ b/modules/home/programs/terminal/tmux/default.nix @@ -0,0 +1,58 @@ +{ lib, pkgs, config, namespace, ... }: +let + inherit (lib) mkIf; + cfg = config.${namespace}.programs.terminal.tmux; +in +{ + options.${namespace}.programs.terminal.tmux = { + enable = lib.mkEnableOption "tmux"; + }; + + config = mkIf cfg.enable { + programs.tmux = { + enable = true; + clock24 = true; + + plugins = with pkgs.tmuxPlugins; [ + { + plugin = catppuccin; + extraConfig = '' + set -g @catppuccin_flavor "mocha" + set -g @catppuccin_status_background "none" + + # Style & Separators + set -g @catppuccin_window_status_style "basic" + set -g @catppuccin_status_left_separator "█" + set -g @catppuccin_status_middle_separator "" + set -g @catppuccin_status_right_separator "█" + + # Window Titles + set -g @catppuccin_window_text " #W" + set -g @catppuccin_window_current_text " #W" + ''; + } + cpu + yank + ]; + + extraConfig = '' + # Misc Settings + set -g status-position top + set -g mouse on + setw -g mode-keys vi + set -g renumber-windows on + set -ga terminal-overrides ",xterm-256color:Tc" + + # Maintain Directory + bind '"' split-window -c "#{pane_current_path}" + bind % split-window -h -c "#{pane_current_path}" + bind c new-window -c "#{pane_current_path}" + + # Theme + set -g status-left "" + set -g status-right "" + set -ag status-right "#{E:@catppuccin_status_host}" + ''; + }; + }; +}