├── krp.rb ├── skhd.rb └── yabai.rb /krp.rb: -------------------------------------------------------------------------------- 1 | class Krp < Formula 2 | desc "Utility to adjust keyrepeat settings for MacOS." 3 | homepage "https://github.com/koekeishiya/krp" 4 | url "https://github.com/koekeishiya/krp/releases/download/v1.0.0/krp-1.0.0.zip" 5 | sha256 "8fe6ead50a5a623f2e9667c85c08badfb0f4adfdd56b891163afe0ce270c09d0" 6 | 7 | def install 8 | bin.install "krp" 9 | end 10 | 11 | test do 12 | system "#{bin}/krp", "--version" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /skhd.rb: -------------------------------------------------------------------------------- 1 | class Skhd < Formula 2 | desc "Simple hotkey-daemon for macOS." 3 | homepage "https://github.com/koekeishiya/skhd" 4 | url "https://github.com/koekeishiya/skhd/archive/v0.3.9.zip" 5 | sha256 "3832df8b3a7156f2a3d512c6fae8b4cb8bbd2b8a484ab672508788a2c46b72a2" 6 | head "https://github.com/koekeishiya/skhd.git" 7 | 8 | def install 9 | ENV.deparallelize 10 | system "make", "-j1", "install" 11 | system "codesign", "-fs", "-", "#{buildpath}/bin/skhd" 12 | bin.install "#{buildpath}/bin/skhd" 13 | (pkgshare/"examples").install "#{buildpath}/examples/skhdrc" 14 | end 15 | 16 | def caveats; <<~EOS 17 | Copy the example configuration into your home directory: 18 | cp #{opt_pkgshare}/examples/skhdrc ~/.skhdrc 19 | 20 | If you want skhd to be managed by launchd (start automatically upon login): 21 | skhd --start-service 22 | 23 | When running as a launchd service logs will be found in: 24 | /tmp/skhd_.[out|err].log 25 | EOS 26 | end 27 | 28 | test do 29 | assert_match "skhd-v#{version}", shell_output("#{bin}/skhd --version") 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /yabai.rb: -------------------------------------------------------------------------------- 1 | class Yabai < Formula 2 | desc "A tiling window manager for macOS based on binary space partitioning." 3 | homepage "https://github.com/koekeishiya/yabai" 4 | url "https://github.com/koekeishiya/yabai/releases/download/v7.1.15/yabai-v7.1.15.tar.gz" 5 | sha256 "865009aa5c1c52635b5b6805634ce574080cd581101dea4ef1280739c34b8f02" 6 | head "https://github.com/koekeishiya/yabai.git" 7 | 8 | depends_on :macos => :big_sur 9 | 10 | def install 11 | man.mkpath 12 | 13 | if build.head? 14 | system "make", "-j1", "install" 15 | system "codesign", "-fs", "-", "#{buildpath}/bin/yabai" 16 | end 17 | 18 | bin.install "#{buildpath}/bin/yabai" 19 | (pkgshare/"examples").install "#{buildpath}/examples/yabairc" 20 | (pkgshare/"examples").install "#{buildpath}/examples/skhdrc" 21 | man1.install "#{buildpath}/doc/yabai.1" 22 | end 23 | 24 | def caveats; <<~EOS 25 | Copy the example configuration into your home directory: 26 | cp #{opt_pkgshare}/examples/yabairc ~/.yabairc 27 | cp #{opt_pkgshare}/examples/skhdrc ~/.skhdrc 28 | 29 | If you want yabai to be managed by launchd (start automatically upon login): 30 | yabai --start-service 31 | 32 | When running as a launchd service logs will be found in: 33 | /tmp/yabai_.[out|err].log 34 | 35 | If you are using the scripting-addition; remember to update your sudoers file: 36 | sudo visudo -f /private/etc/sudoers.d/yabai 37 | 38 | Build the configuration row by running: 39 | echo "$(whoami) ALL=(root) NOPASSWD: sha256:$(shasum -a 256 $(\which yabai) | cut -d " " -f 1) $(\which yabai) --load-sa" 40 | 41 | README: https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition 42 | EOS 43 | end 44 | 45 | test do 46 | assert_match "yabai-v#{version}", shell_output("#{bin}/yabai --version") 47 | end 48 | end 49 | --------------------------------------------------------------------------------