From bbc6fd99f19fa3448871908ef2a129eb7ac3cf72 Mon Sep 17 00:00:00 2001 From: NullBite Date: Mon, 1 Jan 2024 16:40:36 -0500 Subject: [PATCH] Rebind keys and use variables for some stuff --- home/hyprland.nix | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/home/hyprland.nix b/home/hyprland.nix index 061f06f..69e25f2 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -1,8 +1,20 @@ { lib, pkgs, osConfig, ... }: let mkd = lib.mkDefault; + terminal = "${pkgs.kitty}/bin/kitty"; + files = "${pkgs.dolphin}/bin/dolphin"; + rofi = "${pkgs.wofi}/bin/wofi"; + notifydaemon = "${pkgs.dunst}/bin/dunst"; in { + home.packages = with pkgs; [ + kitty + dolphin + wofi + wev + dunst + ]; + wayland.windowManager.hyprland = { enable = true; settings = { @@ -18,6 +30,10 @@ in # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox + exec-once = [ + notifydaemon + ]; + # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -119,14 +135,15 @@ in # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = [ - "$mod, Q, exec, kitty" + "$mod, Q, exec, ${terminal}" + "$mod, Return, exec, ${terminal}" "$mod, C, killactive, " "$mod, M, exit, " - "$mod, E, exec, dolphin" + "$mod, E, exec, ${files}" "$mod, V, togglefloating, " - "$mod, R, exec, wofi --show drun" + "$mod, R, exec, ${rofi} --show drun" "$mod, P, pseudo," # dwindle" - "$mod, J, togglesplit," # dwindle" + "$mod, O, togglesplit," # dwindle" # Move focus with mod + arrow keys "$mod, left, movefocus, l" @@ -134,6 +151,11 @@ in "$mod, up, movefocus, u" "$mod, down, movefocus, d" + "$mod, h, movefocus, l" + "$mod, j, movefocus, d" + "$mod, k, movefocus, u" + "$mod, l, movefocus, r" + # Switch workspaces with mod + [0-9] "$mod, 1, workspace, 1" "$mod, 2, workspace, 2" @@ -171,6 +193,8 @@ in # Move/resize windows with mod + LMB/RMB and dragging "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" + # RMB sucks on laptop + "$mod SHIFT, mouse:272, resizewindow" ]; }; };