From fddf9cef32e7ed6afbfe8c1e847ff302e327dbcc Mon Sep 17 00:00:00 2001 From: shelken Date: Sun, 15 Sep 2024 03:14:13 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20icebar,=20dariwn=20defaults?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/darwin/wm/default.nix | 1 + home/darwin/wm/ice-bar.nix | 28 ++++++++++++++++++++++++++++ hosts/yuuko/home.nix | 5 ++++- modules/darwin/apps.nix | 2 +- modules/darwin/system.nix | 28 ++++++++++++++++++++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 home/darwin/wm/ice-bar.nix diff --git a/home/darwin/wm/default.nix b/home/darwin/wm/default.nix index 0c5182c..5fac91d 100644 --- a/home/darwin/wm/default.nix +++ b/home/darwin/wm/default.nix @@ -1,5 +1,6 @@ {...}: { imports = [ ./aerospace.nix + ./ice-bar.nix ]; } diff --git a/home/darwin/wm/ice-bar.nix b/home/darwin/wm/ice-bar.nix new file mode 100644 index 0000000..f09242d --- /dev/null +++ b/home/darwin/wm/ice-bar.nix @@ -0,0 +1,28 @@ +{ + lib, + mylib, + config, + pkgs, + # 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 iceBar."; + }; + + config = mkIf cfg.enable { + # xdg.configFile = { + # "aerospace/aerospace.toml" = { + # source = ./aerospace/aerospace.toml; + # }; + # }; + + home.packages = with pkgs; [ + ice-bar + ]; + }; +} diff --git a/hosts/yuuko/home.nix b/hosts/yuuko/home.nix index cf22aac..23c23a0 100644 --- a/hosts/yuuko/home.nix +++ b/hosts/yuuko/home.nix @@ -3,7 +3,10 @@ # inherit (myvars.networking.ssh) extraConfig; # }; shelken = { - wm.aerospace.enable = true; + wm = { + aerospace.enable = true; + iceBar.enable = true; + }; secrets.enable = true; }; } diff --git a/modules/darwin/apps.nix b/modules/darwin/apps.nix index 8f28e0c..539aa0e 100644 --- a/modules/darwin/apps.nix +++ b/modules/darwin/apps.nix @@ -161,7 +161,7 @@ in { "stats" # beautiful system status monitor in menu bar # "appcleaner" # app uninstall # "applite" # homebrew ui; need macOS 13+ - "hiddenbar" # menubar plugin + # "hiddenbar" # menubar plugin # "picgo" # picbed "the-unarchiver" # zip,unzip # "imageoptim" # image compress diff --git a/modules/darwin/system.nix b/modules/darwin/system.nix index f08bb03..3c9b76e 100644 --- a/modules/darwin/system.nix +++ b/modules/darwin/system.nix @@ -145,6 +145,34 @@ "company.thebrowser.Browser" = { currentAppIconName = "flutedGlass"; }; + # Stats + "eu.exelban.Stats" = { + # "Battery_state" = 0; + # "CPU_state" = 1; + LaunchAtLoginNext = 1; + "Network_state" = 1; + runAtLoginInitialized = 1; + # setupProcess = 1; + "update-interval" = "Never"; + }; + # ice-bar + "com.jordanbaird.Ice" = { + AutoRehide = 1; + CanToggleAlwaysHiddenSection = 1; + # CustomIceIconIsTemplate = 0; + # NSColorPanelMode = 4; + # NSColorPickerPreferredRGBEntryMode = 2; + SUAutomaticallyUpdate = 0; + SUEnableAutomaticChecks = 0; + # SUHasLaunchedBefore = 1; + ShowIceIcon = 0; + ShowOnClick = 1; + ShowOnHover = 0; + ShowOnScroll = 1; + ShowSectionDividers = 0; + # "hasMigrated0_8_0" = 1; + # MenuBarAppearanceConfiguration = "{bytes = 0x7b226861 73426f72 64657222 3a66616c ... 2f5c2f38 3d227d7d }"; + }; }; loginwindow = {