Skip to content

Commit

Permalink
Added homebrew formula. 2nd
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Oct 26, 2023
1 parent a898f84 commit 8cdafab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ and
On MacOS the availability of the virtual device driver [Karabiner-DriverKit-VirtualHIDDevice](https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice) is a requirement.

Currently one has to install the [Karabiner-DriverKit-VirtualHIDDevice-3.1.0.pkg](https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/blob/main/dist/Karabiner-DriverKit-VirtualHIDDevice-3.1.0.pkg) (which is incompatible with the current [Karabiner-Elements](https://github.com/pqrs-org/Karabiner-Elements/releases) version 14.12.0). After the installation the driver has to be activated by calling:
```
/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/ Karabiner-VirtualHIDDevice-Manager activate
```
```
/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
```

Keymapper is not yet in the [homebrew](https://brew.sh) repository, but the formula [keymapper-git.rb](extra/keymapper-git.rb) is provided. The downloaded file can be installed using:
A [Homebrew](https://brew.sh) formula is provided for building and installing. It is not yet in the repository and can to be downloaded from [keymapper.rb](https://raw.githubusercontent.com/houmain/keymapper/next/extra/keymapper.rb). It can be installed using:

```
brew install --HEAD keymapper-git.rb
brew install --HEAD keymapper.rb
```

Finally `keymapperd` and `keymapper` can be added to the launchd daemons/agents by calling:
Expand Down
2 changes: 2 additions & 0 deletions extra/keymapper-launchd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ if [ $# -eq 1 ] && [ $1 == "add" ]; then
# request permissions for keymapperd to monitor input
echo "$(make_plist keymapperd -g)" > $keymapperd_as_agent_plist
as_user launchctl load $keymapperd_as_agent_plist
sleep 1
as_user launchctl unload $keymapperd_as_agent_plist
unlink $keymapperd_as_agent_plist

echo "$(make_plist keymapperd)" > $keymapperd_plist
Expand Down
5 changes: 3 additions & 2 deletions extra/keymapper-git.rb → extra/keymapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Keymapper < Formula
end

def install
system "cmake", "-B build", *std_cmake_args
system "cmake", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand All @@ -19,7 +19,8 @@ def caveats
<<~EOS
To add keymapperd and keymapper to the launchd daemons/agents call:
`sudo keymapper-launchd add`
to remove them call:
To remove them call:
`sudo keymapper-launchd remove`
EOS
end
Expand Down

0 comments on commit 8cdafab

Please sign in to comment.