chore(zsh): Config cleanup

This commit is contained in:
Jiří Štefka 2024-11-21 23:23:40 +01:00
parent 439c7b02c5
commit 9297d41e33
Signed by: jiriks74
GPG Key ID: 1D5E30D3DB2264DE

93
zsh.nix

@ -3,39 +3,7 @@
pkgs, pkgs,
... ...
}: { }: {
home.packages = with pkgs; [
nix-zsh-completions
# tools for aliases, etc.
lsd
bat
eza
trash-cli
# ^ tools for aliases, etc.
# packages for enhancd
fzf # enhancd
fd # enhancd
# ^ packages for enhancd
# rofi # for fd
# packags for ex
gnutar
bzip3
unzip
p7zip
unrar
gzip
# ^ packages for ex
];
programs = { programs = {
# nix-index = {
# enable = true;
# enableZshIntegration = true;
# };
# thefuck = { # thefuck = {
# enable = true; # enable = true;
# enableZshIntegration = true; # enableZshIntegration = true;
@ -48,7 +16,27 @@
zsh = { zsh = {
enable = true; enable = true;
enableVteIntegration = true;
enableCompletion = true; enableCompletion = true;
completionInit = ''
# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
_comp_options+=(globdots) # Include hidden files.
'';
autosuggestion = {
enable = true;
strategy = [
"match_prev_cmd"
"completion"
"history"
];
};
zplug = { zplug = {
enable = true; enable = true;
plugins = [ plugins = [
@ -105,19 +93,10 @@
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export YSU_MESSAGE_POSITION="after" # you-should-use plugin
export ASCIINEMA_API_URL=https://asciinema.stefka.eu
if [ -v ASCIINEMA_REC ]; then if [ -v ASCIINEMA_REC ]; then
_zsh_autosuggest_disable _zsh_autosuggest_disable
fi fi
# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
_comp_options+=(globdots) # Include hidden files.
# Custom ZSH Binds # Custom ZSH Binds
bindkey '^ ' autosuggest-accept bindkey '^ ' autosuggest-accept
bindkey "^[[H" beginning-of-line bindkey "^[[H" beginning-of-line
@ -167,6 +146,11 @@
fi fi
''; '';
localVariables = {
YSU_MESSAGE_POSITION="after";
ASCIINEMA_API_URL="https://asciinema.stefka.eu";
};
shellAliases = { shellAliases = {
# update = "sudo nixos-rebuild switch"; # update = "sudo nixos-rebuild switch";
@ -231,4 +215,31 @@
}; };
}; };
}; };
home.packages = with pkgs; [
nix-zsh-completions
# tools for aliases, etc.
lsd
bat
eza
trash-cli
# ^ tools for aliases, etc.
# packages for enhancd
fzf # enhancd
fd # enhancd
# ^ packages for enhancd
# rofi # for fd
# packags for ex
gnutar
bzip3
unzip
p7zip
unrar
gzip
# ^ packages for ex
];
} }