feat(bash): add starship prompt
This commit is contained in:
parent
4094dddb54
commit
bb73d4102e
5 changed files with 89 additions and 4 deletions
2
config/ags/TODO
Normal file
2
config/ags/TODO
Normal file
|
@ -0,0 +1,2 @@
|
|||
On fullscreen, make bar disappear (opacity 0)
|
||||
Click to reappear
|
|
@ -26,7 +26,7 @@ set_prompt() {
|
|||
PS1="╭╴$USER_COLOR\u$HOST_COLOR@\h$BRANCH$WHITE:$PURPLE\w$WHITE $LEVEL $STATUS\n╰╴$ "
|
||||
}
|
||||
|
||||
PROMPT_COMMAND="set_prompt \$?; history -a"
|
||||
PROMPT_COMMAND="history -a"
|
||||
|
||||
|
||||
#PATH manipulations
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -20,9 +20,12 @@
|
|||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
console = {
|
||||
#font = "Lat2-Terminus16";
|
||||
keyMap = "ca";
|
||||
#useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
services.kmscon = {
|
||||
enable = true;
|
||||
hwRender = true;
|
||||
extraOptions = "--font-size 12.5 --font-dpi 170 --font-name 'JetBrainsMono Nerd Font'";
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
|
|
@ -1,6 +1,70 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
settings = {
|
||||
format = lib.concatStrings [
|
||||
"╭╴"
|
||||
"[](fg:#bd93f9)"
|
||||
"[ ](bg:#bd93f9 fg:#090c0c)"
|
||||
"[](bg:#715895 fg:#bd93f9)"
|
||||
"$username$hostname"
|
||||
"[](fg:#715895 bg:#382c4a)"
|
||||
"$directory"
|
||||
"[](fg:#382c4a bg:#120e18)"
|
||||
"$git_branch"
|
||||
"[](fg:#120e18)"
|
||||
"\n╰╴$shlvl$character"
|
||||
];
|
||||
|
||||
username = {
|
||||
show_always = true;
|
||||
style_user = "fg:#e3e5e5 bg:#715895";
|
||||
format = "[ $user]($style)";
|
||||
};
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
style = "fg:#e3e5e5 bg:#715895";
|
||||
format = "[@$hostname ]($style)";
|
||||
};
|
||||
|
||||
shlvl = {
|
||||
disabled = false;
|
||||
repeat = true;
|
||||
symbol = " ";
|
||||
format = "[$symbol]($style)";
|
||||
threshold = 1;
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[\\$](bold green)";
|
||||
error_symbol = "[\\$](bold red)";
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "fg:#bd93f9 bg:#382c4a";
|
||||
format = "[ $path ]($style)";
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
|
||||
directory.substitutions = {
|
||||
"Documents" = " ";
|
||||
"Downloads" = " ";
|
||||
"Music" = " ";
|
||||
"Pictures" = " ";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
style = "fg:#715895 bg:#120e18";
|
||||
symbol = "";
|
||||
format = "[ $symbol $branch ]($style)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.bash = { # TODO: deal with root dotfiles
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
|
|
@ -122,6 +122,22 @@ in
|
|||
opacity = 0.8;
|
||||
};
|
||||
|
||||
font = {
|
||||
normal = {
|
||||
family = "JetBrainsMono Nerd Font";
|
||||
style = "Regular";
|
||||
};
|
||||
bold = {
|
||||
family = "JetBrainsMono Nerd Font";
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = "JetBrainsMono Nerd Font";
|
||||
style = "Italic";
|
||||
};
|
||||
size = 12.5;
|
||||
};
|
||||
|
||||
# https://github.com/dracula/alacritty/blob/05faff15c0158712be87d200081633d9f4850a7d/dracula.yml
|
||||
colors = {
|
||||
primary = {
|
||||
|
|
Loading…
Reference in a new issue