Change color of result
Tiv0w opened this issue · comments
Hi!
First a big thanks for rofi-calc, I use it all the time!
I'm using pywal
to automate theming of my machine, but I encounter a serious problem with rofi-calc
: the result part is always black.
This is an issue since most of my color schemes are somewhat dark, or at least my rofi
theme is dark, so I can't really see the result.
result very hard to see in the screenshot
I tried to tweak multiple colors in my rofi theme, no luck.
I took a look in the source of rofi-calc
, but I can't find where the color of the output is controlled, nor the css id of the result...
So my question is: is there anything related to the color configuration in rofi-calc
? If not, how can I access the result from rofi
?
Hm weird. I don't really have time to investigate right now but feel free to poke the code a bit. I don't really do much magic on top of rofi in terms of styling so things that work for rofi should in theory also work for rofi-calc.
You just need to set a default text-color
in the global part of your theme file, so something like:
* {
text-color: #18619e;
}
I experimented a little bit and found out, that the rofi-calc is using the message element. Sample config:
configuration {
calc {
display-name: "";
}
}
* {
background: #343944;
text: #dddddd;
selected: #e25252;
background-color: rgba ( 0, 0, 0, 0 % );
font: "JetBrainsMono Nerd Font Medium 18";
text-color: var(text);
}
window {
background-color: var(background);
width: 120ch;
border-radius: 5px;
}
listview {
lines: 0;
}
inputbar {
padding: 3ch 3ch 3ch 3ch;
children: [ prompt, entry ];
}
entry {
placeholder-color: var(text);
text-color: var(text);
placeholder: "";
cursor: text;
}
message {
border: 2px 0 0 0;
border-color: var(selected);
padding: 1.5ch 3ch 1.5ch 3ch;
vertical-align: 0.5;
}
I have tweaked the command a little bit too:
rofi -modi calc -show calc -kb-accept-custom Return -kb-accept-entry KP_Enter -no-history -no-persist-history -calc-command "echo -n '{result}' | xclip -selection clipboard" -theme ~/.config/rofi/arc-dark-calc.rasi
NOTE: This config is tested on a 4k monitor, so you might get a different result, I haven't tested it somewhere else.
I'm closing this issue for now as it seems fixed in the sense that there's a config that'll get OP what's desired. I'd be totally happy about someone adding a note for this to the README if someone wants to do that.