Add wifi interface

This commit is contained in:
2024-06-22 14:31:39 +01:00
parent 00b29cd850
commit a9db31c3a2
4 changed files with 38 additions and 26 deletions

View File

@@ -4,7 +4,7 @@
const unsigned int interval = 1000;
/* text to show if no value can be retrieved */
static const char unknown_str[] = "??";
static const char unknown_str[] = "";
/* maximum output string length */
#define MAXLEN 2048
@@ -63,11 +63,16 @@ static const char unknown_str[] = "??";
* wifi_essid WiFi ESSID interface name (wlan0)
* wifi_perc WiFi signal in percent interface name (wlan0)
*/
static const struct arg args[] = {
/* function format argument */
{ wifi_essid, " %s", "wlan0" },
{ wifi_perc, "(%s%%) ", "wlan0" },
{ wifi_essid, "%s", "wlo1" },
{ wifi_perc, "(%s", "wlan0" },
{ wifi_perc, "%s%%) ", "wlo1" },
{ battery_perc, "󰂉 %s%% ", "BAT0" },
{ run_command, " %s%% ", "wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -c 11-" },
{ cpu_perc, " %s%% ", NULL },

View File

@@ -4,7 +4,7 @@
const unsigned int interval = 1000;
/* text to show if no value can be retrieved */
static const char unknown_str[] = "??";
static const char unknown_str[] = "";
/* maximum output string length */
#define MAXLEN 2048
@@ -63,11 +63,16 @@ static const char unknown_str[] = "??";
* wifi_essid WiFi ESSID interface name (wlan0)
* wifi_perc WiFi signal in percent interface name (wlan0)
*/
static const struct arg args[] = {
/* function format argument */
{ wifi_essid, " %s", "wlan0" },
{ wifi_perc, "(%s%%) ", "wlan0" },
{ wifi_essid, "%s", "wlo1" },
{ wifi_perc, "(%s", "wlan0" },
{ wifi_perc, "%s%%) ", "wlo1" },
{ battery_perc, "󰂉 %s%% ", "BAT0" },
{ run_command, " %s%% ", "wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -c 11-" },
{ cpu_perc, " %s%% ", NULL },

Binary file not shown.