Add separate rofi configs like jakoolits

This commit is contained in:
Tyler Kelley 2024-05-22 21:32:57 -05:00
parent 468c32a8f0
commit 9cfd7ba99c
4 changed files with 238 additions and 200 deletions

View File

@ -0,0 +1,11 @@
{ ... }:
{
home.file.".config/rofi/config-emoji.rasi".text = ''
@import "~/.config/rofi/config-long.rasi"
entry {
width: 45%;
placeholder: "🔎 Search Emoji's 👀";
}
'';
}

View File

@ -0,0 +1,18 @@
{ ... }:
{
home.file.".config/rofi/config-long.rasi".text = ''
@import "~/.config/rofi/config.rasi"
window {
width: 50%;
}
entry {
placeholder: "🔎 Search ";
}
listview {
columns: 1;
lines: 8;
scrollbar: true;
}
'';
}

208
config/rofi/rofi.nix Normal file
View File

@ -0,0 +1,208 @@
{
pkgs,
config,
...
}:
{
programs = {
rofi = {
enable = true;
package = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; };
extraConfig = {
modi = "drun,emoji,filebrowser,run";
show-icons = true;
icon-theme = "Papirus";
location = 0;
font = "JetBrainsMono Nerd Font Mono 12";
drun-display-format = "{icon} {name}";
display-drun = " Apps ";
display-run = " Run ";
display-filebrowser = " File ";
display-emoji = " Emoji ";
hover-select = true;
me-select-entry = "MouseSecondary";
me-accept-entry = "MousePrimary";
};
theme = let inherit (config.lib.formats.rasi) mkLiteral; in {
"*" = {
bg = mkLiteral "#${config.stylix.base16Scheme.base00}";
bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}";
foreground = mkLiteral "#${config.stylix.base16Scheme.base01}";
selected = mkLiteral "#${config.stylix.base16Scheme.base08}";
active = mkLiteral "#${config.stylix.base16Scheme.base0B}";
text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}";
text-color = mkLiteral "#${config.stylix.base16Scheme.base05}";
border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}";
urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}";
};
"window" = {
width = mkLiteral "50%";
transparency = "real";
orientation = mkLiteral "vertical";
cursor = mkLiteral "default";
spacing = mkLiteral "0px";
border = mkLiteral "2px";
border-color = "@border-color";
border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg";
};
"mainbox" = {
padding = mkLiteral "15px";
enabled = true;
orientation = mkLiteral "vertical";
children = map mkLiteral [ "inputbar" "listbox" ];
background-color = mkLiteral "transparent";
};
"inputbar" = {
enabled = true;
padding = mkLiteral "10px 10px 200px 10px";
margin = mkLiteral "10px";
background-color = mkLiteral "transparent";
border-radius = "25px";
orientation = mkLiteral "horizontal";
children = map mkLiteral ["entry" "dummy" "mode-switcher" ];
background-image = mkLiteral ''url("~/Pictures/Wallpapers/zaney-wallpaper.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" = {
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
background-color = mkLiteral "transparent";
orientation = mkLiteral "vertical";
children = map mkLiteral [ "message" "listview" ];
};
"listview" = {
enabled = true;
columns = 2;
lines = 6;
cycle = true;
dynamic = true;
scrollbar = false;
layout = mkLiteral "vertical";
reverse = false;
fixed-height = false;
fixed-columns = true;
spacing = mkLiteral "10px";
background-color = mkLiteral "transparent";
border = mkLiteral "0px";
};
"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" = {
enabled = true;
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
border-radius = mkLiteral "12px";
background-color = mkLiteral "transparent";
cursor = mkLiteral "pointer";
};
"element normal.normal" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"element normal.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@foreground";
};
"element normal.active" = {
background-color = mkLiteral "@active";
text-color = mkLiteral "@foreground";
};
"element selected.normal" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@text-selected";
};
"element selected.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-selected";
};
"element selected.active" = {
background-color = mkLiteral "@urgent";
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" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
size = mkLiteral "36px";
cursor = mkLiteral "inherit";
};
"element-text" = {
background-color = mkLiteral "transparent";
font = "JetBrainsMono Nerd Font Mono 12";
text-color = mkLiteral "inherit";
cursor = mkLiteral "inherit";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"message" = {
background-color = mkLiteral "transparent";
border = mkLiteral "0px";
};
"textbox" = {
padding = mkLiteral "12px";
border-radius = mkLiteral "10px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@bg";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"error-message" = {
padding = mkLiteral "12px";
border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@bg";
};
};
};
};
}

