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,18 +11,15 @@
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 = mkLiteral "#${config.stylix.base16Scheme.base00}";
bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}"; bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}";
@ -33,55 +32,42 @@
urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}"; urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}";
}; };
"window" = { "window" = {
width = mkLiteral "50%";
transparency = "real"; transparency = "real";
orientation = mkLiteral "vertical"; width = mkLiteral "1000px";
cursor = mkLiteral "default"; location = mkLiteral "center";
spacing = mkLiteral "0px"; anchor = mkLiteral "center";
border = mkLiteral "2px"; fullscreen = false;
border-color = "@border-color"; x-offset = mkLiteral "0px";
border-radius = mkLiteral "20px"; y-offset = mkLiteral "0px";
cursor = "default";
enabled = true;
border-radius = mkLiteral "15px";
background-color = mkLiteral "@bg"; background-color = mkLiteral "@bg";
}; };
"mainbox" = { "mainbox" = {
padding = mkLiteral "15px";
enabled = true; enabled = true;
orientation = mkLiteral "vertical"; spacing = mkLiteral "0px";
orientation = mkLiteral "horizontal";
children = map mkLiteral [ children = map mkLiteral [
"inputbar" "imagebox"
"listbox" "listbox"
]; ];
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
}; };
"inputbar" = { "imagebox" = {
enabled = true; padding = mkLiteral "20px";
padding = mkLiteral "10px 10px 200px 10px";
margin = mkLiteral "10px";
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
border-radius = "25px"; background-image = mkLiteral ''url("~/Pictures/Wallpapers/Rainnight.jpg", height)'';
orientation = mkLiteral "horizontal"; orientation = mkLiteral "vertical";
children = map mkLiteral [ children = map mkLiteral [
"entry" "inputbar"
"dummy" "dummy"
"mode-switcher" "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" = { "listbox" = {
spacing = mkLiteral "10px"; spacing = mkLiteral "20px";
padding = mkLiteral "10px"; padding = mkLiteral "20px";
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
orientation = mkLiteral "vertical"; orientation = mkLiteral "vertical";
children = map mkLiteral [ children = map mkLiteral [
@ -89,72 +75,93 @@
"listview" "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" = { "listview" = {
enabled = true; enabled = true;
columns = 2; columns = 1;
lines = 6; lines = 8;
cycle = true; cycle = true;
dynamic = true; dynamic = true;
scrollbar = false; scrollbar = false;
layout = mkLiteral "vertical"; layout = mkLiteral "vertical";
reverse = false; reverse = false;
fixed-height = false; fixed-height = true;
fixed-columns = true; fixed-columns = true;
spacing = mkLiteral "10px"; spacing = mkLiteral "10px";
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
border = mkLiteral "0px"; text-color = mkLiteral "@foreground";
}; cursor = "default";
"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" = { "element" = {
enabled = true; enabled = true;
spacing = mkLiteral "10px"; spacing = mkLiteral "15px";
padding = mkLiteral "10px"; padding = mkLiteral "8px";
border-radius = mkLiteral "12px"; border-radius = mkLiteral "10px";
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
text-color = mkLiteral "@text-color";
cursor = mkLiteral "pointer"; cursor = mkLiteral "pointer";
}; };
"element normal.normal" = { "element normal.normal" = {
background-color = mkLiteral "inherit"; background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit"; text-color = mkLiteral "@text-color";
}; };
"element normal.urgent" = { "element normal.urgent" = {
background-color = mkLiteral "@urgent"; background-color = mkLiteral "@urgent";
text-color = mkLiteral "@foreground"; text-color = mkLiteral "@text-color";
}; };
"element normal.active" = { "element normal.active" = {
background-color = mkLiteral "@active"; background-color = mkLiteral "inherit";
text-color = mkLiteral "@foreground"; text-color = mkLiteral "@text-color";
}; };
"element selected.normal" = { "element selected.normal" = {
background-color = mkLiteral "@selected"; background-color = mkLiteral "@selected";
text-color = mkLiteral "@text-selected"; text-color = mkLiteral "@foreground";
}; };
"element selected.urgent" = { "element selected.urgent" = {
background-color = mkLiteral "@urgent"; background-color = mkLiteral "@urgent";
@ -164,18 +171,6 @@
background-color = mkLiteral "@urgent"; background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-selected"; 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" = { "element-icon" = {
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit"; text-color = mkLiteral "inherit";
@ -184,7 +179,6 @@
}; };
"element-text" = { "element-text" = {
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
font = "JetBrainsMono Nerd Font Mono 12";
text-color = mkLiteral "inherit"; text-color = mkLiteral "inherit";
cursor = mkLiteral "inherit"; cursor = mkLiteral "inherit";
vertical-align = mkLiteral "0.5"; vertical-align = mkLiteral "0.5";
@ -192,21 +186,20 @@
}; };
"message" = { "message" = {
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
border = mkLiteral "0px";
}; };
"textbox" = { "textbox" = {
padding = mkLiteral "12px"; padding = mkLiteral "15px";
border-radius = mkLiteral "10px"; border-radius = mkLiteral "10px";
background-color = mkLiteral "@bg-alt"; background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@bg"; text-color = mkLiteral "@foreground";
vertical-align = mkLiteral "0.5"; vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0"; horizontal-align = mkLiteral "0.0";
}; };
"error-message" = { "error-message" = {
padding = mkLiteral "12px"; padding = mkLiteral "15px";
border-radius = mkLiteral "20px"; border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg-alt"; background-color = mkLiteral "@bg";
text-color = mkLiteral "@bg"; text-color = mkLiteral "@foreground";
}; };
}; };
}; };