X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=53f8c5b0074cc3cf62650238027c4684fea347de;hb=3f437c0f6c11356451d5d739875eee2d4603d7ca;hp=bd8429e1d526b6252367f3d38b65005bca5d3337;hpb=5856bb416776ef23746dcaf166f68cda7ffee711;p=distro-setup 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 #