feat: steal and overhaul rofi rice

This commit is contained in:
Youwen Wu 2025-04-18 23:20:05 -07:00
parent c8ede44693
commit 059ab48a51
Signed by: youwen
GPG key ID: 865658ED1FE61EC3
3 changed files with 59 additions and 10 deletions

View file

@ -35,17 +35,64 @@ in
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
# theme = "gruvbox-dark";
terminal = "${pkgs.kitty}/bin/kitty"; terminal = "${pkgs.kitty}/bin/kitty";
extraConfig = { theme =
modi = "window,drun,ssh,combi,filebrowser,recursivebrowser"; let
display-drun = " 󰘧 "; inherit (config.lib.formats.rasi) mkLiteral;
combi-modi = "window,drun,ssh"; mkRgba =
run-shell-command = "{terminal} -e {cmd}"; opacity: color:
sidebar-mode = true; let
background-color = "transparent"; c = config.lib.stylix.colors;
sorting = "fuzzy"; r = c."${color}-rgb-r";
}; g = c."${color}-rgb-g";
b = c."${color}-rgb-b";
in
mkLiteral "rgba ( ${r}, ${g}, ${b}, ${opacity} % )";
mkRgb = mkRgba "100";
rofiOpacity = builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
in
{
"*" = {
font = "${config.stylix.fonts.monospace.name} ${toString config.stylix.fonts.sizes.popups}";
text-color = mkRgb "base05";
background-color = mkRgba rofiOpacity "base00";
};
"window" = {
height = mkLiteral "20em";
width = mkLiteral "30em";
border-radius = mkLiteral "8px";
border-width = mkLiteral "2px";
padding = mkLiteral "1.5em";
};
"mainbox" = {
background-color = mkRgba rofiOpacity "base01";
};
"inputbar" = {
margin = mkLiteral "0 0 1em 0";
};
"prompt" = {
enabled = false;
};
"entry" = {
placeholder = "Search...";
padding = mkLiteral "1em 1em";
text-color = mkRgb "base05";
background-color = mkRgba rofiOpacity "base00";
border-radius = mkLiteral "8px";
};
"element-text" = {
padding = mkLiteral "0.5em 1em";
margin = mkLiteral "0 0.5em";
};
"element-icon" = {
size = mkLiteral "3ch";
};
"element-text selected" = {
background-color = mkRgba rofiOpacity "base0A";
text-color = mkRgb "base01";
border-radius = mkLiteral "8px";
};
};
}; };
services.swayosd.enable = true; services.swayosd.enable = true;

View file

@ -11,6 +11,7 @@
hyprlock.enable = false; hyprlock.enable = false;
hyprland.enable = false; hyprland.enable = false;
starship.enable = false; starship.enable = false;
rofi.enable = false;
}; };
}; };
} }

View file

@ -58,6 +58,7 @@ in
image = lib.mkIf (cfg.wallpaper != null) cfg.wallpaper; image = lib.mkIf (cfg.wallpaper != null) cfg.wallpaper;
base16Scheme = lib.mkIf (cfg.base16Scheme != null) cfg.base16Scheme; base16Scheme = lib.mkIf (cfg.base16Scheme != null) cfg.base16Scheme;
polarity = lib.mkIf (cfg.polarity != null) cfg.polarity; polarity = lib.mkIf (cfg.polarity != null) cfg.polarity;
opacity.popups = 0.8;
fonts = { fonts = {
serif = { serif = {