Udev: Trigger on all bt events.
This commit is contained in:
parent
abbb23b615
commit
6fa7e64cd4
|
@ -2,13 +2,16 @@
|
|||
let
|
||||
waybar_reload = pkgs.writeShellScriptBin "bt-wb-dispatcher" ''
|
||||
${pkgs.procps}/bin/pkill -RTMIN+7 waybar
|
||||
'';
|
||||
waybar_reload_add = pkgs.writeShellScriptBin "bt-add-wb-dispatcher" ''
|
||||
${pkgs.procps}/bin/pkill -RTMIN+7 waybar
|
||||
${pkgs.coreutils}/bin/sleep 2
|
||||
${pkgs.procps}/bin/pkill -RTMIN+7 waybar
|
||||
'';
|
||||
in
|
||||
{
|
||||
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"
|
||||
SUBSYSTEM=="bluetooth", RUN+="${waybar_reload}/bin/bt-wb-dispatcher"
|
||||
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="${waybar_reload_add}/bin/bt-add-wb-dispatcher"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue