Improve rofi config

Closes #15
master
Mark 2022-11-04 21:20:18 -07:00
parent aa4ebcb292
commit e07ff152f4
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
2 changed files with 71 additions and 43 deletions

View File

@ -1,40 +1,52 @@
// Some values in this configuration will be overriden by
// options when awesome runs rofi.
//
// See util.lua in this module.
* {
// Basic colors
transparent: #00000000;
background: #000000FF;
foreground: #F2F2F2EE;
// lightening transparency
overlay-white: #F2F2F211;
background-selected: #F2F2F245;
background-active: #F2F2F230;
urgent: #E91E6366;
urgent-selected: #E91E6377;
}
configuration { configuration {
font: "Inter Regular 25"; font: "Astra Sans 25";
show-icons: true; show-icons: true;
icon-theme: "Papirus"; icon-theme: "Papirus";
drun-display-format: "{name}"; drun-display-format: "{name}";
fullscreen: false; fullscreen: false;
threads: 0;
matching: "fuzzy"; matching: "fuzzy";
scroll-method: 1; scroll-method: 1;
disable-history: false; disable-history: false;
fullscreen: false; fullscreen: false;
window-thumbnail: true; window-thumbnail: true;
} drun-match-fields: "exec, name";
* {
transparent: #00000000;
background: #000000FF;
foreground: #F2F2F2EE;
background-selected: #F2F2F245;
background-active: #F2F2F230;
background-white: #F2F2F211;
background-black: #00000066;
urgent: #E91E6366;
urgent-selected: #E91E6377;
} }
window { window {
// Overridden by awesome
y-offset: -50px;
height: 50%;
width: 25%;
transparency: "real"; transparency: "real";
background-color: @background; background-color: @background;
location: southwest; location: southwest;
anchor: southwest; anchor: southwest;
x-offset: 4px;
y-offset: -50px;
height: 800px;
width: 800px;
orientation: vertical; orientation: vertical;
border-radius: 5px; border-radius: 0px;
x-offset: 0px;
} }
prompt { prompt {
@ -42,9 +54,10 @@ prompt {
} }
button { button {
font: "FantasqueSansMono Nerd Font 25";
action: "ok"; action: "ok";
str: " "; str: " ";
font: "FantasqueSansMono Nerd Font 25";
expand: false; expand: false;
text-color: @foreground; text-color: @foreground;
background-color: @transparent; background-color: @transparent;
@ -53,7 +66,9 @@ button {
} }
entry { entry {
font: "Inter Regular 25"; // Overridden by awesome
font: "Astra Sans 25";
background-color: @transparent; background-color: @transparent;
text-color: @foreground; text-color: @foreground;
expand: true; expand: true;
@ -61,7 +76,7 @@ entry {
horizontal-align: 0.5; horizontal-align: 0.5;
placeholder: "Search"; placeholder: "Search";
placeholder-color: @foreground; placeholder-color: @foreground;
blink: true; cursor: text;
} }
case-indicator { case-indicator {
@ -74,18 +89,17 @@ case-indicator {
entry-wrapper { entry-wrapper {
orientation: horizontal; orientation: horizontal;
vertical-align: 0.5; vertical-align: 0.5;
spacing: 4px;
background-color: @transparent; background-color: @transparent;
children: [ button, entry, case-indicator ]; children: [ button, entry, case-indicator ];
} }
inputbar { inputbar {
background-color: @background-white; background-color: @overlay-white;
text-color: @foreground; text-color: @foreground;
expand: false; expand: false;
border-radius: 24px; border-radius: 2mm;
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
padding: 10px 10px 10px 10px; padding: 3mm 3mm 3mm 3mm;
position: north; position: north;
children: [ entry-wrapper ]; children: [ entry-wrapper ];
} }
@ -93,48 +107,56 @@ inputbar {
listview { listview {
background-color: @transparent; background-color: @transparent;
columns: 1; columns: 1;
spacing: 5px; spacing: 2mm;
cycle: false; cycle: false;
dynamic: true; dynamic: false;
layout: vertical; layout: vertical;
scrollbar: true;
}
scrollbar {
background-color: @overlay-white;
handle-color: @foreground;
handle-width: 2mm;
width: 3px;
padding: 1mm;
} }
mainbox { mainbox {
background-color: @background-black; background-color: @background;
children: [listview, inputbar ]; children: [ listview, inputbar ];
spacing: 25px; spacing: 10mm;
padding: 40px 25px 25px 25px; padding: 15mm 15mm 15mm 15mm;
} }
element { element {
background-color: @transparent; background-color: @transparent;
text-color: @foreground; text-color: @foreground;
orientation: horizontal; orientation: horizontal;
border-radius: 6px; border-radius: 0mm;
padding: 5px 10px 5px 10px; padding: 2mm 2mm 2mm 2mm;
} }
element-icon { element-icon {
size: 36px; size: 16mm;
border: 0; border: 0mm;
background-color: @transparent; background-color: @transparent;
text-color: inherit; text-color: inherit;
} }
element-text { element-text {
expand: true; expand: true;
horizontal-align: 0; horizontal-align: 0;
vertical-align: 0.5; vertical-align: 0.5;
margin: 0 10px 0 10px; margin: 2mm 2mm 2mm 2mm;
background-color: @transparent; background-color: @transparent;
text-color: inherit; text-color: inherit;
} }
element normal.urgent, element normal.urgent,
element alternate.urgent { element alternate.urgent {
background-color: @urgent; background-color: @urgent;
text-color: @foreground; text-color: @foreground;
border-radius: 9px;
} }
element normal.active, element normal.active,

View File

@ -3,7 +3,13 @@ local launcher = {}
local conf = conf_dir .. "modules/launcher/launcher.rasi" local conf = conf_dir .. "modules/launcher/launcher.rasi"
launcher.launcher = function() launcher.launcher = function()
awful.spawn("rofi -show drun -theme \"" .. conf .. "\"") awful.spawn(
"rofi -show drun " ..
"-theme \"" .. conf .. "\" " ..
-- Override y-offset so rofi
-- sits right above the bar.
"-theme-str \"#window{ y-offset: -" .. beautiful.dpi(config.core.bar_height) .. "; }\""
)
end end
return launcher return launcher