forked from poz/niksos
move the hyprland event handler script further down into settings
This commit is contained in:
parent
6abd0b07c1
commit
5649089667
1 changed files with 19 additions and 19 deletions
|
@ -17,24 +17,6 @@
|
||||||
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
|
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
|
||||||
inherit (inputs.shadower.packages.${pkgs.system}) shadower;
|
inherit (inputs.shadower.packages.${pkgs.system}) shadower;
|
||||||
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
|
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 {
|
in {
|
||||||
options.myOptions.programs.hyprland = {
|
options.myOptions.programs.hyprland = {
|
||||||
enable = mkEnableOption "enable hiper ląd";
|
enable = mkEnableOption "enable hiper ląd";
|
||||||
|
@ -402,7 +384,25 @@ in {
|
||||||
movefocus_cycles_fullscreen = false;
|
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"
|
"${pkgs.systemd}/bin/systemctl start --user waybar.service"
|
||||||
|
|
||||||
# run persistent special workspace windows
|
# run persistent special workspace windows
|
||||||
|
|
Loading…
Reference in a new issue