-multiline = 0
+#multiline = 0
+
# i like it, but it randomly got mostly stuck on bright blue.
theme = Solarized
#colored = 0
# get ipv4 ip from HOST. or if it is already a number, return that
hostip() {
local host="$1"
- case $host in
- [0-9:])
- echo "$host"
- ;;
- *)
- getent ahostsv4 "$host" | awk '{ print $1 }' | head -n1
- ;;
- esac
+ if [[ $host == *[0-9:]* ]]; then
+ echo "$host"
+ else
+ getent ahostsv4 "$host" | awk '{ print $1 }' | head -n1
+ fi
}
# dig nicer defaults
grep -iIP --color=auto "$@" || return $?
}
# grep recursive
+#
+# Doesn't return 1 on nonmatch because this is meant to be
+# interactive, not in a conditional.
grr() {
- # Don't return 1 on nonmatch because this is meant to be
- # interactive, not in a conditional.
- if [[ ${#@} == 1 ]]; then
- grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" . || [[ $? == 1 ]]
- else
- grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" || [[ $? == 1 ]]
- fi
+ local dir_arg
+ if [[ ${#@} == 1 ]]; then dir_arg=.; fi
+ grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" $dir_arg || [[ $? == 1 ]]
}
ccomp grep gr grr
# recursive grep
rg() { grr "$@"; }
-ccomp grep rg
+# copy of grr, add pager
+rgp() {
+ local dir_arg
+ if [[ ${#@} == 1 ]]; then dir_arg=.; fi
+ grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=always "$@" $dir_arg | less || [[ $? == 1 ]]
+}
+ccomp grep rg rgp
# recursive grep and find (e for everything). search for files/dirs and
# lines.
echo targetf: $targetf
github-release-dl "$@"
files=(./*)
- case $file_suffix in
- *.bz2)
- m bunzip2 -- ./*
- ;;
- *.tar.gz|*.tgz)
- m tar -vxzf ./*
- ;;
- esac
+ if [[ $file_suffix == *.bz2 ]]; then
+ m bunzip2 -- ./*
+ elif [[ $file_suffix == *.tar.gz || $file_suffix == *.tgz ]]; then
+ m tar -vxzf ./*
+ fi
m rm -f -- "${files[@]}"
files=(./*)
# Here we detect and handle 2 cases: either we extracted a single
new="${new#"${new%%[[:alnum:]]*}"}" # remove leading/trailing non-alnum
new="${new%"${new##*[[:alnum:]]}"}"
# remove bad underscores, like __ and _._
- new=$(echo $new | sed -r 's/__+/_/g;s/_+([.-])|([.-])_+/\1/g')
+ new=$(echo $new | sed -r 's/__+/_/g;s/_*([.-])_*/\1/g')
safe_rename "$dir/$f" "$dir/$new" || return 1
done
return 0
j="${arr[0]}"
for elt in "${arr[@]:1}"; do
j+="$sep$elt"
- done
+ done
+}
+
+# jl = join lines. run, then paste lines, press ctrl-c when done, then
+# all the lines will be joined and stored in $x.
+jl() {
+ x=$(cat)
}
# * stuff that makes sense to be at the end
mpvd() {
mpv --profile=d "$@";
}
+# mpv profile e. good for videos
+mpe () {
+ mpv --profile=e "$@";
+ }
mpva() {
mpv --profile=a "$@";
}
xc() {
xclip -r -selection clipboard "$@"
}
-# echo copy
+# echo copy. e text to copy | ec
ec() {
pee "xclip -r -selection clipboard" cat
}
# -. = search dotfiles
# -n --no-heading: show files and line numbers together allowing for clicking
rg() {
- local path_arg
- if [[ ${#@} == 1 ]]; then
- path_arg=.
- fi
-
- command rg -. -z --no-messages -Lin --no-heading -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" $path_arg || return $?
+ command rg -. -z --no-messages -Lin --no-heading -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" || return $?
+ }
+ # rgp = rg + pager
+ rgp() {
+ rg --color=always "$@" | less
}
#fails if not exist. ignore
complete -r rg 2>/dev/null ||:
quarter: self evident
-u Undelayed. Removes 5 second video delay, and about 4 second audio delay.
-w do not launch watch of stream
--8 Use vp9 instead of default vp9.
+-8 Use vp8 instead of default vp9.
note: args duplicated in ffp
sleep 4
fi
- pass=$(sed -n 's/ *<source-password>\([^<]*\).*/\1/p' /p/c/icecast.xml)
+ pass=$(sed -n 's/ *<source-password>\([^<]*\).*/\1/p' /p/c/user-specific/icecast2/icecast.xml)
fi
xrandr=$(xrandr)
force=false
force_arg=
pull_reexec=false
-mp_args="-m /o,/a,/q,/qr"
+mp_args="-m /o,/a,/q"
check_installed=false
orig_args=("$@")
if ! temp=$(getopt -l check-installed,force,pull-reexec,help 2afioh "$@"); then
if $mail_only; then
mp_args="-m /o"
elif $host2_only; then
- mp_args="-m /a,/q,/qr"
+ mp_args="-m /a,/q"
fi
[Unit]
-Description=Btrbk to r3
+Description=Btrbk to r4
After=multi-user.target
[Service]
Type=oneshot
-ExecStart=/usr/local/bin/sysd-mail-once btrbkr3 btrbk -c /etc/btrbk/r3.conf run
+ExecStart=/usr/local/bin/sysd-mail-once btrbkr4 btrbk -c /etc/btrbk/r4.conf run
+++ /dev/null
-# Daemon config file for PipeWire version "1.0.5" #
-#
-# Copy and edit this file in /etc/pipewire for system-wide changes
-# or in ~/.config/pipewire for local changes.
-#
-# It is also possible to place a file with an updated section in
-# /etc/pipewire/pipewire.conf.d/ for system-wide changes or in
-# ~/.config/pipewire/pipewire.conf.d/ for local changes.
-#
-
-context.properties = {
-
- # iank: adding this made us output at the same sample rate as the audio we were playing, which seems like a good thing. from arch wiki: "PipeWire can also change dynamically the output sample rates supported by your DAC", find them with:
- # grep -E 'Codec|Audio Output|rates' /proc/asound/card*/codec#*
- # get currently used rate:
- # grep rate: /proc/asound/card?/pcm??/sub?/hw_params
- # or pw-top
- #
- #
- default.clock.allowed-rates = [ 44100 48000 88200 96000 192000 ]
-
- #default.clock.allowed-rates = [ 48000 ]
- #default.clock.quantum = 1024
- # iank. ran out of time to test this to prevent io stuttering
- #default.clock.min-quantum = 1024
-}
-
-# found a rancom config suggestion of a file which is just:
-# context.properties = {
-# default.clock.rate = 48000
-# default.clock.quantum = 1024
-# default.clock.min-quantum = 32
-# default.clock.max-quantum = 2048
-# }
if [[ ! $secondary_out ]] || grep -A1 disconnected $xf | grep '^[[:space:]]'; then
# gets rid of leftover secondary
+ if [[ $HOSTNAME != frodo ]]; then
m xmod --auto
+
+ # new monitor on frodo, I've been having to run this to get the full refresh rate:
+ # xrandr --output DP-0 --mode 3840x2160 --rate 120
+ # testing if this xmod is getting in the way.
+ fi
fi
if [[ $secondary_out ]] && $restart; then
# DO NOT USE THIS ONE.
#keyserver hkp://pool.sks-keyservers.net
-keyserver hkp://keys.openpgp.org
+#keyserver hkp://keys.openpgp.org
#keyserver hkp://pgp.mit.edu
#keyserver hkp://keyserver.pgp.com
-#keyserver hkp://ipv4.pool.sks-keyservers.net
+keyserver hkp://ipv4.pool.sks-keyservers.net
#keyserver hkp://keys.gnupg.net
#keyserver hkp://keyserver.ubuntu.com
#keyserver hkp://keyring.debian.org