Desktop usability adjustments #1
@@ -3,4 +3,5 @@
 | 
				
			|||||||
    # Put a cursor theme to the location expected by the hyprland window manager
 | 
					    # Put a cursor theme to the location expected by the hyprland window manager
 | 
				
			||||||
    # TODO
 | 
					    # TODO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -7,6 +7,7 @@
 | 
				
			|||||||
    pkgs.gnome-control-center
 | 
					    pkgs.gnome-control-center
 | 
				
			||||||
    pkgs.brightnessctl
 | 
					    pkgs.brightnessctl
 | 
				
			||||||
    pkgs.cliphist
 | 
					    pkgs.cliphist
 | 
				
			||||||
 | 
					    pkgs.wl-clipboard
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -27,8 +28,6 @@
 | 
				
			|||||||
        "$mod, b, exec, $browser"
 | 
					        "$mod, b, exec, $browser"
 | 
				
			||||||
        "$mod, s, exec, $ide"
 | 
					        "$mod, s, exec, $ide"
 | 
				
			||||||
        "$mod, e, exec, nautilus"
 | 
					        "$mod, e, exec, nautilus"
 | 
				
			||||||
        # Overview
 | 
					 | 
				
			||||||
        "$mod, , overview:toggle"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Lock screen
 | 
					        # Lock screen
 | 
				
			||||||
        "$mod+Shift, l, exec, hyprlock"
 | 
					        "$mod+Shift, l, exec, hyprlock"
 | 
				
			||||||
@@ -37,14 +36,14 @@
 | 
				
			|||||||
        "$mod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
 | 
					        "$mod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        "$mod+Shift, Q, killactive," # Close window
 | 
					        "$mod+Shift, Q, killactive," # Close window
 | 
				
			||||||
        "$mod, f, togglefloating," # Toggle Floating
 | 
					        # Toggle Floating and reduce size
 | 
				
			||||||
 | 
					        "$mod, f, togglefloating,"
 | 
				
			||||||
 | 
					        "$mod, f, resizeactive, 50% 50%,"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Alt-tab alternative
 | 
					        # Alt-tab alternative
 | 
				
			||||||
        "$mod, Tab, cyclenext,"
 | 
					        "$mod, Tab, cyclenext,"
 | 
				
			||||||
        "$mod, Tab, bringactivetotop,"
 | 
					        "$mod, Tab, bringactivetotop,"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Reshape the window in focus
 | 
					 | 
				
			||||||
        "$mod, left, resizeactive, -10 0"
 | 
					 | 
				
			||||||
        "$mod, right, resizeactive, 10 0"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Move the window
 | 
					        # Move the window
 | 
				
			||||||
        "$mod+Shift, left, movewindow, l"
 | 
					        "$mod+Shift, left, movewindow, l"
 | 
				
			||||||
