From bf19c62041f626aa92bdcae2fefbb04012e7057d Mon Sep 17 00:00:00 2001 From: willifan Date: Mon, 7 Oct 2024 21:34:44 +0200 Subject: [PATCH 1/6] added tealdeer --- users/willifan/common/utils/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/users/willifan/common/utils/default.nix b/users/willifan/common/utils/default.nix index a85f7c2..8cb2549 100644 --- a/users/willifan/common/utils/default.nix +++ b/users/willifan/common/utils/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { @@ -8,4 +8,11 @@ programs.btop.enable = true; programs.yazi.enable = true; }; + + environment.systemPackages = with pkgs; [ + + tealdeer + + ]; + } From 997e696091179c62be9260a659de6325d25a0381 Mon Sep 17 00:00:00 2001 From: willifan Date: Mon, 7 Oct 2024 21:44:30 +0200 Subject: [PATCH 2/6] added example starship config --- users/willifan/common/shell/starship.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/users/willifan/common/shell/starship.nix b/users/willifan/common/shell/starship.nix index facb35d..b3e27c8 100644 --- a/users/willifan/common/shell/starship.nix +++ b/users/willifan/common/shell/starship.nix @@ -1,4 +1,23 @@ -{ ... }: +{ lib, ... }: { + home-manager.users.willifan.programs.starship = { + enable = true; + enableNushellIntegration = true; + settings = { + add_newline = false; + format = lib.concatStrings [ + "$line_break" + "$package" + "$line_break" + "$character" + ]; + scan_timeout = 10; + character = { + success_symbol = "➜"; + error_symbol = "➜"; + }; + }; + }; + } From 35324b9bd4df623dad8a935f769d0f27646ac1c1 Mon Sep 17 00:00:00 2001 From: willifan Date: Mon, 7 Oct 2024 22:04:26 +0200 Subject: [PATCH 3/6] switched to JetBrainsMonoNerdFont --- users/willifan/desktop/theme/stylix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/willifan/desktop/theme/stylix.nix b/users/willifan/desktop/theme/stylix.nix index 34ca9ac..57d16da 100644 --- a/users/willifan/desktop/theme/stylix.nix +++ b/users/willifan/desktop/theme/stylix.nix @@ -30,7 +30,7 @@ # }; monospace = { package = pkgs.nerdfonts; - name = "HackNerdFontMono-Regular"; + name = "JetBrainsMonoNerdFont-Regular"; }; # sansSerif = { # package = pkgs.; From 54265125458215595357f529df9f00d9773cdc9c Mon Sep 17 00:00:00 2001 From: willifan Date: Mon, 7 Oct 2024 23:17:37 +0200 Subject: [PATCH 4/6] add better starship config --- users/willifan/common/shell/starship.nix | 145 +++++++++++++++++++++-- 1 file changed, 136 insertions(+), 9 deletions(-) diff --git a/users/willifan/common/shell/starship.nix b/users/willifan/common/shell/starship.nix index b3e27c8..4335a65 100644 --- a/users/willifan/common/shell/starship.nix +++ b/users/willifan/common/shell/starship.nix @@ -1,23 +1,150 @@ -{ lib, ... }: +{ lib, config, ... }: { home-manager.users.willifan.programs.starship = { enable = true; enableNushellIntegration = true; settings = { - add_newline = false; format = lib.concatStrings [ - "$line_break" - "$package" - "$line_break" + "$username" + "$directory" + "(" + "$python" + "$conda" + "$nodejs" + "$c" + "$golang" + "$haskell" + "$java" + "$julia" + "$rust" + ")" + "[](fg:fourth bg:fifth)" + "$docker_context" + "[](fg:fifth bg:sixth)" + "(" + "$git_branch" + "$git_status" + ")" + "[](fg:sixth bg:seventh)" + "$time" + "$cmd_duration" "$character" ]; - scan_timeout = 10; + + palette = "pal"; + + # Disables the blank line at the start of the prompt + add_newline = true; + + + palettes.pal = { + first = config.lib.stylix.colors.withHashtag.base00; + second = config.lib.stylix.colors.withHashtag.base01; + third = config.lib.stylix.colors.withHashtag.base02; + fourth = config.lib.stylix.colors.withHashtag.base03; + fifth = config.lib.stylix.colors.withHashtag.base04; + sixth = config.lib.stylix.colors.withHashtag.base05; + seventh = config.lib.stylix.colors.withHashtag.base06; + eighth = config.lib.stylix.colors.withHashtag.base07; + error = config.lib.stylix.colors.withHashtag.base08; + # Text color: + black = "#272D37"; + white = "#CBF4F8"; + github = "#B02B10"; + }; + + username = { + show_always = true; + style_user = "bg:second fg:white"; + style_root = "bg:second fg:white"; + format = "[$user]($style)[](fg:second bg:third)"; + }; + + directory = { + style = "bg:third fg:white"; + format = "[  $path ]($style)($style)[$read_only]($read_only_style)[](fg:third bg:fourth)"; + truncation_symbol = "…/"; + truncate_to_repo = true; + read_only ="  "; + }; + + c = { + symbol = " "; + version_format = "\${raw}"; + style = "bg:fourth fg:white"; + format = "[$symbol($version) ]($style)"; + }; + + golang = { + symbol = " "; + version_format = "\${raw}"; + style = "bg:fourth fg:white"; + format = "[$symbol($version) ]($style)"; + }; + + python = { + symbol = " "; + version_format = "\${raw}"; + style = "bg:fourth fg:white"; + python_binary = ["./venv/bin/python" "./env/Scripts/python" "python" "python3" "python2"]; + format = "[$symbol($version)]($style)[ (\($virtualenv\)) ](bg:fourth fg:white)"; + }; + + conda = { + symbol = " "; + style = "bg:fourth fg:white"; + ignore_base = false; + format = "[$symbol ($environment) ]($style)"; + }; + + haskell = { + symbol = " "; + version_format = "\${raw}"; + style = "bg:fourth fg:white"; + format = "[$symbol($version) ]($style)"; + }; + + rust = { + symbol = " "; + version_format = "\${raw}"; + style = "bg:fourth fg:white"; + format = "[$symbol($version) ]($style)"; + }; + + docker_context = { + symbol = " "; + style = "bg:fifth fg:white"; + format = "[$symbol $context ]($style)"; + }; + + git_branch = { + symbol = " "; + style = "bg:sixth fg:white"; + format = "[$symbol $branch ]($style)"; + }; + + git_status = { + format = "([\($all_status$ahead_behind\) ]($style))"; + style = "bold bg:sixth fg:github"; + }; + + time = { + disabled = false; + time_format = "%R"; # Hour:Minute Format + style = "bg:seventh fg:white"; + format = "[ $time]($style)[](fg:seventh bg:eighth)"; + }; + + cmd_duration = { + style = "bg:eighth fg:white"; + format = "[  $duration ]($style)"; + }; + character = { - success_symbol = "➜"; - error_symbol = "➜"; + success_symbol = "[](fg:eighth bg:eighth)[](fg:eighth)"; + error_symbol = "[](fg:eighth bg:error)[](fg:error)"; }; }; }; - } From d95e3696d3aee5ef19c4de5e6061c2012dd230e5 Mon Sep 17 00:00:00 2001 From: willifan Date: Tue, 8 Oct 2024 10:13:32 +0200 Subject: [PATCH 5/6] improved starship config --- users/willifan/common/shell/starship.nix | 110 ++++++++++++----------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/users/willifan/common/shell/starship.nix b/users/willifan/common/shell/starship.nix index 4335a65..585f20e 100644 --- a/users/willifan/common/shell/starship.nix +++ b/users/willifan/common/shell/starship.nix @@ -6,39 +6,40 @@ enableNushellIntegration = true; settings = { format = lib.concatStrings [ - "$username" + "[  ](fg:twelve bg:trans_blue)" + "[ ](bg:trans_blue)[ ](fg:trans_blue bg:trans_pink)" + "$hostname" + "[ ](bg:trans_pink)[ ](fg:trans_pink bg:trans_white)" "$directory" - "(" - "$python" - "$conda" - "$nodejs" - "$c" - "$golang" - "$haskell" - "$java" - "$julia" - "$rust" - ")" - "[](fg:fourth bg:fifth)" - "$docker_context" - "[](fg:fifth bg:sixth)" + "[ ](bg:trans_white)[ ](fg:trans_white bg:trans_pink)" "(" "$git_branch" "$git_status" ")" - "[](fg:sixth bg:seventh)" - "$time" - "$cmd_duration" + "[ ](bg:trans_pink)[ ](fg:trans_pink bg:trans_blue)" "$character" ]; - palette = "pal"; + right_format = lib.concatStrings [ + "$cmd_duration" + "(" + "$python" + "$conda" + "$c" + "$cmake" + "$golang" + "$haskell" + "$rust" + ")" + ]; + + palette = "stylix"; # Disables the blank line at the start of the prompt add_newline = true; - palettes.pal = { + palettes.stylix = { first = config.lib.stylix.colors.withHashtag.base00; second = config.lib.stylix.colors.withHashtag.base01; third = config.lib.stylix.colors.withHashtag.base02; @@ -47,26 +48,41 @@ sixth = config.lib.stylix.colors.withHashtag.base05; seventh = config.lib.stylix.colors.withHashtag.base06; eighth = config.lib.stylix.colors.withHashtag.base07; - error = config.lib.stylix.colors.withHashtag.base08; + baseeight = config.lib.stylix.colors.withHashtag.base08; + basenine = config.lib.stylix.colors.withHashtag.base09; + ten = config.lib.stylix.colors.withHashtag.base0A; + eleven = config.lib.stylix.colors.withHashtag.base0B; + twelve = config.lib.stylix.colors.withHashtag.base0C; + thirteen = config.lib.stylix.colors.withHashtag.base0D; + fourteen = config.lib.stylix.colors.withHashtag.base0E; + fifteen = config.lib.stylix.colors.withHashtag.base0F; + trans_blue = "#55CDFD"; + trans_pink = "#F6AAB7"; + trans_white = "#FFFFFF"; + pride_red = "#FF1E26"; + pride_orange = "#FE941E"; + pride_yellow = "#FFFF00"; + pride_green = "#06BD00"; + pride_blue = "#001A98"; + pride_violet = "#760088"; # Text color: black = "#272D37"; white = "#CBF4F8"; github = "#B02B10"; }; - username = { - show_always = true; - style_user = "bg:second fg:white"; - style_root = "bg:second fg:white"; - format = "[$user]($style)[](fg:second bg:third)"; + hostname = { + ssh_only = false; + style = "bg:trans_pink fg:twelve"; + format = "[$hostname](bold $style)"; }; directory = { - style = "bg:third fg:white"; - format = "[  $path ]($style)($style)[$read_only]($read_only_style)[](fg:third bg:fourth)"; + style = "bg:trans_white fg:twelve"; + format = "[ $path](bold $style)($style)[$read_only](bold $style)"; truncation_symbol = "…/"; truncate_to_repo = true; - read_only ="  "; + read_only =" "; }; c = { @@ -76,6 +92,13 @@ format = "[$symbol($version) ]($style)"; }; + cmake = { + symbol = "△ "; + version_format = "\${raw}"; + style = "bg:fourth fg:white"; + format = "[$symbol($version) ]($style)"; + }; + golang = { symbol = " "; version_format = "\${raw}"; @@ -112,38 +135,25 @@ format = "[$symbol($version) ]($style)"; }; - docker_context = { - symbol = " "; - style = "bg:fifth fg:white"; - format = "[$symbol $context ]($style)"; - }; - git_branch = { symbol = " "; - style = "bg:sixth fg:white"; - format = "[$symbol $branch ]($style)"; + style = "bg:trans_pink fg:twelve"; + format = "[$symbol $branch ](bold $style)"; }; git_status = { - format = "([\($all_status$ahead_behind\) ]($style))"; - style = "bold bg:sixth fg:github"; - }; - - time = { - disabled = false; - time_format = "%R"; # Hour:Minute Format - style = "bg:seventh fg:white"; - format = "[ $time]($style)[](fg:seventh bg:eighth)"; + style = "bold bg:trans_pink fg:twelve"; + format = "([\($all_status$ahead_behind\)](bold $style))"; }; cmd_duration = { - style = "bg:eighth fg:white"; - format = "[  $duration ]($style)"; + style = "bg:eighth fg:twelve"; + format = "[  $duration ](bold $style)"; }; character = { - success_symbol = "[](fg:eighth bg:eighth)[](fg:eighth)"; - error_symbol = "[](fg:eighth bg:error)[](fg:error)"; + success_symbol = "[:3 ](bold fg:twelve bg:trans_blue)[](fg:trans_blue)"; + error_symbol = "[:o ](bold fg:twelve bg:trans_blue)[](fg:trans_blue)"; }; }; }; From 42313777a39083e9e77537c74e2d701de7f8083a Mon Sep 17 00:00:00 2001 From: willifan Date: Wed, 9 Oct 2024 14:08:29 +0200 Subject: [PATCH 6/6] set nushell as default --- users/willifan/common/shell/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/users/willifan/common/shell/default.nix b/users/willifan/common/shell/default.nix index c362ab4..08704ad 100644 --- a/users/willifan/common/shell/default.nix +++ b/users/willifan/common/shell/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { imports = [ @@ -8,4 +8,6 @@ ./zsh.nix ]; + users.users.willifan.shell = pkgs.nushell; + }