small fixes and improvements
authorIan Kelling <iank@fsf.org>
Mon, 22 Jan 2018 01:49:37 +0000 (20:49 -0500)
committerIan Kelling <iank@fsf.org>
Mon, 22 Jan 2018 01:49:37 +0000 (20:49 -0500)
brc
filesystem/etc/X11/Xsession.d/98iank [new file with mode: 0644]

diff --git a/brc b/brc
index bd8429e1d526b6252367f3d38b65005bca5d3337..53f8c5b0074cc3cf62650238027c4684fea347de 100644 (file)
--- a/brc
+++ b/brc
@@ -1602,7 +1602,7 @@ EOF
  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 \$ "
@@ -1709,8 +1709,11 @@ vspicy() { # usage: VIRSH_DOMAIN
 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 /
@@ -1719,7 +1722,7 @@ xl() {
         # 1 was not long enough
         sleep 3
     fi
-    xscreensaver-command -lock
+    xscreensaver-command -activate
 }
 
 #############################
@@ -1940,6 +1943,25 @@ scrollbar true
 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 #
diff --git a/filesystem/etc/X11/Xsession.d/98iank b/filesystem/etc/X11/Xsession.d/98iank
new file mode 100644 (file)
index 0000000..fa21023
--- /dev/null
@@ -0,0 +1,10 @@
+# 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 &