mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-30 02:19:18 -05:00
Aly Raffauf
b53a94c121
Some checks are pending
flakehub / flakehub-publish (push) Waiting to run
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
* home/hyprland: move scripts to scripts.nix * home/hyprland: rewirte config in nix * home/hyprland: moved all easily possible variables to nix * nix fmt * home/hyprland: move everything except usbmaps to nix * aly: move hyprland config to nix * petalburg: move hyprland config to nix * home/hyprland: move submap starters to nix * home/hyprland: inherit window and layer rules from vars.nix * nix fmt * home/hyprland: moved all hyprland settings to vars.nix * home/hyprland: add options for default workspaces and window manager binds * home/hyprland: remove workspaces option * home/hyprland: vars.nix -> settings.nix * home/hyprland: nixify extraConfig * home/hyprland: standardize hyprland argument calls * home/hyprland: get rid of defaultApps
53 lines
1.5 KiB
Nix
53 lines
1.5 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cfg = config.ar.home;
|
|
in {
|
|
config = lib.mkIf cfg.desktop.hyprland.enable {
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
settings = import ./settings.nix {inherit config lib pkgs;};
|
|
|
|
extraConfig = let
|
|
moveMonitorBinds =
|
|
lib.attrsets.mapAttrsToList (
|
|
key: direction: "bind=CONTROL,${key},movecurrentworkspacetomonitor,${direction}"
|
|
)
|
|
cfg.desktop.hyprland.windowManagerBinds;
|
|
|
|
moveWindowBinds =
|
|
lib.attrsets.mapAttrsToList (
|
|
key: direction: "bind=,${key},movewindow,${direction}"
|
|
)
|
|
cfg.desktop.hyprland.windowManagerBinds;
|
|
|
|
moveWorkspaceBinds = builtins.map (x: "bind=,${toString x},workspace,${toString x}") [1 2 3 4 5 6 7 8 9];
|
|
in ''
|
|
submap=resize
|
|
binde=,down,resizeactive,0 10
|
|
binde=,left,resizeactive,-10 0
|
|
binde=,right,resizeactive,10 0
|
|
binde=,up,resizeactive,0 -10
|
|
binde=,j,resizeactive,0 10
|
|
binde=,h,resizeactive,-10 0
|
|
binde=,l,resizeactive,10 0
|
|
binde=,k,resizeactive,0 -10
|
|
bind=,escape,submap,reset
|
|
submap=reset
|
|
|
|
submap=move
|
|
${lib.strings.concatLines moveMonitorBinds}
|
|
${lib.strings.concatLines moveWindowBinds}
|
|
${lib.strings.concatLines moveWorkspaceBinds}
|
|
bind=,comma,exec,${lib.getExe pkgs.hyprnome} --previous --move
|
|
bind=,period,exec,${lib.getExe pkgs.hyprnome} --move
|
|
bind=,escape,submap,reset
|
|
submap=reset
|
|
'';
|
|
};
|
|
};
|
|
}
|