diff options
author | xengineering <me@xengineering.eu> | 2022-10-26 12:56:34 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2022-11-05 12:16:42 +0100 |
commit | 4c19b83831eb32146a0cb1e9307c0d9f6d7aeed5 (patch) | |
tree | 9d01488a27cb9290d7b00bac6b41cb301ee71451 | |
parent | 1c0c87c968dcc542de17e30d9ecc81f6868edb05 (diff) | |
download | dotfiles-4c19b83831eb32146a0cb1e9307c0d9f6d7aeed5.tar dotfiles-4c19b83831eb32146a0cb1e9307c0d9f6d7aeed5.tar.zst dotfiles-4c19b83831eb32146a0cb1e9307c0d9f6d7aeed5.zip |
Add aliases and basic prompt to .zshrc
-rw-r--r-- | .zshrc | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -10,3 +10,39 @@ zstyle :compinstall filename '/home/jan/.zshrc' autoload -Uz compinit compinit # End of lines added by compinstall + +# alias definitions +alias ls='ls --color=auto' +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' +alias ip='ip --color=auto' +alias dotfiles='/usr/bin/git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME' +alias gitstat='git status' +alias igit='git log --all --oneline --decorate --graph' +alias horizons='telnet horizons.jpl.nasa.gov 6775' # a NASA server providing data about planet positions and velocities +alias wlrecord='wf-recorder -a -g "$(slurp)"' +alias ranger='ranger --choosedir=$HOME/.local/share/ranger/lastdir && cd "$(cat $HOME/.local/share/ranger/lastdir)"' +alias lf='lf -last-dir-path=$HOME/.local/share/lf/lastdir && cd "$(cat $HOME/.local/share/lf/lastdir)"' +alias music="cd ~/Musik && ranger || echo '~/Musik does not exist'" +alias bt="bluetoothctl" +alias ikhal="ikhal; clear" +alias news="newsboat" +if command -v apt > /dev/null # ugly hack to detect Debian +then + alias t="todo-txt" +fi +if command -v pacman > /dev/null # ugly hack to detect Arch Linux +then + alias t="todo.sh" +fi +function my_xdg_open() { nohup xdg-open "$1" > /dev/null 2>&1 & } +alias open=my_xdg_open + +# extend PATH by custom scripts (location based on XDG) +# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +PATH=~/.local/bin:$PATH + +# set prompt +PS1='[%(?.. %F{red}%?%f )%F{yellow}%*%f %F{magenta}%n@%m%f %F{cyan}%1d%f] +$ ' |