mirror of https://github.com/captn3m0/Scripts.git
Housekeeping improvements
This commit is contained in:
parent
937c42d901
commit
2ddd9fd62d
|
@ -6,4 +6,7 @@ WORK_ROOT="/home/nemo/projects/work/razorpay"
|
|||
find $WORK_ROOT -maxdepth 2 -type d -iname .git | xargs -I{} bash -c "cd {}/.. && karn update"
|
||||
|
||||
PERSONAL_ROOT="/home/nemo/projects/personal"
|
||||
find $PERSONAL_ROOT -maxdepth 2 -type d -iname .git | xargs -I{} bash -c "cd {}/.. && karn update"
|
||||
find $PERSONAL_ROOT -maxdepth 2 -type d -iname .git | xargs -I{} bash -c "cd {}/.. && karn update"
|
||||
|
||||
# Cleanup yay-cache
|
||||
find /home/nemo/.cache/yay -iregex '.*\.\(bz2\|tar\|zip\|deb\|xz\|gz\)$' -delete
|
|
@ -1,11 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Add the following to your crontab to get this working
|
||||
# DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
||||
# XAUTHORITY=/home/nemo/.Xauthority
|
||||
BATTINFO=`acpi -b`
|
||||
BATTERY=/sys/class/power_supply/BAT0
|
||||
REM=`grep "POWER_SUPPLY_CHARGE_NOW" $BATTERY/uevent | awk -F= '{ print $2 }'`
|
||||
FULL=`grep "POWER_SUPPLY_CHARGE_FULL_DESIGN" $BATTERY/uevent | awk -F= '{ print $2 }'`
|
||||
PERCENT=`echo $(( $REM * 100 / $FULL ))`
|
||||
|
||||
if [[ `echo $BATTINFO | grep Discharging` && "$PERCENT" -lt "10" ]] ; then
|
||||
DISPLAY=:0.0 /usr/bin/notify-send "low battery" "$BATTINFO"
|
||||
echo "Battery is at $PERCENT%"
|
||||
|
||||
if [[ `echo $BATTINFO | grep Discharging` && "$PERCENT" -lt "15" ]] ; then
|
||||
echo "Not Charging, so alerting"
|
||||
DISPLAY=:0.0 /usr/bin/notify-send --urgency=critical "Battery Running Low" "$BATTINFO"
|
||||
fi
|
|
@ -0,0 +1 @@
|
|||
../personal/mobile-passwords/runme.sh
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
|||
export CF_DNS_SERVERS='1.1.1.1 9.9.9.9'
|
||||
|
||||
# Based on https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
|
||||
export CF_KEY=`gkeyring -n CF_KEY --output secret`
|
||||
export CF_KEY=$(pass show CloudFlare/CF_KEY)
|
||||
export CF_EMAIL="capt.n3m0@gmail.com"
|
||||
|
||||
dehydrated --cron
|
BIN
youtube-dl
BIN
youtube-dl
Binary file not shown.
Loading…
Reference in New Issue