From d8ee1a648d505ef35351de46227c7e652928b6dc Mon Sep 17 00:00:00 2001 From: Roman Lubij Date: Mon, 2 Mar 2026 12:58:21 +0100 Subject: [PATCH] Update prompt --- Justfile | 3 + common/modules/home/dconf/apps.nix | 4 +- common/modules/home/starship.nix | 108 +++++++++++++---------------- common/modules/packages.nix | 1 + 4 files changed, 56 insertions(+), 60 deletions(-) diff --git a/Justfile b/Justfile index 34ad968..b43375a 100644 --- a/Justfile +++ b/Justfile @@ -19,6 +19,9 @@ clean: rm -rf result rm -rf *.qcow2 +format: + treefmt . + switch: nh os switch diff --git a/common/modules/home/dconf/apps.nix b/common/modules/home/dconf/apps.nix index de3c8e8..b964c3e 100644 --- a/common/modules/home/dconf/apps.nix +++ b/common/modules/home/dconf/apps.nix @@ -11,12 +11,12 @@ }; "org/gnome/Console" = { - custom-font = lib.mkDefault "FiraCode Nerd Font Mono 11"; + custom-font = lib.mkDefault "FiraCode Nerd Font 11"; use-system-font = false; }; "org/gnome/TextEditor" = { - custom-font = lib.mkDefault "Fira Code weight=450 11"; + custom-font = lib.mkDefault "Fira Code Nerd Font weight=450 11"; use-system-font = false; }; diff --git a/common/modules/home/starship.nix b/common/modules/home/starship.nix index 6b15f02..8d09c8c 100644 --- a/common/modules/home/starship.nix +++ b/common/modules/home/starship.nix @@ -9,10 +9,15 @@ settings = { format = lib.concatStrings [ "$hostname" - "\${custom.ssh_status}" "\${custom.distrobox}" - "\${nix_shell}" + "$nix_shell" "$python" + "$nodejs" + "$rust" + "$golang" + "$php" + "\${custom.android}" + "[](fg:#000000)" "[░▒▓](#FFFFFF)" "[ 🐺 ](bg:#FFFFFF fg:#1E91D6)" "[](bg:#0072BB fg:#FFFFFF)" @@ -21,32 +26,45 @@ "$git_branch" "$git_status" "[](fg:#E18335 bg:#061A40)" - "\${custom.android}" - "$nodejs" - "$rust" - "$golang" - "$php" - "[](fg:#061A40 bg:#1D2F51)" "$time" - "[ ](fg:#1D2F51)" + "[ ](fg:#061A40)" "\n$character" ]; + hostname = { + ssh_only = true; + format = "[](fg:#1E91D6)[$hostname](bg:#1E91D6 fg:#FFFFFF)[](fg:#1E91D6) "; + }; + + custom.distrobox = { + when = "printenv CONTAINER_ID"; + command = "echo $CONTAINER_ID"; + format = "[](fg:#FF5F00)[󰏖 $output ](bg:#FF5F00 fg:#FFFFFF)[](fg:#FF5F00) "; + }; + + nix_shell = { + format = "[](fg:#7EBAE4)[ $state ](bg:#7EBAE4 fg:#061A40)[](fg:#7EBAE4) "; + }; + + custom.android = { + when = "test -n \"$IN_ANDROID_ENV\""; + format = "[](fg:#3DDC84)[󰀲 Android ](bg:#3DDC84 fg:#061A40)[](fg:#3DDC84) "; + }; + directory = { style = "fg:#e3e5e5 bg:#0072BB"; format = "[ $path ]($style)"; truncation_length = 3; - truncation_symbol = "…/"; substitutions = { "Documents" = "󰈙 "; - "Downloads" = " "; - "Music" = " "; - "Pictures" = " "; + "Downloads" = "󰇚 "; + "Music" = "󰝚 "; + "Pictures" = "󰙏 "; }; }; git_branch = { - symbol = ""; + symbol = "󰊢"; style = "bg:#E18335"; format = "[[ $symbol $branch ](fg:#0072BB bg:#E18335)]($style)"; }; @@ -56,66 +74,40 @@ format = "[[($all_status$ahead_behind )](fg:#0072BB bg:#E18335)]($style)"; }; + python = { + symbol = "󰌠"; + format = "[](fg:#4B8BBE)[$symbol $version](bg:#4B8BBE fg:#FFFFFF)[](fg:#4B8BBE) "; + }; + nodejs = { - symbol = ""; - style = "bg:#061A40"; - format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + symbol = "󰎙"; + format = "[](fg:#68A063)[$symbol $version](bg:#68A063 fg:#FFFFFF)[](fg:#68A063) "; }; rust = { - symbol = ""; - style = "bg:#061A40"; - format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + symbol = "󱘗"; + format = "[](fg:#CE412B)[$symbol $version](bg:#CE412B fg:#FFFFFF)[](fg:#CE412B) "; }; golang = { - symbol = ""; - style = "bg:#061A40"; - format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + symbol = "󰟓"; + format = "[](fg:#00ADD8)[$symbol $version](bg:#00ADD8 fg:#FFFFFF)[](fg:#00ADD8) "; }; php = { - symbol = ""; - style = "bg:#061A40"; - format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + symbol = "󰌟"; + format = "[](fg:#8892BF)[$symbol $version](bg:#8892BF fg:#FFFFFF)[](fg:#8892BF) "; }; time = { disabled = false; - time_format = "%R"; - style = "bg:#1D2F51"; - format = "[[  $time ](fg:#a0a9cb bg:#1D2F51)]($style)"; + style = "bg:#061A40"; + format = "[[ 󰥔 $time ](fg:#a0a9cb bg:#061A40)]($style)"; }; - nix_shell = { - disabled = false; - impure_msg = "[impure shell](bold red)"; - pure_msg = "[pure shell](bold green)"; - unknown_msg = "[unknown shell](bold yellow)"; - format = "via [☃️ $state( \($name\))](bold blue) "; - }; - - custom.android = { - description = "Show label when inside Android FHS env"; - when = "test -n \"$IN_ANDROID_ENV\""; - symbol = "🤖 "; - style = "fg:green bg:#061A40"; - format = "[ $symbol Android ]($style)"; - }; - - custom.distrobox = { - description = "Indicate when inside a Distrobox container"; - when = "printenv CONTAINER_ID"; - command = "printenv CONTAINER_ID"; - format = "[$symbol$output]($style) "; - symbol = "📦 "; - style = "bold purple"; - }; - - hostname = { - ssh_only = true; - format = "[](fg:#1E91D6)[$hostname](bg:#1E91D6 fg:#FFFFFF)[](fg:#1E91D6) "; - disabled = false; + character = { + success_symbol = "[❯](bold green)"; + error_symbol = "[❯](bold red)"; }; }; }; diff --git a/common/modules/packages.nix b/common/modules/packages.nix index 212a2ec..22bdcbf 100644 --- a/common/modules/packages.nix +++ b/common/modules/packages.nix @@ -53,6 +53,7 @@ curl fet.packages.${pkgs.stdenv.hostPlatform.system}.default ddcutil + direnv discord distrobox docker-buildx