From 28634cefd6c47f8f3c922030887371936de43490 Mon Sep 17 00:00:00 2001 From: shelken Date: Mon, 23 Sep 2024 03:16:51 +0800 Subject: [PATCH] fix ice-bar --- home/darwin/wm/ice-bar.nix | 6 +++--- hosts/mio/default.nix | 5 ++++- hosts/yuuko/default.nix | 5 ++++- modules/darwin/apps.nix | 2 +- modules/darwin/wm/aerospace.nix | 4 ++++ modules/darwin/wm/default.nix | 1 + modules/darwin/wm/ice-bar.nix | 26 ++++++++++++++++++++++++++ 7 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 modules/darwin/wm/ice-bar.nix diff --git a/home/darwin/wm/ice-bar.nix b/home/darwin/wm/ice-bar.nix index f09242d..5a597ea 100644 --- a/home/darwin/wm/ice-bar.nix +++ b/home/darwin/wm/ice-bar.nix @@ -21,8 +21,8 @@ in { # }; # }; - home.packages = with pkgs; [ - ice-bar - ]; + # home.packages = with pkgs; [ + # ice-bar + # ]; }; } diff --git a/hosts/mio/default.nix b/hosts/mio/default.nix index 91ba55e..91f9f28 100644 --- a/hosts/mio/default.nix +++ b/hosts/mio/default.nix @@ -7,5 +7,8 @@ in { imports = [ ./apps.nix ]; - shelken.wm.aerospace.enable = true; + shelken.wm = { + aerospace.enable = true; + iceBar.enable = true; + }; } diff --git a/hosts/yuuko/default.nix b/hosts/yuuko/default.nix index 6f0a20e..6e10457 100644 --- a/hosts/yuuko/default.nix +++ b/hosts/yuuko/default.nix @@ -7,5 +7,8 @@ in { imports = [ ./apps.nix ]; - shelken.wm.aerospace.enable = true; + shelken.wm = { + aerospace.enable = true; + iceBar.enable = true; + }; } diff --git a/modules/darwin/apps.nix b/modules/darwin/apps.nix index 539aa0e..4cc8ef4 100644 --- a/modules/darwin/apps.nix +++ b/modules/darwin/apps.nix @@ -159,7 +159,7 @@ in { # "iina" # video player "raycast" # macOS 12+ (HotKey: alt/option + space)search, calculate and run scripts(with many plugins) "stats" # beautiful system status monitor in menu bar - # "appcleaner" # app uninstall + "appcleaner" # app uninstall # "applite" # homebrew ui; need macOS 13+ # "hiddenbar" # menubar plugin # "picgo" # picbed diff --git a/modules/darwin/wm/aerospace.nix b/modules/darwin/wm/aerospace.nix index cdb3277..2356b51 100644 --- a/modules/darwin/wm/aerospace.nix +++ b/modules/darwin/wm/aerospace.nix @@ -19,6 +19,10 @@ in { casks = [ "aerospace" ]; + brews = [ + # janky borders; for aerospace; need macOS 14+ + "borders" + ]; }; }; } diff --git a/modules/darwin/wm/default.nix b/modules/darwin/wm/default.nix index 77c7a58..a958620 100644 --- a/modules/darwin/wm/default.nix +++ b/modules/darwin/wm/default.nix @@ -3,6 +3,7 @@ ./skhd.nix ./yabai.nix ./aerospace.nix + ./ice-bar.nix # ./sketchybar.nix ]; } diff --git a/modules/darwin/wm/ice-bar.nix b/modules/darwin/wm/ice-bar.nix new file mode 100644 index 0000000..49fb1a5 --- /dev/null +++ b/modules/darwin/wm/ice-bar.nix @@ -0,0 +1,26 @@ +{ + lib, + mylib, + config, + # options, + ... +}: let + inherit (lib) mkIf; + inherit (mylib) mkBoolOpt; + cfg = config.shelken.wm.iceBar; +in { + options.shelken.wm.iceBar = { + enable = mkBoolOpt false "Whether or not to enable."; + }; + + config = mkIf cfg.enable { + # 版本差异的 + homebrew = { + casks = [ + "jordanbaird-ice" + ]; + brews = [ + ]; + }; + }; +}