diff --git a/.config/shell/functions b/.config/shell/functions index cc5628c..6a955a0 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -130,6 +130,10 @@ alias jcj='jcl -o json-pretty -u' # Applications {{{1 +# Remote +alias delta="sc restart openvpn-client@deltaPeak.service" +alias sshl="lemonade server -allow 127.0.0.1 & ssh -R 2489:127.0.0.1:2489" + alias calc='rlwrap -a bc -l' alias logoff="loginctl terminate-user $USER" blues() { bluedevil-sendfile $(echo "$@" | xargs -n 1 realpath | xargs -n 1 echo -n " --files") } @@ -175,7 +179,6 @@ hex() { hexyl "$@" | "${PAGER:-less}" } alias dict="rdictcc -d $XDG_DATA_HOME/dictcc" alias dictu="dict -i $XDG_DATA_HOME/dictcc/dict.txt" alias startMinecraftServer='curl https://ipinfo.io/ip | xclip -sel clip && cd ~/daten/games/sharedgames/minecraft/server && java -jar forge-1.12.2-14.23.5.2768-universal.jar -mx 8G' -alias delta="sc start openvpn-client@deltaPeak.service" alias u='topgrade' diff --git a/.local/bin/scripts/edconf b/.local/bin/scripts/edconf index 1bb566a..eb2e8f3 100755 --- a/.local/bin/scripts/edconf +++ b/.local/bin/scripts/edconf @@ -20,6 +20,7 @@ case "$sel" in /etc/sudoers) sudo visudo;; /etc/fstab) sudoedit "$sel" && sudo findmnt --verify;; /etc/default/grub) sudoedit "$sel" && sudo grub-mkconfig -o /boot/grub/grub.cfg;; + /etc/locale.gen) sudoedit "$sel" && sudo locale-gen;; *) edit "$sel";; esac echo "$sel" | cat - "$conf_cache" | head -20 >"$conf_tmp" && mv "$conf_tmp" "$conf_cache" diff --git a/.local/bin/scripts/ffmeta b/.local/bin/scripts/ffmeta new file mode 100755 index 0000000..b45f62e --- /dev/null +++ b/.local/bin/scripts/ffmeta @@ -0,0 +1,6 @@ +#!/bin/sh +# Extract song metadata with ffprobe +while read f; do + highlight "$f" + ffprobe "$f" 2>&1 | grep -A90 'Metadata:' +done | less diff --git a/.local/bin/scripts/git-aur b/.local/bin/scripts/git-aur index af72200..af903dc 100755 --- a/.local/bin/scripts/git-aur +++ b/.local/bin/scripts/git-aur @@ -1,10 +1,15 @@ #!/bin/sh -e +aurdir="$DATA/2-standards/dev/aur" +test $# -eq 0 && cd "$aurdir" && exec $SHELL command=$1 shift +url="ssh://aur@aur.archlinux.org/${1:-$(basename $PWD)}.git" case $command in + (origin) + test "$(git rev-parse --git-dir)" = ".git" && git remote set-url origin "$url";; (clone) - cd "$DATA/2-standards/dev/aur" - git -c init.defaultBranch=master clone ssh://aur@aur.archlinux.org/$1.git + cd "$aurdir" + git -c init.defaultBranch=master clone "$url" cd "$1" test -f PKGBUILD || sed "s/PKG/${1%%-git}/" ../PKGBUILD > PKGBUILD test -f .gitignore || echo '*' > .gitignore