Compare commits
No commits in common. "05d2cbd709830b98081272c85908c8735a5c8548" and "cc0a9f89fd997f86b4375af48764e5ef28406979" have entirely different histories.
05d2cbd709
...
cc0a9f89fd
9 changed files with 12 additions and 60 deletions
|
@ -1,10 +1,7 @@
|
||||||
#! /bin/zsh
|
#! /bin/zsh
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
alias cdiff="colordiff"
|
alias cdiff="colordiff"
|
||||||
|
|
||||||
alias mktemp='mktemp --suffix=.delme --tmpdir=$XDG_RUNTIME_DIR'
|
|
||||||
|
|
||||||
function clean-gpg () {
|
function clean-gpg () {
|
||||||
[ -z "$(command -v gpg2)" ] && exit 1;
|
[ -z "$(command -v gpg2)" ] && exit 1;
|
||||||
for key in $(gpg2 -k | sed -rn 's/pub +[a-z0-9]+\/(0x[0-9A-Fa-f]+).*/\1/p');
|
for key in $(gpg2 -k | sed -rn 's/pub +[a-z0-9]+\/(0x[0-9A-Fa-f]+).*/\1/p');
|
||||||
|
|
12
batcat.zsh
12
batcat.zsh
|
@ -1,12 +0,0 @@
|
||||||
#! /bin/zsh
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
alias bathelp='bat --plain --language=help'
|
|
||||||
unalias help
|
|
||||||
help() {
|
|
||||||
"$@" --help 2>&1 | bathelp
|
|
||||||
}
|
|
||||||
|
|
||||||
batdiff() {
|
|
||||||
git diff --name-only --relative --diff-filter=d | xargs bat --diff
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
#! /bin/zsh
|
#! /bin/zsh
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
function escape() { perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$@"; }
|
function escape() { perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$@"; }
|
||||||
|
|
||||||
|
@ -8,4 +7,3 @@ function google() { elinks -dump "https://www.google.de/search?q=$(escape "$@")"
|
||||||
|
|
||||||
function wetter() { curl --tr-encoding -H "Accept-Language: ${LANG%_*}" "https://wttr.in/$*"; }
|
function wetter() { curl --tr-encoding -H "Accept-Language: ${LANG%_*}" "https://wttr.in/$*"; }
|
||||||
function wetter2() { curl --tr-encoding -H "Accept-Language: ${LANG%_*}" "https://v2.wttr.in/$*"; }
|
function wetter2() { curl --tr-encoding -H "Accept-Language: ${LANG%_*}" "https://v2.wttr.in/$*"; }
|
||||||
alias mdw=mdw.sh
|
|
||||||
|
|
|
@ -1,5 +1,2 @@
|
||||||
#! /bin/zsh
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
# this is ripped off serverfault https://serverfault.com/a/90401
|
# this is ripped off serverfault https://serverfault.com/a/90401
|
||||||
function debchangedconfigs () { dpkg-query -W -f='${Conffiles}\n' '*' | awk 'OFS=" "{print $2,$1}' | LANG=C md5sum -c 2>/dev/null | awk -F': ' '$2 !~ /OK$/{print $1}' | sort; }
|
function debchangedconfigs () { dpkg-query -W -f='${Conffiles}\n' '*' | awk 'OFS=" "{print $2,$1}' | LANG=C md5sum -c 2>/dev/null | awk -F': ' '$2 !~ /OK$/{print $1}' | sort; }
|
||||||
|
|
3
exa.zsh
3
exa.zsh
|
@ -1,7 +1,6 @@
|
||||||
#! /bin/zsh
|
#! /bin/zsh
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
alias exa='exa -FHhg@ --git --binary --time-style long-iso'
|
alias exa='exa -FHhg@ --git --time-style long-iso'
|
||||||
alias exal='exa -l'
|
alias exal='exa -l'
|
||||||
function exat() {
|
function exat() {
|
||||||
[[ "$1" != <-> ]] && { echo "Usage: exat <depth> [path]"; exit 1 };
|
[[ "$1" != <-> ]] && { echo "Usage: exat <depth> [path]"; exit 1 };
|
||||||
|
|
29
fzf.zsh
29
fzf.zsh
|
@ -1,29 +0,0 @@
|
||||||
#! /bin/zsh
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
export FZF_COMPLETION_OPTS='--border --info=inline'
|
|
||||||
|
|
||||||
if [ -n "$TERMUX_VERSION" ] && [ -d "$PREFIX" ];
|
|
||||||
then
|
|
||||||
source "$PREFIX/share/fzf/completion.zsh"
|
|
||||||
source "$PREFIX/share/fzf/key-bindings.zsh"
|
|
||||||
else
|
|
||||||
source /usr/share/doc/fzf/examples/completion.zsh
|
|
||||||
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# (EXPERIMENTAL) Advanced customization of fzf options via _fzf_comprun function
|
|
||||||
# - The first argument to the function is the name of the command.
|
|
||||||
# - You should make sure to pass the rest of the arguments to fzf.
|
|
||||||
_fzf_comprun() {
|
|
||||||
local command=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
case "$command" in
|
|
||||||
vim|nvim|nano) fzf "$@" --preview 'batcat --color=always {}' ;;
|
|
||||||
cd) fzf "$@" --preview 'tree -C {} | head -200' ;;
|
|
||||||
export|unset) fzf "$@" --preview "eval 'echo \$'{}" ;;
|
|
||||||
ssh) fzf "$@" --preview 'dig {}' ;;
|
|
||||||
*) fzf "$@" ;;
|
|
||||||
esac
|
|
||||||
}
|
|
9
local-bin.zsh
Normal file
9
local-bin.zsh
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#! /bin/zsh
|
||||||
|
# Make sure we include this file only once
|
||||||
|
if [ -z "$ZSH_LOCAL_BIN_ALREADY_SET" ];
|
||||||
|
then
|
||||||
|
export ZSH_LOCAL_BIN_ALREADY_SET=1
|
||||||
|
# set PATH so it includes user's private bin if it exists
|
||||||
|
[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH"
|
||||||
|
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
|
||||||
|
fi
|
|
@ -1,6 +1,3 @@
|
||||||
#! /bin/zsh
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
user_commands=(
|
user_commands=(
|
||||||
list-units is-active status show help list-unit-files
|
list-units is-active status show help list-unit-files
|
||||||
is-enabled list-jobs show-environment cat list-timers
|
is-enabled list-jobs show-environment cat list-timers
|
||||||
|
@ -19,3 +16,4 @@ for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done
|
||||||
alias sc-enable-now="sc-enable --now"
|
alias sc-enable-now="sc-enable --now"
|
||||||
alias sc-disable-now="sc-disable --now"
|
alias sc-disable-now="sc-disable --now"
|
||||||
alias sc-mask-now="sc-mask --now"
|
alias sc-mask-now="sc-mask --now"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#! /bin/zsh
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
[ -z "$EDITOR" ] && export EDITOR=sensible-editor
|
[ -z "$EDITOR" ] && export EDITOR=sensible-editor
|
||||||
|
|
||||||
export LESS="-F -R"
|
|
||||||
|
|
||||||
[ -r "$HOME/.config/user-dirs.dirs" -a \
|
[ -r "$HOME/.config/user-dirs.dirs" -a \
|
||||||
-z "$XDG_DESKTOP_DIR" -a \
|
-z "$XDG_DESKTOP_DIR" -a \
|
||||||
|
@ -14,7 +10,6 @@ export LESS="-F -R"
|
||||||
-z "$XDG_MUSIC_DIR" -a \
|
-z "$XDG_MUSIC_DIR" -a \
|
||||||
-z "$XDG_PICTURES_DIR" -a \
|
-z "$XDG_PICTURES_DIR" -a \
|
||||||
-z "$XDG_VIDEOS_DIR" ] && . "$HOME/.config/user-dirs.dirs"
|
-z "$XDG_VIDEOS_DIR" ] && . "$HOME/.config/user-dirs.dirs"
|
||||||
|
|
||||||
export MAILCHECK=1
|
export MAILCHECK=1
|
||||||
|
|
||||||
which fortune >/dev/null && which cowsay > /dev/null && fortune -e debian house-harkonnen house-atreides pratchett | cowsay -f tux -W 76 -n
|
which fortune >/dev/null && which cowsay > /dev/null && fortune -e debian house-harkonnen house-atreides pratchett | cowsay -f tux -W 76 -n
|
||||||
|
|
Loading…
Reference in a new issue