Removed dwmblocks scripts - Moved to dwmblocks repo

This commit is contained in:
Luke Else 2022-09-21 20:53:45 +01:00
parent 66bc4b5673
commit cdd92acbb7
12 changed files with 0 additions and 125 deletions

View File

@ -1,25 +0,0 @@
#!/bin/bash
bat_capacity=$(</sys/class/power_supply/BAT0/capacity)
bat_status=$(</sys/class/power_supply/BAT0/status)
if [ $bat_status == "Charging" ]
then
battery_icon=""
elif [ $bat_capacity -lt 15 ]
then
battery_icon=" "
elif [ $bat_capacity -lt 35 ] && [ $bat_capacity -ge 15 ]
then
battery_icon=" "
elif [ $bat_capacity -lt 60 ] && [ $bat_capacity -ge 35 ]
then
battery_icon=" "
elif [ $bat_capacity -lt 90 ] && [ $bat_capacity -ge 60 ]
then
battery_icon=" "
else
battery_icon=" "
fi
printf "$battery_icon ^c#f7ca88^$bat_capacity%%^d^"

View File

@ -1,5 +0,0 @@
#!/bin/bash
icon=""
printf "$icon ^c#f7ca88^$(/usr/bin/brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}')%%^d^"

View File

@ -1,4 +0,0 @@
#!/bin/bash
icon=""
printf "$icon ^c#f7ca88^$(date '+%I:%M %p')^d^"

View File

@ -1,6 +0,0 @@
#!/bin/bash
icon=""
temp=$(echo "scale=0; $(sort -nr /sys/class/thermal/thermal_zone*/temp | head -n1) / 1000" | bc)
printf "$icon ^c#f7ca88^$((temp))^c#d75f5f^°C^d^"

View File

@ -1,4 +0,0 @@
#!/bin/bash
icon=""
printf "$icon ^c#f7ca88^$(date '+%a, %B %d')^d^"

View File

@ -1,7 +0,0 @@
#!/bin/bash
icon=""
kernel_v="$(uname -r)"
kernel_v="${kernel_v%-*}"
printf "$icon ^c#f7ca88^$kernel_v^d^"

View File

@ -1,6 +0,0 @@
#!/bin/bash
k_layout_icon=
k_layout=$(setxkbmap -query | grep layout | awk '{print $NF}')
printf "$k_layout_icon ^c#f7ca88^$k_layout^d^"

View File

@ -1,4 +0,0 @@
#!/bin/bash
icon=""
printf "$icon $(free -m | awk '/^Mem:/ {print "^c#87af5f^"$3 "mb^d^/" "^c#87afd7^"$2 "mb"}')^d^"

View File

@ -1,14 +0,0 @@
#! /bin/bash
if [[ $(tail -n+3 /proc/net/wireless 2>/dev/null) ]]; then
ssid=$(nmcli -t -f name connection show --active | head -n 1)
wireless_icon=" ^c#f7ca88^$ssid^d^"
elif [[ $(grep "" /sys/class/net/eth0/* 2>/dev/null) ]]; then
wired_icon=" ^c#f7ca88^LAN^d^"
fi
if [[ $(nmcli con show --active | grep -i vpn 2>/dev/null) ]]; then
vpn_icon="旅 "
fi
printf "$vpn_icon$wired_icon$wireless_icon"

View File

@ -1,23 +0,0 @@
#!/bin/bash
cache_path=~/.cache/.traffic
old_rx=$(head -n 1 $cache_path)
old_tx=$(tail -1 $cache_path)
printf "0\n0\n" > $cache_path
NETWORK_INTERFACE=$(ip route get 1.1.1.1 | grep -Po '(?<=dev\s)\w+' | cut -f1 -d ' ')
new_rx=`</sys/class/net/$NETWORK_INTERFACE/statistics/rx_bytes`
new_tx=`</sys/class/net/$NETWORK_INTERFACE/statistics/tx_bytes`
sed -i "1s/^.*$/$new_rx/" $cache_path
sed -i "2s/^.*$/$new_tx/" $cache_path
tx_bytes=`expr $new_tx - $old_tx`
rx_bytes=`expr $new_rx - $old_rx`
tx_kbs=`expr $tx_bytes / 1024`
rx_kbs=`expr $rx_bytes / 1024`
printf " ^c#87af5f^$rx_kbs"kb^d^"  ^c#87afd7^$tx_kbs"kb^d^""

View File

@ -1,4 +0,0 @@
#!/bin/bash
icon=""
printf "$icon ^c#d75f5f^$(uptime -p | cut -d " " -f2- | awk '{print $1 substr($2,1,1) " " $3 substr($4,1,1)}')^d^"

View File

@ -1,23 +0,0 @@
#!/bin/bash
vol=$(pactl list sinks | perl -000ne 'if(/#1/){/(Volume:.*)/; print "$1\n"}' | tr ' ' '\n' | grep -m1 '%' | tr -d '%')
if [ -z "$vol" ]; then
vol=$(pactl list sinks | tr ' ' '\n' | grep -m1 '%' | tr -d '%')
fi
vol_status=$(pactl list sinks | grep 'Mute: yes')
if [ -n "$vol_status" ]
then
vol_icon=" "
elif [ ${vol::-1} -eq 0 ]
then
vol_icon=" "
elif [ ${vol::-1} -lt 50 ]
then
vol_icon=" "
else
vol_icon=" "
fi
printf "$vol_icon^c#f7ca88^$vol%%^d^"