Add hyprland utilities

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-25 17:31:49 +03:00
parent 193c665aa4
commit a69695dd73
22 changed files with 162 additions and 38 deletions

View File

@@ -1,8 +1,5 @@
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
let
hmConfig = config.home-manager.users."${user.name}";
in
{
programs.hyprland.enable = true;
@@ -15,9 +12,8 @@ in
bind = [
"$mod, Return, exec, $term"
"$mod, r, exec, ${pkgs.rofi-wayland}/bin/rofi -cache-dir ${hmConfig.xdg.cacheHome}/rofi -show drun"
"$mod, b, exec, ${pkgs.firefox}/bin/firefox"
"$mod, `, togglespecialworkspace"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
@@ -29,6 +25,7 @@ in
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod_SHIFT, `, movetoworkspacesilent, special"
"$mod_SHIFT, 1, movetoworkspacesilent, 1"
"$mod_SHIFT, 2, movetoworkspacesilent, 2"
"$mod_SHIFT, 3, movetoworkspacesilent, 3"
@@ -75,6 +72,7 @@ in
"$mod_SHIFT, Tab, bringactivetotop"
"$mod, f, fullscreen, 0"
"$mod, m, fullscreen, 1"
"$mod, p, pin"
"$mod, Space, togglefloating"
"$mod, Space, centerwindow"
@@ -100,7 +98,7 @@ in
};
programs.zsh.loginExtra = lib.mkAfter ''
if [ -z "''${WAYLAND_DISPLAY}" ] && [ -n "''${XDG_VTNR}" ] && [ "''${XDG_VTNR}" -eq 1 ]; then
if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
hyprland &> /tmp/hyprland.log
fi
'';