X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=7f6011f43dd05b4cf61d19d7658449a3a5c4053d;hb=b87c76c4ad04f75a7dff371c65b5f065ba2839a4;hp=73dc3daaed782cbffc1f3c00e6111a4adc50bb1c;hpb=9ac513d1086f22a8dede2ebe3ca0236443bdc429;p=distro-setup diff --git a/brc2 b/brc2 index 73dc3da..7f6011f 100644 --- a/brc2 +++ b/brc2 @@ -395,16 +395,27 @@ astudio() { # becomes # https://brains.fsf.org/wiki/sysadmin/interns/2022/nick_shrader/intro_blog_post iki() { - local url path + local url path input if [[ $1 ]]; then - path="$*" + input="$*" else - read -r -p "enter path" path + read -r -p "enter path or url" input fi - url=$(readlink -f "$path") - url="https://brains.fsf.org/wiki/${url#*brains/}" - url="${url%.mdwn}" - echo "$url" + case $input in + http*) + path="/f/brains/${input##https://brains.fsf.org/wiki/}" + if [[ $path == */ ]]; then + path=${path%/}.mdwn + fi + j printf "%s\n" "$path" + ;; + *) + url=$(readlink -f "$input") + url="https://brains.fsf.org/wiki/${url#*brains/}" + url="${url%.mdwn}" + j echo "$url" + ;; + esac } @@ -1292,7 +1303,9 @@ cheogram-get-logs() { adb pull /storage/emulated/0/Download/Cheogram/Backup sqlite3 b /b/data/daystart + else + cat /b/data/daystart + fi +} #### begin bitcoin related things btc() { @@ -2566,9 +2588,17 @@ otp() { oathtool --totp -b "$*" | xclip -selection clipboard } j() { - "$@" |& pee "xclip -r -selection clipboard" + "$@" |& pee "xclip -r -selection clipboard" cat } +# x copy +xc() { + xclip -r -selection clipboard +} +# echo copy +ec() { + pee "xclip -r -selection clipboard" cat +} pakaraoke() { # from http://askubuntu.com/questions/456021/remove-vocals-from-mp3-and-get-only-instrumentals @@ -3152,6 +3182,17 @@ fixu() { fi } +# unmute +um() { + pactl set-sink-mute @DEFAULT_SINK@ false + rm -f /tmp/ianknap +} +nap() { + pactl set-sink-mute @DEFAULT_SINK@ true + touch /tmp/ianknap +} + + # systemctl is-enabled / status / cat says nothing, instead theres # some obscure symlink. paths copied from man systemd.unit. # possibly also usefull, but incomplete, doesnt show units not loaded in memory: