nix-config/home/ironbar.nix

146 lines
3.0 KiB
Nix
Raw Normal View History

{ config, ... }:
2023-07-05 06:36:38 +02:00
{
xdg.configFile."ironbar/config.json".text = /* json */ ''
{
"name": "main",
"icon_theme": "Fluent-dark",
"position": "bottom",
"anchor_to_edges": true,
2023-07-04 19:31:19 +02:00
"start": [
{
"type": "label",
"label": "",
"on_mouse_enter": "rofi -show drun"
},
{
"type": "script",
"on_click_left": "notify-send -t 2000 \"Mullvad\" \"Changing location...\" && mullvad relay set location any && mullvad relay set location us",
"cmd": "mullvad status | choose 2..",
"mode": "poll",
"interval": 5000
2023-07-04 19:31:19 +02:00
}
],
"center": [
{
"type": "launcher",
"icon_size": 39,
"favorites": [
"librewolf",
"kitty",
"thunar",
"audacity",
"Gimp-2.10",
"org.qutebrowser.qutebrowser",
"Logseq",
"spek",
"Mullvad Browser"
]
}
],
"end": [
2024-01-28 11:19:18 +01:00
{
"type": "tray"
},
2024-01-30 00:33:09 +01:00
{
"type": "script",
"cmd": "fish -c 'echo \"$(math \"$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1) * 100\")%\"'",
"mode": "poll",
"interval": 2500
},
{
"type": "clock",
"format": "%x%a%R"
}
]
}
'';
2023-07-05 06:36:38 +02:00
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;
2023-07-05 15:20:32 +02:00
color: #${base05};
}
.background {
background: alpha(#${base00}, 0.925);
}
button:hover {
2023-07-05 15:20:32 +02:00
background: #${base01};
}
#bar {
2023-07-05 15:20:32 +02:00
border-top: 1px solid #${base01};
padding-left: 0.5em;
}
.label, .script, .tray {
padding-left: 0.5em;
padding-right: 0.5em;
2023-07-21 20:10:10 +02:00
}
.popup {
2023-07-05 15:20:32 +02:00
border: 1px solid #${base01};
padding: 1em;
}
.popup-clock .calendar-clock {
font-family: "Maple Mono";
font-size: 2.5em;
padding-bottom: 0.1em;
}
.popup-clock .calendar .header {
padding-top: 1em;
2023-07-05 15:20:32 +02:00
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 #${base04};
}
.launcher .focused {
2023-07-05 15:20:32 +02:00
box-shadow: inset 0 -2px #${base09};
background: #${base01};
}
.popup-launcher {
padding: 0;
}
.popup-launcher .popup-item:not(:first-child) {
2023-07-05 15:20:32 +02:00
border-top: 1px solid #${base01};
}
'';
}