feat: show more info, and fix the cpu temp path

This commit is contained in:
0x61nas 2024-05-15 15:28:53 +03:00
parent 23d7ce0ebe
commit 27b258bd0a
No known key found for this signature in database
GPG Key ID: 83E03DC6F3834086
1 changed files with 30 additions and 16 deletions

View File

@ -63,21 +63,35 @@ static const char unknown_str[] = "n/a";
* wifi_perc WiFi signal in percent interface name (wlan0) * wifi_perc WiFi signal in percent interface name (wlan0)
* wifi_essid WiFi ESSID interface name (wlan0) * wifi_essid WiFi ESSID interface name (wlan0)
*/ */
static const struct arg _separator = {separator, " \\|/ ", NULL};
#define BAT_NAME "BAT0"
static const struct arg args[] = { static const struct arg args[] = {
/* function format argument */ /* function format argument */
{ run_command, "SP:%s ", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" }, {run_command, "SP:%s ",
{ run_command, "BR:%s%% ", "xbacklight -get | awk '{printf \"%.0f\", $1}'" }, "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1"},
{ cpu_perc, "CPU:%s%%|", NULL }, {run_command, "BR:%s%% ", "xbacklight -get | awk '{printf \"%.0f\", $1}'"},
{ cpu_freq, "%s ", NULL }, _separator,
{ temp, "%s\u00b0C ", "/sys/class/hwmon/hwmon5/temp1_input" }, {cpu_perc, "CPU:%s%%|", NULL},
{ ram_perc, "RAM:%s%% ", NULL }, {cpu_freq, "%s ", NULL},
// { netspeed_tx, " %s ^ ", "wlan0" }, {temp, "%s\u00b0C ", "/sys/class/thermal/thermal_zone8/temp"},
// { netspeed_rx, " %s ", "wlan0" }, _separator,
{ battery_perc, "BAT:%s%%", "BAT0" }, {ram_perc, "RAM:%s%% ", NULL},
{ battery_state, "%s ", "BAT0" }, {swap_perc, "SWAP: %s%% ", NULL },
{ keymap, "KB:%s ", NULL }, // { netspeed_tx, " %s ^ ", "wlan0" },
{ datetime, "TIME:%s|", "%r" }, // { netspeed_rx, " %s ", "wlan0" },
{ datetime, "%s ", "%a %d/%m/%Y" }, _separator,
{ disk_used, "(/:%s|", "/" }, {battery_perc, "BAT:%s%%", BAT_NAME},
{ disk_used, "~:%s)", "/home" }, {battery_state, "%s ", BAT_NAME},
// {battery_remaining, " REM: %s", BAT_NAME},
_separator,
{keymap, "KB:%s", NULL},
_separator,
{datetime, "TIME:%s", "%r"},
_separator,
{datetime, "%s ", "%a %d/%m/%Y"},
_separator,
{disk_used, "(ROOT:%s|", "/"},
{disk_used, "HOME:%s)", "/home"},
_separator,
{uptime, "UP: %s", NULL},
}; };