mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
chore(nix): Prefer builtins.toJSON where possible
This commit is contained in:
parent
6dde83cea9
commit
a4bdf7a076
114
home/ironbar.nix
114
home/ironbar.nix
@ -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": [
|
||||
{
|
||||
"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
|
||||
}
|
||||
],
|
||||
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;
|
||||
}
|
||||
];
|
||||
|
||||
"center": [
|
||||
{
|
||||
"type": "launcher",
|
||||
"icon_size": 39,
|
||||
"favorites": [
|
||||
"librewolf",
|
||||
"kitty",
|
||||
"thunar",
|
||||
"org.qutebrowser.qutebrowser",
|
||||
"anki",
|
||||
"Element"
|
||||
]
|
||||
}
|
||||
],
|
||||
center = [
|
||||
{
|
||||
type = "launcher";
|
||||
icon_size = 39;
|
||||
favorites = [
|
||||
"librewolf"
|
||||
"kitty"
|
||||
"thunar"
|
||||
"org.qutebrowser.qutebrowser"
|
||||
"anki"
|
||||
"Element"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
'';
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."ironbar/style.css".text = with config.lib.stylix.colors; /* css */ ''
|
||||
* {
|
||||
|
Loading…
Reference in New Issue
Block a user