nix-config/modules/home-manager/desktop-xmonad/rofi.nix

141 lines
3.4 KiB
Nix

{ config, pkgs, ... }:
let
gruvbox-dark = {
bg = "#282828";
bg1 = "#3c3836";
bg2 = "#504945";
fg = "#ebdbb2";
fg0 = "#fbf1c7";
fg3 = "#bdae93";
red = "#cc241d";
green = "#98971a";
yellow = "#d79921";
blue = "#458588";
purple = "#b16286";
aqua = "#689d6a";
gray = "#a89984";
gray2 = "#928374";
red-light = "#fb4934";
green-light = "#b8bb26";
yellow-light = "#fabd2f";
blue-light = "#83a598";
purple-light = "#d3869b";
aqua-light = "#8ec07c";
};
colors = {
fg = gruvbox-dark.fg;
selFg = gruvbox-dark.fg0;
bg = gruvbox-dark.bg;
sel = gruvbox-dark.blue;
inactive = gruvbox-dark.gray;
inactiveBorder = gruvbox-dark.bg2;
urgent = gruvbox-dark.red;
};
rofiTransparency = "96";
font = {
name = "Inter";
size = "10";
};
monoFont = {
name = "Hack";
size = "9";
};
in {
programs.rofi = {
enable = true;
font = "${font.name} ${font.size}";
extraConfig = {
display-run = " ";
# display-drun = " ";
display-window = " ";
drun-display-format = "{name}";
modi = "window,run,drun,ssh";
show-icons = false;
};
theme = let inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background-color = mkLiteral "transparent";
border = 0;
margin = 0;
padding = 0;
spacing = 0;
};
element = {
padding = 2;
orientation = "vertical";
};
"element-text" = { text-color = mkLiteral colors.fg; };
"element selected" = {
text-color = mkLiteral colors.selFg;
background-color = mkLiteral "${colors.sel}A0";
};
entry = {
padding = mkLiteral "0 0 6 3";
text-color = mkLiteral colors.fg;
};
inputbar = {
children = map mkLiteral [ "prompt" "entry" ];
border = mkLiteral "0 0 1 0";
border-color = mkLiteral gruvbox-dark.gray2;
margin = mkLiteral "0 0 5 0";
};
listview = {
columns = 1;
fixed-height = false;
};
mainbox = {
children = map mkLiteral [ "inputbar" "listview" ];
margin = 6;
};
prompt = {
padding = mkLiteral "0 0 0 6";
text-color = mkLiteral colors.fg;
background-color = mkLiteral "transparent";
};
window = {
transparency = "real";
background-color = mkLiteral "${colors.bg}D0";
y-offset = mkLiteral "-25%";
border = 2;
border-color = mkLiteral colors.sel;
};
};
terminal = "${pkgs.alacritty}/bin/alacritty";
pass = {
enable = true;
extraConfig = ''
URL_field='url'
USERNAME_field='user'
AUTOTYPE_field='autotype'
delay=2
wait=0.2
xdotool_delay=12
EDITOR='gvim -f'
BROWSER='xdg-open'
default_do='typePass' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
auto_enter='false'
notify='false'
default_autotype='user :tab pass'
help_color="${gruvbox-dark.blue-light}"
clip=primary
clip_clear=45
edit_new_pass="true"
default_user=":filename"
autotype="Alt+1"
type_user="Alt+u"
type_pass="Alt+p"
copy_name=""
copy_pass=""
'';
};
};
}