adding battery status
This commit is contained in:
33
config.def.h
33
config.def.h
@ -57,42 +57,19 @@ static const char unknown_str[] = "?";
|
||||
* wifi_perc WiFi signal in percent interface name (wlan0)
|
||||
*/
|
||||
|
||||
#define IFACE "enp4s0"
|
||||
#define BAT ""
|
||||
#define IFACE "wifibox0"
|
||||
#define BAT "BAT1"
|
||||
|
||||
static const struct arg args[] = {
|
||||
/* function format argument */
|
||||
// Network
|
||||
{ netspeed_rx, " [ %sB/s]", IFACE },
|
||||
{ ipv4, " ^c#fb4934^[ %s]", IFACE },
|
||||
|
||||
// Battery
|
||||
//{ battery_perc, " ^c#fe9019^[ %s%%", BAT },
|
||||
//{ battery_state, " %s", BAT },
|
||||
//{ battery_remaining," %s]", BAT
|
||||
// Brightness, Volume
|
||||
{ battery_perc, " ^c#fe9019^[ %s%%", BAT },
|
||||
{ battery_remaining," %s]", BAT },
|
||||
{ run_command, " ^c#8ec07c^[ %s]", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" },
|
||||
|
||||
// CPU & RAM Usage
|
||||
{ cpu_perc, " ^c#b8bb26^[%s%%]", NULL },
|
||||
{ ram_used, " ^c#d3869b^[ %s]", NULL },
|
||||
{ disk_free, " ^c#fe8019^[ %s]", "/" },
|
||||
|
||||
// Date & time
|
||||
{ datetime, " ^c#ebdbb2^[ %s]", "%H:%M:%S" }
|
||||
{ datetime, " ^c#ebdbb2^[ %s]", "%H:%M:%S" },
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
static const struct arg args[] = {
|
||||
{ netspeed_tx, "%s", IFACE},
|
||||
{ ipv4, " | %s", IFACE},
|
||||
{ ram_used, " | %s", NULL},
|
||||
{ cpu_perc, " | %s%%", NULL},
|
||||
{ run_command, " | %s%%", "/bin/sh -c \"amixer get Master | tail -n1 | grep -Po '\\[\\K[^%]*' | head -n1\"" },
|
||||
{ uptime, " | %s", NULL },
|
||||
{ datetime, " | %s", "%H:%M:%S |"},
|
||||
};
|
||||
*/
|
||||
|
||||
|
@ -7,8 +7,8 @@ VERSION = 1.0
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = $(PREFIX)/share/man
|
||||
|
||||
X11INC = /usr/include
|
||||
X11LIB = /usr/lib
|
||||
X11INC = ${PREFIX}/include
|
||||
X11LIB = ${PREFIX}/lib
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
|
||||
@ -16,7 +16,7 @@ CFLAGS = -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter -Os
|
||||
LDFLAGS = -L$(X11LIB) -s
|
||||
# OpenBSD: add -lsndio
|
||||
# FreeBSD: add -lkvm -lsndio
|
||||
LDLIBS = -lX11
|
||||
LDLIBS = -lX11 -lkvm -lsndio
|
||||
|
||||
# compiler and linker
|
||||
CC = cc
|
||||
|
Reference in New Issue
Block a user