~anjan/public-inbox

Updated readme with the latest files i did commit. v1 APPLIED

magdesign: 1
  Updated readme with the latest files i did commit.

 2 files changed, 42 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~anjan/public-inbox/patches/49294/mbox | git am -3
Learn more about email & git

[PATCH] Updated readme with the latest files i did commit. Export this patch

---
 scripts/datausage_reset.sh | 15 +++++++++++++++
 scripts/powerlevel.sh      | 27 +++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 scripts/datausage_reset.sh
 create mode 100644 scripts/powerlevel.sh

diff --git a/scripts/datausage_reset.sh b/scripts/datausage_reset.sh
new file mode 100644
index 0000000..09721b4
--- /dev/null
+++ b/scripts/datausage_reset.sh
@@ -0,0 +1,15 @@
#!/bin/sh
# title="$icon_modem_disabled zero datausage"
# Description: resets the datausage counter
# Author: magdesign
# License: MIT
# shellcheck source=scripts/core/sxmo_common.sh
. "/usr/bin/sxmo_common.sh"

# ask for sudo and execute
sxmo_terminal.sh -t "Enter password" -- sh -c '$(sudo rc-service vnstatd stop && sleep 3 && sudo rm -rf /var/lib/vnstat/vnstat.db && sudo service vnstatd start)'

# notify
#notify-send --urgency=critical "datausage set to 0"

exit 0
diff --git a/scripts/powerlevel.sh b/scripts/powerlevel.sh
new file mode 100644
index 0000000..cdf56e1
--- /dev/null
+++ b/scripts/powerlevel.sh
@@ -0,0 +1,27 @@
#!/bin/sh
# title="$icon_bat_c_3 Powerlevel"
# shows battery level and state
# Author: magdesign
# License: MIT
# Description: Shows the wlan data usage
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "/usr/bin/sxmo_common.sh"

# read percentage
PERCENTAGE=$(upower -d | awk '/percentage/; /^$/ {exit}' | sed 's/[^0-9]//g')

# read state
STATE=$(upower -d | awk '/state/; /^$/ {exit}' |  sed 's/state://g;s/ //g')

# time to empty
EMPTY=$(upower -d | awk '/ time to empty/; /^$/ {exit}' | sed 's/ time to empty://g;s/ //g')

# when battery low, red background
if [[ "$PERCENTAGE" -lt 15 ]]; then 
    notify-send -u critical "$PERCENTAGE""%"" Battery LOW and ""$STATE" "$EMPTY"" left"
 else notify-send "$PERCENTAGE""%"" Battery ""$STATE" "$EMPTY"" left"
 
fi

exit
-- 
2.43.0
Thanks!

To git@git.sr.ht:~anjan/sxmo-userscripts
   cbf2652..07e21dd  master -> maste