You are not logged in.
Pages: 1
Just wondering if anyone could shed some light on this weird issue. Probably belongs over at suckless.org but thought id pose the question here. When i start slstatus normally via .xinitrc the bars show up as asterisk symbols but if i start slstatus via xterm or st term then the bars show up. Seems like there is a bug or something starting characters such as these bars via xsetroot or however slstatus prints output to the statusbar and needs a terminal to print the bars?
how i start slstatus via .xinitrc to show the bars = xterm -e nohup slstatus
code:
nmcli -f ACTIVE,SIGNAL,BARS dev wifi list | awk '$1=="yes" {print $3}'
scrots:
Offline
I'm confused, slstatus is a C program so why have you posted a shell script?
Brianna Ghey — Rest In Power
Offline
i call a network status shell script from slstatus.
#!/bin/sh
get_net="$(ip r | awk '/^default/{print $5}')"
get_bars="$(nmcli -f ACTIVE,SIGNAL,BARS dev wifi list | awk '$1=="yes" {print $3}')"
if [ "$get_net" = "wlan0" ]; then
printf "$get_bars"
elif [ "$get_net" = "usb0" ]; then
printf ":Usb0"
else
printf "no network"
fi
Last edited by hevidevi (2021-10-30 11:55:52)
Offline
Is NetworkManager running and connected before your user logs in? I don't use it myself so I'm not sure how that works.
i call a network status shell script from slstatus
Wait, what? Why would you do that?
Please show how you have hooked the shell script into slstatus' components.
Last edited by Head_on_a_Stick (2021-10-31 08:14:19)
Brianna Ghey — Rest In Power
Offline
Is NetworkManager running and connected before your user logs in? I don't use it myself so I'm not sure how that works.
hevidevi wrote:i call a network status shell script from slstatus
Wait, what? Why would you do that?
Please show how you have hooked the shell script into slstatus' components.
Yes network manager is running before user logs in.
slstatus in config.h has below function call and i want a network status script that tells me at a glance the wifi is working with minimal info possible, just prints nmcli bars for the wifi and a usb icon for when im using usb phone tethering.
* run_command custom shell command command (echo foo)
then i put it as an argument like so.
static const struct arg args[] = {
/* function format argument */
{ run_command, " %s ", ("temperature") },
{ run_command, " %s ", ("network") },
{ run_command, " %s ", ("volume") },
{ datetime, "%s;", "%R" }
};
Last edited by hevidevi (2021-10-31 09:53:14)
Offline
Pages: 1