move the hyprland event handler script further down into settings

This commit is contained in:
jacekpoz 2024-03-06 23:32:13 +01:00
parent 6abd0b07c1
commit 5649089667
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -17,24 +17,6 @@
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
inherit (inputs.shadower.packages.${pkgs.system}) shadower;
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
# https://wiki.hyprland.org/IPC/#how-to-use-socket2-with-bash
handle_hyprland_events = pkgs.writeShellScriptBin "handle_hyprland_events" ''
#!/bin/sh
handle() {
case $1 in
configreloaded*)
${hyprland}/bin/hyprctl notify 1 2500 "" " Reloading Hyprland..."
;;
esac
}
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock |
while read -r line; do
handle "$line"
done
'';
in {
options.myOptions.programs.hyprland = {
enable = mkEnableOption "enable hiper ląd";
@ -402,7 +384,25 @@ in {
movefocus_cycles_fullscreen = false;
};
exec-once = [
exec-once = let
# https://wiki.hyprland.org/IPC/#how-to-use-socket2-with-bash
handle_hyprland_events = pkgs.writeShellScriptBin "handle_hyprland_events" ''
#!/bin/sh
handle() {
case $1 in
configreloaded*)
${hyprland}/bin/hyprctl notify 1 2500 "" " Reloading Hyprland..."
;;
esac
}
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock |
while read -r line; do
handle "$line"
done
'';
in [
"${pkgs.systemd}/bin/systemctl start --user waybar.service"
# run persistent special workspace windows