@@ -65,19 +64,35 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # repeatable bindings
 | 
				
			||||||
      binde = [
 | 
					      binde = [
 | 
				
			||||||
        # Fn keys
 | 
					        # Fn keys
 | 
				
			||||||
        ", code:232, exec, brightnessctl set -5%"
 | 
					        ", XF86MonBrightnessDown, exec, brightnessctl set -5%"
 | 
				
			||||||
        ", code:231, exec, brightnessctl set +5%"
 | 
					        ", XF86MonBrightnessUp, exec, brightnessctl set +5%"
 | 
				
			||||||
        ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
 | 
					        ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
 | 
				
			||||||
        ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"
 | 
					        ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"
 | 
				
			||||||
        ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
 | 
					        ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Reshape the window in focus
 | 
				
			||||||
 | 
					        "$mod, left, resizeactive, -2% 0"
 | 
				
			||||||
 | 
					        "$mod, right, resizeactive, 2% 0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
      # bindl = [
 | 
					      # bindl = [
 | 
				
			||||||
      #   ", switch:on:Lid Switch, exec, hyprctl dispatch dpms off"
 | 
					      #   ", switch:on:Lid Switch, exec, hyprctl dispatch dpms off"
 | 
				
			||||||
      #   ", switch:off:Lid Switch, exec, hyprctl dispatch dpms on"
 | 
					      #   ", switch:off:Lid Switch, exec, hyprctl dispatch dpms on"
 | 
				
			||||||
      # ];
 | 
					      # ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      bindr = [
 | 
				
			||||||
 | 
					          # Overview
 | 
				
			||||||
 | 
					        "$mod, , overview:toggle"
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      bindm = [
 | 
				
			||||||
 | 
					        # move the window
 | 
				
			||||||
 | 
					        "$mod, mouse:272, movewindow"
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      exec-once = [
 | 
					      exec-once = [
 | 
				
			||||||
        # "${pkgs.hyprpaper}/bin/hyprpaper"
 | 
					        # "${pkgs.hyprpaper}/bin/hyprpaper"
 | 
				
			||||||
        # hyprpaper is handled as its own service
 | 
					        # hyprpaper is handled as its own service
 | 
				
			||||||
@@ -85,6 +100,7 @@
 | 
				
			|||||||
        # listen to clipboard events and send them to cliphist
 | 
					        # listen to clipboard events and send them to cliphist
 | 
				
			||||||
        "wl-paste --watch cliphist stores"
 | 
					        "wl-paste --watch cliphist stores"
 | 
				
			||||||
        "${pkgs.waybar}/bin/hypridle"
 | 
					        "${pkgs.waybar}/bin/hypridle"
 | 
				
			||||||
 | 
					        "hyprpaper"
 | 
				
			||||||
        # # Fixes cursor themes in gnome apps under hyprland
 | 
					        # # Fixes cursor themes in gnome apps under hyprland
 | 
				
			||||||
        # "gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'"
 | 
					        # "gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'"
 | 
				
			||||||
        # "gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}"
 | 
					        # "gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}"
 | 
				
			||||||
@@ -100,6 +116,8 @@
 | 
				
			|||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      misc = {
 | 
					      misc = {
 | 
				
			||||||
 | 
					        # disable refreshs when nothing is going on
 | 
				
			||||||
 | 
					        vfr = false;
 | 
				
			||||||
        disable_hyprland_logo = true;
 | 
					        disable_hyprland_logo = true;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -129,20 +147,22 @@
 | 
				
			|||||||
        inactive_opacity = 0.9;
 | 
					        inactive_opacity = 0.9;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        shadow = {
 | 
					        shadow = {
 | 
				
			||||||
          enabled = true;
 | 
					          enabled = false;
 | 
				
			||||||
          range = 6;
 | 
					 | 
				
			||||||
          render_power = 6;
 | 
					 | 
				
			||||||
          # color = "#000000";
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # blur is set on a per-program basis
 | 
					        # blur is set on a per-program basis
 | 
				
			||||||
        layerrule = [
 | 
					        windowrulev2 = [
 | 
				
			||||||
          "blur, wofi"
 | 
					          # kitty should behave like a floating window
 | 
				
			||||||
          "ignorezero, wofi"
 | 
					          "animation popin, class:kitty"
 | 
				
			||||||
          "ignorealpha 0.5, wofi"
 | 
					          "move cursor -50% -50%, class:kitty"
 | 
				
			||||||
          "blur, kitty"
 | 
					          "float, class:kitty"
 | 
				
			||||||
          "ignorezero, kitty"
 | 
					          "size 50% 50%, class:kitty"
 | 
				
			||||||
          "ignorealpha 0.5, kitty"
 | 
					
 | 
				
			||||||
 | 
					          # some more floating windows
 | 
				
			||||||
 | 
					          "float, class:org.gnome.Settings"
 | 
				
			||||||
 | 
					          "float, class:desktopclient.owncloud.com"
 | 
				
			||||||
 | 
					          "float, class:org.keepassxc.KeePassXC"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -158,13 +178,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      env = [
 | 
					      env = [
 | 
				
			||||||
        # force apps to use wayland
 | 
					        # force apps to use wayland
 | 
				
			||||||
        "NIXOS_OZONE_WL,1"
 | 
					        "NIXOS_OZONE_WL, 1"
 | 
				
			||||||
        "ELECTRON_OZONE_PLATFORM_HINT,wayland"
 | 
					        "ELECTRON_OZONE_PLATFORM_HINT, wayland"
 | 
				
			||||||
        # set the scale factor for GDK apps
 | 
					        # set the scale factor for GDK apps
 | 
				
			||||||
        "GDK_SCALE,1.5"
 | 
					        "GDK_SCALE, 1.5"
 | 
				
			||||||
        "XCURSOR_SIZE,32"
 | 
					        "XCURSOR_SIZE, 32"
 | 
				
			||||||
        # set the scale factor for QT apps
 | 
					        # set the scale factor for QT apps
 | 
				
			||||||
        "QT_SCALE_FACTOR,1.5"
 | 
					        "QT_SCALE_FACTOR, 1.5"
 | 
				
			||||||
        # set the scale factor for GTK apps
 | 
					        # set the scale factor for GTK apps
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
@@ -186,11 +206,5 @@
 | 
				
			|||||||
    # };
 | 
					    # };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # services.network-manager-applet = {
 | 
					 | 
				
			||||||
  #   enable = true;
 | 
					 | 
				
			||||||
  # };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  services.swaync.enable = true;
 | 
					  services.swaync.enable = true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,13 +6,10 @@
 | 
				
			|||||||
with lib; let
 | 
					with lib; let
 | 
				
			||||||
  # load the wallpapers from the wallpapers directory - this gives a set with the folder content
 | 
					  # load the wallpapers from the wallpapers directory - this gives a set with the folder content
 | 
				
			||||||
  dirContent = builtins.readDir ../../../wallpapers;
 | 
					  dirContent = builtins.readDir ../../../wallpapers;
 | 
				
			||||||
  # only keep regular (the true files) as a list
 | 
					 | 
				
			||||||
  # loop over the set and keep the values where the key is "regular"
 | 
					 | 
				
			||||||
  wallpapersIntermediate = attrsToList dirContent;
 | 
					 | 
				
			||||||
  # remove the attr, keep the value
 | 
					 | 
				
			||||||
  wallpapers = map (x: x.value) wallpapersIntermediate;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
 | 
					  wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
 | 
				
			||||||
 | 
					  # # load each wallpaper and keep its path (now in the nix store) as an array
 | 
				
			||||||
 | 
					  # wallpapers = map (x: builtins.readDir "${../../../wallpapers}/${x.value}") dirContent;
 | 
				
			||||||
 | 
					  # wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # script that picks a random wallpaper from the array and sets it as the desktop background
 | 
					  # script that picks a random wallpaper from the array and sets it as the desktop background
 | 
				
			||||||
  monitor = ""; # leave empty to set the wallpaper on all monitors
 | 
					  monitor = ""; # leave empty to set the wallpaper on all monitors
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user