Compare commits

..

2 Commits

Author SHA1 Message Date
Sojus07
ae12d05779 kekl 2025-02-12 21:05:33 +01:00
4ab6081307 poggers 2025-02-10 22:52:59 +01:00
3 changed files with 9 additions and 6 deletions

1
components/sh/ip.sh Normal file
View File

@ -0,0 +1 @@
curl -s icanhazip.com

View File

@ -1,24 +1,26 @@
const unsigned int interval = 1000; const unsigned int interval = 1000;
static const char unknown_str[] = "?"; static const char unknown_str[] = "?";
#define MAXLEN 2048 #define MAXLEN 2048
#define IFACE "enp6s0" #define IFACE "enp6s0"
#define BAT "BAT1" #define BAT "BAT0"
static const struct arg args[] = { static const struct arg args[] = {
{ netspeed_rx, " [ %sB/s]", IFACE }, { netspeed_rx, " [ %sB/s]", IFACE },
{ netspeed_tx, " [ %sB/s]", IFACE }, { netspeed_tx, " [ %sB/s]", IFACE },
{ ipv4, " ^c#fb4934^[ %s]", IFACE }, { ipv4, " ^c#fb4934^[ %s]", IFACE },
{ run_command, " ^c#fb4934^[%s]", "sh /opt/suckless/slstatus/components/wg.sh" }, { run_command, " ^c#7ec07c^[%s]", "sh /opt/suckless/slstatus/components/sh/ip.sh" },
{ mullvad_relay, " [%s]", NULL }, { run_command, " ^c#fb4934^[%s]", "sh /opt/suckless/slstatus/components/sh/wg.sh" },
//{ mullvad_relay, " [%s]", NULL },
{ mullvad_stat, " [%s]", NULL }, { mullvad_stat, " [%s]", NULL },
//{ battery_perc, " ^c#fe9019^[ %s%%", BAT }, //{ battery_perc, " ^c#fe9019^[ %s%%", BAT },
//{ battery_remaining," %s]", BAT }, //{ battery_remaining," %s]", BAT },
//{ run_command, " ^c#8ec07c^[ %s]", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" }, { run_command, " ^c#8ec07c^[ %s]", "amixer sget Master | grep -oP '\\d+(?=%)' | head -n 1" },
{ vol_perc, " ^c#8ec07c^[ %s]", NULL }, //{ vol_perc, " ^c#8ec07c^[ %s]", NULL },
{ cpu_perc, " ^c#b8bb26^[%s%%]", NULL }, { cpu_perc, " ^c#b8bb26^[%s%%]", NULL },
{ ram_used, " ^c#d3869b^[ %s]", NULL }, { ram_used, " ^c#d3869b^[ %s]", NULL },
{ datetime, " ^c#ebdbb2^[ %s]", "%H:%M:%S" }, { datetime, " ^c#ebdbb2^[ %s]", "%H:%M:%S" },