nix-config/home/ironbar.nix
Donovan Glover a2fe09a166
ironbar: Don't hardcode opacity
Now the opacity will always be 0.05 less than the opacity of the
terminal.
2023-07-26 13:11:49 -04:00

141 lines
2.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, lib, ... }:
let
opacity = lib.strings.floatToString (config.stylix.opacity.terminal - 0.05);
in
{
xdg.configFile."ironbar/config.json".text = /* json */ ''
{
"icon_theme": "Fluent-dark",
"position": "bottom",
"anchor_to_edges": true,
"start": [
{
"type": "clipboard",
"max_items": 3,
"truncate": {
"length": 50,
"mode": "end"
}
}
],
"center": [
{
"type": "launcher",
"icon_size": 40,
"favorites": [
"librewolf",
"kitty",
"Thunar",
"srb2",
"org.qutebrowser.qutebrowser",
"Logseq",
"spek",
"mullvadbrowser"
]
}
],
"end": [
{
"type": "clock",
"format": "%x%a%R"
}
]
}
'';
xdg.configFile."ironbar/style.css".text = with config.lib.stylix.colors; /* css */ ''
* {
font-family: "Noto Sans CJK JP", "Font Awesome 6 Free Solid";
font-size: 16px;
text-shadow: 2px 2px #${base00};
border: none;
border-radius: 0;
outline: none;
font-weight: 500;
background: none;
color: #${base05};
}
.background {
background: alpha(#${base00}, ${opacity});
}
.clipboard {
padding-right: 1em;
}
button:hover {
background: #${base01};
}
#bar {
border-top: 1px solid #${base01};
}
.label {
padding-left: 1em;
padding-right: 1em;
}
.popup {
border: 1px solid #${base01};
padding: 1em;
}
.popup-clipboard .item {
padding-bottom: 0.3em;
}
.popup-clock .calendar-clock {
font-family: "Maple Mono";
font-size: 2.5em;
padding-bottom: 0.1em;
}
.popup-clock .calendar .header {
padding-top: 1em;
border-top: 1px solid #${base01};
font-size: 1.5em;
}
.popup-clock .calendar {
padding: 0.2em 0.4em;
}
.popup-clock .calendar:selected {
color: #${base09};
}
.launcher .item {
padding-left: 1em;
padding-right: 1em;
margin-right: 4px;
}
button:active {
background: #${base04};
}
.launcher .open {
box-shadow: inset 0 -2px;
}
.launcher .focused {
box-shadow: inset 0 -2px #${base09};
background: #${base01};
}
.popup-launcher {
padding: 0;
}
.popup-launcher .popup-item:not(:first-child) {
border-top: 1px solid #${base01};
}
'';
}