Skip to content
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

Open
vkravets opened this issue May 27, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@vkravets
Copy link

vkravets commented May 27, 2024

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

bool is_executable = buffer.st_mode & S_IXUSR;

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

    launchd.user.agents.sketchybar = {
      path = [ pkgs.sketchybar ] ++ [ pkgs.sketchybar-app-font ] ++ [ config.environment.systemPath ];
      serviceConfig.ProgramArguments = [ "${pkgs.sketchybar}/bin/sketchybar" ] ++ ["--config" "${self}/sketchybar/sketchybarrc"];
      serviceConfig.KeepAlive = true;
      serviceConfig.RunAtLoad = true;
    };

Where self it's my flake configuration inherits to system configuration and to home-manager configuration via specialArgs and extraSpecialArgs.

Note: nix-darwin solution works since create the service using real path to configuration, not symlink

@vkravets vkravets changed the title Cannot run SketcyBar if configuration is execeutable symbolic link Cannot run SketchyBar if configuration is execeutable symbolic link May 27, 2024
@FelixKratz FelixKratz added the bug Something isn't working label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants