This commit is contained in:
Tobias Schmidl 2018-01-29 16:10:37 +01:00
parent c5225c9d2d
commit dfe3abc014
4 changed files with 51 additions and 0 deletions

22
aliases.zsh Normal file
View file

@ -0,0 +1,22 @@
alias cdiff="colordiff"
alias clean-gpg="for a in `gpg2 -k | sed -rn 's/pub +[a-z0-9]+\/(0x[0-9A-Fa-f]+).*/\1/p'`; do gpg2 --quiet --no-tty --edit-key $a clean save; done;"
alias diff="diff -W $(( $(tput cols) - 2))"
alias bz2c='bzip2 --best'
alias gzc='gzip --best --no-name'
alias xzc='xz --best --extreme'
alias extip='curl -LR1fs --compressed https://ipinfo.io/ | jq -Sc'
alias jjar='java -jar'
current_dist=`lsb_release -c -s`
all_dkms_packages="`apt-cache rdepends --installed dkms | sed -rn 's/^ +([^ ]+)$/\1/p' | sort -iu`"
if [ $use_sudo -eq 1 ];
then
alias adbu='sudo $apt_pref -t ${current_dist}-backports $apt_upgr'
alias drd='[ -n "$all_dkms_packages" ] && sudo dpkg-reconfigure $all_dkms_packages'
else
alias adbu='su -lc "$apt_pref -t ${current_dist}-backports $apt_upgr" root'
alias drd='[ -n "$all_dkms_packages" ] && su -lc "dpkg-reconfigure $all_dkms_packages" root'
fi

4
browser.zsh Normal file
View file

@ -0,0 +1,4 @@
function duckduck() { x-www-browser "https://duckduckgo.com/?q=`escape "$@"`"; }
function escape() { perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$@"; }
function google() { x-www-browser "https://www.google.de/search?q=`escape "$@"`"; }

19
systemd.zsh Normal file
View file

@ -0,0 +1,19 @@
user_commands=(
list-units is-active status show help list-unit-files
is-enabled list-jobs show-environment cat list-timers
is-system-running default rescue halt poweroff reboot
emergency kexec exit suspend hibernate hybrid-sleep)
sudo_commands=(
start stop reload restart try-restart isolate kill
reset-failed enable disable reenable preset mask unmask
link load cancel set-environment unset-environment
edit)
for c in $user_commands; do; alias sc-$c="systemctl $c"; done
for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done
alias sc-enable-now="sc-enable --now"
alias sc-disable-now="sc-disable --now"
alias sc-mask-now="sc-mask --now"

6
zinit.zsh Normal file
View file

@ -0,0 +1,6 @@
[ -z "$EDITOR" ] && export EDITOR=sensible-editor
export MAILCHECK=1
fortune debian house-harkonnen house-atreides | cowsay -f tux -W 76 -n
which todo > /dev/null && todo due