aboutsummaryrefslogtreecommitdiffstats
path: root/home/hyprland/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/hyprland/default.nix')
-rw-r--r--home/hyprland/default.nix114
1 files changed, 102 insertions, 12 deletions
diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix
index e00e794..992fa09 100644
--- a/home/hyprland/default.nix
+++ b/home/hyprland/default.nix
@@ -1,24 +1,110 @@
+{ pkgs, ... }:
{
+ services.hyprpaper = {
+ enable = true;
+ settings = {
+ ipc = "on";
+ preload = [
+ "/etc/nixos/home/wallpapers/owl1.webp"
+ "/etc/nixos/home/wallpapers/owl2.webp"
+ "/etc/nixos/home/wallpapers/owl3.webp"
+ ];
+ wallpaper = [ ", /etc/nixos/home/wallpapers/owl1.webp" ];
+ };
+ };
+
+ services.hyprpolkitagent.enable = true;
+
+ services.hypridle = {
+ enable = true;
+ settings = {
+ general = {
+ after_sleep_cmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on";
+ ignore_dbus_inhibit = false;
+ lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
+ };
+
+ listener = [
+ {
+ timeout = 300;
+ on-timeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 10";
+ on-resume = "${pkgs.brightnessctl}/bin/brightnessctl -r";
+ }
+ {
+ timeout = 600;
+ on-timeout = "${pkgs.systemd}/bin/loginctl lock-session";
+ }
+ {
+ timeout = 900; # 15 minutes
+ on-timeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; # screen off when timeout has passed
+ on-resume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
+ }
+ {
+ timeout = 1800;
+ on-timeout = "${pkgs.systemd}/bin/systemctl suspend";
+ }
+ ];
+ };
+ };
wayland.windowManager.hyprland = {
enable = true;
- systemd.enable = true;
+ package = pkgs.hyprland;
+ systemd = {
+ variables = [ "--all" ];
+ enable = true;
+ enableXdgAutostart = true;
+ };
+ extraConfig = ''
+ exec-once = ${pkgs.hyprlock}/bin/hyprlock --immediate;
+ '';
+ xwayland.enable = true;
settings = {
- "exec-once" = "waybar & hyprpaper";
- "monitor" = ",preferred,auto,1";
+ monitor = ", preferred, auto, 1";
+ general = {
+ gaps_out = 10;
+ };
input = {
- kb_layout = "fi";
- repeat_delay = 280;
- repeat_rate = 100;
+ kb_layout = "us,fi";
+ kb_options = "grp:alt_shift_toggle";
+ scroll_method = "on_button_down";
+ scroll_button = 274;
+ sensitivity = 0; # -1.0 - 1.0, 0 means no modification
+ repeat_delay = 180;
+ repeat_rate = 150;
+ touchpad = {
+ natural_scroll = true;
+ disable_while_typing = true;
+ tap-to-click = true;
+ middle_button_emulation = true;
+ };
+ };
+ decoration = {
+ dim_inactive = true;
+ };
+ cursor = {
+ no_hardware_cursors = true;
+ };
+ misc = {
+ disable_hyprland_logo = true;
+ disable_splash_rendering = true;
+ middle_click_paste = true;
};
-
"$mainMod" = "SUPER";
bind = [
- "$mainMod, Return, exec, alacritty"
- "$mainMod, d, exec, wofi --show drun"
- "$mainMod, B, exec, firefox"
+ "$mainMod, V, exec, ${pkgs.ghostty}/bin/ghostty --class clipse -e 'clipse' "
+ "$mainMod, Return, exec, ${pkgs.ghostty}/bin/ghostty"
+ "$mainMod, d, exec, ${pkgs.walker}/bin/walker --modules applications,translation,webesearch,clipboard,finder"
+ "$mainMod, B, exec, ${pkgs.firefox}/bin/firefox"
"$mainMod, F, fullscreen"
"$mainMod, C, killactive,"
+ "$mainMod, Tab, cyclenext"
+ ", Print, exec, ${pkgs.grim}/bin/grim - | wl-copy && wl-paste > ~/Pictures/screenshots/Screenshot-$(date +%F_%T).png && dunstify 'Screenshot of the whole screen taken' -t 1000"
+ ", XF86MonBrightnessUp, exec, brightnessctl s -e 5%+"
+ ", XF86MonBrightnessDown, exec, brightnessctl s -e 5%-"
+ ", XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
+ ", XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
+ "$mainMod SHIFT, L, exec, hyprlock"
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
@@ -30,6 +116,11 @@
"$mainMod, K, movefocus, u"
"$mainMod, J, movefocus, d"
+ "$mainMod SHIFT, left, swapwindow, l"
+ "$mainMod SHIFT, right, swapwindow, r"
+ "$mainMod SHIFT, up, swapwindow, u"
+ "$mainMod SHIFT, down, swapwindow, d"
+
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
@@ -54,6 +145,7 @@
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
];
+ binde = [ ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow"
@@ -61,6 +153,4 @@
];
};
};
-
- home.file.".config/hypr/hyprpaper.conf".source = ./hyprpaper.conf;
}