2024-07-25 15:26:12 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.ar.home;
|
2024-08-15 00:45:27 -04:00
|
|
|
|
|
|
|
inherit (config.lib.formats.rasi) mkLiteral;
|
|
|
|
mkRgba = opacity: color: let
|
|
|
|
c = config.lib.stylix.colors;
|
|
|
|
r = c."${color}-rgb-r";
|
|
|
|
g = c."${color}-rgb-g";
|
|
|
|
b = c."${color}-rgb-b";
|
|
|
|
in
|
|
|
|
mkLiteral
|
|
|
|
"rgba ( ${r}, ${g}, ${b}, ${opacity} % )";
|
|
|
|
mkRgb = mkRgba "100";
|
|
|
|
rofiOpacity = builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
|
2024-07-25 15:26:12 -04:00
|
|
|
in {
|
|
|
|
config = lib.mkIf cfg.apps.rofi.enable {
|
2024-07-26 00:21:42 -04:00
|
|
|
home.packages = [
|
|
|
|
pkgs.networkmanager_dmenu
|
|
|
|
pkgs.rofi-bluetooth
|
2024-08-02 07:50:06 -04:00
|
|
|
pkgs.rofi-rbw-wayland
|
2024-07-26 00:21:42 -04:00
|
|
|
];
|
2024-07-25 18:03:57 -04:00
|
|
|
|
2024-08-15 00:45:27 -04:00
|
|
|
stylix.targets.rofi.enable = false;
|
|
|
|
|
2024-07-25 15:26:12 -04:00
|
|
|
programs.rofi = {
|
|
|
|
enable = true;
|
2024-08-15 00:45:27 -04:00
|
|
|
font = "${config.stylix.fonts.monospace.name} ${toString config.stylix.fonts.sizes.popups}";
|
2024-07-25 15:26:12 -04:00
|
|
|
location = "center";
|
|
|
|
package = pkgs.rofi-wayland;
|
2024-07-29 21:47:21 -04:00
|
|
|
|
|
|
|
plugins = [
|
|
|
|
pkgs.rofi-power-menu
|
|
|
|
pkgs.rofi-file-browser
|
|
|
|
];
|
|
|
|
|
2024-07-25 15:26:12 -04:00
|
|
|
terminal = lib.getExe cfg.defaultApps.terminal;
|
2024-08-15 00:45:27 -04:00
|
|
|
theme = {
|
|
|
|
"*" = {
|
|
|
|
background = mkRgba rofiOpacity "base00";
|
|
|
|
lightbg = mkRgba rofiOpacity "base01";
|
|
|
|
red = mkRgba rofiOpacity "base08";
|
|
|
|
blue = mkRgba rofiOpacity "base0D";
|
|
|
|
lightfg = mkRgba rofiOpacity "base06";
|
2024-08-15 00:57:10 -04:00
|
|
|
foreground = mkRgb "base05";
|
|
|
|
lightbgopaque = mkRgb "base01";
|
|
|
|
lightfgopaque = mkRgb "base06";
|
2024-08-15 00:45:27 -04:00
|
|
|
|
|
|
|
background-color = mkRgb "base00";
|
|
|
|
separatorcolor = mkLiteral "@foreground";
|
|
|
|
border-color = mkLiteral "@foreground";
|
2024-08-15 00:57:10 -04:00
|
|
|
selected-normal-foreground = mkLiteral "@lightbgopaque";
|
|
|
|
selected-normal-background = mkLiteral "@lightfgopaque";
|
2024-08-15 00:45:27 -04:00
|
|
|
selected-active-foreground = mkLiteral "@background";
|
|
|
|
selected-active-background = mkLiteral "@blue";
|
|
|
|
selected-urgent-foreground = mkLiteral "@background";
|
|
|
|
selected-urgent-background = mkLiteral "@red";
|
|
|
|
normal-foreground = mkLiteral "@foreground";
|
|
|
|
normal-background = mkLiteral "@background";
|
|
|
|
active-foreground = mkLiteral "@blue";
|
|
|
|
active-background = mkLiteral "@background";
|
|
|
|
urgent-foreground = mkLiteral "@red";
|
|
|
|
urgent-background = mkLiteral "@background";
|
|
|
|
alternate-normal-foreground = mkLiteral "@foreground";
|
|
|
|
alternate-normal-background = mkLiteral "@lightbg";
|
|
|
|
alternate-active-foreground = mkLiteral "@blue";
|
|
|
|
alternate-active-background = mkLiteral "@lightbg";
|
|
|
|
alternate-urgent-foreground = mkLiteral "@red";
|
|
|
|
alternate-urgent-background = mkLiteral "@lightbg";
|
|
|
|
|
|
|
|
# Text Colors
|
|
|
|
base-text = mkRgb "base05";
|
|
|
|
selected-normal-text = mkRgb "base01";
|
|
|
|
selected-active-text = mkRgb "base00";
|
|
|
|
selected-urgent-text = mkRgb "base00";
|
|
|
|
normal-text = mkRgb "base05";
|
|
|
|
active-text = mkRgb "base0D";
|
|
|
|
urgent-text = mkRgb "base08";
|
|
|
|
alternate-normal-text = mkRgb "base05";
|
|
|
|
alternate-active-text = mkRgb "base0D";
|
|
|
|
alternate-urgent-text = mkRgb "base08";
|
|
|
|
};
|
|
|
|
|
|
|
|
window = {
|
|
|
|
background-color = mkLiteral "@background";
|
|
|
|
border = 4;
|
|
|
|
};
|
|
|
|
|
|
|
|
message = {
|
|
|
|
border-color = mkLiteral "@separatorcolor";
|
|
|
|
border = mkLiteral "2px solid 0px 0px";
|
|
|
|
padding = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
textbox.text-color = mkLiteral "@base-text";
|
|
|
|
|
|
|
|
listview = {
|
|
|
|
border-color = mkLiteral "@separatorcolor";
|
|
|
|
border = mkLiteral "2px solid 0px 0px";
|
|
|
|
spacing = 4;
|
|
|
|
scrollbar = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
element = {
|
|
|
|
border = 0;
|
|
|
|
padding = 5;
|
|
|
|
};
|
|
|
|
|
|
|
|
element-text = {
|
|
|
|
background-color = mkLiteral "inherit";
|
|
|
|
text-color = mkLiteral "inherit";
|
|
|
|
};
|
|
|
|
|
|
|
|
element-icon = {
|
|
|
|
background-color = mkLiteral "inherit";
|
|
|
|
text-color = mkLiteral "inherit";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element normal.normal" = {
|
|
|
|
background-color = mkLiteral "@normal-background";
|
|
|
|
text-color = mkLiteral "@normal-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element normal.urgent" = {
|
|
|
|
background-color = mkLiteral "@urgent-background";
|
|
|
|
text-color = mkLiteral "@urgent-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element normal.active" = {
|
|
|
|
background-color = mkLiteral "@active-background";
|
|
|
|
text-color = mkLiteral "@active-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element selected.normal" = {
|
|
|
|
background-color = mkLiteral "@selected-normal-background";
|
|
|
|
text-color = mkLiteral "@selected-normal-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element selected.urgent" = {
|
|
|
|
background-color = mkLiteral "@selected-urgent-background";
|
|
|
|
text-color = mkLiteral "@selected-urgent-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element selected.active" = {
|
|
|
|
background-color = mkLiteral "@selected-active-background";
|
|
|
|
text-color = mkLiteral "@selected-active-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element alternate.normal" = {
|
|
|
|
background-color = mkLiteral "@alternate-normal-background";
|
|
|
|
text-color = mkLiteral "@alternate-normal-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element alternate.urgent" = {
|
|
|
|
background-color = mkLiteral "@alternate-urgent-background";
|
|
|
|
text-color = mkLiteral "@alternate-urgent-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
"element alternate.active" = {
|
|
|
|
background-color = mkLiteral "@alternate-active-background";
|
|
|
|
text-color = mkLiteral "@alternate-active-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
scrollbar.handle-color = mkLiteral "@normal-foreground";
|
|
|
|
sidebar.border-color = mkLiteral "@separatorcolor";
|
|
|
|
button.text-color = mkLiteral "@normal-text";
|
|
|
|
"button selected" = {
|
|
|
|
background-color = mkLiteral "@selected-normal-background";
|
|
|
|
text-color = mkLiteral "@selected-normal-text";
|
|
|
|
};
|
|
|
|
|
|
|
|
inputbar.text-color = mkLiteral "@normal-text";
|
|
|
|
case-indicator.text-color = mkLiteral "@normal-text";
|
|
|
|
entry.text-color = mkLiteral "@normal-text";
|
|
|
|
prompt.text-color = mkLiteral "@normal-text";
|
|
|
|
|
|
|
|
"#textbox-prompt-colon" = {
|
|
|
|
expand = false;
|
|
|
|
margin = mkLiteral "0px 0.3em 0em 0em";
|
|
|
|
str = ":";
|
|
|
|
text-color = mkLiteral "inherit";
|
|
|
|
};
|
|
|
|
|
|
|
|
case-indicator.spacing = 0;
|
|
|
|
entry.spacing = 0;
|
|
|
|
|
|
|
|
prompt = {
|
|
|
|
spacing = 0;
|
|
|
|
margin = mkLiteral "1px";
|
|
|
|
};
|
|
|
|
|
|
|
|
"#inputbar" = {
|
|
|
|
children = map mkLiteral ["prompt" "textbox-prompt-colon" "entry" "case-indicator"];
|
|
|
|
padding = 10;
|
|
|
|
};
|
|
|
|
|
|
|
|
mode-switcher = {
|
|
|
|
border = mkLiteral "2px solid 0px 0px";
|
|
|
|
border-color = mkLiteral "@separatorcolor";
|
|
|
|
};
|
|
|
|
};
|
2024-07-25 15:26:12 -04:00
|
|
|
|
|
|
|
extraConfig = {
|
2024-07-29 21:47:21 -04:00
|
|
|
case-sensitive = false;
|
2024-07-25 15:26:12 -04:00
|
|
|
click-to-exit = true;
|
|
|
|
combi-display-format = "{text}";
|
|
|
|
combi-hide-mode-prefix = true;
|
|
|
|
|
|
|
|
combi-modes = [
|
|
|
|
"window"
|
|
|
|
"drun"
|
|
|
|
"ssh"
|
2024-07-29 21:47:21 -04:00
|
|
|
"recursivebrowser"
|
2024-07-25 15:26:12 -04:00
|
|
|
];
|
|
|
|
|
2024-07-25 18:03:57 -04:00
|
|
|
display-combi = "Search";
|
2024-07-29 21:47:21 -04:00
|
|
|
display-drun = "Apps";
|
2024-07-25 18:03:57 -04:00
|
|
|
display-filebrowser = "Files";
|
2024-07-29 21:47:21 -04:00
|
|
|
display-recursivebrowser = "Files";
|
2024-07-25 20:25:22 -04:00
|
|
|
display-run = "Run";
|
2024-07-25 18:03:57 -04:00
|
|
|
display-ssh = "SSH";
|
|
|
|
display-window = "Windows";
|
2024-07-25 15:26:12 -04:00
|
|
|
drun-display-format = "{icon} {name}";
|
|
|
|
hover-select = true;
|
2024-07-30 15:34:06 -04:00
|
|
|
matching = "fuzzy";
|
2024-07-25 15:26:12 -04:00
|
|
|
me-accept-entry = "MousePrimary";
|
|
|
|
me-select-entry = "";
|
2024-07-29 21:47:21 -04:00
|
|
|
modes = "drun,window,ssh,recursivebrowser";
|
|
|
|
scrollbar = false;
|
2024-07-25 15:26:12 -04:00
|
|
|
show-display-name = false;
|
|
|
|
show-icons = true;
|
|
|
|
sort = true;
|
|
|
|
window-format = " {c} {t}";
|
|
|
|
window-thumbnail = false;
|
|
|
|
};
|
|
|
|
};
|
2024-07-25 18:03:57 -04:00
|
|
|
|
2024-08-02 07:50:06 -04:00
|
|
|
xdg.configFile = {
|
|
|
|
"rofi-rbw.rc".text = ''
|
|
|
|
prompt "Bitwarden"
|
|
|
|
clear-after 60
|
|
|
|
'';
|
2024-07-28 23:16:52 -04:00
|
|
|
|
2024-08-02 07:50:06 -04:00
|
|
|
"networkmanager-dmenu/config.ini".text = ''
|
|
|
|
[dmenu]
|
|
|
|
dmenu_command = ${lib.getExe config.programs.rofi.package}
|
|
|
|
highlight = True
|
2024-07-25 18:03:57 -04:00
|
|
|
|
2024-08-02 07:50:06 -04:00
|
|
|
[dmenu_passphrase]
|
|
|
|
obscure = True
|
|
|
|
|
|
|
|
[editor]
|
|
|
|
gui = ${pkgs.networkmanagerapplet}/bin/nm-connection-editor
|
|
|
|
gui_if_available = True
|
|
|
|
terminal = ${lib.getExe cfg.defaultApps.terminal}
|
|
|
|
'';
|
|
|
|
};
|
2024-07-25 15:26:12 -04:00
|
|
|
};
|
|
|
|
}
|