nixos/home/rofi/default.nix
Evie Litherland-Smith 69741482bc Globally change opacity to 0.65 / 65%
Update some more places that weren't using the stylix opacity setting
2024-03-09 12:00:10 +00:00

137 lines
3.4 KiB
Nix

{
config,
accentColour ? "base07",
...
}: {
programs.rofi = {
enable = true;
font = config.stylix.fonts.monospace.name;
location = "center";
pass = {
enable = true;
extraConfig = ''
USERNAME_field='login'
'';
};
extraConfig = {
modi = "drun,ssh,window,combi";
combi-modi = "window,drun,ssh";
sidebar-mode = true;
sort = true;
sorting-method = "fzf";
matching = "fuzzy";
icon-theme = config.gtk.iconTheme.name;
show-icons = true;
application-fallback-icon = "󰋙 ";
drun-display-format = "{icon} {name} ({categories})";
disable-history = false;
hide-scrollbar = true;
display-window = " 󰧨 Move ";
display-run = " 󰅴 Run ";
display-drun = " 󱓞 Apps ";
display-ssh = " 󰢹 SSH ";
display-combi = " 󰛡 Combi ";
};
theme = with builtins;
with config.stylix;
with config.lib.stylix.colors; let
inherit (config.lib.formats.rasi) mkLiteral;
bg = mkLiteral "rgba (${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, ${toString (floor (mul opacity.popups 100))}%)";
bg2 = mkLiteral "rgba (${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 100%)";
fg = mkLiteral withHashtag.base05;
fg2 = mkLiteral withHashtag.base04;
border = mkLiteral withHashtag.${accentColour};
blue = mkLiteral withHashtag.blue;
in {
"*" = {
background-color = mkLiteral "transparent";
text-color = fg;
font = with config.stylix.fonts; "${monospace.name} ${toString sizes.popups}";
};
window = {
height = mkLiteral "75%";
width = mkLiteral "75%";
border = mkLiteral "1px";
border-color = border;
border-radius = mkLiteral "10px";
background-color = bg;
};
inputbar = {
children = map mkLiteral ["prompt" "entry"];
padding = mkLiteral "2px";
};
prompt = {
background-color = bg2;
padding = mkLiteral "6px";
text-color = blue;
border-radius = mkLiteral "10px";
margin = mkLiteral "20px 0px 0px 20px";
};
textbox-prompt-colon = {
expand = false;
str = "=";
};
entry = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 10px";
};
listview = {
border = mkLiteral "0px 0px 0px";
padding = mkLiteral "6px 0px 0px";
margin = mkLiteral "10px 0px 0px 20px";
columns = 2;
lines = 5;
};
element = {
padding = mkLiteral "5px";
};
"element-icon" = {
size = mkLiteral "25px";
};
"element selected" = {
background-color = bg2;
text-color = blue;
border-radius = mkLiteral "10px";
};
mode-switcher = {
spacing = 0;
};
button = {
padding = mkLiteral "10px";
text-color = fg2;
border-radius = mkLiteral "10px";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.5";
};
"button selected" = {
background-color = bg2;
text-color = blue;
};
message = {
margin = mkLiteral "2px";
padding = mkLiteral "2px";
border-radius = mkLiteral "5px";
};
textbox = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 20px";
text-color = blue;
};
};
};
}