aboutsummaryrefslogtreecommitdiffstats
path: root/hm/soispha
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-12-29 17:47:27 +0100
committerSoispha <soispha@vhack.eu>2023-12-29 17:57:08 +0100
commit5bd6ec4a12d5dbdc905aeba580b5d6180c52643b (patch)
tree957b822f472a04e9aeca5c36f85be4e7698cc7de /hm/soispha
parentfeat(hm/conf/starship): Init (diff)
downloadnixos-config-5bd6ec4a12d5dbdc905aeba580b5d6180c52643b.zip
feat(hm/conf/starship): Add basic config
Diffstat (limited to 'hm/soispha')
-rw-r--r--hm/soispha/conf/starship/default.nix88
1 files changed, 84 insertions, 4 deletions
diff --git a/hm/soispha/conf/starship/default.nix b/hm/soispha/conf/starship/default.nix
index 1dfe042d..b4c879b5 100644
--- a/hm/soispha/conf/starship/default.nix
+++ b/hm/soispha/conf/starship/default.nix
@@ -1,14 +1,94 @@
-{lib, ...}: {
+{
+ lib,
+ nixosConfig,
+ ...
+}: {
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
- format = lib.concatStrings ["$line_break" "$package" "$line_break" "$character"];
+ format = lib.concatStrings [
+ "$directory"
+ "$username"
+ "$cmd_duration"
+ "$status"
+ "$character"
+ ];
+ right_format = lib.concatStrings (
+ [
+ "$time"
+ "$git_metrics"
+ "$git_branch"
+ "$git_status"
+ "$git_commit"
+ "$git_state"
+ ]
+ ++ lib.optional
+ nixosConfig.soispha.laptop.enable
+ "$battery"
+ );
scan_timeout = 20;
character = {
- success_symbol = "[➜](bold green)";
- error_symbol = "[➜](bold red)";
+ # success_symbol = "[❯](bold blue)";
+ # a = "⬢";
+ success_symbol = "[](bold blue)";
+ error_symbol = "[](bold red)";
+ };
+ status = {
+ disabled = false;
+ format = ''[($common_meaning \($status\))($signal_name \($signal_number\)))]($style)'';
+ };
+ time = {
+ format = ''[\[$time\]]($style)'';
+ };
+ username = {
+ format = "as [$user]($style) ";
+ };
+ git_status = {
+ ahead = "⇡$count";
+ diverged = "⇕⇡$ahead_count⇣$behind_count";
+ behind = "⇣$count";
+ };
+ git_metrics = {
+ disabled = false;
+ ignore_submodules = true;
+ };
+ git_state = {};
+ git_commit = {
+ tag_disabled = false;
+ tag_symbol = "v";
+ format = ''[(\[($hash$tag\])]($style)'';
+ };
+ directory = {
+ truncate_to_repo = true;
+ read_only = "";
+ before_repo_root_style = "black bold dimmed";
+ };
+ cmd_duration = {
+ min_time = 2000; # Milliseconds
+ style = "bold white";
+ };
+ battery = {
+ # '󰁹 '
+ # '󰂄 '
+ # '󰂃 '
+ # '󰁽 '
+ # '󰂎 '
+ display = [
+ {
+ threshold = 10;
+ style = "bold red";
+ }
+ {
+ threshold = 30;
+ style = "bold blue";
+ }
+ {
+ threshold = 50;
+ style = "bold green";
+ }
+ ];
};
};
};