feat: zsh, starship, session vars + graphical option pattern
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
c = config.theme.colors;
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
format = lib.concatStrings [
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_status"
|
||||
"$nix_shell"
|
||||
"$cmd_duration"
|
||||
"$line_break"
|
||||
"$character"
|
||||
];
|
||||
|
||||
username = {
|
||||
style_user = "bold #${lib.removePrefix "#" c.green_b}";
|
||||
style_root = "bold #${lib.removePrefix "#" c.red_b}";
|
||||
format = "[$user]($style) ";
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
format = "at [($hostname)](bold #${lib.removePrefix "#" c.yellow_b}) ";
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "#${lib.removePrefix "#" c.blue_b}";
|
||||
truncation_length = 4;
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = " ";
|
||||
style = "#${lib.removePrefix "#" c.purple_b}";
|
||||
format = "[$symbol$branch]($style) ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "#${lib.removePrefix "#" c.red_b}";
|
||||
format = "[$all_status$ahead_behind]($style) ";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
symbol = " ";
|
||||
style = "#${lib.removePrefix "#" c.aqua_b}";
|
||||
format = "[$symbol$state]($style) ";
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
min_time = 2000;
|
||||
style = "#${lib.removePrefix "#" c.yellow}";
|
||||
format = "took [$duration]($style) ";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[»](bold #${lib.removePrefix "#" c.green_b})";
|
||||
error_symbol = "[»](bold #${lib.removePrefix "#" c.red_b})";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -7,7 +7,8 @@ in
|
||||
# Tells HM to set ZDOTDIR, which moves all zsh config into ~/.config/zsh
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh"; # sets ZDOTDIR automatically
|
||||
dotDir = "${config.xdg.configHome}/zsh";
|
||||
|
||||
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
@@ -20,9 +21,9 @@ in
|
||||
share = true;
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
PROMPT="%F{${c.green_b}}%n@%m%f %F{${c.yellow_b}}%~%f %F{${c.fg4}}»%f "
|
||||
'';
|
||||
# initContent = ''
|
||||
# PROMPT="%F{${c.green_b}}%n@%m%f %F{${c.yellow_b}}%~%f %F{${c.fg4}}»%f "
|
||||
# '';
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza --icons";
|
||||
|
||||
Reference in New Issue
Block a user