Udev: Trigger on all bt events.
This commit is contained in:
parent
abbb23b615
commit
0eee442e16
|
@ -1,6 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
waybar_reload = pkgs.writeShellScriptBin "bt-wb-dispatcher" ''
|
||||
btWbDispatcher = pkgs.writeShellScriptBin "bt-wb-dispatcher" ''
|
||||
${pkgs.procps}/bin/pkill -RTMIN+7 waybar
|
||||
'';
|
||||
btAddWbDispatcher = 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
|
||||
|
@ -8,7 +11,7 @@ let
|
|||
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+="${btWbDispatcher}/bin/bt-wb-dispatcher"
|
||||
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="${btAddWbDispatcher}/bin/bt-add-wb-dispatcher"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue