mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-21 16:33:55 -05:00
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
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:
parent
56427dd1aa
commit
147a653e6b
|
@ -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
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue