Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: Enhance rofi configuration

Better looking theme, separate configuration

+84 -27
+1
lib/default.nix
··· 1 1 { inputs, lib, ... }: 2 2 3 3 { 4 + nix = inputs.nixpkgs.lib; 4 5 std = inputs.nix-std.lib; 5 6 mkEnableOptionWithDefault = description: default: 6 7 (lib.mkEnableOption description) // { inherit default; };
+1 -26
modules/home/de/hyprland/binds/default.nix
··· 1 - { config, lib, pkgs, ... }: 1 + { lib, pkgs, ... }: 2 2 3 3 with lib; 4 4 with (import ./lib.nix { inherit lib; }); ··· 6 6 wayland.windowManager.hyprland = { 7 7 settings = { 8 8 "$mod" = "SUPER"; 9 - bindr = [ 10 - "$mod, SUPER_L, exec, pkill rofi || rofi -show drun" 11 - "$mod, R, exec, pkill rofi || rofi -show run" 12 - "$mod, W, exec, pkill rofi || rofi -show window" 13 - ]; 14 9 bind = [ 15 10 "$mod, T, exec, kitty" 16 11 "$mod ALT, T, exec, wezterm" ··· 71 66 programs = { 72 67 firefox.enable = true; 73 68 kitty.enable = true; 74 - rofi = { 75 - enable = true; 76 - package = pkgs.rofi-wayland; 77 - terminal = "${pkgs.kitty}/bin/kitty"; 78 - extraConfig = { 79 - modi = "run,drun,window"; 80 - display-drun = " 󰀻 Apps "; 81 - display-run = "  Run "; 82 - display-window = "  Window "; 83 - display-Network = " 󰤨 Network "; 84 - lines = 5; 85 - font = "${config.stylix.fonts.monospace.name}"; 86 - show-icons = true; 87 - drun-display-format = "{icon} {name}"; 88 - location = 0; 89 - disable-history = false; 90 - hide-scrollbar = true; 91 - sidebar-mode = true; 92 - }; 93 - }; 94 69 wezterm.enable = true; 95 70 }; 96 71
+2 -1
modules/home/de/hyprland/default.nix
··· 12 12 13 13 config = mkIf cfg.enable (mkMerge [ 14 14 (setAttrByPath namespace { 15 - plugins.enable = mkDefault false; 16 15 bars.ags.enable = mkDefault true; 17 16 bars.waybar.enable = mkDefault false; 17 + launchers.rofi.enable = mkDefault true; 18 + plugins.enable = mkDefault false; 18 19 }) 19 20 { 20 21 wayland.windowManager.hyprland = {
+80
modules/home/de/hyprland/launchers/rofi/default.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + let 4 + namespace = [ "my" "modules" "de" "hyprland" "launchers" "rofi" ]; 5 + cfg = lib.getAttrFromPath namespace config; 6 + in 7 + { 8 + options = lib.setAttrByPath namespace { 9 + enable = lib.mkEnableOption "rofi"; 10 + }; 11 + 12 + config = lib.mkIf cfg.enable { 13 + wayland.windowManager.hyprland.settings.bindr = [ 14 + "$mod, SUPER_L, exec, pkill rofi || rofi -show drun" 15 + "$mod, R, exec, pkill rofi || rofi -show run" 16 + "$mod, W, exec, pkill rofi || rofi -show window" 17 + ]; 18 + 19 + programs.rofi = { 20 + enable = true; 21 + package = pkgs.rofi-wayland; 22 + extraConfig = { 23 + modes = "run,drun,window,filebrowser,recursivebrowser,ssh,keys,combi"; 24 + modi = "run,drun,window,recursivebrowser,ssh"; 25 + display-drun = "󰀻 Apps"; 26 + display-recursivebrowser = "󰉋 Files"; 27 + display-run = " Run"; 28 + # display-network = "󰤨 Networks"; 29 + display-ssh = "󰯄 SSH"; 30 + display-window = " Windows"; 31 + lines = 8; 32 + show-icons = true; 33 + drun-display-format = "{icon} {name}"; 34 + location = 0; 35 + disable-history = false; 36 + hide-scrollbar = true; 37 + sidebar-mode = false; 38 + }; 39 + }; 40 + 41 + home.file = 42 + let 43 + inherit (config.lib.stylix.colors) withHashtag; 44 + adiCfgs = pkgs.fetchFromGitHub { 45 + owner = "adi1090x"; 46 + repo = "rofi"; 47 + rev = "3a28753b0a8fb666f4bd0394ac4b0e785577afa2"; 48 + hash = "sha256-G3sAyIZbq1sOJxf+NBlXMOtTMiBCn6Sat8PHryxRS0w="; 49 + }; 50 + newmanCfgs = pkgs.fetchFromGitHub { 51 + owner = "newmanls"; 52 + repo = "rofi-themes-collection"; 53 + rev = "22c9b43f9e54164b8a35702fffffaef4d7b16c7c"; 54 + hash = "sha256-uNgsOaHeuTMyKbG6A4T5oHGmoONH0Ae3CbKKHFjyrH4="; 55 + }; 56 + in 57 + { 58 + "${config.programs.rofi.configPath}".text = lib.mkMerge [ 59 + (lib.mkBefore '' 60 + @import "${adiCfgs + /files/config.rasi}" 61 + '') 62 + (lib.mkAfter '' 63 + @import "${pkgs.writeText "rofi-colors" '' 64 + * { 65 + bg0: ${withHashtag.base00-hex}; 66 + bg1: ${withHashtag.base01-hex}; 67 + bg2: ${withHashtag.base05-hex}; 68 + bg3: ${withHashtag.base06-hex}; 69 + fg0: ${withHashtag.base05-hex}; 70 + fg1: ${withHashtag.base04-hex}; 71 + fg2: ${withHashtag.base05-hex}; 72 + fg3: ${withHashtag.base04-hex}; 73 + } 74 + @import "${newmanCfgs + /themes/rounded-common.rasi}" 75 + ''}" 76 + '') 77 + ]; 78 + }; 79 + }; 80 + }