2016-10-04 20:45:39 +08:00
|
|
|
cask 'karabiner-elements' do
|
2018-05-07 05:10:35 +08:00
|
|
|
if MacOS.version == :el_capitan
|
|
|
|
version '11.6.0'
|
|
|
|
sha256 'c1b06252ecc42cdd8051eb3d606050ee47b04532629293245ffdfa01bbc2430d'
|
|
|
|
else
|
2018-06-01 07:48:09 +08:00
|
|
|
version '12.1.0'
|
|
|
|
sha256 '0e1fd76efcc2b7b8766b77c4ad5a58faefbb6b706d7669b097942d64ae4be62e'
|
2018-05-07 05:10:35 +08:00
|
|
|
end
|
2016-10-04 20:45:39 +08:00
|
|
|
|
|
|
|
url "https://pqrs.org/osx/karabiner/files/Karabiner-Elements-#{version}.dmg"
|
2018-06-12 22:37:26 +08:00
|
|
|
appcast 'https://pqrs.org/osx/karabiner/files/karabiner-elements-appcast.xml'
|
2016-10-04 20:45:39 +08:00
|
|
|
name 'Karabiner Elements'
|
|
|
|
homepage 'https://pqrs.org/osx/karabiner/'
|
|
|
|
|
|
|
|
auto_updates true
|
2018-05-07 05:10:35 +08:00
|
|
|
depends_on macos: '>= :el_capitan'
|
2016-10-04 20:45:39 +08:00
|
|
|
|
|
|
|
pkg 'Karabiner-Elements.sparkle_guided.pkg'
|
|
|
|
|
2017-11-13 13:55:01 +08:00
|
|
|
uninstall signal: [
|
|
|
|
['TERM', 'org.pqrs.Karabiner-Elements'],
|
|
|
|
['TERM', 'karabiner_grabber'],
|
|
|
|
['TERM', 'karabiner_console_user_server'],
|
|
|
|
],
|
2016-10-04 20:45:39 +08:00
|
|
|
pkgutil: 'org.pqrs.Karabiner-Elements',
|
|
|
|
script: {
|
2017-11-13 13:55:01 +08:00
|
|
|
executable: '/Library/Application Support/org.pqrs/Karabiner-Elements/uninstall_core.sh',
|
2016-10-04 20:45:39 +08:00
|
|
|
sudo: true,
|
|
|
|
}
|
|
|
|
|
2018-04-18 16:59:56 +08:00
|
|
|
# kext: 'org.pqrs.driver.Karabiner.VirtualHIDDevice.v*': Should not be uninstalled by Cask
|
|
|
|
|
2017-11-18 18:27:43 +08:00
|
|
|
zap trash: [
|
|
|
|
'~/Library/Application Support/Karabiner-Elements',
|
|
|
|
'~/.karabiner.d',
|
|
|
|
'~/.config/karabiner',
|
|
|
|
'~/Library/Preferences/org.pqrs.Karabiner-Elements-Updater.plist',
|
|
|
|
'~/Library/Caches/org.pqrs.Karabiner-Elements-Updater',
|
|
|
|
]
|
2016-10-04 20:45:39 +08:00
|
|
|
end
|