mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: adjust starship prompt and install fish fzf
This commit is contained in:
parent
f25a7cc241
commit
6bfa0187c7
5 changed files with 80 additions and 74 deletions
|
@ -35,7 +35,7 @@ in {
|
|||
{
|
||||
keyMap = "de-latin1-nodeadkeys";
|
||||
}
|
||||
// lib.mkIf config.video.hidpi.enable {
|
||||
// lib.mkIf config.hardware.video.hidpi.enable {
|
||||
font = "ter-v28n";
|
||||
packages = with pkgs; [terminus_font];
|
||||
};
|
||||
|
|
|
@ -12,6 +12,7 @@ with self.pkgs.${system};
|
|||
ragenix
|
||||
rnix-lsp
|
||||
statix
|
||||
update-nix-fetching
|
||||
|
||||
# Lua
|
||||
stylua
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
bandwhich
|
||||
btop
|
||||
fd
|
||||
file
|
||||
neofetch
|
||||
rclone
|
||||
ripgrep
|
||||
|
@ -29,6 +30,7 @@
|
|||
tree
|
||||
rage
|
||||
];
|
||||
|
||||
shellAliases = {
|
||||
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
|
||||
t = "tree -F --dirsfirst -L 2";
|
||||
|
@ -46,6 +48,8 @@
|
|||
ip = "ip --color";
|
||||
tmux = "tmux -2";
|
||||
rg = "rg -S";
|
||||
|
||||
zf = "zathura --fork";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -2,50 +2,35 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
with lib; {
|
||||
# FIXME: ctrl-del not working
|
||||
# FIXME: esc goes into vim mode, i hate it.
|
||||
# FIXME: fzf on tab missing
|
||||
# FIXME: DEL also deletes to the left :(
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = lib.mkMerge [
|
||||
(lib.mkBefore ''
|
||||
set -g ATUIN_NOBIND true
|
||||
set -g fish_escape_delay_ms 300
|
||||
set -g fish_greeting
|
||||
'')
|
||||
(lib.mkAfter ''
|
||||
enable_ayu_theme_dark
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell fish | source
|
||||
fish_vi_key_bindings insert
|
||||
# atuin
|
||||
bind -M insert \cr _atuin_search
|
||||
# quickly open text file
|
||||
bind -M insert \co 'fzf | xargs -r $VISUAL'
|
||||
'')
|
||||
];
|
||||
plugins = [
|
||||
{
|
||||
name = "ayu-theme.fish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "edouard-lopez";
|
||||
repo = "ayu-theme.fish";
|
||||
rev = "d351d24263d87bef3a90424e0e9c74746673e383";
|
||||
hash = "sha256-rx9izD2pc3hLObOehuiMwFB4Ta5G1lWVv9Jdb+JHIz0=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "autopair.fish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jorgebucaran";
|
||||
repo = "autopair.fish";
|
||||
rev = "1.0.4";
|
||||
hash = "sha256-s1o188TlwpUQEN3X5MxUlD/2CFCpEkWu83U9O+wg3VU=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
# FIXME: ignore certain history entries (" .*", ...)
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = mkMerge [
|
||||
(mkBefore ''
|
||||
set -g ATUIN_NOBIND true
|
||||
set -g fish_greeting
|
||||
set -g fish_autosuggestion_enabled 0
|
||||
set -U FZF_COMPLETE 0
|
||||
'')
|
||||
(mkAfter ''
|
||||
bind \cr _atuin_search
|
||||
'')
|
||||
];
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "fzf";
|
||||
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
|
||||
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,36 +6,37 @@
|
|||
format = lib.concatStrings [
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_commit"
|
||||
" $directory "
|
||||
"($git_branch )"
|
||||
"($git_commit )"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$character"
|
||||
];
|
||||
right_format = lib.concatStrings [
|
||||
"$status"
|
||||
"$cmd_duration"
|
||||
"$jobs"
|
||||
"$package"
|
||||
"$python"
|
||||
"$rust"
|
||||
"$nix_shell"
|
||||
"($status )"
|
||||
"($cmd_duration )"
|
||||
"($jobs )"
|
||||
"($python )"
|
||||
"($rust )"
|
||||
"($nix_shell )"
|
||||
"$time"
|
||||
];
|
||||
|
||||
username = {
|
||||
format = "[$user]($style) ";
|
||||
format = "[$user]($style)";
|
||||
style_root = "red";
|
||||
style_user = "cyan";
|
||||
show_always = true;
|
||||
};
|
||||
hostname = {
|
||||
format = "[$ssh_symbol$hostname]($style) ";
|
||||
format = "[$ssh_symbol$hostname]($style)";
|
||||
ssh_only = false;
|
||||
ssh_symbol = "🌐";
|
||||
style = "cyan";
|
||||
};
|
||||
directory = {
|
||||
format = "[$path]($style)[$read_only]($read_only_style)";
|
||||
fish_style_pwd_dir_length = 1;
|
||||
style = "bold blue";
|
||||
};
|
||||
|
@ -48,41 +49,56 @@
|
|||
vimcmd_visual_symbol = "[](bold yellow)";
|
||||
};
|
||||
git_branch = {
|
||||
format = "[$symbol$branch]($style) ";
|
||||
format = "[$symbol$branch]($style)";
|
||||
symbol = " ";
|
||||
style = "green";
|
||||
};
|
||||
git_commit = {
|
||||
commit_hash_length = 8;
|
||||
format = "[$hash$tag]($style) ";
|
||||
format = "[$hash$tag]($style)";
|
||||
style = "green";
|
||||
};
|
||||
git_status = {
|
||||
conflicted = "$count ";
|
||||
ahead = "⇡$count ";
|
||||
behind = "⇣$count ";
|
||||
diverged = "⇡$ahead_count⇣$behind_count ";
|
||||
untracked = "?$count ";
|
||||
stashed = "\\$$count ";
|
||||
modified = "!$count ";
|
||||
staged = "+$count ";
|
||||
renamed = "→$count ";
|
||||
deleted = "-$count ";
|
||||
format = "[$conflicted](red)[$stashed](magenta)[$staged](green)[$deleted](red)[$renamed](blue)[$modified](yellow)[$untracked](blue)[$ahead_behind](green)";
|
||||
conflicted = "$count";
|
||||
ahead = "⇡$count";
|
||||
behind = "⇣$count";
|
||||
diverged = "⇡$ahead_count⇣$behind_count";
|
||||
untracked = "?$count";
|
||||
stashed = "\\$$count";
|
||||
modified = "!$count";
|
||||
staged = "+$count";
|
||||
renamed = "→$count";
|
||||
deleted = "-$count";
|
||||
format = lib.concatStrings [
|
||||
"[($conflicted )](red)"
|
||||
"[($stashed )](magenta)"
|
||||
"[($staged )](green)"
|
||||
"[($deleted )](red)"
|
||||
"[($renamed )](blue)"
|
||||
"[($modified )](yellow)"
|
||||
"[($untracked )](blue)"
|
||||
"[($ahead_behind )](green)"
|
||||
];
|
||||
};
|
||||
nix_shell.heuristic = true; # Also detect nix shell
|
||||
status = {
|
||||
pipestatus = true;
|
||||
disabled = false;
|
||||
pipestatus_format = "$pipestatus => [$symbol$common_meaning$signal_name$maybe_int]($style)";
|
||||
pipestatus_segment_format = "[$symbol$status]($style)";
|
||||
format = "[$symbol$status$signal_name]($style)";
|
||||
pipestatus = true;
|
||||
pipestatus_format = "$pipestatus => [$int( $signal_name)]($style)";
|
||||
pipestatus_separator = "[|]($style)";
|
||||
pipestatus_segment_format = "[$status]($style)";
|
||||
format = "[$status( $signal_name)]($style)";
|
||||
style = "red";
|
||||
};
|
||||
python = {
|
||||
format = "[$symbol$pyenv_prefix($version )(\($virtualenv\) )]($style)";
|
||||
};
|
||||
cmd_duration = {
|
||||
format = "[ $duration]($style) ";
|
||||
format = "[ $duration]($style)";
|
||||
style = "yellow";
|
||||
};
|
||||
time = {
|
||||
format = "[ $time]($style) ";
|
||||
format = "[ $time]($style)";
|
||||
style = "cyan";
|
||||
disabled = false;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue