X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=7d94df1fc12e1011bc08fe6adaf3078fbad89a78;hb=774fe9ab8c8d5c71614feda5a283b4a91fb3f145;hp=d374c52537cdba929355a7f0abf7955ed1d25134;hpb=46fb17d56b093264b69cc20192603da2604111ca;p=distro-setup diff --git a/brc2 b/brc2 index d374c52..7d94df1 100644 --- a/brc2 +++ b/brc2 @@ -6,7 +6,9 @@ # * settings -HISTFILE=$HOME/.bh +if [[ $HISTFILE ]]; then + HISTFILE=$HOME/.bh +fi source /a/bin/distro-setup/path-add-function path-add /a/exe @@ -1074,9 +1076,11 @@ jrf() { journalctl -n 200 -f "$@" ; } ccomp journalctl jtail jr jrf -kff() { # keyboardio firmware flash - pushd /a/bin/distro-setup/Arduino/Model01-Firmware - yes $'\n' | make flash +kff() { # keyboardio firmware flash. you must hold down the tilde key + pushd /a/opt/Model01-Firmware + # if we didn't want this yes hack, then remove "shell read" from + # /a/opt/Kaleidoscope/etc/makefiles/sketch.mk + yes $'\n' | VERBOSE=1 make flash popd } @@ -1275,6 +1279,54 @@ mo() { xset dpms force off; } # monitor off mpvd() { mpv --profile=d "$@"; } +# mpv all media files in . or $1 +mpvm() { + local -a extensions arg + # get page source of https://en.wikipedia.org/w/index.php?title=Video_file_format&action=edit + # into /a/x.log, then + # grep '^| *\.' /a/x.log | sed 's/| *//;s/,//g' + extensions=( + .webm + .mkv + .flv + .flv + .vob + .ogv .ogg + .drc + .gif + .gifv + .mng + .avi + .MTS .M2TS .TS + .mov .qt + .wmv + .yuv + .rm + .rmvb + .viv + .asf + .amv + .mp4 .m4p .m4v + .mpg .mp2 .mpeg .mpe .mpv + .mpg .mpeg .m2v + .m4v + .svi + .3gp + .3g2 + .mxf + .roq + .nsv + ) + arg=("(" -iname "*${extensions[0]}") + for (( i=1 ; i < ${#extensions[@]}; i++ )); do + arg+=(-o -iname "*${extensions[i]}") + done + arg+=(")") + dir=${1:-.} + # debug: + #find $dir "${arg[@]}" -size +1M + find $dir "${arg[@]}" -size +1M -exec mpv --profile=d '{}' + +} mpvs() { mpv --profile=s "$@"; } @@ -1782,12 +1834,7 @@ mailnncheck() { vpncmd() { m sudo -E env "PATH=$PATH" nsenter -t $(pgrep -f "/usr/sbin/openvpn .* --config /etc/openvpn/.*client.conf") -n "$@" } -vpnf() { - sudo -v - vpncmd sudo -E -u iank env "PATH=$PATH" abrowser -no-remote -P vpn & - sleep 5 - r -} + vpn2f() { sudo -v vpncmd sudo -u iank env "PATH=$PATH" abrowser -no-remote -P vpn2 & r @@ -2044,7 +2091,9 @@ path-add /usr/local/go/bin # I have both because I was trying to solve an issue that # turned out to be unrelated. # ARDUINO_PATH=/a/opt/Arduino/build/linux/work -export ARDUINO_PATH=/a/opt/arduino-1.8.15 + +## i should have documented this... +# based on https://github.com/keyboardio/Kaleidoscope export KALEIDOSCOPE_DIR=/a/opt/Kaleidoscope # They want to be added to the start, but i think