refactor(hypr): move more config into nix files

This commit is contained in:
matt1432 2024-02-05 09:56:42 -05:00
parent 1b235a4b7e
commit efa318d4d1
9 changed files with 121 additions and 121 deletions
modules/ags
config/services
default.nix

View file

@ -50,6 +50,7 @@ class Tablet extends Service {
constructor() {
super();
this.#listenOskState();
execAsync('squeekboard').catch(print);
}
#blockInputs() {

View file

@ -5,6 +5,7 @@
...
}: let
inherit (config.vars) mainUser hostName;
isTouchscreen = config.hardware.sensor.iio.enable;
in {
services.upower.enable = true;
@ -18,7 +19,9 @@ in {
...
}: let
symlink = config.lib.file.mkOutOfStoreSymlink;
inherit (lib) optionals;
inherit (lib) optionalAttrs optionals;
cfgHypr = config.wayland.windowManager.hyprland;
in {
programs.ags.enable = true;
@ -53,6 +56,27 @@ in {
ydotool
]));
};
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"ags"
"sleep 3; ags -r 'App.openWindow(\"applauncher\")'"
];
bindn = [",Escape, exec, ags run-js 'closeAll()'"];
bind = [
"$mainMod SHIFT, E , exec, ags -t powermenu"
"$mainMod , D , exec, ags -t applauncher"
];
binde = [
## Brightness control
", XF86MonBrightnessUp, exec, ags -r 'Brightness.screen += 0.05'"
", XF86MonBrightnessDown, exec, ags -r 'Brightness.screen -= 0.05'"
];
bindr = ["CAPS, Caps_Lock, exec, ags -r 'Brightness.fetchCapsState()'"];
};
};
})
];
}