2024-12-18 09:40:11 +03:00
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
waybar_reload = pkgs.writeShellScriptBin "bt-wb-dispatcher" ''
|
|
|
|
${pkgs.procps}/bin/pkill -RTMIN+7 waybar
|
|
|
|
'';
|
|
|
|
in
|
2024-12-12 10:48:42 +03:00
|
|
|
{
|
2024-12-18 09:40:11 +03:00
|
|
|
services.udev.extraRules = ''
|
|
|
|
ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="${waybar_reload}/bin/bt-wb-dispatcher"
|
|
|
|
ACTION=="remove", SUBSYSTEM=="bluetooth", RUN+="${waybar_reload}/bin/bt-wb-dispatcher"
|
|
|
|
'';
|
2024-12-12 10:48:42 +03:00
|
|
|
}
|