aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2022-01-14 22:33:32 -0700
committerDerek Stevens <nilix@nilfm.cc>2022-01-14 22:33:32 -0700
commitc762b10e61ba00477c6ad976e9a3681520ea3e7b (patch)
treee23eb3c991b906e2d37f4052ecb062cbc4f2a01e
parentfa5f28ca3f90c9ce6b26d1841f72623ab490f19d (diff)
improve t2stats performance, tweak heading comments througout
-rw-r--r--README.md2
-rwxr-xr-xbatAlarm.sh4
-rwxr-xr-xdesks.sh4
-rwxr-xr-xdynacal.sh4
-rwxr-xr-xextdisplay.sh4
-rwxr-xr-xlogout.sh4
-rwxr-xr-xrio.sh4
-rwxr-xr-xsirius.sh4
-rwxr-xr-xt2stats.sh95
-rwxr-xr-xxtraKeys.sh4
-rwxr-xr-xztabelle.sh4
11 files changed, 80 insertions, 53 deletions
diff --git a/README.md b/README.md
index ebe4a3a..ce35c88 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ common keybinding operations with notifications
tint2 system load/memory, battery, and network info
-### dynaclock
+### dynacal
displays either regular or arvelie clock in a tint2 executor, with an action to switch them as well
diff --git a/batAlarm.sh b/batAlarm.sh
index 031e01c..e6b85b2 100755
--- a/batAlarm.sh
+++ b/batAlarm.sh
@@ -2,8 +2,8 @@
# Just a background script to tell you when your battery's low if you don't
# have a panel.
-# Lisenced under the MIT license -- do what you want
-# Copyleft 2021 Derek Stevens <drkste@zoho.com>
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
flag1=0
flag2=0
diff --git a/desks.sh b/desks.sh
index 8df6abd..311a71a 100755
--- a/desks.sh
+++ b/desks.sh
@@ -3,8 +3,8 @@
# this is a simple script to both give some semblance of eye-candy for a tint2 executor
# and to switch virtual desktops programmatically, to be invoked by button click/scroll
# on said executor.
-# copyleft 2020 Derek Stevens <drkste@zoho.com>
-# MIT License - do whatever you want
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
# if we're feeling spartan, just print a simple string for the executor
if [ -z $1 ]; then
diff --git a/dynacal.sh b/dynacal.sh
index c2adb5d..b0bb581 100755
--- a/dynacal.sh
+++ b/dynacal.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+# display arvelie/neralie or gregorian time depending on toggle
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
+
if [ "$1" = "-t" ]; then
current=$(cat ~/.time_mode)
case ${current} in
diff --git a/extdisplay.sh b/extdisplay.sh
index b6e5c65..a6217cd 100755
--- a/extdisplay.sh
+++ b/extdisplay.sh
@@ -2,8 +2,8 @@
# extdisplay:
# this is a wrapper around xrandr to handle one external monitor on a laptop
-# copyleft 2020 Derek Stevens <drkste@zoho.com>
-# MIT License -- do whatever you want
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
helpme()
{
diff --git a/logout.sh b/logout.sh
index b0afacc..db92259 100755
--- a/logout.sh
+++ b/logout.sh
@@ -5,8 +5,8 @@
# no arguments prints the power icon with siji font
# -p runs the prompt in dmenu
# use a sudoers rule with NOPASSWD or a session manager
-# copyleft 2020 Derek Stevens <drkste@zoho.com>
-# MIT License -- do whatever you want
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
menu() {
dmenu "$@" -p "action >>>" -fn saucecodepronerdfont-9 -l 6 -nb black -nf grey50 -sb "#1f9b92" -sf black
diff --git a/rio.sh b/rio.sh
index ec7e146..86b24ad 100755
--- a/rio.sh
+++ b/rio.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+# use slop and wmctrl to emulate rio behavior in an EWMH compliant WM
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
+
termcmd="alacritty --option geometry="
movebind="super+v"
diff --git a/sirius.sh b/sirius.sh
index 96ec89c..b46967e 100755
--- a/sirius.sh
+++ b/sirius.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+# fetch your mail at regular intervals
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
+
while true; do
mbsync -a
sleep 5m
diff --git a/t2stats.sh b/t2stats.sh
index b1c790c..133f7a2 100755
--- a/t2stats.sh
+++ b/t2stats.sh
@@ -2,15 +2,22 @@
# t2stats:
# this is a simple network/battery status indicator to be used with tint2
-# copyleft 2020 Derek Stevens <drkste@zoho.com>
-# MIT License -- do whatever you want
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
if [ "$1" = "-l" ]; then
- load=$(cat /proc/loadavg | awk '{print $1}')
+ load=$(cat /proc/loadavg)
+ set -- ${load}
+ load=$3
+
memdata=$(free -h --si | grep Mem)
swapdata=$(free -h --si | grep Swap)
- memused=$(echo ${memdata} | awk '{print $3}' )
- swapused=$(echo ${swapdata} | awk '{print $3}')
+
+ set -- ${memdata}
+ memused=$3
+
+ set -- ${swapdata}
+ swapused=$3
echo " ${load} | ${memused} | ${swapused}"
fi
@@ -27,7 +34,7 @@ if [ "$1" = "-r" ]; then
output=wired
elif [ ! -z "${possiblywifi}" ]; then
output="wifi/$(echo ${possiblywifi} |\
- awk 'BEGIN { ORS=" " }; {for (i=1; i<=(NF-3);i++) print $i}')"
+ awk 'BEGIN { ORS=" " }; {for (i=1; i<=(NF-3);i++) print $i}')"
else
output=offline
fi
@@ -35,45 +42,45 @@ if [ "$1" = "-r" ]; then
echo -n "${output}"
# battery
- powerlevel=$(cat /sys/class/power_supply/BAT*/capacity)
- case $powerlevel in
- 0)
- meter=" "
- ;;
- 1|2|3|4|5|6|7|8|9)
- meter=" "
- ;;
- 10|11|12|13|14|15|16|17|18|19)
- meter=" "
- ;;
- 20|21|22|23|24|25|26|27|28|29)
- meter=" "
- ;;
- 30|31|32|33|34|35|36|37|38|39)
- meter=" "
- ;;
- 40|41|42|43|44|45|46|47|48|49)
- meter=" "
- ;;
- 50|51|52|53|54|55|56|57|58|59)
- meter=" "
- ;;
- 60|61|62|63|64|65|66|67|68|69)
- meter=" "
- ;;
- 70|71|72|73|74|75|76|77|78|79)
- meter=" "
- ;;
- 80|81|82|83|84|85|86|87|88|89)
- meter=""
- ;;
- *)
- meter=""
- ;;
- esac
-
if ! grep Full /sys/class/power_supply/BAT*/status > /dev/null \
- && file /sys/class/power_supply/BAT* > /dev/null; then
+ && [ -d /sys/class/power_supply/BAT* ]; then
+ powerlevel=$(cat /sys/class/power_supply/BAT*/capacity)
+ case $powerlevel in
+ 0)
+ meter=" "
+ ;;
+ 1|2|3|4|5|6|7|8|9)
+ meter=" "
+ ;;
+ 10|11|12|13|14|15|16|17|18|19)
+ meter=" "
+ ;;
+ 20|21|22|23|24|25|26|27|28|29)
+ meter=" "
+ ;;
+ 30|31|32|33|34|35|36|37|38|39)
+ meter=" "
+ ;;
+ 40|41|42|43|44|45|46|47|48|49)
+ meter=" "
+ ;;
+ 50|51|52|53|54|55|56|57|58|59)
+ meter=" "
+ ;;
+ 60|61|62|63|64|65|66|67|68|69)
+ meter=" "
+ ;;
+ 70|71|72|73|74|75|76|77|78|79)
+ meter=" "
+ ;;
+ 80|81|82|83|84|85|86|87|88|89)
+ meter=""
+ ;;
+ *)
+ meter=""
+ ;;
+ esac
+
echo " ${meter}"
fi
fi
diff --git a/xtraKeys.sh b/xtraKeys.sh
index 0fe08fe..6857ec5 100755
--- a/xtraKeys.sh
+++ b/xtraKeys.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+# wrapper for common keybinds across environments
+# by Derek Stevens <nilix@nilfm.cc>
+# MIT License
+
helpme(){
echo "$0 < v | b > < args >"
echo " args for v (volume) command:"
diff --git a/ztabelle.sh b/ztabelle.sh
index 654459c..90f2c9b 100755
--- a/ztabelle.sh
+++ b/ztabelle.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+# make a timesheet from a month's data from the Zeit db
+# Derek Stevens <nilix@nilfm.cc>
+# MIT License
+
if [ -z $2 ]; then
echo "usage:"
echo " $0 MONTH YEAR"