Skip to content
Snippets Groups Projects
Commit 72ec1a75 authored by Jens Nolte's avatar Jens Nolte
Browse files

Update qbar

parent 6689a1e1
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env zsh
dir="/"
df -h -P -l "$dir" | awk '/\// { print $4 }'
#!/usr/bin/env bash
if [[ -n "${1}" ]]
then
INTERFACE="${1}"
else
INTERFACE="${BLOCK_INSTANCE:-wlp2s0}"
fi
SSID=$(iwgetid -r)
# don't display if there is no active wifi adapter
[[ ! -d /sys/class/net/${INTERFACE}/wireless ]] ||
[[ "$(cat /sys/class/net/$INTERFACE/operstate)" = 'down' ]] && exit
QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
[[ "$SSID" = 100111010110 ]] && SSID="<span color='#44ccff'>$SSID</span>"
echo "${SSID} $QUALITY%"
# color
if (( $QUALITY <= 20 )); then
exit 29
elif (( $QUALITY <= 30 )); then
exit 28
elif (( $QUALITY <= 40 )); then
exit 27
fi
......@@ -436,7 +436,7 @@ client.placeholder $base00 $base00 $base05 $base00 $base00
client.background $base00
bar {
status_command qbar server swaybar date battery cpu script --poll '~/.config/qbar/blocks/memory' script --poll '~/.config/qbar/blocks/temperature' networkmanager script --poll ~/.config/qbar/blocks/network-environment
status_command qbar server swaybar date battery cpu script --poll ~/.config/qbar/blocks/memory script --poll ~/.config/qbar/blocks/temperature disk / networkmanager
id bar-0
position top
......
{
"ref": "refs/heads/master",
"url": "https://git.c3pb.de/jens/qbar.git",
"rev": "5c8ef1e1adfae4414f11392b63662d2791f45634",
"date": "2020-03-19T22:27:09+01:00",
"sha256": "0q7ikpscxjrbbxzl5vqbf6szzfc05l4gh4f1x2zdwswny5a5qd93",
"rev": "27911553f65cd1a6967e7eac9ae9dd64e10dd597",
"date": "2020-09-20T23:15:02+02:00",
"path": "/nix/store/d38vpybnb8rxzd7hjfph2yjcbshpays8-qbar",
"sha256": "1g6f98qn8niyhqxpnw5sl5pdsiw6yjqfz19d5v6raz6hf69wd19k",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment