Update statusbar
This commit is contained in:
3
.bin/sb-date
Executable file
3
.bin/sb-date
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo -n -e "Week $(date '+%V') - $(date '+%a %d %b %H:%M')"
|
||||
7
.bin/sb-internet
Executable file
7
.bin/sb-internet
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||
wifiicon="$(awk '/^\s*w/ { print "WiFi", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
|
||||
fi
|
||||
|
||||
printf " %s%s%s |" "$wifiicon" "$(sed "s/down//;s/up/Ethernet/" /sys/class/net/e*/operstate 2>/dev/null)"
|
||||
3
.bin/sb-pomo
Executable file
3
.bin/sb-pomo
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat /tmp/pomo
|
||||
3
.bin/sb-portfolio
Executable file
3
.bin/sb-portfolio
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
"$HOME/dev/automation/portfolio-tracker/index.js"
|
||||
14
.bin/sb-tasks
Executable file
14
.bin/sb-tasks
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
num_done="$(task end.after:today status:completed count)"
|
||||
num_pending="$(($(task count status:pending) + $num_done))"
|
||||
|
||||
if [ "$num_done" -ge "$num_pending" ];then
|
||||
color="\x01"
|
||||
elif [ "$num_done" -ge "$((num_pending/2))" ]; then
|
||||
color="\x03"
|
||||
else
|
||||
color="\x04"
|
||||
fi
|
||||
|
||||
echo -n -e "$color Tasks: $num_done/$num_pending \x01"
|
||||
Reference in New Issue
Block a user