add scripts
This commit is contained in:
parent
b91bb6b7c8
commit
bc7920537e
4 changed files with 26 additions and 1 deletions
6
scripts/bdays.sh
Executable file
6
scripts/bdays.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
date=$(date "+%-d\\/%-m")
|
||||
echo $(cat ~/documents/notes/bdays.md \
|
||||
| sed "/ $date/!d" \
|
||||
| cut -d "|" -f3)
|
13
scripts/kb_battery.py
Executable file
13
scripts/kb_battery.py
Executable file
|
@ -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")
|
3
scripts/mount_ilo.sh
Executable file
3
scripts/mount_ilo.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
sshfs -o idmap=user -o transform_symlinks ilo:/ ~/ilo
|
||||
|
|
@ -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 -)"
|
||||
|
|
Loading…
Reference in a new issue