feat(darwin)!: rewrite sketchybar
config
- Now written in `Clojure`, using `Babashka` Checked with `clj-kondo` - Add TODO for module upstreaming (of allowing file or script for `config`) - Set `yabai` `window_border_radius` to `0` - Fix ` battery` script (`grep` does not do `\d`)
This commit is contained in:
parent
31f9e7dbef
commit
10a013d6a6
5 changed files with 266 additions and 163 deletions
modules/nix-darwin/yabai
|
@ -36,24 +36,46 @@ in
|
|||
${builtins.readFile ./yabairc}
|
||||
|
||||
# Load JankyBorders
|
||||
${borders}/bin/borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0 &
|
||||
${borders}/bin/borders active_color=0xffe1e3e4 inactive_color=0xff494d64 style=squared width=5.0 &
|
||||
'';
|
||||
};
|
||||
|
||||
skhd = {
|
||||
enable = true;
|
||||
package = pkgs.skhd;
|
||||
skhdConfig = (builtins.readFile ./skhdrc);
|
||||
skhdConfig = builtins.readFile ./skhdrc;
|
||||
};
|
||||
|
||||
sketchybar = {
|
||||
enable = true;
|
||||
# sketchybar = {
|
||||
# enable = true;
|
||||
# package = pkgs.sketchybar;
|
||||
# extraPackages = with pkgs; [
|
||||
# jq
|
||||
# ];
|
||||
# config = import (lib.getExe (pkgs.callPackage ./sketchybar { }));
|
||||
# };
|
||||
};
|
||||
|
||||
# TODO: make builtin module work with scripts
|
||||
launchd.user.agents.sketchybar = let
|
||||
cfg = rec {
|
||||
package = pkgs.sketchybar;
|
||||
extraPackages = with pkgs; [
|
||||
jq
|
||||
];
|
||||
config = import ./sketchybar pkgs;
|
||||
configFile = lib.getExe (pkgs.callPackage ./sketchybar { sketchybar = package; });
|
||||
};
|
||||
in {
|
||||
path = [ cfg.package ] ++ cfg.extraPackages ++ [ config.environment.systemPath ];
|
||||
serviceConfig.ProgramArguments =
|
||||
[
|
||||
"${lib.getExe cfg.package}"
|
||||
] ++ optionals (cfg.configFile != null) [
|
||||
"--config"
|
||||
"${cfg.configFile}"
|
||||
];
|
||||
serviceConfig.KeepAlive = true;
|
||||
serviceConfig.RunAtLoad = true;
|
||||
};
|
||||
|
||||
# For sketchybar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue