1

Modules/Rofi: Use updated color module for theme

This commit is contained in:
2025-07-19 22:49:07 +02:00
parent a74af377bd
commit 714f2fd7f9

View File

@ -35,46 +35,42 @@ in {
sidebar-mode = false; sidebar-mode = false;
}; };
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
theme = let theme = let
inherit (config.lib.formats.rasi) mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
bg = mkLiteral "rgba(${color.rgbString.light.base}, 0.3)";
hl = mkLiteral "#${color.hex.dark.lavender}";
hl-pink = mkLiteral "#${color.hex.dark.pink}";
text = mkLiteral "#${color.hex.dark.base}";
trans = mkLiteral "rgba(0, 0, 0, 0)";
};
trans = "rgba(0, 0, 0, 0)";
in {
"element-text,element-icon,mode-switcher" = { "element-text,element-icon,mode-switcher" = {
background-color = mkLiteral "inherit"; background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit"; text-color = mkLiteral "inherit";
}; };
"window" = { "window" = {
height = 480; height = "50%";
width = 700; width = "50%";
border = mkLiteral "2 solid 2 solid 2 solid 2 solid"; border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 6; border-radius = 6;
border-color = mkLiteral "@hl"; border-color = mkLiteral color.hexS.accent;
background-color = mkLiteral "@bg"; background-color = mkLiteral "rgba(${color.rgbS.bg}, 0.2)";
}; };
"mainbox" = { "mainbox" = {
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
}; };
"message" = { "message" = {
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
}; };
"error-message" = { "error-message" = {
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
margin = mkLiteral "0px 0px 20px 0px"; margin = mkLiteral "0px 0px 20px 0px";
}; };
"textbox" = { "textbox" = {
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
padding = 6; padding = 6;
margin = mkLiteral "20px 20px 0px 20px"; margin = mkLiteral "20px 20px 0px 20px";
border-radius = 3; border-radius = 3;
@ -82,13 +78,13 @@ in {
"inputbar" = { "inputbar" = {
children = builtins.map mkLiteral ["prompt" "entry"]; children = builtins.map mkLiteral ["prompt" "entry"];
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
}; };
"prompt" = { "prompt" = {
background-color = mkLiteral "@hl-pink"; background-color = mkLiteral color.hexS.accentHL;
padding = 6; padding = 6;
text-color = mkLiteral "@text"; text-color = mkLiteral color.hexS.accentText;
border-radius = 3; border-radius = 3;
margin = mkLiteral "20px 0px 0px 20px"; margin = mkLiteral "20px 0px 0px 20px";
}; };
@ -96,11 +92,11 @@ in {
"entry" = { "entry" = {
padding = 6; padding = 6;
margin = mkLiteral "20px 20px 0px 10px"; margin = mkLiteral "20px 20px 0px 10px";
text-color = mkLiteral "@text"; text-color = mkLiteral color.hexS.text;
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid"; border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3; border-radius = 3;
border-color = mkLiteral "@hl-pink"; border-color = mkLiteral color.hexS.accentHL;
}; };
"listview" = { "listview" = {
@ -108,17 +104,17 @@ in {
padding = 0; padding = 0;
margin = mkLiteral "10px 20px 20px 20px"; margin = mkLiteral "10px 20px 20px 20px";
columns = 1; columns = 1;
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid"; border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3; border-radius = 3;
border-color = mkLiteral "@hl-pink"; border-color = mkLiteral color.hexS.accentHL;
}; };
"element" = { "element" = {
padding = 5; padding = 5;
margin = 0; margin = 0;
background-color = mkLiteral "@trans"; background-color = mkLiteral trans;
text-color = mkLiteral "@text"; text-color = mkLiteral color.hexS.text;
# border-radius = 3; # border-radius = 3;
}; };
@ -127,8 +123,8 @@ in {
}; };
"element selected" = { "element selected" = {
background-color = mkLiteral "@hl-pink"; background-color = mkLiteral color.hexS.accentHL;
text-color = mkLiteral "@text"; text-color = mkLiteral color.hexS.accentText;
}; };
}; };
}; };
@ -138,12 +134,12 @@ in {
mylib.rofi.mkSimpleMenu mylib.rofi.mkSimpleMenu
"power" "power"
{ {
"Poweroff" = "poweroff"; "󰤂 Poweroff" = "poweroff";
"Reboot" = "reboot"; "󰜉 Reboot" = "reboot";
"Lock" = "loginctl lock-session"; "󰌾 Lock" = "loginctl lock-session";
"Reload Hyprpanel" = "systemctl --user restart hyprpanel.service"; " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
"Reload Hyprland" = "hyprctl reload"; " Reload Hyprland" = "hyprctl reload";
"Exit Hyprland" = "hyprctl dispatch exit"; " Exit Hyprland" = "hyprctl dispatch exit";
}; };
vpn-menu = pkgs.writeScript "rofi-menu-vpn" (builtins.readFile ./menus/vpn.fish); vpn-menu = pkgs.writeScript "rofi-menu-vpn" (builtins.readFile ./menus/vpn.fish);