{ config, pkgs, ... }:

let
  dunst = "${pkgs.dunst}/bin/dunstctl";
  pkill = "${pkgs.procps}/bin/pkill";
  signal = "${toString config.programs.waybar.settings.mainBar."custom/notifications".signal}";
in
(pkgs.writeShellScriptBin "dunst-toggle" ''
  ${dunst} set-paused toggle
  ${pkill} -RTMIN+${signal} waybar
'')
