summaryrefslogtreecommitdiff
path: root/home/zshrc.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-03-05 00:40:32 -0600
committerAlejandro Soto <alejandro@34project.org>2022-03-05 00:40:32 -0600
commit5dc85e72a002efce36b440a98b17a6c80234a142 (patch)
tree11f0d3af31b88c079d1598a5842dc47d9e024aa9 /home/zshrc.nix
parent743a205dd9bff31e0ed63ebba8dd3327614ac188 (diff)
Restructure flake source hierarchy
Diffstat (limited to 'home/zshrc.nix')
-rw-r--r--home/zshrc.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/home/zshrc.nix b/home/zshrc.nix
new file mode 100644
index 0000000..134ee5a
--- /dev/null
+++ b/home/zshrc.nix
@@ -0,0 +1,49 @@
+{ grml-zsh-config }: ''
+ source ${grml-zsh-config}/etc/zsh/zshrc
+
+ #export PATH="$PATH:$HOME/.local/bin:$HOME/System/local/bin:$HOME/System/bin:$HOME/.cargo/bin"
+
+ alias reset='tput reset'
+ alias reload='exec zsh'
+ alias py=python
+ alias py2=python2
+ alias py3=python3
+
+ function spawn() {
+ if [ ! -x "$(command -v $1)" ]; then
+ echo "spawn: no such shit: $1" >&2
+ return 1
+ fi
+
+ $@ >/dev/null 0>&1 2>&1 &
+ disown
+ }
+
+ function galias() {
+ source $HOME/System/dot/git-aliases.zsh
+ }
+
+ function xseli() {
+ T=$(mktemp)
+ $EDITOR -n $T
+ xsel -b <$T
+ rm $T
+ }
+
+ autoload -Uz up-line-or-beginning-search
+ zle -N up-line-or-beginning-search
+ autoload -Uz down-line-or-beginning-search
+ zle -N down-line-or-beginning-search
+ bindkey '\eOA' up-line-or-beginning-search
+ bindkey '\e[A' up-line-or-beginning-search
+ bindkey '\eOB' down-line-or-beginning-search
+ bindkey '\e[B' down-line-or-beginning-search
+
+ zstyle ':prompt:grml:left:setup' items $([ ''${NO_USERATHOST:-0} -gt 0 ] || echo user at host) path percent
+ zstyle ':prompt:grml:right:setup' items sad-smiley vcs $([ ''${NO_BATTERY:-0} -gt 0 ] || echo battery) time
+ zstyle ':prompt:grml:right:items:time' pre ' %F{yellow}'
+
+ unsetopt sharehistory
+ setopt appendhistory
+ setopt extendedhistory
+''