aboutsummaryrefslogtreecommitdiff
path: root/share/home/hyprland.nix
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2023-11-03 15:59:16 +0100
committerMiran Bastaja <miran.bastaja04@gmail.com>2023-11-03 15:59:16 +0100
commitf559671cae7b02526dedf7923b135c09e0d095d5 (patch)
tree0f273fb13211c4aa7cae2add41e3aa2b1c6d7785 /share/home/hyprland.nix
Inital commit ;P
Diffstat (limited to 'share/home/hyprland.nix')
-rw-r--r--share/home/hyprland.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/share/home/hyprland.nix b/share/home/hyprland.nix
new file mode 100644
index 0000000..63d5d77
--- /dev/null
+++ b/share/home/hyprland.nix
@@ -0,0 +1,65 @@
+# IMPORTANT: this module requires the system to already have `programs.hyprland`
+# enabled. You can enable it by importing `share/system/hyprland.nix`
+{ pkgs, ... }: {
+ imports = [ ./kitty.nix ./wpaperd.nix ./eww ];
+
+ wayland.windowManager.hyprland = {
+ enable = true;
+ extraConfig = ''
+ $mod = SUPER
+
+ bind = $mod SHIFT, Return, exec, kitty
+
+ general {
+ layout = master
+ }
+
+ master {
+ mfact = 0.5
+ new_is_master = false
+ }
+
+ # workspaces
+ # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
+ ${builtins.concatStringsSep "\n" (builtins.genList (x:
+ let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
+ in ''
+ bind = $mod, ${ws}, workspace, ${toString (x + 1)}
+ bind = $mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}
+ '') 10)}
+
+ bind = $mod SHIFT, C, killactive
+ bind = $mod SHIFT, F, togglefloating
+ bind = $mod SHIFT, Q, exit
+ bind = $mod, P, exec, rofi -show run
+
+ bind = $mod, H, cyclenext, prev
+ bind = $mod, L, cyclenext
+ bind = $mod SHIFT, H, swapnext, prev
+ bind = $mod SHIFT, L, swapnext
+
+ # audio control
+ binde =, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%+
+ binde =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%-
+ bind =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
+
+ # monitor brightness control
+ binde =, XF86MonBrightnessUp, exec, brightnessctl set +5%
+ binde =, XF86MonBrightnessDown, exec, brightnessctl set 5%-
+
+ input {
+ # focus change on cursor move
+ follow_mouse = 1
+ accel_profile = flat
+ }
+ monitor=,preferred,auto,1
+
+ # set opacity to 0.9 active and 0.5 inactive for kitty
+ windowrule = opacity 0.9 override 0.5 override,^(kitty)$
+ '';
+ };
+
+ home.packages = with pkgs; [ brightnessctl wireplumber ];
+ services.dunst.enable = true;
+ programs.rofi.enable = true;
+}