updated rofi config

This commit is contained in:
2023-12-27 06:53:27 +05:30
parent 093eef483b
commit 3db4242567

View File

@ -1,333 +1,321 @@
{ ... }: { { config, ... }: {
programs.rofi = { programs.rofi =
enable = true; {
extraConfig = '' enable = true;
configuration { extraConfig =
terminal: "alacritty"; {
terminal = "alacritty";
modes: "combi,keys"; modes = "combi,keys";
display-window: "window"; display-window = "window";
display-drun: "run"; display-drun = "run";
display-windowcd: "windowcd"; display-windowcd = "windowcd";
display-run: "run"; display-run = "run";
display-ssh: "ssh"; display-ssh = "ssh";
display-combi: "combi"; display-combi = "combi";
display-keys: "keys"; display-keys = "keys";
display-filebrowser: "filebrowser"; display-filebrowser = "filebrowser";
combi-modes: "window,drun"; combi-modes = "window,drun";
combi-hide-mode-prefix: false; combi-hide-mode-prefix = false;
combi-display-format: "<i>{mode}</i> {text}"; combi-display-format = "<i>{mode}</i> {text}";
window-format: "<span fgalpha='65%'>[{w:-1}] </span><b>{c:-1}</b> <span weight='light' fgalpha='65%' size='small'>{t:-1}</span>"; window-format = "<span fgalpha='65%'>[{w=-1}] </span><b>{c=-1}</b> <span weight='light' fgalpha='65%' size='small'>{t=-1}</span>";
window-thumbnail: false; window-thumbnail = false;
drun-url-launcher: "xdg-open"; drun-url-launcher = "xdg-open";
drun-match-fields: "name,generic,exec,categories,keywords"; drun-match-fields = "name,generic,exec,categories,keywords";
drun-display-format: "<b>{name}</b>[ <span weight='light' size='small'><i>({generic})</i></span>][ <span weight='light' fgalpha='65%' size='small'>{exec}</span>]"; drun-display-format = "<b>{name}</b>[ <span weight='light' size='small'><i>({generic})</i></span>][ <span weight='light' fgalpha='65%' size='small'>{exec}</span>]";
drun-show-actions: true; drun-show-actions = true;
drun {
parse-user: true;
parse-system: true;
}
run-command: "{cmd}"; run-command = "{cmd}";
run-list-command: ""; run-list-command = "";
run-shell-command: "{terminal} -e {cmd}"; run-shell-command = "{terminal} -e {cmd}";
filebrowser { matching = "normal";
directories-first: true; font = "JetBrains Mono 11";
sorting-method: "name"; show-icons = true;
} scroll-method = 0;
cycle = false;
fixed-num-lines = false;
};
theme =
let
inherit (config.lib.formats.rasi) mkLiteral;
in
{
"*" = {
font = "JetBrains Mono 11";
timeout { black = mkLiteral "#1d1f21";
action: "kb-cancel"; white = mkLiteral "#c5c8c6";
delay: 0; red = mkLiteral "#cc6666";
} orange = mkLiteral "#de935f";
yellow = mkLiteral "#f0c674";
green = mkLiteral "#7cb36b";
cyan = mkLiteral "#78bab9";
blue = mkLiteral "#81a2be";
magenta = mkLiteral "#b294bb";
matching: "normal"; black-bright = mkLiteral "#3c4044";
font: "monospace 11"; white-bright = mkLiteral "#eaeaea";
show-icons: true; red-bright = mkLiteral "#d54e53";
scroll-method: 0; orange-bright = mkLiteral "#e78c45";
cycle: false; yellow-bright = mkLiteral "#e7c547";
fixed-num-lines: false; green-bright = mkLiteral "#71c464";
} cyan-bright = mkLiteral "#6acdcc";
blue-bright = mkLiteral "#7aa6da";
magenta-bright = mkLiteral "#c397d8";
@theme "theme" black-66 = mkLiteral "#131415";
''; white-66 = mkLiteral "#828382";
theme = '' red-66 = mkLiteral "#864343";
* { orange-66 = mkLiteral "#92613e";
font: "JetBrains Mono 11"; yellow-66 = mkLiteral "#9e824c";
green-66 = mkLiteral "#517646";
cyan-66 = mkLiteral "#4f7a7a";
blue-66 = mkLiteral "#556a7d";
magenta-66 = mkLiteral "#75617b";
black: #1d1f21; black-33 = mkLiteral "#090a0a";
white: #c5c8c6; white-33 = mkLiteral "#414141";
red: #cc6666; red-33 = mkLiteral "#432121";
orange: #de935f; orange-33 = mkLiteral "#49301f";
yellow: #f0c674; yellow-33 = mkLiteral "#4f4126";
green: #7cb36b; green-33 = mkLiteral "#283b23";
cyan: #78bab9; cyan-33 = mkLiteral "#273d3d";
blue: #81a2be; blue-33 = mkLiteral "#2a353e";
magenta: #b294bb; magenta-33 = mkLiteral "#3a303d";
black-bright: #3c4044; common-background = mkLiteral "@black";
white-bright: #eaeaea; common-background-bright = mkLiteral "@black-bright";
red-bright: #d54e53; common-background-66 = " @black-66";
orange-bright: #e78c45; common-foreground = mkLiteral "@white";
yellow-bright: #e7c547; common-foreground-bright = mkLiteral "@white-bright";
green-bright: #71c464; common-foreground-66 = mkLiteral "@white-66";
cyan-bright: #6acdcc; common-primary = mkLiteral "@yellow";
blue-bright: #7aa6da; common-primary-bright = mkLiteral "@yellow-bright";
magenta-bright: #c397d8; common-primary-66 = mkLiteral "@yellow-66";
common-primary-33 = mkLiteral "@yellow-33";
common-secondary = mkLiteral "@blue";
common-secondary-bright = mkLiteral "@blue-bright";
common-secondary-66 = mkLiteral "@blue-66";
common-secondary-33 = mkLiteral "@blue-33";
common-urgent = mkLiteral "@red";
common-urgent-bright = mkLiteral "@red-bright";
common-urgent-66 = mkLiteral "@red-66";
common-urgent-33 = mkLiteral "@red-33";
black-66: #131415; background-color = mkLiteral "transparent";
white-66: #828382;
red-66: #864343;
orange-66: #92613e;
yellow-66: #9e824c;
green-66: #517646;
cyan-66: #4f7a7a;
blue-66: #556a7d;
magenta-66: #75617b;
black-33: #090a0a; normal-normal-background = mkLiteral "transparent";
white-33: #414141; normal-normal-foreground = mkLiteral "@common-foreground";
red-33: #432121; normal-normal-border-color = mkLiteral "transparent";
orange-33: #49301f; normal-active-background = mkLiteral "transparent";
yellow-33: #4f4126; normal-active-foreground = mkLiteral "@common-secondary-bright";
green-33: #283b23; normal-active-border-color = mkLiteral "transparent";
cyan-33: #273d3d; normal-urgent-background = mkLiteral "transparent";
blue-33: #2a353e; normal-urgent-foreground = mkLiteral "@common-urgent-bright";
magenta-33: #3a303d; normal-urgent-border-color = mkLiteral "transparent";
common-background: @black; selected-normal-background = mkLiteral "@common-primary-33";
common-background-bright: @black-bright; selected-normal-foreground = mkLiteral "@common-primary-bright";
common-background-66: @black-66; selected-normal-border-color = mkLiteral "@common-primary-66";
common-foreground: @white; selected-active-background = mkLiteral "@common-secondary-33";
common-foreground-bright: @white-bright; selected-active-foreground = mkLiteral "@common-secondary-bright";
common-foreground-66: @white-66; selected-active-border-color = mkLiteral "@common-secondary-66";
common-primary: @yellow; selected-urgent-background = mkLiteral "@common-urgent-33";
common-primary-bright: @yellow-bright; selected-urgent-foreground = mkLiteral "@common-urgent-bright";
common-primary-66: @yellow-66; selected-urgent-border-color = mkLiteral "@common-urgent-66";
common-primary-33: @yellow-33;
common-secondary: @blue;
common-secondary-bright: @blue-bright;
common-secondary-66: @blue-66;
common-secondary-33: @blue-33;
common-urgent: @red;
common-urgent-bright: @red-bright;
common-urgent-66: @red-66;
common-urgent-33: @red-33;
background-color: transparent; alternate-normal-background = mkLiteral "@normal-normal-background";
alternate-normal-foreground = mkLiteral "@normal-normal-foreground";
alternate-normal-border-color = mkLiteral "@normal-normal-border-color";
alternate-active-background = mkLiteral "@normal-active-background";
alternate-active-foreground = mkLiteral "@normal-active-foreground";
alternate-active-border-color = mkLiteral "@normal-active-border-color";
alternate-urgent-background = mkLiteral "@normal-urgent-background";
alternate-urgent-foreground = mkLiteral "@normal-urgent-foreground";
alternate-urgent-border-color = mkLiteral "@normal-urgent-border-color";
};
normal-normal-background: transparent; "window" = {
normal-normal-foreground: @common-foreground; background-color = mkLiteral "#1d1f21e6"; #// @black + 0.85 alpha
normal-normal-border-color: transparent; border = 3;
normal-active-background: transparent; border-color = mkLiteral "@black-bright";
normal-active-foreground: @common-secondary-bright; border-radius = 16;
normal-active-border-color: transparent; width = 1024;
normal-urgent-background: transparent; height = 460;
normal-urgent-foreground: @common-urgent-bright; };
normal-urgent-border-color: transparent;
selected-normal-background: @common-primary-33; "mainbox" = {
selected-normal-foreground: @common-primary-bright; padding = 16;
selected-normal-border-color: @common-primary-66; spacing = 16;
selected-active-background: @common-secondary-33; };
selected-active-foreground: @common-secondary-bright;
selected-active-border-color: @common-secondary-66;
selected-urgent-background: @common-urgent-33;
selected-urgent-foreground: @common-urgent-bright;
selected-urgent-border-color: @common-urgent-66;
alternate-normal-background: @normal-normal-background; "inputbar" = {
alternate-normal-foreground: @normal-normal-foreground; background-color = mkLiteral "#333537"; #// @black-110
alternate-normal-border-color: @normal-normal-border-color; border = 1;
alternate-active-background: @normal-active-background; border-color = mkLiteral "#606263"; #// @black-130
alternate-active-foreground: @normal-active-foreground; border-radius = 8;
alternate-active-border-color: @normal-active-border-color; padding = mkLiteral "12 16";
alternate-urgent-background: @normal-urgent-background; spacing = 0;
alternate-urgent-foreground: @normal-urgent-foreground; text-color = mkLiteral "@common-foreground";
alternate-urgent-border-color: @normal-urgent-border-color; children = mkLiteral "[ entry, case-indicator, num-filtered-rows, textbox-num-sep, num-rows ]";
} };
window { "prompt" = {
background-color: #1d1f21d9; // @black + 0.85 alpha background-color = mkLiteral "transparent";
border: 3; text-color = mkLiteral "@common-foreground-bright";
border-color: @black-bright; spacing = 0;
border-radius: 16; text-transform = mkLiteral "bold";
width: 1024; };
height: 460;
}
mainbox { "textbox-prompt-colon" = {
padding: 16; background-color = mkLiteral "transparent";
spacing: 16; text-color = mkLiteral "inherit";
} margin = mkLiteral "0 0.3em 0 0";
expand = false;
str = "=";
};
inputbar { "entry" = {
background-color: #333537; // @black-110 background-color = mkLiteral "transparent";
border: 1; text-color = mkLiteral "@common-foreground-bright";
border-color: #606263; // @black-130 cursor = "text";
border-radius: 8; placeholder-color = mkLiteral "@common-foreground-66";
padding: 12 16; placeholder = "Type to filter";
spacing: 0; };
text-color: @common-foreground;
children: [ "entry", "case-indicator", "num-filtered-rows", "textbox-num-sep", "num-rows"];
}
prompt { "case-indicator" = {
background-color: transparent; background-color = mkLiteral "transparent";
text-color: @common-foreground-bright; text-color = mkLiteral "inherit";
spacing: 0; };
text-transform: bold;
}
textbox-prompt-colon { "num-filtered-rows" = {
background-color: transparent; background-color = mkLiteral "transparent";
text-color: inherit; text-color = mkLiteral "inherit";
margin: 0 0.3em 0 0; expand = false;
expand: false; };
str: ":";
}
entry { "textbox-num-sep" = {
background-color: transparent; background-color = mkLiteral "transparent";
text-color: @common-foreground-bright; text-color = mkLiteral "inherit";
cursor: text; expand = false;
placeholder-color: @common-foreground-66; str = "/";
placeholder: "Type to filter"; };
}
case-indicator { "num-rows" = {
background-color: transparent; background-color = mkLiteral "transparent";
text-color: inherit; text-color = mkLiteral "inherit";
} expand = false;
};
num-filtered-rows { "message" = {
background-color: transparent; background-color = mkLiteral "@cyan-33";
text-color: inherit; border = 1;
expand: false; border-color = mkLiteral "@cyan-66";
} border-radius = 8;
padding = 16;
};
textbox-num-sep { "textbox" = {
background-color: transparent; background-color = mkLiteral "transparent";
text-color: inherit; text-color = mkLiteral "@cyan-bright";
expand: false; };
str: "/";
}
num-rows { "listview" = {
background-color: transparent; dynamic = true;
text-color: inherit; scrollbar = true;
expand: false; spacing = 0;
} };
message { "scrollbar" = {
background-color: @cyan-33; background-color = mkLiteral "transparent";
border: 1; padding = 0;
border-color: @cyan-66; margin = mkLiteral "0 0 0 4";
border-radius: 8; handle-width = 8;
padding: 16; border = 0;
} handle-color = mkLiteral "#626463"; #// @white-50
};
textbox { "element" = {
background-color: transparent; border = 1;
text-color: @cyan-bright; border-radius = 8;
} padding = mkLiteral "6 12";
margin = mkLiteral "1 0";
spacing = 12;
children = mkLiteral "[ element-icon, element-text ]";
};
listview { "element-icon" = {
dynamic: true; background-color = mkLiteral "transparent";
scrollbar: true; text-color = mkLiteral "inherit";
spacing: 0; size = mkLiteral "1.0em";
} cursor = mkLiteral "inherit";
};
scrollbar { "element-text" = {
background-color: transparent; background-color = mkLiteral "transparent";
padding: 0; text-color = mkLiteral "inherit";
margin: 0 0 0 4; highlight = mkLiteral "inherit";
handle-width: 8; cursor = mkLiteral "inherit";
border: 0; };
handle-color: #626463; // @white-50
}
element { "element normal.normal" = {
border: 1; background-color = mkLiteral "@normal-normal-background";
border-radius: 8; text-color = mkLiteral "@normal-normal-foreground";
padding: 6 12; border-color = mkLiteral "@normal-normal-border-color";
margin: 1 0; };
spacing: 12;
children: [ element-icon, element-text ];
}
element-icon { "element normal.urgent" = {
background-color: transparent; background-color = mkLiteral "@normal-urgent-background";
text-color: inherit; text-color = mkLiteral "@normal-urgent-foreground";
size: 1.0em; border-color = mkLiteral "@normal-urgent-border-color";
cursor: inherit; };
}
element-text { "element normal.active" = {
background-color: transparent; background-color = mkLiteral "@normal-active-background";
text-color: inherit; text-color = mkLiteral "@normal-active-foreground";
highlight: inherit; border-color = mkLiteral "@normal-active-border-color";
cursor: inherit; };
}
element normal.normal { "element selected.normal" = {
background-color: @normal-normal-background; background-color = mkLiteral "@selected-normal-background";
text-color: @normal-normal-foreground; text-color = mkLiteral "@selected-normal-foreground";
border-color: @normal-normal-border-color; border-color = mkLiteral "@selected-normal-border-color";
} };
element normal.urgent { "element selected.urgent" = {
background-color: @normal-urgent-background; background-color = mkLiteral "@selected-urgent-background";
text-color: @normal-urgent-foreground; text-color = mkLiteral "@selected-urgent-foreground";
border-color: @normal-urgent-border-color; border-color = mkLiteral "@selected-urgent-border-color";
} };
element normal.active { "element selected.active" = {
background-color: @normal-active-background; background-color = mkLiteral "@selected-active-background";
text-color: @normal-active-foreground; text-color = mkLiteral "@selected-active-foreground";
border-color: @normal-active-border-color; border-color = mkLiteral "@selected-active-border-color";
} };
element selected.normal { "element alternate.normal" = {
background-color: @selected-normal-background; background-color = mkLiteral "@alternate-normal-background";
text-color: @selected-normal-foreground; text-color = mkLiteral "@alternate-normal-foreground";
border-color: @selected-normal-border-color; border-color = mkLiteral "@alternate-normal-border-color";
} };
element selected.urgent { "element alternate.urgent" = {
background-color: @selected-urgent-background; background-color = mkLiteral "@alternate-urgent-background";
text-color: @selected-urgent-foreground; text-color = mkLiteral "@alternate-urgent-foreground";
border-color: @selected-urgent-border-color; border-color = mkLiteral "@alternate-urgent-border-color";
} };
element selected.active { "element alternate.active" = {
background-color: @selected-active-background; background-color = mkLiteral "@alternate-active-background";
text-color: @selected-active-foreground; text-color = mkLiteral "@alternate-active-foreground";
border-color: @selected-active-border-color; border-color = mkLiteral "@alternate-active-border-color";
} };
};
element alternate.normal { };
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
border-color: @alternate-normal-border-color;
}
element alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
border-color: @alternate-urgent-border-color;
}
element alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
border-color: @alternate-active-border-color;
}
'';
};
} }