From 87f900c44182d9175700349890c24440a740c121 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 21 Jan 2018 20:49:37 -0500 Subject: [PATCH] small fixes and improvements --- brc | 28 +++++++++++++++++++++++++--- filesystem/etc/X11/Xsession.d/98iank | 10 ++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 filesystem/etc/X11/Xsession.d/98iank diff --git a/brc b/brc index bd8429e..53f8c5b 100644 --- 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 index 0000000..fa21023 --- /dev/null +++ b/filesystem/etc/X11/Xsession.d/98iank @@ -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 & -- 2.30.2