2020-06-17 19:01:57 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.profiles.zsh;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.profiles.zsh = {
|
|
|
|
enable = lib.mkEnableOption "Manage zsh from hm";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
dotDir = ".config/zsh";
|
|
|
|
enableAutosuggestions = true;
|
|
|
|
enableCompletion = true;
|
|
|
|
history = {
|
|
|
|
expireDuplicatesFirst = true;
|
|
|
|
ignoreDups = true;
|
2021-12-22 04:58:46 +01:00
|
|
|
share = false;
|
2020-06-17 19:01:57 +02:00
|
|
|
};
|
|
|
|
shellAliases = {
|
2022-04-02 03:53:25 +02:00
|
|
|
cat = "bat";
|
|
|
|
ls = "exa";
|
|
|
|
tree = "exa -T";
|
|
|
|
df = "df -h";
|
|
|
|
|
2022-04-02 04:33:44 +02:00
|
|
|
sysu = "systemctl --user";
|
|
|
|
jnlu = "journalctl --user";
|
|
|
|
|
2020-06-17 19:01:57 +02:00
|
|
|
mpvav1 = "mpv --vd-queue-enable=yes --ad-queue-enable=yes --vd-queue-max-bytes=4000MiB --vd-queue-max-samples=2000000 --vd-queue-max-secs=50";
|
2022-04-02 03:52:30 +02:00
|
|
|
|
|
|
|
gst = "git status -sb";
|
|
|
|
gcm = "git commit -m";
|
|
|
|
gca = "git commit --amend --no-edit";
|
2022-06-05 03:21:50 +02:00
|
|
|
grc = "git rc";
|
|
|
|
gne = "git n";
|
2022-04-02 03:52:30 +02:00
|
|
|
gds = "git diff --staged";
|
|
|
|
glg = "git log --oneline";
|
2022-06-05 15:46:48 +02:00
|
|
|
|
|
|
|
nano = "hx"; # Behavioral training
|
2020-06-17 19:01:57 +02:00
|
|
|
};
|
|
|
|
initExtra = ''
|
2021-04-12 01:41:56 +02:00
|
|
|
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
|
|
|
source ${./p10k.zsh}
|
2020-06-17 19:01:57 +02:00
|
|
|
|
2022-04-19 20:24:50 +02:00
|
|
|
autoload -U down-line-or-beginning-search
|
|
|
|
autoload -U up-line-or-beginning-search
|
2022-04-02 04:01:58 +02:00
|
|
|
|
2022-04-19 20:24:50 +02:00
|
|
|
zle -N down-line-or-beginning-search
|
|
|
|
zle -N up-line-or-beginning-search
|
|
|
|
|
|
|
|
bindkey '^[OA' up-line-or-beginning-search
|
|
|
|
bindkey '^[OB' down-line-or-beginning-search
|
2022-04-02 04:01:58 +02:00
|
|
|
|
|
|
|
bindkey '^[[1;5D' backward-word
|
|
|
|
bindkey '^[[1;5C' forward-word
|
|
|
|
bindkey '^H' backward-kill-word
|
|
|
|
|
|
|
|
bindkey '^[OH' beginning-of-line
|
|
|
|
bindkey '^[OF' end-of-line
|
|
|
|
bindkey '^[[3~' delete-char
|
2021-12-22 04:58:46 +01:00
|
|
|
|
2020-06-17 19:01:57 +02:00
|
|
|
ZLE_RPROMPT_INDENT=0
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-05-02 04:26:35 +02:00
|
|
|
|
|
|
|
programs.atuin = {
|
|
|
|
enable = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
};
|
2020-06-17 19:01:57 +02:00
|
|
|
|
|
|
|
home.packages = [
|
|
|
|
pkgs.dan.mesloNFp10k
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|