diff --git a/scripts/bdays.sh b/scripts/bdays.sh new file mode 100755 index 0000000..43a0eb7 --- /dev/null +++ b/scripts/bdays.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +date=$(date "+%-d\\/%-m") +echo $(cat ~/documents/notes/bdays.md \ +| sed "/ $date/!d" \ +| cut -d "|" -f3) diff --git a/scripts/kb_battery.py b/scripts/kb_battery.py new file mode 100755 index 0000000..f017151 --- /dev/null +++ b/scripts/kb_battery.py @@ -0,0 +1,13 @@ +#!/bin/env python3 +import subprocess + +all_statuses = subprocess.run(["upower", "-d"], capture_output=True).stdout.decode("utf-8").split("\n\n") + +for s in all_statuses: + if "leko pona 1" in s: + for line in s.split("\n"): + if "percentage:" in line: + print(line.split(":")[1].strip()) + exit(0) + +print("no kb found") diff --git a/scripts/mount_ilo.sh b/scripts/mount_ilo.sh new file mode 100755 index 0000000..33a9805 --- /dev/null +++ b/scripts/mount_ilo.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sshfs -o idmap=user -o transform_symlinks ilo:/ ~/ilo + diff --git a/scripts/task.sh b/scripts/task.sh index b06774b..d2a2670 100755 --- a/scripts/task.sh +++ b/scripts/task.sh @@ -1 +1,4 @@ -sed '/# unlikely/q' ~/documents/notes/projects.md | sed 's/#.*//;/^$/d' | shuf -n1 | echo "[$(date +%H:%M)] Work on this for an hour: $(cat -)" +sed '/---/q' ~/documents/notes/projects.md \ +| sed 's/#.*//;/^$/d' \ +| shuf -n1 \ +| echo "[$(date +%H:%M)] Work on this for an hour: $(cat -)"