diff options
author | Jasper Ras <jaspert.ras@gmail.com> | 2025-02-06 22:03:10 +0000 |
---|---|---|
committer | Jasper Ras <jaspert.ras@gmail.com> | 2025-02-06 22:19:49 +0000 |
commit | f71051f47158f57091306e269352d7579522e426 (patch) | |
tree | 3b112ddd10797c8669e9b68d483b205d49c3035b /configuration/home-manager/core/shell.nix | |
parent | 463f0d40c6ee02e5512269d2e370506a8ca8f965 (diff) |
bluurb
Diffstat (limited to 'configuration/home-manager/core/shell.nix')
-rw-r--r-- | configuration/home-manager/core/shell.nix | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/configuration/home-manager/core/shell.nix b/configuration/home-manager/core/shell.nix new file mode 100644 index 0000000..183b9ae --- /dev/null +++ b/configuration/home-manager/core/shell.nix @@ -0,0 +1,69 @@ +{ pkgs, lib, ... }: +{ + programs.zsh = { + enable = true; + defaultKeymap = "emacs"; + initExtra = '' + # https://github.com/jeffreytse/zsh-vi-mode + source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh + ''; + shellAliases = { + g = "git"; + }; + }; + + programs.starship = { + enable = true; + settings = { + directory.style = "blue"; + + format = lib.concatStrings [ + "$username" + "$hostname" + "$directory" + "$git_branch" + "$git_state" + "$git_status" + "$cmd_duration" + "$line_break" + "$python" + "$openstack" + "$character" + ]; + + character = { + success_symbol = "[❯](purple)"; + error_symbol = "[❯](red)"; + vimcmd_symbol = "[❮](green)"; + }; + + git_branch = { + format = "[$branch]($style)"; + style = "bright-black"; + }; + + git_status = { + format = + "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"; + style = "cyan"; + conflicted = ""; + untracked = ""; + modified = ""; + staged = ""; + renamed = ""; + deleted = ""; + stashed = "≡"; + }; + + git_state = { + format = "'([$state( $progress_current/$progress_total)]($style))' "; + style = "bright-black"; + }; + + cmd_duration = { + format = "[$duration]($style) "; + style = "yellow"; + }; + }; + }; +} |