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