-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run SketchyBar if configuration is execeutable symbolic link #553
Comments
@vkravets I encountered the same issue, and here’s how I resolved it: I moved my entire Sketchybar configuration (including the sketchybarrc file and all associated shell scripts) under a central config directory. Then, I symlinked the whole directory with the following line in my Home Manager configuration:
You can check out my setup here for reference: nix-setup/home/darwin/sketchybar/default.nix Hope this helps! |
I have encountered a similar problem trying to configure Sketchybar with Home-Manager. I've tried @neversad-dev approach of symlinking the directory: {
pkgs,
config,
...
}: let
# Sketchybar package to use.
sketchybar = pkgs.sketchybar;
in {
home.packages = [sketchybar];
# Sketchybar configuration directory.
home.file.".config/sketchybar" = {
source = ./config;
recursive = false;
};
# Add Sketchybar to the user's launchd agents.
launchd.agents.sketchybar = {
enable = true;
config = {
Label = "sketchybar";
ProgramArguments = [
"${sketchybar}/bin/sketchybar"
];
RunAtLoad = true;
KeepAlive = true;
};
};
} Then, inside the #!/bin/bash
# Bar properties.
bar=(
height=39
shadow=on
margin=30
color=0xff9b9b9b
)
sketchybar --bar "${bar[@]}"
sketchybar --update
echo "Sketchybar configuration loaded." However, when rebuild the Home-Manager configuration, Sketchybar shows the default bar: Any idea on what's going wrong? |
In case of nix all config files are symlink. The SketcyBar check if config file is executable (and it will be false in case of symlink, even if target is executable) and try to set the execute permission and it's fail since it's a nix )))
It seems issue is arising here
SketchyBar/src/misc/helpers.h
Line 427 in 4aa602a
and this code for executable symlink won't return true
I don't have knowladge of c++ to fix this, so please aware of the issue related to symlinked configuration
in my case I've fixed it, by manualy configure launchctl service using following changes at my configuration and don't using the nix-darwin service for the integration
Where
self
it's my flake configuration inherits to system configuration and to home-manager configuration viaspecialArgs
andextraSpecialArgs
.Note: nix-darwin solution works since create the service using real path to configuration, not symlink
The text was updated successfully, but these errors were encountered: