Networkwidget: Add a hack for bluetooth power levels.
This commit is contained in:
parent
6016b0a3e5
commit
8df54677d0
|
@ -187,7 +187,7 @@ in
|
|||
};
|
||||
"custom/network" = {
|
||||
exec = "swayscript networkwidget";
|
||||
# interval = refreshInterval;
|
||||
# interval = 60;
|
||||
on-click = "blueman-manager";
|
||||
on-click-middle = "swayscript network";
|
||||
on-click-right = "nm-connection-editor";
|
||||
|
@ -196,18 +196,22 @@ in
|
|||
};
|
||||
"custom/taghw1" = {
|
||||
exec = "echo ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/taghw2" = {
|
||||
exec = "echo ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/tagbt1" = {
|
||||
exec = "test -e /sys/class/power_supply/BAT*/capacity && echo ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/tagbt2" = {
|
||||
exec = "test -e /sys/class/power_supply/BAT*/capacity && echo ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{ ... }:
|
||||
{
|
||||
}
|
||||
{ ... }: { }
|
||||
|
|
|
@ -11,6 +11,7 @@ function networkwidget() {
|
|||
local icon=""
|
||||
local class=""
|
||||
|
||||
[[ ${#_bts_raw[@]} -gt 0 ]] && sleep 1 # HACK: Darn bluetooth battery levels!
|
||||
for bt in ${_bts_raw[@]}; do
|
||||
local name=$(printf "%s" ${bt} | cut -d\ -f3)
|
||||
local mac=$(printf "%s" ${bt} | cut -d\ -f2 | sed -e "s/:/_/g")
|
||||
|
|
Loading…
Reference in a new issue