39 lines
1.5 KiB
Nix
39 lines
1.5 KiB
Nix
with import <nixpkgs> {};
|
|
|
|
{
|
|
enable = true;
|
|
interactiveShellInit = ''
|
|
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
|
# Make user colour green in prompt instead of default blue
|
|
#zstyle ':prompt:grml:left:items:user' pre '%F{green}%B'
|
|
export QUOTING_STYLE=literal
|
|
new.nix() {
|
|
echo -e '{ ... }:\n{\n\n}\n# vim: set et ts=2 sw=2 ai:' >> "$1"
|
|
}
|
|
'';
|
|
promptInit = ""; # otherwise it'll override the grml prompt
|
|
histSize = 500000;
|
|
syntaxHighlighting = {
|
|
enable = true;
|
|
highlighters = [ "main" "pattern" "brackets" ];
|
|
};
|
|
autosuggestions = {
|
|
enable = true;
|
|
highlightStyle = "fg=cyan";
|
|
};
|
|
shellAliases = {
|
|
"l" = "eza -lag";
|
|
"lh" = "command ls -hAl --color=auto";
|
|
"s" = "systemctl";
|
|
"ip" = "ip -c";
|
|
"n" = "cd /etc/nixos";
|
|
"nt" = "(cd /tmp && nixos-rebuild test)";
|
|
"ns" = "nixos-rebuild switch";
|
|
"nsu" = "nixos-rebuild switch --upgrade";
|
|
"dfr" = "df -h | head -n +1; df -h -x overlay -x tmpfs | tail -n +2 | sort -nrk5";
|
|
"d" = ''du -ahx "$PWD" --exclude=/proc| sort -rh 2>/dev/null |head -40 | sort -rh 2>/dev/null'';
|
|
"bigplay" = ''PL="" ; find -type f -not -iname "*.jpg" -not -iname "*.par2" -exec du {} \; | sort -nr | sed "s/[0-9 \t]*//" | while read -r src; do PL="$(echo $PL; realpath "$src")" ; done; mpv --playlist=<(echo "$PL")'';
|
|
"randplay" = ''PL=""; find -type f | grep -Fvi ".jpg" | grep -Fvi ".par2" | sort -R | while read -r src; do PL="$(echo $PL; realpath "$src")" ; done; mpv --playlist=<(echo "$PL")'';
|
|
};
|
|
}
|
|
# vim: set et ts=2 sw=2 ai:
|