Change primary display don't need sketchybar

This commit is contained in:
Tyler Mayoff 2025-02-17 12:54:48 -05:00
parent 6768bdb19e
commit c1e274ab1c
No known key found for this signature in database
GPG key ID: B62A5AFAD8E14845
6 changed files with 44 additions and 64 deletions

View file

@ -57,7 +57,7 @@ inner.horizontal = 4
inner.vertical = 4 inner.vertical = 4
outer.left = 0 outer.left = 0
outer.bottom = 0 outer.bottom = 0
outer.top = 30 outer.top = 0
outer.right = 0 outer.right = 0
# 'main' binding mode declaration # 'main' binding mode declaration

View file

@ -40,6 +40,19 @@
file.".gnupg/gpg-agent.conf".text = '' file.".gnupg/gpg-agent.conf".text = ''
pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
''; '';
file.".config/sketchybar/sketchybarrc" = {
executable = true;
text = ''
#!/usr/bin/env lua
package.cpath = package.cpath .. ";${pkgs.sbarlua}/lib/lua/5.4/sketchybar.so"
-- Load the sketchybar-package and prepare the helper binaries
require("helpers")
require("init")
'';
};
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;

View file

@ -1,6 +1,8 @@
{...}: { {pkgs, ...}: {
# services.sketchybar = { services.sketchybar = {
# enable = true; # enable = true;
# extraPackages = []; extraPackages = with pkgs; [
# }; sbarlua
];
};
} }

View file

@ -1,62 +1,33 @@
{ {
lib,
stdenv, stdenv,
clang,
fetchFromGitHub, fetchFromGitHub,
gcc, gcc,
lua, readline,
nix-update-script, lua5_4,
apple-sdk_15,
versionCheckHook,
}: let }: let
inherit (stdenv.hostPlatform) system; lua = lua5_4;
target =
{
"aarch64-darwin" = "arm64";
"x86_64-darwin" = "x86";
}
.${system}
or (throw "Unsupported system: ${system}");
in in
stdenv.mkDerivation ( stdenv.mkDerivation {
finalAttrs: { pname = "SBarLua";
pname = "SBarLua"; version = "unstable-2024-02-28";
version = "437bd2031da38ccda75827cb7548e7baa4aa9978";
src = fetchFromGitHub {
repo = "SbarLua";
owner = "FelixKratz";
rev = "437bd2031da38ccda75827cb7548e7baa4aa9978";
hash = "sha256-F0UfNxHM389GhiPQ6/GFbeKQq5EvpiqQdvyf7ygzkPg=";
};
nativeBuildInputs = [ src = fetchFromGitHub {
gcc owner = "FelixKratz";
]; repo = "SbarLua";
rev = "437bd2031da38ccda75827cb7548e7baa4aa9978";
hash = "sha256-F0UfNxHM389GhiPQ6/GFbeKQq5EvpiqQdvyf7ygzkPg=";
};
buildInputs = [ nativeBuildInputs = [
apple-sdk_15 clang
lua gcc
]; ];
# buildPhase = '' buildInputs = [readline];
# make
# '';
installPhase = '' installPhase = ''
runHook preInstall mkdir -p $out/lib/lua/${lua.luaversion}/
cp -r bin/* "$out/lib/lua/${lua.luaversion}/"
mkdir -p $out/bin '';
}
ls -la
cp ./bin/sbarlua $out/bin/sbarlua
runHook postInstall
'';
meta = {
homepage = "https://github.com/FelixKratz/SbarLua";
platforms = lib.platforms.darwin;
};
}
)

View file

@ -1,5 +0,0 @@
#!/usr/bin/env lua
-- Load the sketchybar-package and prepare the helper binaries
require("helpers")
require("init")

View file

@ -1,4 +1,3 @@
-- Add the sketchybar module to the package cpath -- Add the sketchybar module to the package cpath
package.cpath = package.cpath .. ";/Users/" .. os.getenv("USER") .. "/.local/share/sketchybar_lua/?.so"
os.execute("(cd helpers && make)") os.execute("(cd helpers && make)")