diff --git a/localbin/.local/bin/batstatus b/localbin/.local/bin/batstatus deleted file mode 100755 index 37f2ecf..0000000 --- a/localbin/.local/bin/batstatus +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# get battery percentage and current time remaining - -#acpi | awk -F '[, :]' '{print $6 " ~" $8":"$9}' -acpi | awk -F '[, :]' '{ print $6 }' diff --git a/localbin/.local/bin/dwmbattery b/localbin/.local/bin/dwmbattery new file mode 100755 index 0000000..b0591b0 --- /dev/null +++ b/localbin/.local/bin/dwmbattery @@ -0,0 +1,7 @@ +#!/bin/bash + +icon="" +#battery="$(acpi | awk -F '[, :]' '{ print $6 " ~" $8":"$9 }')" # with time remaning +battery="$(acpi | awk -F '[, :]' '{ print $6 }')" # without time + +printf " %s %s \\n" "$icon" "$battery" diff --git a/localbin/.local/bin/dwmcpu b/localbin/.local/bin/dwmcpu new file mode 100755 index 0000000..03c50eb --- /dev/null +++ b/localbin/.local/bin/dwmcpu @@ -0,0 +1,11 @@ +#!/bin/bash + +read cpu a b c previdle rest < /proc/stat +prevtotal=$((a+b+c+previdle)) +sleep 0.5 +read cpu a b c idle rest < /proc/stat +total=$((a+b+c+idle)) +cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) +icon="" +printf " %s %s \\n" "$icon" "$cpu%" + diff --git a/localbin/.local/bin/dwmdisk b/localbin/.local/bin/dwmdisk new file mode 100755 index 0000000..11ae2eb --- /dev/null +++ b/localbin/.local/bin/dwmdisk @@ -0,0 +1,8 @@ +#!/bin/bash + +icon="" +hdd1="$(df / | awk '/^\// { print $5 }')" +hdd2="$(df /home | awk '/^\// { print $5 }')" + +printf " %s / %s | %s /home %s \\n" "$icon" "$hdd1" "$icon" "$hdd2" + diff --git a/localbin/.local/bin/dwmmemory b/localbin/.local/bin/dwmmemory new file mode 100755 index 0000000..f59f1b9 --- /dev/null +++ b/localbin/.local/bin/dwmmemory @@ -0,0 +1,7 @@ +#!/bin/bash + +icon="" +mem="$(free -h | awk '/^Mem/ { print $3"/"$2 }' | sed s/i//g)" + +printf " %s %s \\n" "$icon" "$mem" + diff --git a/localbin/.local/bin/dwmnetwork b/localbin/.local/bin/dwmnetwork new file mode 100755 index 0000000..382f0a9 --- /dev/null +++ b/localbin/.local/bin/dwmnetwork @@ -0,0 +1,21 @@ +#!/bin/bash + +icon="" +iface="enp4s0" + +up="" +down="" + +R1="$(cat /sys/class/net/$iface/statistics/rx_bytes)" +T1="$(cat /sys/class/net/$iface/statistics/tx_bytes)" +sleep 1 +R2="$(cat /sys/class/net/$iface/statistics/rx_bytes)" +T2="$(cat /sys/class/net/$iface/statistics/tx_bytes)" +TBPS="$(expr $T2 - $T1)" +RBPS="$(expr $R2 - $R1)" +TKBPS="$(expr $TBPS / 1024)" +RKBPS="$(expr $RBPS / 1024)" +IPADDR="$(ip a show dev $iface | awk '/inet / { print $2 } ')" + +printf " %s [%s] %s %skB/s %s %skB/s \\n" "$icon" "$IPADDR" "$up" "$TKBPS" "$down" "$RKBPS" +#echo "tx $iface: $TKBPS kB/s rx $iface: $RKBPS kB/s" diff --git a/localbin/.local/bin/freememory b/localbin/.local/bin/freememory deleted file mode 100755 index 0afd42b..0000000 --- a/localbin/.local/bin/freememory +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# simple script to show systemmemory in dwmblocks - -free -h | awk '/^Mem/ { print $3"/"$2 }' | sed s/i//g diff --git a/localbin/.local/bin/makescreenshot b/localbin/.local/bin/makescreenshot new file mode 100755 index 0000000..c98e1f0 --- /dev/null +++ b/localbin/.local/bin/makescreenshot @@ -0,0 +1,3 @@ +#!/bin/bash + +/usr/bin/maim -s ~/Pictures/Screenshot_$(date +%Y%m%d_%H:%M:%S).jpg