refactor(homeModules/desktop): move hyprland config to module

This commit is contained in:
Mohammad Rafiq 2025-05-20 12:05:48 +08:00
parent 97e4bf372b
commit a1001ddb4c
No known key found for this signature in database
4 changed files with 27 additions and 2 deletions

View file

@ -11,6 +11,7 @@
cli.git.name = "Mohammad Rafiq";
cli.git.email = "rafiq@rrv.sh";
cli.git.defaultBranch = "prime";
desktop.windowManager = "hyprland";
home.shellAliases.v = "nvim";
home.shellAliases = {

View file

@ -1,7 +1,6 @@
{pkgs,...}:
{
imports = [
./desktop/hyprland.nix
./desktop/firefox.nix
];
home.packages = with pkgs; [

View file

@ -1,46 +0,0 @@
{config, lib, osConfig, ...}:
let
mainMonitor = osConfig.desktop.mainMonitor;
in
{
xdg.configFile."uwsm/env".text = # sh
''
'';
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
settings = {
ecosystem.no_update_news = true;
"$hypr" = "CTRL_SUPER_ALT_SHIFT";
monitor = [
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
", preferred, auto, 1"
];
bind = [
"$hypr, Q, exec, uwsm stop"
"SUPER, W, killactive"
"SUPER, return, exec, uwsm app -- $TERMINAL"
"SUPER, O, exec, uwsm app -- $BROWSER"
"SUPER, H, cyclenext, visible"
"SUPER, L, cyclenext, visible prev"
"SUPER_ALT, H, movewindow, l"
"SUPER_ALT, J, movewindow, d"
"SUPER_ALT, K, movewindow, u"
"SUPER_ALT, L, movewindow, r"
"ALT_SHIFT, H, resizeactive, -10% 0"
"ALT_SHIFT, J, resizeactive, 0 -10%"
"ALT_SHIFT, K, resizeactive, 0 10%"
"ALT_SHIFT, L, resizeactive, 10% 0"
"SUPER_CTRL, H, workspace, r-1"
"SUPER_CTRL, L, workspace, r+1"
"$hypr, H, movetoworkspace, r-1"
"$hypr, L, movetoworkspace, r+1"
];
};
};
}