services.rb 975 B

12345678910111213141516171819202122232425262728293031
  1. # frozen_string_literal: true
  2. # This is necessary to let `brew services` fall through to the actual handler for it =]
  3. require_relative "../../../homebrew/homebrew-services/cmd/services"
  4. # We need to require this ourselves so that when homebrew-services requires it on its own, Ruby won't reload that shit and kill our magic ;;]];];
  5. require_relative "../../../homebrew/homebrew-services/lib/service/system"
  6. opoo "You have homebrew-services-bg installed on a non-macOS system, which doesn't do anything\n\n" if !OS.mac?
  7. module Service
  8. module System
  9. # This seems to be necessary so the domain_target method gets defined in the proper namespace (otherwise there's no override lel)
  10. module_function
  11. # Otherwise el alias no werkies ;_;
  12. class << self
  13. alias bg_domain_target domain_target
  14. end
  15. # Bighekkem
  16. def domain_target
  17. target = bg_domain_target()
  18. if target.start_with?("gui/")
  19. target.sub("gui/", "user/")
  20. else
  21. target
  22. end
  23. end
  24. end
  25. end