Networkwidget: Move battery reload to udev itself.

This commit is contained in:
Dmitry Voronin 2024-12-27 06:42:28 +03:00
parent 6a93742777
commit abbb23b615
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 2 additions and 1 deletions

View file

@ -11,7 +11,6 @@ function networkwidget() {
local icon="󰖩"
local class=""
[[ ${#_bts_raw[@]} -gt 0 ]] && sleep 2 # 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")

View file

@ -2,6 +2,8 @@
let
waybar_reload = pkgs.writeShellScriptBin "bt-wb-dispatcher" ''
${pkgs.procps}/bin/pkill -RTMIN+7 waybar
${pkgs.coreutils}/bin/sleep 2
${pkgs.procps}/bin/pkill -RTMIN+7 waybar
'';
in
{