dwmblocks 0.1.1

Simple and fast modular status bar for dwm written in rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

acpi=`acpi -b`
    bat=`echo $acpi | linesplit ',' 1 | cut -b 2-`
    if echo $acpi | grep -q "Charging"; then
        echo -e "$bat"
    else
        charge=`echo $bat | sed -e 's/%//g'`
        if [ $charge -gt 75 ]; then
            echo -e "$bat"
        elif [ $charge -gt 50 ]; then
            echo -e "$bat"
        elif [ $charge -gt 25 ]; then
            echo -e "$bat"
        else
            echo -e "$bat"
        fi
    fi