summaryrefslogtreecommitdiffstats
path: root/lass/2configs/zsh.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-01-16 20:19:27 +0100
committertv <tv@krebsco.de>2018-01-16 20:19:27 +0100
commitcc4e5322aeca08d121b7769517136b05d7e391ca (patch)
tree8d8757d91cd631c58d30cb98589973a4983e9d4a /lass/2configs/zsh.nix
parent1c06f938b3d4e4e036184639ecdcadec27b5d8f8 (diff)
parent74d1531be988057ccadd3de5184d915dcf84c92d (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lass/2configs/zsh.nix')
-rw-r--r--lass/2configs/zsh.nix34
1 files changed, 18 insertions, 16 deletions
diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix
index 4d33aa79d..728c0cc0d 100644
--- a/lass/2configs/zsh.nix
+++ b/lass/2configs/zsh.nix
@@ -7,10 +7,8 @@
zsh-newuser-install() { :; }
'';
interactiveShellInit = ''
- #unsetopt nomatch
setopt autocd extendedglob
bindkey -e
- zstyle :compinstall filename '/home/lass/.zshrc'
#history magic
bindkey "" up-line-or-local-history
@@ -40,7 +38,6 @@
bindkey "^X^E" edit-command-line
#completion magic
- fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
@@ -48,14 +45,18 @@
#enable automatic rehashing of $PATH
zstyle ':completion:*' rehash true
-
- #eval $( dircolors -b ~/.LS_COLORS )
+ eval $(dircolors -b ${pkgs.fetchFromGitHub {
+ owner = "trapd00r";
+ repo = "LS_COLORS";
+ rev = "master";
+ sha256="05lh5w3bgj9h8d8lrbbwbzw8788709cnzzkl8yh7m1dawkpf6nlp";
+ }}/LS_COLORS)
# export MANPAGER='sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | vim -R -c "set ft=man nonu nomod nolist" -'
#beautiful colors
alias ls='ls --color'
- zstyle ':completion:*:default' list-colors ''${(s.:.)LS_COLORS}
+ # zstyle ':completion:*:default' list-colors ''${(s.:.)LS_COLORS}
#emacs bindings
bindkey "[7~" beginning-of-line
@@ -66,24 +67,24 @@
#aliases
alias ll='ls -l'
alias la='ls -la'
- alias pinginet='ping 8.8.8.8'
- alias du='du -hd1'
- alias qiv="qiv -f -m"
- alias zshres="source ~/.zshrc"
#fancy window title magic
case $TERM in
(*xterm* | *rxvt*)
-
- # Write some info to terminal title.
- # This is seen when the shell prompts for input.
function precmd {
- print -Pn "\e]0;%(1j,%j job%(2j|s|); ,)%~\a"
+ if test -n "$SSH_CLIENT"; then
+ echo -ne "\033]0;$$ $USER@$HOST $PWD\007"
+ else
+ echo -ne "\033]0;$$ $USER@$PWD\007"
+ fi
}
- # Write command and args to terminal title.
# This is seen while the shell waits for a command to complete.
function preexec {
- printf "\033]0;%s\a" "$1"
+ if test -n "$SSH_CLIENT"; then
+ echo -ne "\033]0;$$ $USER@$HOST $PWD $1\007"
+ else
+ echo -ne "\033]0;$$ $USER@$PWD $1\007"
+ fi
}
;;
esac
@@ -119,4 +120,5 @@
'';
};
users.users.mainUser.shell = "/run/current-system/sw/bin/zsh";
+ users.users.root.shell = "/run/current-system/sw/bin/zsh";
}