-
Notifications
You must be signed in to change notification settings - Fork 0
/
zsh.nix
51 lines (51 loc) · 1.14 KB
/
zsh.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
defaultKeymap = "emacs";
localVariables = {
PROMPT = "%F{green} ➜ %f";
RPROMPT = "%F{blue}%~ ";
};
initExtra = ''
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
alias -s .git="git clone"
function t() {
z "$1"
ls
}
'';
profileExtra = ''
if [[ "$(tty)" = "/dev/tty1" ]]; then
pgrep i3 || startx $(which i3)
fi
'';
plugins = [
{
name = "zsh-autopair";
src = pkgs.zsh-autopair;
file = "share/zsh/zsh-autopair/autopair.zsh";
}
{
name = "fzf-tab";
src = pkgs.zsh-fzf-tab;
file = "share/fzf-tab/fzf-tab.zsh";
}
];
shellAliases = {
"md" = "mkdir";
"yank" = "xclip -selection clipboard";
"r" = "trash";
"n" = "hx";
"e" = "ls --classify --human-readable";
"g" = "git";
"." = "cd .. && e";
".." = "cd ../.. && e";
"..." = "cd ../../.. && e";
};
};
}