Compare commits

..

4 commits

Author SHA1 Message Date
Zhongheng Liu
b86a4183f9 feat: add battery monitoring convenience script 2026-06-14 17:12:49 +02:00
Zhongheng Liu
96cf21afb2 ereport script 2026-05-19 09:45:27 +02:00
Zhongheng Liu
f2bcaf389e thing 2026-05-18 12:37:25 +02:00
Zhongheng Liu
b5aad6a795 reintroduce Makefile (for emake) 2026-05-18 12:29:33 +02:00
10 changed files with 14 additions and 0 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
Thing

1
scripts/adpon.sh Executable file
View file

@ -0,0 +1 @@
[ "$(cat /sys/class/power_supply/ADP*/online 2>/dev/null)" = "1" ] && echo "ADP Online" || echo "ADP Offline; using battery"

12
scripts/ereport.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
set -euo pipefail
DATE=$(date -I)
REPORT_PATH=$HOME/ereport-$(date -I).txt
if [[ -f "$REPORT_PATH" ]]; then
echo "Today's report already exists at $REPORT_PATH!"
else
echo "Syncing repositories..."
# sudo emerge --sync >> "$REPORT_PATH"
echo "Writing update report..."
sudo emerge --update --newuse --deep @world --pretend >> "$REPORT_PATH"
fi