From 147a653e6be7f6080dd1d8d7ca31f8f6368ad3af Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 21 Jul 2024 12:04:52 -0400 Subject: [PATCH] home/hyprland: reload waybar with clamshell script --- homeManagerModules/desktop/hyprland/scripts.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeManagerModules/desktop/hyprland/scripts.nix b/homeManagerModules/desktop/hyprland/scripts.nix index ec081a0a..77bb4fa9 100644 --- a/homeManagerModules/desktop/hyprland/scripts.nix +++ b/homeManagerModules/desktop/hyprland/scripts.nix @@ -6,6 +6,7 @@ }: let cfg = config.ar.home; hyprctl = lib.getExe' config.wayland.windowManager.hyprland.package "hyprctl"; + pkill = lib.getExe' pkgs.procps "pkill"; virtKeyboard = lib.getExe' pkgs.squeekboard "squeekboard"; in { clamshell = pkgs.writeShellScript "hyprland-clamshell" '' @@ -13,6 +14,7 @@ in { if [ "$1" == "on" ]; then if [ $NUM_MONITORS -gt 1 ]; then ${hyprctl} keyword monitor "eDP-1, disable" + ${pkill} -SIGUSR2 waybar fi elif [ "$1" == "off" ]; then ${ @@ -20,6 +22,7 @@ in { (monitor: ''${hyprctl} keyword monitor "${monitor}"'') cfg.desktop.hyprland.laptopMonitors } + ${pkill} -SIGUSR2 waybar fi '';