forked from mirrors_public/oddlama_nix-config
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";
|
keyMap = "de-latin1-nodeadkeys";
|
||||||
}
|
}
|
||||||
// lib.mkIf config.video.hidpi.enable {
|
// lib.mkIf config.hardware.video.hidpi.enable {
|
||||||
font = "ter-v28n";
|
font = "ter-v28n";
|
||||||
packages = with pkgs; [terminus_font];
|
packages = with pkgs; [terminus_font];
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,7 @@ with self.pkgs.${system};
|
||||||
ragenix
|
ragenix
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
statix
|
statix
|
||||||
|
update-nix-fetching
|
||||||
|
|
||||||
# Lua
|
# Lua
|
||||||
stylua
|
stylua
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
bandwhich
|
bandwhich
|
||||||
btop
|
btop
|
||||||
fd
|
fd
|
||||||
|
file
|
||||||
neofetch
|
neofetch
|
||||||
rclone
|
rclone
|
||||||
ripgrep
|
ripgrep
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
tree
|
tree
|
||||||
rage
|
rage
|
||||||
];
|
];
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
|
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
|
||||||
t = "tree -F --dirsfirst -L 2";
|
t = "tree -F --dirsfirst -L 2";
|
||||||
|
@ -46,6 +48,8 @@
|
||||||
ip = "ip --color";
|
ip = "ip --color";
|
||||||
tmux = "tmux -2";
|
tmux = "tmux -2";
|
||||||
rg = "rg -S";
|
rg = "rg -S";
|
||||||
|
|
||||||
|
zf = "zathura --fork";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,50 +2,35 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
with lib; {
|
||||||
# FIXME: ctrl-del not working
|
# FIXME: ctrl-del not working
|
||||||
# FIXME: esc goes into vim mode, i hate it.
|
|
||||||
# FIXME: fzf on tab missing
|
# FIXME: fzf on tab missing
|
||||||
# FIXME: DEL also deletes to the left :(
|
# FIXME: DEL also deletes to the left :(
|
||||||
programs = {
|
# FIXME: ignore certain history entries (" .*", ...)
|
||||||
fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interactiveShellInit = lib.mkMerge [
|
interactiveShellInit = mkMerge [
|
||||||
(lib.mkBefore ''
|
(mkBefore ''
|
||||||
set -g ATUIN_NOBIND true
|
set -g ATUIN_NOBIND true
|
||||||
set -g fish_escape_delay_ms 300
|
|
||||||
set -g fish_greeting
|
set -g fish_greeting
|
||||||
|
set -g fish_autosuggestion_enabled 0
|
||||||
|
set -U FZF_COMPLETE 0
|
||||||
'')
|
'')
|
||||||
(lib.mkAfter ''
|
(mkAfter ''
|
||||||
enable_ayu_theme_dark
|
bind \cr _atuin_search
|
||||||
${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 = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "ayu-theme.fish";
|
name = "fzf";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "edouard-lopez";
|
owner = "jethrokuan";
|
||||||
repo = "ayu-theme.fish";
|
repo = "fzf";
|
||||||
rev = "d351d24263d87bef3a90424e0e9c74746673e383";
|
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
|
||||||
hash = "sha256-rx9izD2pc3hLObOehuiMwFB4Ta5G1lWVv9Jdb+JHIz0=";
|
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "autopair.fish";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "jorgebucaran";
|
|
||||||
repo = "autopair.fish";
|
|
||||||
rev = "1.0.4";
|
|
||||||
hash = "sha256-s1o188TlwpUQEN3X5MxUlD/2CFCpEkWu83U9O+wg3VU=";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,20 +7,19 @@
|
||||||
"$username"
|
"$username"
|
||||||
"$hostname"
|
"$hostname"
|
||||||
" $directory "
|
" $directory "
|
||||||
"$git_branch"
|
"($git_branch )"
|
||||||
"$git_commit"
|
"($git_commit )"
|
||||||
"$git_state"
|
"$git_state"
|
||||||
"$git_status"
|
"$git_status"
|
||||||
"$character"
|
"$character"
|
||||||
];
|
];
|
||||||
right_format = lib.concatStrings [
|
right_format = lib.concatStrings [
|
||||||
"$status"
|
"($status )"
|
||||||
"$cmd_duration"
|
"($cmd_duration )"
|
||||||
"$jobs"
|
"($jobs )"
|
||||||
"$package"
|
"($python )"
|
||||||
"$python"
|
"($rust )"
|
||||||
"$rust"
|
"($nix_shell )"
|
||||||
"$nix_shell"
|
|
||||||
"$time"
|
"$time"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -28,6 +27,7 @@
|
||||||
format = "[$user]($style)";
|
format = "[$user]($style)";
|
||||||
style_root = "red";
|
style_root = "red";
|
||||||
style_user = "cyan";
|
style_user = "cyan";
|
||||||
|
show_always = true;
|
||||||
};
|
};
|
||||||
hostname = {
|
hostname = {
|
||||||
format = "[$ssh_symbol$hostname]($style)";
|
format = "[$ssh_symbol$hostname]($style)";
|
||||||
|
@ -36,6 +36,7 @@
|
||||||
style = "cyan";
|
style = "cyan";
|
||||||
};
|
};
|
||||||
directory = {
|
directory = {
|
||||||
|
format = "[$path]($style)[$read_only]($read_only_style)";
|
||||||
fish_style_pwd_dir_length = 1;
|
fish_style_pwd_dir_length = 1;
|
||||||
style = "bold blue";
|
style = "bold blue";
|
||||||
};
|
};
|
||||||
|
@ -68,14 +69,29 @@
|
||||||
staged = "+$count";
|
staged = "+$count";
|
||||||
renamed = "→$count";
|
renamed = "→$count";
|
||||||
deleted = "-$count";
|
deleted = "-$count";
|
||||||
format = "[$conflicted](red)[$stashed](magenta)[$staged](green)[$deleted](red)[$renamed](blue)[$modified](yellow)[$untracked](blue)[$ahead_behind](green)";
|
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 = {
|
status = {
|
||||||
pipestatus = true;
|
|
||||||
disabled = false;
|
disabled = false;
|
||||||
pipestatus_format = "$pipestatus => [$symbol$common_meaning$signal_name$maybe_int]($style)";
|
pipestatus = true;
|
||||||
pipestatus_segment_format = "[$symbol$status]($style)";
|
pipestatus_format = "$pipestatus => [$int( $signal_name)]($style)";
|
||||||
format = "[$symbol$status$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 = {
|
cmd_duration = {
|
||||||
format = "[ $duration]($style)";
|
format = "[ $duration]($style)";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue