chore(nix): Prefer builtins.toJSON where possible

This commit is contained in:
Donovan Glover 2024-04-02 14:46:28 -04:00
parent 6dde83cea9
commit a4bdf7a076
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -1,67 +1,65 @@
{ config, ... }:
{
xdg.configFile."ironbar/config.json".text = /* json */ ''
{
"name": "main",
"icon_theme": "Fluent-dark",
"position": "bottom",
"anchor_to_edges": true,
xdg.configFile."ironbar/config.json".text = builtins.toJSON {
name = "main";
icon_theme = "Fluent-dark";
position = "bottom";
anchor_to_edges = true;
"start": [
start = [
{
"name": "startMenu",
"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 4.. | sed -e 's/Chicago.*//g' -e 's/Atlanta.*//g' -e 's/Miami.*//g' -e 's/Ashburn.*//g' -e 's/Boston.*//g' -e 's/Charlotte.*//g' -e 's/Cleveland.*//g' -e 's/Dallas.*//g' -e 's/Detroit.*//g' -e 's/Denver.*//g' -e 's/Honolulu.*//g' -e 's/Houston.*//g' -e 's/Jackson.*//g' -e 's/Los Angeles.*//g' -e 's/Louisville.*//g' -e 's/Milwaukee.*//g' -e 's/Minneapolis.*//g' -e 's/New York.*//g' -e 's/Oklahoma.*//g' -e 's/Philadelphia.*//g' -e 's/Phoenix.*//g' -e 's/Piscataway.*//g' -e 's/Portland.*//g' -e 's/Raleigh.*//g' -e 's/Richmond.*//g' -e 's/Salt Lake.*//g' -e 's/San Francisco.*//g' -e 's/San Jose.*//g' -e 's/Seattle.*//g' -e 's/Secaucus.*//g' -e 's/Sioux Falls.*//g' -e 's/St. Louis.*//g' -e 's/Stamford.*//g' -e 's/Washington.*//g'",
"mode": "poll",
"interval": 2500
name = "startMenu";
type = "label";
label = "";
on_mouse_enter = "rofi -show drun";
}
],
"center": [
{
"type": "launcher",
"icon_size": 39,
"favorites": [
"librewolf",
"kitty",
"thunar",
"org.qutebrowser.qutebrowser",
"anki",
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 4.. | sed -e 's/Chicago.*//g' -e 's/Atlanta.*//g' -e 's/Miami.*//g' -e 's/Ashburn.*//g' -e 's/Boston.*//g' -e 's/Charlotte.*//g' -e 's/Cleveland.*//g' -e 's/Dallas.*//g' -e 's/Detroit.*//g' -e 's/Denver.*//g' -e 's/Honolulu.*//g' -e 's/Houston.*//g' -e 's/Jackson.*//g' -e 's/Los Angeles.*//g' -e 's/Louisville.*//g' -e 's/Milwaukee.*//g' -e 's/Minneapolis.*//g' -e 's/New York.*//g' -e 's/Oklahoma.*//g' -e 's/Philadelphia.*//g' -e 's/Phoenix.*//g' -e 's/Piscataway.*//g' -e 's/Portland.*//g' -e 's/Raleigh.*//g' -e 's/Richmond.*//g' -e 's/Salt Lake.*//g' -e 's/San Francisco.*//g' -e 's/San Jose.*//g' -e 's/Seattle.*//g' -e 's/Secaucus.*//g' -e 's/Sioux Falls.*//g' -e 's/St. Louis.*//g' -e 's/Stamford.*//g' -e 's/Washington.*//g'";
mode = "poll";
interval = 2500;
}
];
center = [
{
type = "launcher";
icon_size = 39;
favorites = [
"librewolf"
"kitty"
"thunar"
"org.qutebrowser.qutebrowser"
"anki"
"Element"
]
];
}
],
];
"end": [
end = [
{
"type": "tray"
},
{
"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"
},
{
"name": "overview",
"type": "label",
"label": "",
"on_mouse_enter": "hyprctl dispatch hycov:toggleoverview"
type = "tray";
}
]
{
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";
}
{
name = "overview";
type = "label";
label = "";
on_mouse_enter = "hyprctl dispatch hycov:toggleoverview";
}
];
};
xdg.configFile."ironbar/style.css".text = with config.lib.stylix.colors; /* css */ ''
* {