tx() { # toggle set -x, and the prompt so it doesn't spam
if [[ $- == *x* ]]; then
set +x
- PROMPT_COMMAND=prompt_command
+ PROMPT_COMMAND=prompt-command
else
unset PROMPT_COMMAND
PS1="\w \$ "
wtr() { curl wttr.in/boston; }
xl() {
- # this succeeds even if gnome-screensaver isn\'t running.
+ if pgrep gnome-screensav &>/dev/null; then
+ # this command actually starts gnome-screensaver if it isn't running.
+ # lololol, what crap
gnome-screensaver-command --exit &>/dev/null
+ fi
mate-screensaver-command --exit &>/dev/null
if ! pidof xscreensaver; then
pushd /
# 1 was not long enough
sleep 3
fi
- xscreensaver-command -lock
+ xscreensaver-command -activate
}
#############################
EOF
}
+reset-xscreensaver() {
+ # except for spash, i set these by setting gui options in
+ # xscreensaver-command -demo
+ # then finding the corresponding option in .xscreensaver
+ # spash, i happened to notice in .xscreensaver
+ cat > /home/iank/.xscreensaver <<'EOF'
+mode: blank
+dpmsEnabled: True
+dpmsStandby: 0:01:00
+dpmsSuspend: 0:01:00
+dpmsOff: 0:02:00
+timeout: 0:01:00
+lock: True
+lockTimeout: 0:02:00
+splash: False
+EOF
+
+}
+
###########################################
# stuff that makes sense to be at the end #
--- /dev/null
+# no screensaver for htpc machine
+if [[ $HOSTNAME != frodo ]]; then
+/usr/share/xscreensaver/xscreensaver-wrapper.sh &
+fi
+
+/a/exe/lnf -T /p/arbtt-capture.log ~/.arbtt/capture.log
+
+# docs say a sample rate less than 20 is probably not worth the data cost,
+# but it seems pretty small to me
+arbtt-capture --sample-rate=10 &