+##### begin clipboard history checkup ####
+
+# Avoid streaming with secrets in our clipboard history. We could just
+# clear the history, but here I truncate it to a max and then show it,
+# and then I can press super+y if I want to clear it, or close the
+# window if I want to keep it.
+copyqcount=$(copyq count)
+regex='^[1-9][0-9]*$'
+if [[ $copyqcount =~ $regex ]]; then
+ # i dont want to think about more than this
+ max_rows=40
+ if (( copyqcount >= max_rows )); then
+ rows_arg=()
+ for ((i=max_rows; i<copyqcount; i++)); do
+ rows_arg+=($i)
+ done
+ copyq remove "${rows_arg[@]}"
+ fi
+ copyq show
+ gone=false
+ for (( i=0; i<40; i++ )); do
+ if i3-msg -t get_tree | jq -e '.. | select(.class? == "copyq" and .instance? == "copyq")' &>/dev/null; then
+ sleep .5
+ else
+ gone=true
+ break
+ fi
+ done
+ if ! $gone; then
+ msg="ffs: copyq not gone. aborting. super+y = copyq-restart / clear"
+ if [[ -t 0 ]]; then
+ echo $msg
+ else
+ dunstify -u critical -h string:x-dunst-stack-tag:alert "$msg"
+ fi
+ exit 1
+ fi
+fi
+##### end clipboard history checkup ####
+
+if [[ $mount_suffix == -sysops ]]; then
+ touch $HOME/.iank-stream-on
+fi
+
+echo true >$HOME/.iank-stream-muted
+