From 9b72b7f6453db57ac56685ebc984f50ad11475cc Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 25 Jul 2024 14:48:41 -0400 Subject: [PATCH] home: add rofi module with default settings --- homeManagerModules/apps/default.nix | 1 + homeManagerModules/apps/rofi/default.nix | 51 +++++++++++++++++++ .../desktop/hyprland/settings.nix | 1 + homeManagerModules/options.nix | 4 +- homes/aly/default.nix | 1 + 5 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 homeManagerModules/apps/rofi/default.nix diff --git a/homeManagerModules/apps/default.nix b/homeManagerModules/apps/default.nix index 51e76414..395e2eb6 100644 --- a/homeManagerModules/apps/default.nix +++ b/homeManagerModules/apps/default.nix @@ -14,6 +14,7 @@ ./librewolf ./mako ./nemo + ./rofi ./swaylock ./thunar ./tmux diff --git a/homeManagerModules/apps/rofi/default.nix b/homeManagerModules/apps/rofi/default.nix new file mode 100644 index 00000000..75ca9f66 --- /dev/null +++ b/homeManagerModules/apps/rofi/default.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.ar.home; +in { + config = lib.mkIf cfg.apps.rofi.enable { + programs.rofi = { + enable = true; + font = "NotoSansM Nerd Font ${toString config.gtk.font.size}"; + location = "center"; + package = pkgs.rofi-wayland; + plugins = [pkgs.rofi-emoji pkgs.rofi-power-menu]; + terminal = lib.getExe cfg.defaultApps.terminal; + theme = "glue_pro_blue"; + + extraConfig = { + click-to-exit = true; + combi-display-format = "{text}"; + combi-hide-mode-prefix = true; + + combi-modes = [ + "window" + "drun" + "ssh" + # "power-menu:${lib.getExe pkgs.rofi-power-menu} --no-symbols --choices=logout/lockscreen/suspend/shutdown/reboot" + ]; + + display-drun = "  "; + display-filebrowser = "  "; + display-power-menu = "  "; + display-run = "  "; + display-ssh = "  "; + display-window = " 﩯 "; + drun-display-format = "{icon} {name}"; + hide-scrollbar = true; + hover-select = true; + me-accept-entry = "MousePrimary"; + me-select-entry = ""; + modes = "drun,window,ssh,combi,filebrowser"; + show-display-name = false; + show-icons = true; + sort = true; + window-format = " {c} {t}"; + window-thumbnail = false; + }; + }; + }; +} diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index 895f19c0..578c7afa 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -103,6 +103,7 @@ in { "blur,launcher" "blur,logout_dialog" "blur,notifications" + "blur,rofi" "blur,swayosd" "blur,waybar" "ignorezero,notifications" diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index dc0e6c1f..1979ce0f 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -59,8 +59,10 @@ in { default = cfg.defaultApps.fileManager == pkgs.cinnamon.nemo; type = lib.types.bool; }; - + + rofi.enable = lib.mkEnableOption "Rofi launcher."; swaylock.enable = lib.mkEnableOption "Swaylock screen locker."; + thunar.enable = lib.mkOption { description = "Thunar file manager."; default = cfg.defaultApps.fileManager == pkgs.xfce.thunar; diff --git a/homes/aly/default.nix b/homes/aly/default.nix index b3f0a0cd..31ff4747 100644 --- a/homes/aly/default.nix +++ b/homes/aly/default.nix @@ -80,6 +80,7 @@ in { helix.enable = true; keepassxc.enable = true; kitty.enable = true; + rofi.enable = true; tmux.enable = true; yazi.enable = true;