View File

@ -3,7 +3,6 @@
inputs,
username,
host,
config,
...
}:
let
@ -22,6 +21,7 @@ in
imports = [
inputs.hyprland.homeManagerModules.default
../../config/hyprland.nix
../../config/rofi.nix
../../config/swaync.nix
../../config/waybar.nix
../../config/wlogout.nix
@ -253,205 +253,6 @@ in
enable = true;
package = pkgs.starship;
};
rofi = {
enable = true;
package = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; };
extraConfig = {
modi = "drun,emoji,filebrowser,run";
show-icons = true;
icon-theme = "Papirus";
location = 0;
font = "JetBrainsMono Nerd Font Mono 16";
drun-display-format = "{icon} {name}";
display-drun = " Apps ";
display-run = " Run ";
display-filebrowser = " File ";
display-emoji = " Emoji ";
hover-select = true;
me-select-entry = "MouseSecondary";
me-accept-entry = "MousePrimary";
dpi = 1;
};
theme = let inherit (config.lib.formats.rasi) mkLiteral; in {
"*" = {
bg = mkLiteral "#${config.stylix.base16Scheme.base00}";
bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}";
foreground = mkLiteral "#${config.stylix.base16Scheme.base01}";
selected = mkLiteral "#${config.stylix.base16Scheme.base08}";
active = mkLiteral "#${config.stylix.base16Scheme.base0B}";
text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}";
text-color = mkLiteral "#${config.stylix.base16Scheme.base05}";
border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}";
urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}";
};
"window" = {
width = mkLiteral "50%";
transparency = "real";
orientation = mkLiteral "vertical";
cursor = mkLiteral "default";
spacing = mkLiteral "0px";
border = mkLiteral "2px";
border-color = "@border-color";
border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg";
};
"mainbox" = {
padding = mkLiteral "15px";
enabled = true;
orientation = mkLiteral "vertical";
children = map mkLiteral [ "inputbar" "listbox" ];
background-color = mkLiteral "transparent";
};
"inputbar" = {
enabled = true;
padding = mkLiteral "10px 10px 200px 10px";
margin = mkLiteral "10px";
background-color = mkLiteral "transparent";
border-radius = "25px";
orientation = mkLiteral "horizontal";
children = map mkLiteral ["entry" "dummy" "mode-switcher" ];
background-image = mkLiteral "url('~/Pictures/Wallpapers/zaney-wallpaper.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" = {
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
background-color = mkLiteral "transparent";
orientation = mkLiteral "vertical";
children = map mkLiteral [ "message" "listview" ];
};
"listview" = {
enabled = true;
columns = 2;
lines = 6;
cycle = true;
dynamic = true;
scrollbar = false;
layout = mkLiteral "vertical";
reverse = false;
fixed-height = false;
fixed-columns = true;
spacing = mkLiteral "10px";
background-color = mkLiteral "transparent";
border = mkLiteral "0px";
};
"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" = {
enabled = true;
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
border-radius = mkLiteral "12px";
background-color = mkLiteral "transparent";
cursor = mkLiteral "pointer";
};
"element normal.normal" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"element normal.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@foreground";
};
"element normal.active" = {
background-color = mkLiteral "@active";
text-color = mkLiteral "@foreground";
};
"element selected.normal" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@text-selected";
};
"element selected.urgent" = {
background-color = mkLiteral "@urgent";
text-color = mkLiteral "@text-selected";
};
"element selected.active" = {
background-color = mkLiteral "@urgent";
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" = {
background-color = mkLiteral "transparent";
text-color = mkLiteral "inherit";
size = mkLiteral "36px";
cursor = mkLiteral "inherit";
};
"element-text" = {
background-color = mkLiteral "transparent";
font = "JetBrainsMono Nerd Font Mono 14";
text-color = mkLiteral "inherit";
cursor = mkLiteral "inherit";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"message" = {
background-color = mkLiteral "transparent";
border = mkLiteral "0px";
};
"textbox" = {
padding = mkLiteral "12px";
border-radius = mkLiteral "10px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@bg";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
};
"error-message" = {
padding = mkLiteral "12px";
border-radius = mkLiteral "20px";
background-color = mkLiteral "@bg-alt";
text-color = mkLiteral "@bg";
};
};
};
bash = {
enable = true;
enableCompletion = true;