improve rofi config

This commit is contained in:
Tyler Kelley 2025-02-17 12:49:44 -06:00
parent 66afb4a858
commit 30a279ebe9
2 changed files with 191 additions and 204 deletions

View File

@ -1,18 +1,12 @@
{ ... }: {...}: {
{
home.file.".config/rofi/config-long.rasi".text = '' home.file.".config/rofi/config-long.rasi".text = ''
@import "~/.config/rofi/config.rasi" @import "~/.config/rofi/config.rasi"
window {
width: 50%;
}
entry { entry {
placeholder: "🔎 Search "; placeholder: "🔎 Search ";
} }
listview { listview {
columns: 1; columns: 1;
lines: 8; lines: 10;
scrollbar: true;
} }
''; '';
} }

View File

@ -1,6 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
programs = { programs = {
rofi = { rofi = {
enable = true; enable = true;
@ -9,206 +11,197 @@
modi = "drun,filebrowser,run"; modi = "drun,filebrowser,run";
show-icons = true; show-icons = true;
icon-theme = "Papirus"; icon-theme = "Papirus";
location = 0;
font = "JetBrainsMono Nerd Font Mono 12"; font = "JetBrainsMono Nerd Font Mono 12";
drun-display-format = "{icon} {name}"; drun-display-format = "{icon} {name}";
display-drun = " Apps"; display-drun = " Apps";
display-run = " Run"; display-run = " Run";
display-filebrowser = " File"; display-filebrowser = " File";
}; };
theme = theme = let
let inherit (config.lib.formats.rasi) mkLiteral;
inherit (config.lib.formats.rasi) mkLiteral; in {
in "*" = {
{ bg = mkLiteral "#${config.stylix.base16Scheme.base00}";
"*" = { bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}";
bg = mkLiteral "#${config.stylix.base16Scheme.base00}"; foreground = mkLiteral "#${config.stylix.base16Scheme.base01}";
bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}"; selected = mkLiteral "#${config.stylix.base16Scheme.base08}";
foreground = mkLiteral "#${config.stylix.base16Scheme.base01}"; active = mkLiteral "#${config.stylix.base16Scheme.base0B}";
selected = mkLiteral "#${config.stylix.base16Scheme.base08}"; text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}";
active = mkLiteral "#${config.stylix.base16Scheme.base0B}"; text-color = mkLiteral "#${config.stylix.base16Scheme.base05}";
text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}"; border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}";
text-color = mkLiteral "#${config.stylix.base16Scheme.base05}"; urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}";
border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}";
urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}";
};
"window" = {
width = mkLiteral "50%";
transparency = "real";
orientation = mkLiteral "vertical";
cursor = mkLiteral "default";
spacing = mkLiteral "0px";
border = mkLiteral "2px";
border-color = "@border-color";
border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg";
};
"mainbox" = {
padding = mkLiteral "15px";
enabled = true;
orientation = mkLiteral "vertical";
children = map mkLiteral [
"inputbar"
"listbox"
];
background-color = mkLiteral "transparent";
};
"inputbar" = {
enabled = true;
padding = mkLiteral "10px 10px 200px 10px";
margin = mkLiteral "10px";
background-color = mkLiteral "transparent";
border-radius = "25px";
orientation = mkLiteral "horizontal";
children = map mkLiteral [
"entry"
"dummy"
"mode-switcher"
];
background-image = mkLiteral ''url("~/Pictures/Wallpapers/Rainnight.jpg", width)'';
};
"entry" = {
enabled = true;
expand = false;
width = mkLiteral "20%";
padding = mkLiteral "10px";
border-radius = mkLiteral "12px";
background-color = mkLiteral "@selected";
text-color = mkLiteral "@text-selected";
cursor = mkLiteral "text";
placeholder = "🖥 Search ";
placeholder-color = mkLiteral "inherit";
};
"listbox" = {
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
background-color = mkLiteral "transparent";
orientation = mkLiteral "vertical";
children = map mkLiteral [
"message"
"listview"
];
};
"listview" = {
enabled = true;
columns = 2;
lines = 6;
cycle = true;
dynamic = true;
scrollbar = false;
layout = mkLiteral "vertical";
reverse = false;
fixed-height = false;
fixed-columns = true;
spacing = mkLiteral "10px";
background-color = mkLiteral "transparent";
border = mkLiteral "0px";
};
"dummy" = {
expand = true;
background-color = mkLiteral "transparent";
};
"mode-switcher" = {
enabled = true;
spacing = mkLiteral "10px";
background-color = mkLiteral "transparent";
};
"button" = {
width = mkLiteral "5%";
padding = mkLiteral "12px";
border-radius = mkLiteral "12px";
background-color = mkLiteral "@text-selected";
text-color = mkLiteral "@text-color";
cursor = mkLiteral "pointer";
};
"button selected" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@text-selected";
};
"scrollbar" = {
width = mkLiteral "4px";
border = 0;
handle-color = mkLiteral "@border-color";
handle-width = mkLiteral "8px";
padding = 0;
};
"element" = {
enabled = true;
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
border-radius = mkLiteral "12px";
background-color = mkLiteral "transparent";
cursor = mkLiteral "pointer";
};
"element normal.normal" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"element normal.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@foreground";
};
"element normal.active" = {
background-color = mkLiteral "@active";
text-color = mkLiteral "@foreground";
};
"element selected.normal" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@text-selected";
};
"element selected.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-selected";
};
"element selected.active" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-selected";
};
"element alternate.normal" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
};
"element alternate.urgent" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
};
"element alternate.active" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
};
"element-icon" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
size = mkLiteral "36px";
cursor = mkLiteral "inherit";
};
"element-text" = {
background-color = mkLiteral "transparent";
font = "JetBrainsMono Nerd Font Mono 12";
text-color = mkLiteral "inherit";
cursor = mkLiteral "inherit";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"message" = {
background-color = mkLiteral "transparent";
border = mkLiteral "0px";
};
"textbox" = {
padding = mkLiteral "12px";
border-radius = mkLiteral "10px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@bg";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"error-message" = {
padding = mkLiteral "12px";
border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@bg";
};
}; };
"window" = {
transparency = "real";
width = mkLiteral "1000px";
location = mkLiteral "center";
anchor = mkLiteral "center";
fullscreen = false;
x-offset = mkLiteral "0px";
y-offset = mkLiteral "0px";
cursor = "default";
enabled = true;
border-radius = mkLiteral "15px";
background-color = mkLiteral "@bg";
};
"mainbox" = {
enabled = true;
spacing = mkLiteral "0px";
orientation = mkLiteral "horizontal";
children = map mkLiteral [
"imagebox"
"listbox"
];
background-color = mkLiteral "transparent";
};
"imagebox" = {
padding = mkLiteral "20px";
background-color = mkLiteral "transparent";
background-image = mkLiteral ''url("~/Pictures/Wallpapers/Rainnight.jpg", height)'';
orientation = mkLiteral "vertical";
children = map mkLiteral [
"inputbar"
"dummy"
"mode-switcher"
];
};
"listbox" = {
spacing = mkLiteral "20px";
padding = mkLiteral "20px";
background-color = mkLiteral "transparent";
orientation = mkLiteral "vertical";
children = map mkLiteral [
"message"
"listview"
];
};
"dummy" = {
background-color = mkLiteral "transparent";
};
"inputbar" = {
enabled = true;
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
border-radius = mkLiteral "10px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@foreground";
children = map mkLiteral [
"textbox-prompt-colon"
"entry"
];
};
"textbox-prompt-colon" = {
enabled = true;
expand = false;
str = "";
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"entry" = {
enabled = true;
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
cursor = mkLiteral "text";
placeholder = "Search";
placeholder-color = mkLiteral "inherit";
};
"mode-switcher" = {
enabled = true;
spacing = mkLiteral "20px";
background-color = mkLiteral "transparent";
text-color = mkLiteral "@foreground";
};
"button" = {
padding = mkLiteral "15px";
border-radius = mkLiteral "10px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "inherit";
cursor = mkLiteral "pointer";
};
"button selected" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@foreground";
};
"listview" = {
enabled = true;
columns = 1;
lines = 8;
cycle = true;
dynamic = true;
scrollbar = false;
layout = mkLiteral "vertical";
reverse = false;
fixed-height = true;
fixed-columns = true;
spacing = mkLiteral "10px";
background-color = mkLiteral "transparent";
text-color = mkLiteral "@foreground";
cursor = "default";
};
"element" = {
enabled = true;
spacing = mkLiteral "15px";
padding = mkLiteral "8px";
border-radius = mkLiteral "10px";
background-color = mkLiteral "transparent";
text-color = mkLiteral "@text-color";
cursor = mkLiteral "pointer";
};
"element normal.normal" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "@text-color";
};
"element normal.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-color";
};
"element normal.active" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "@text-color";
};
"element selected.normal" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@foreground";
};
"element selected.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-selected";
};
"element selected.active" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-selected";
};
"element-icon" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
size = mkLiteral "36px";
cursor = mkLiteral "inherit";
};
"element-text" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
cursor = mkLiteral "inherit";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"message" = {
background-color = mkLiteral "transparent";
};
"textbox" = {
padding = mkLiteral "15px";
border-radius = mkLiteral "10px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@foreground";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"error-message" = {
padding = mkLiteral "15px";
border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg";
text-color = mkLiteral "@foreground";
};
};
}; };
}; };
} }