raujonas / executor

Gnome Shell Extension - Execute multiple shell commands periodically with separate intervals and display the output in gnome top bar.
https://raujonas.github.io/executor
77 stars 14 forks source link

Show state of SteelSeries Arctis 7 headset #59

Open vigne opened 1 year ago

vigne commented 1 year ago

Hi,

thanks for the extension. I'd like to share my config for a SteelSeries Arctis 7 headset, which shows either 'Off' or "battery | chat-mix-dial level'. Since, to my best knowledge, there is no proper integration for this headset into Gnome, I used the HeadsetControl (https://github.com/Sapd/HeadsetControl) tool from @Sapd which works without issues.

Headset On: image

Headset On (battery critical): image

Headset Off: image

The command is likt his:

echo "" | awk '{if (battery > 0) { printf icon" "; printf " "battery"%"; if(battery < 10) { printf "<executor.css.red>"} print " | "vcm} else { print icon, "Off<executor.css.gray>"} }' vcm="`headsetcontrol -c -m`" battery="`headsetcontrol -b -c`" icon="`echo -e '\U1f3a7'`"

And finally this is the custom.css I used:

.red {
    color: red;
}

.white {
    color: white;
}

.gray {
    color: gray;
}

Maybe somebody else finds this useful.

Cheers

raujonas commented 1 year ago

Thanks for sharing your configuration, that's really appreciated! :blush: