From 9ada1cffc8a3aff64c9cfe2ec42ad4b3c02bc9cd Mon Sep 17 00:00:00 2001 From: Tslil Clingman Date: Wed, 16 Dec 2015 23:52:39 -0500 Subject: runas sends arguments on - lock now uses ssh-agent because who knows how to get gpg-agent working properly anymore - there was an extra line being printed in the wls prompt - alsa now has a binary called bat. yay. --- bat | 6 ------ battery | 6 ++++++ lock | 1 + runas | 6 ++++-- wls | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) delete mode 100755 bat create mode 100755 battery diff --git a/bat b/bat deleted file mode 100755 index d98974c..0000000 --- a/bat +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh - -# Quick hack to display battery levels for the laptop - -str="s/ Charging, /C/;s/ Discharging, /D/;s/ Unknown,/U/" -acpi | cut -d: -f 2- | sed "$str" | cut -d\ -f 1-2 | cut -d: -f 1-2; diff --git a/battery b/battery new file mode 100755 index 0000000..d98974c --- /dev/null +++ b/battery @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +# Quick hack to display battery levels for the laptop + +str="s/ Charging, /C/;s/ Discharging, /D/;s/ Unknown,/U/" +acpi | cut -d: -f 2- | sed "$str" | cut -d\ -f 1-2 | cut -d: -f 1-2; diff --git a/lock b/lock index 6cf218d..aad1615 100755 --- a/lock +++ b/lock @@ -1,4 +1,5 @@ #!/usr/bin/env sh killall -s HUP gpg-agent +keychain --clear xset dpms force off slock diff --git a/runas b/runas index 89f45c1..9ebb527 100755 --- a/runas +++ b/runas @@ -9,7 +9,7 @@ export LOCALE="en_ZA.UTF-8" export PATH=$PATH:. export HISTFILE=$HOME/.histfile export HISTSIZE=8192 -umask 077 +umask 033 set -o emacs set -o utf8-mode PS1='${ local e=$?; local r=""; (( $e )) && r="<$e>"; @@ -49,6 +49,8 @@ else cd $HOME printf '\033k'"$1"'\033\\' xhost +local: - sudo -u $1 -s /home/$1/$1 + usr=$1 + shift + sudo -u $usr -s /home/$usr/$usr $* xhost -local: fi; diff --git a/wls b/wls index c6229b4..62cf55a 100755 --- a/wls +++ b/wls @@ -36,7 +36,7 @@ if [ ! -f "$dird/$ssid" ]; then echo Creating new network profile, enter passphrase: read pass wpa_passphrase $ssid "$pass" > $dird/$ssid - echo "Edit file (y/[n])? " + echo -n "Edit file (y/[n])? " read edit if [ "$edit" == "y" ]; then $EDITOR $dird/$ssid -- cgit v1.2.3