diff options
| author | tslil clingman <> | 2021-01-20 15:40:09 -0500 |
|---|---|---|
| committer | tslil clingman <> | 2021-01-20 15:40:09 -0500 |
| commit | c0ffa4c32b140378fb51e4c4f8c8c75a67a9d572 (patch) | |
| tree | 605d07e830d47db96930a0aeb9b12f455f6135e8 | |
| parent | 8109b6a56b74ff1c5780c14415caf23ecaeb0623 (diff) | |
Small changes
| -rwxr-xr-x | battery | 12 | ||||
| -rwxr-xr-x | lock | 15 | ||||
| -rwxr-xr-x | sc | 21 |
3 files changed, 24 insertions, 24 deletions
@@ -1,9 +1,7 @@ #!/bin/sh report=$(acpi | tr -d ',') -echo $report | grep -qv Unknown -if [ "$?" = "0" ]; then - status=$(echo $report | cut -d\ -f 3 | cut -b 1) - perc=$(echo $report | cut -d\ -f 4) - time=$(echo $report | cut -d\ -f 5 | sed 's/\([0-9]*\):\([0-9]*\).*/\1h\2m/') - echo $status$perc $time -fi +status=$(echo $report | cut -d\ -f 3 | cut -b 1) +perc=$(echo $report | cut -d\ -f 4) +time=$(echo $report | cut -d\ -f 5 | sed 's/\([0-9]*\):\([0-9]*\).*/\1h\2m/') +echo $status$perc $time + @@ -1,8 +1,15 @@ #!/usr/bin/env sh + +# Clear keys killall -s HUP gpg-agent keychain --clear -xset dpms force off + +# We want powersaving now that screen is locked +xset +dpms +sleep 1; xset dpms force off + +# Lock slock -fix_backlight -xset s off -xest -dpms + +# Clean up on exit +trap "xset -dpms" EXIT @@ -3,17 +3,12 @@ reset_ratpoison="yes" case "$1" in - "d") xrandr --nograb --output VGA1 --off --output LVDS1 --auto;; - "r") xrandr --nograb --output VGA1 --auto --primary --output LVDS1 --off;; - "c") xrandr --nograb --output VGA1 --auto --output LVDS1 --auto;; - "n") xrandr --nograb --output LVDS1 --auto --above VGA1 --output VGA1 --auto;; - "s") xrandr --nograb --output LVDS1 --auto --below VGA1 --output VGA1 --auto;; - "e") xrandr --nograb --output LVDS1 --auto --right-of VGA1 --output VGA1 --auto;; - "w") xrandr --nograb --output LVDS1 --auto --left-of VGA1 --output VGA1 --auto;; - *) xrandr --nograb; reset_ratpoison="" ;; + "d") xrandr --nograb --output VGA-1 --off --output LVDS-1 --auto;; + "r") xrandr --nograb --output VGA-1 --auto --primary --output LVDS-1 --off;; + "c") xrandr --nograb --output VGA-1 --auto --output LVDS-1 --auto;; + "n") xrandr --nograb --output LVDS-1 --auto --above VGA-1 --output VGA-1 --auto;; + "s") xrandr --nograb --output LVDS-1 --auto --below VGA-1 --output VGA-1 --auto;; + "e") xrandr --nograb --output LVDS-1 --auto --right-of VGA-1 --output VGA-1 --auto;; + "w") xrandr --nograb --output LVDS-1 --auto --left-of VGA-1 --output VGA-1 --auto;; + *) xrandr --nograb; reset_ratpoison="" ;; esac; - -if [ -n "$reset_ratpoison" ]; then - [ -n "$BACKGROUND_IMAGE" ] && feh --bg-scale "$BACKGROUND_IMAGE" - #ratpoison -c restart -fi; |
