Desktop usability adjustments #1
@@ -15,14 +15,16 @@
 | 
			
		||||
    settings = {
 | 
			
		||||
      "$mod" = "SUPER";
 | 
			
		||||
      "$browser" = "firefox";
 | 
			
		||||
      "$launcher-cmd" = "wofi --show drun -n";
 | 
			
		||||
      "$ide" = "code";
 | 
			
		||||
 | 
			
		||||
      # Global bindings
 | 
			
		||||
      bind = [
 | 
			
		||||
        # Launch applications
 | 
			
		||||
        "$mod, space, exec, walker"
 | 
			
		||||
        "$mod, space, exec, $launcher-cmd"
 | 
			
		||||
        "$mod, return, exec, kitty"
 | 
			
		||||
        "$mod, b, exec, $browser"
 | 
			
		||||
        "$mod, s, exec, code"
 | 
			
		||||
        "$mod, s, exec, $ide"
 | 
			
		||||
        "$mod, e, exec, nautilus"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -51,7 +53,8 @@
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      exec-once = [
 | 
			
		||||
        "${pkgs.hyprpaper}/bin/hyprpaper"
 | 
			
		||||
        # "${pkgs.hyprpaper}/bin/hyprpaper"
 | 
			
		||||
        # hyprpaper is handled as its own service
 | 
			
		||||
        "${pkgs.waybar}/bin/waybar"
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
@@ -70,7 +73,7 @@
 | 
			
		||||
 | 
			
		||||
      input = {
 | 
			
		||||
        kb_layout = "de";
 | 
			
		||||
        kb_options = "caps:control";
 | 
			
		||||
        kb_options = "caps:escape";
 | 
			
		||||
        numlock_by_default = true;
 | 
			
		||||
        # mouse input should be unchanged
 | 
			
		||||
        natural_scroll = false;
 | 
			
		||||
@@ -98,14 +101,7 @@
 | 
			
		||||
          # color = "#000000";
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        # set this on a per-program basis
 | 
			
		||||
        # blur = {
 | 
			
		||||
        #   enabled = true;
 | 
			
		||||
        #   size = 4;
 | 
			
		||||
        #   passes = 2;
 | 
			
		||||
        #   new_optimizations = true;
 | 
			
		||||
        #   ignore_opacity = true;
 | 
			
		||||
        # };
 | 
			
		||||
        # blur is set on a per-program basis
 | 
			
		||||
        layerrule = [
 | 
			
		||||
          "blur, wofi"
 | 
			
		||||
          "ignorezero, wofi"
 | 
			
		||||
@@ -130,22 +126,6 @@
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  programs.walker = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    runAsService = true;
 | 
			
		||||
 | 
			
		||||
    # All options from the config.json can be used here.
 | 
			
		||||
    config = {
 | 
			
		||||
      search.placeholder = "Search";
 | 
			
		||||
      ui.fullscreen = true;
 | 
			
		||||
      list = {
 | 
			
		||||
        height = 200;
 | 
			
		||||
      };
 | 
			
		||||
      websearch.prefix = "?";
 | 
			
		||||
      switcher.prefix = "/";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  programs.hyprlock = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,15 +1,60 @@
 | 
			
		||||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
 ...
 | 
			
		||||
}:
 | 
			
		||||
{ 
 | 
			
		||||
with lib; let
 | 
			
		||||
  wallpapers = builtins.path { path = ../../../wallpapers; };
 | 
			
		||||
 | 
			
		||||
  wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: "${wallpaper}") wallpapers))}\")";
 | 
			
		||||
  wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
 | 
			
		||||
    wallpapers=${wallpaperBashArray}
 | 
			
		||||
    rand=$[$RANDOM % ''${#wallpapers[@]}]
 | 
			
		||||
    wallpaper=''${wallpapers[$rand]}
 | 
			
		||||
 | 
			
		||||
    monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`)
 | 
			
		||||
    hyprctl hyprpaper unload all
 | 
			
		||||
    hyprctl hyprpaper preload $wallpaper
 | 
			
		||||
    for m in ''${monitor[@]}; do
 | 
			
		||||
      hyprctl hyprpaper wallpaper "$m,$wallpaper"
 | 
			
		||||
    done
 | 
			
		||||
  '';
 | 
			
		||||
in {
 | 
			
		||||
  home.packages = [wallpaperRandomizer];
 | 
			
		||||
 | 
			
		||||
  services.hyprpaper = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    settings = {
 | 
			
		||||
      # TODO: implement this correctly
 | 
			
		||||
      # preload = builtins.attrValues (builtins.readFile ../../../wallpapers/luke-chesser-eICUFSeirc0-unsplash.jpg);
 | 
			
		||||
      # wallpaper = [
 | 
			
		||||
      #   ", ${builtins.attrValues (builtins.readFile ../../../wallpapers/luke-chesser-eICUFSeirc0-unsplash.jpg)}"
 | 
			
		||||
      # ];
 | 
			
		||||
 | 
			
		||||
    # settings = {
 | 
			
		||||
    #   ipc = "on";
 | 
			
		||||
    #   splash = false;
 | 
			
		||||
    #   splash_offset = 2.0;
 | 
			
		||||
    # };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  systemd.user = {
 | 
			
		||||
    services.wallpaperRandomizer = {
 | 
			
		||||
      Install = {WantedBy = ["graphical-session.target"];};
 | 
			
		||||
 | 
			
		||||
      Unit = {
 | 
			
		||||
        Description = "Set random desktop background using hyprpaper";
 | 
			
		||||
        After = ["graphical-session-pre.target"];
 | 
			
		||||
        PartOf = ["graphical-session.target"];
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      Service = {
 | 
			
		||||
        Type = "oneshot";
 | 
			
		||||
        ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
 | 
			
		||||
        IOSchedulingClass = "idle";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    timers.wallpaperRandomizer = {
 | 
			
		||||
      Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
 | 
			
		||||
 | 
			
		||||
      Timer = {OnUnitActiveSec = "6h";};
 | 
			
		||||
 | 
			
		||||
      Install = {WantedBy = ["timers.target"];};
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
@@ -9,10 +9,16 @@
 | 
			
		||||
            cursor_trail = 3;
 | 
			
		||||
        };
 | 
			
		||||
        keybindings = {
 | 
			
		||||
            # TODO - they should not overwrite default behaviour
 | 
			
		||||
            # "ctrl+c" = "copy_to_clipboard";
 | 
			
		||||
            # "ctrl+v" = "paste_from_clipboard";
 | 
			
		||||
            # copy and paste
 | 
			
		||||
            "ctrl+shift+c" = "copy_to_clipboard";
 | 
			
		||||
            "ctrl+shift+v" = "paste_from_clipboard";
 | 
			
		||||
            # zoom
 | 
			
		||||
            "ctrl+shift+plus" = "increase_font_size";
 | 
			
		||||
            "ctrl+shift+minus" = "decrease_font_size";
 | 
			
		||||
            "ctrl+shift+0" = "reset_font_size";
 | 
			
		||||
            # tabs
 | 
			
		||||
            "ctrl+shift+t" = "new_tab";
 | 
			
		||||
            "ctrl+shift+w" = "close_tab";
 | 
			
		||||
        };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								modules/home-manager/kubectl.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								modules/home-manager/kubectl.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
{pkgs, ...}: 
 | 
			
		||||
{
 | 
			
		||||
    home.packages = [
 | 
			
		||||
        pkgs.kubie
 | 
			
		||||
        pkgs.kubectl
 | 
			
		||||
    ];
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										108
									
								
								modules/home-manager/wofi.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								modules/home-manager/wofi.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,108 @@
 | 
			
		||||
{ config, pkgs, lib, ... }:
 | 
			
		||||
let
 | 
			
		||||
  accent = "#ffffff";
 | 
			
		||||
  background = "#000000";
 | 
			
		||||
  background-alt = "#000000";
 | 
			
		||||
  foreground = "##ffffff";
 | 
			
		||||
  font = "Roboto";
 | 
			
		||||
  rounding = 5;
 | 
			
		||||
  font-size = 25;
 | 
			
		||||
in {
 | 
			
		||||
 | 
			
		||||
  home.packages = with pkgs; [ wofi-emoji ];
 | 
			
		||||
 | 
			
		||||
  programs.wofi = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
 | 
			
		||||
    settings = {
 | 
			
		||||
      allow_markup = true;
 | 
			
		||||
      width = 450;
 | 
			
		||||
      show = "drun";
 | 
			
		||||
      prompt = "Apps";
 | 
			
		||||
      normal_window = true;
 | 
			
		||||
      layer = "top";
 | 
			
		||||
      term = "foot";
 | 
			
		||||
      height = "305px";
 | 
			
		||||
      orientation = "vertical";
 | 
			
		||||
      halign = "fill";
 | 
			
		||||
      line_wrap = "off";
 | 
			
		||||
      dynamic_lines = false;
 | 
			
		||||
      allow_images = true;
 | 
			
		||||
      image_size = 24;
 | 
			
		||||
      exec_search = false;
 | 
			
		||||
      hide_search = false;
 | 
			
		||||
      parse_search = false;
 | 
			
		||||
      insensitive = true;
 | 
			
		||||
      hide_scroll = true;
 | 
			
		||||
      no_actions = true;
 | 
			
		||||
      sort_order = "default";
 | 
			
		||||
      gtk_dark = true;
 | 
			
		||||
      filter_rate = 100;
 | 
			
		||||
      key_expand = "Tab";
 | 
			
		||||
      key_exit = "Escape";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    style = lib.mkForce
 | 
			
		||||
      # css
 | 
			
		||||
      ''
 | 
			
		||||
        * {
 | 
			
		||||
          font-family: "${font}";
 | 
			
		||||
          font-weight: 500;
 | 
			
		||||
          font-size: ${toString font-size}px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #window {
 | 
			
		||||
          background-color: ${background};
 | 
			
		||||
          color: ${foreground};
 | 
			
		||||
          border-radius: ${toString rounding}px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #outer-box {
 | 
			
		||||
          padding: 20px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #input {
 | 
			
		||||
          background-color: ${background-alt};
 | 
			
		||||
          border: 0px solid ${accent};
 | 
			
		||||
          color: ${foreground};
 | 
			
		||||
          padding: 8px 12px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #scroll {
 | 
			
		||||
          margin-top: 20px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #inner-box {}
 | 
			
		||||
 | 
			
		||||
        #img {
 | 
			
		||||
          padding-right: 8px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #text {
 | 
			
		||||
          color: ${foreground};
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #text:selected {
 | 
			
		||||
          color: ${foreground};
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #entry {
 | 
			
		||||
          padding: 6px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #entry:selected {
 | 
			
		||||
          background-color: ${accent};
 | 
			
		||||
          color: ${foreground};
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #unselected {}
 | 
			
		||||
 | 
			
		||||
        #selected {}
 | 
			
		||||
 | 
			
		||||
        #input,
 | 
			
		||||
        #entry:selected {
 | 
			
		||||
          border-radius: ${toString rounding}px;
 | 
			
		||||
        }
 | 
			
		||||
      '';
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
@@ -9,9 +9,11 @@ with lib.hm.gvariant;
 | 
			
		||||
    ../modules/home-manager/hypr
 | 
			
		||||
    ../modules/home-manager/keepassxc.nix
 | 
			
		||||
    ../modules/home-manager/kitty.nix
 | 
			
		||||
    ../modules/home-manager/kubectl.nix
 | 
			
		||||
    ../modules/home-manager/obsidian.nix
 | 
			
		||||
    ../modules/home-manager/owncloud-client.nix
 | 
			
		||||
    ../modules/home-manager/thunderbird.nix
 | 
			
		||||
    ../modules/home-manager/wofi.nix
 | 
			
		||||
    ../modules/home-manager/xdg-portals.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
@@ -24,38 +26,10 @@ with lib.hm.gvariant;
 | 
			
		||||
  home.username = "remy";
 | 
			
		||||
  home.homeDirectory = "/home/remy";
 | 
			
		||||
 | 
			
		||||
  #home.file.<filepath> = <content>;
 | 
			
		||||
  
 | 
			
		||||
  ## Utils relevant to this user only
 | 
			
		||||
  programs.git = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    userName = "Remy Moll";
 | 
			
		||||
    userEmail = "me@moll.re";
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  # ## Gnome keyboard and mouse settings
 | 
			
		||||
  # dconf.settings = {
 | 
			
		||||
  #   # set the keyboard layout to german
 | 
			
		||||
  #   "org/gnome/desktop/input-sources" = {
 | 
			
		||||
  #     current = mkUint32 0;
 | 
			
		||||
  #     sources = [ (mkTuple [ "xkb" "de" ]) (mkTuple [ "xkb" "ch" ]) (mkTuple [ "xkb" "us" ]) ];
 | 
			
		||||
  #     xkb-options = [ "lv3:ralt_switch" ];
 | 
			
		||||
  #   };
 | 
			
		||||
 | 
			
		||||
  #   "org/gnome/desktop/peripherals/keyboard" = {
 | 
			
		||||
  #     numlock-state = true;
 | 
			
		||||
  #   };
 | 
			
		||||
 | 
			
		||||
  #   "org/gnome/desktop/peripherals/mouse" = {
 | 
			
		||||
  #     natural-scroll = false;
 | 
			
		||||
  #     speed = 0.20851063829787231;
 | 
			
		||||
  #   };
 | 
			
		||||
 | 
			
		||||
  #   "org/gnome/desktop/peripherals/touchpad" = {
 | 
			
		||||
  #     tap-to-click = true;
 | 
			
		||||
  #     two-finger-scrolling-enabled = true;
 | 
			
		||||
  #     speed = 0.16872427983539096;
 | 
			
		||||
  #   };
 | 
			
		||||
  # };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user