home/hyprland: reload waybar with clamshell script
Some checks failed
nix-build / default-build (push) Has been cancelled
nix-build / fallarbor-build (push) Has been cancelled
nix-build / lavaridge-build (push) Has been cancelled
nix-build / mauville-build (push) Has been cancelled
nix-build / petalburg-build (push) Has been cancelled
nix-build / rustboro-build (push) Has been cancelled
nix-check / fmt-check (push) Has been cancelled
nix-check / eval-check (push) Has been cancelled

This commit is contained in:
Aly Raffauf 2024-07-21 12:04:52 -04:00
parent 56427dd1aa
commit 147a653e6b

View file

@ -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
'';