From 6bb2d414f0414cc3afc9c106afc2b0a5870265e4 Mon Sep 17 00:00:00 2001 From: zackartz Date: Sat, 15 Jun 2024 21:27:19 -0400 Subject: [PATCH] customize oh-my-posh a little bit --- modules/home/apps/tools/ohmyposh/default.nix | 71 +++++++++++++++++++- modules/home/apps/tools/tmux/default.nix | 19 +++--- shells/default/default.nix | 1 + 3 files changed, 81 insertions(+), 10 deletions(-) diff --git a/modules/home/apps/tools/ohmyposh/default.nix b/modules/home/apps/tools/ohmyposh/default.nix index be640bd..28f9715 100644 --- a/modules/home/apps/tools/ohmyposh/default.nix +++ b/modules/home/apps/tools/ohmyposh/default.nix @@ -16,7 +16,76 @@ in { programs.oh-my-posh = { enable = true; enableZshIntegration = true; - useTheme = "catppuccin"; + settings = { + palette = { + os = "#ACB0BE"; + pink = "#F5BDE6"; + lavender = "#B7BDF8"; + blue = "#8AADF4"; + wight = "#FFFFFF"; + text = "#494D64"; + }; + blocks = [ + { + alignment = "left"; + segments = [ + { + background = "p:blue"; + foreground = "p:wight"; + "powerline_symbol" = ""; + "leading_diamond" = "█"; + style = "diamond"; + template = "{{.Icon}} "; + type = "os"; + } + { + background = "p:blue"; + foreground = "p:text"; + "powerline_symbol" = ""; + style = "diamond"; + template = "{{ .UserName }}@{{ .HostName }}"; + type = "session"; + } + { + background = "p:pink"; + foreground = "p:text"; + properties = { + "folder_icon" = "..\ue5fe.."; + "home_icon" = "~"; + style = "agnoster_short"; + }; + "powerline_symbol" = ""; + style = "powerline"; + template = " {{ .Path }}"; + type = "path"; + } + { + background = "p:lavender"; + foreground = "p:text"; + style = "powerline"; + properties = { + "branch_icon" = " "; + "cherry_pick_icon" = " "; + "commit_icon" = " "; + "fetch_status" = false; + "fetch_upstream_icon" = false; + "merge_icon" = " "; + "no_commits_icon" = " "; + "rebase_icon" = " "; + "revert_icon" = " "; + "tag_icon" = " "; + }; + "powerline_symbol" = ""; + template = " {{ .HEAD }} "; + type = "git"; + } + ]; + type = "prompt"; + } + ]; + "final_space" = true; + version = 2; + }; }; }; } diff --git a/modules/home/apps/tools/tmux/default.nix b/modules/home/apps/tools/tmux/default.nix index 96b45ce..72ffab0 100644 --- a/modules/home/apps/tools/tmux/default.nix +++ b/modules/home/apps/tools/tmux/default.nix @@ -18,13 +18,13 @@ in { dreamsofcode-io-catppuccin-tmux = pkgs.tmuxPlugins.mkTmuxPlugin { - pluginName = "tokyo-night-tmux"; - version = "v1.5.3"; + pluginName = "catppuccin"; + version = "unstable-2023-01-06"; src = pkgs.fetchFromGitHub { - owner = "janoamaral"; - repo = "tokyo-night-tmux"; - rev = "v1.5.3"; - sha256 = "sha256-3rMYYzzSS2jaAMLjcQoKreE0oo4VWF9dZgDtABCUOtY="; + owner = "dreamsofcode-io"; + repo = "catppuccin-tmux"; + rev = "b4e0715356f820fc72ea8e8baf34f0f60e891718"; + sha256 = "sha256-FJHM6LJkiAwxaLd5pnAoF3a7AE1ZqHWoCpUJE0ncCA8="; }; }; in { @@ -40,18 +40,19 @@ in { tmuxPlugins.sensible tmuxPlugins.vim-tmux-navigator tmuxPlugins.yank + tmuxPlugins.cpu ]; extraConfig = '' set-option -sa terminal-overrides ",xterm*:Tc" set -g mouse on - set -g @catppuccin-flavor 'mocha' - set -g base-index 1 set -g pane-base-index 1 setw -g mode-keys vi set-window-option -g pane-base-index 1 set-option -g renumber-windows on + + set -g @catppuccin-flavor 'mocha' set -g @catppuccin_window_left_separator "" set -g @catppuccin_window_right_separator " " set -g @catppuccin_window_middle_separator " █" @@ -60,7 +61,7 @@ in { set -g @catppuccin_window_default_text "#W" set -g @catppuccin_window_current_fill "number" set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}" - set -g @catppuccin_status_modules_right "directory meetings date_time" + set -g @catppuccin_status_modules_right "directory meetings cpu date_time uptime" set -g @catppuccin_status_modules_left "session" set -g @catppuccin_status_left_separator " " set -g @catppuccin_status_right_separator " " diff --git a/shells/default/default.nix b/shells/default/default.nix index b34b556..96bbe8a 100644 --- a/shells/default/default.nix +++ b/shells/default/default.nix @@ -10,5 +10,6 @@ mkShell { stylua lua-language-server luajitPackages.lua-lsp + python3 ]; }