karabiner 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +3 -3
- data/lib/karabiner/version.rb +1 -1
- data/lib/karabiner/vkopenurldef.rb +9 -2
- data/spec/lib/karabiner_spec.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cad9d51fd89f724dddd5a32a4131f4b47ca8a44
|
4
|
+
data.tar.gz: c754b37688ced16b446178aa8e84ede9dcc0aa52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19bd1e9fc29b218399dbb2b8c01c60b16b5df8ffc6ffd9b5c96f298ce0b7f3de7901d10d0b7cfcfe67554a951823f9b98efa231a32f0dfbfa2aac180442edb69
|
7
|
+
data.tar.gz: 7d022b77f5b8a2cd4bceb13837bc6888fa30be66b8195fd6d9c9c49f667d46859841fcc3710bf1ed67b4cc1854b2d5f583941856b31f5b1e419bd5cd515e9253
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -117,9 +117,9 @@ Shift_R Shift_L
|
|
117
117
|
|
118
118
|
```rb
|
119
119
|
item "Application shortcuts" do
|
120
|
-
remap "C-o", to: invoke("YoruFukurou")
|
121
|
-
remap "C-u", to: invoke("Google Chrome")
|
122
|
-
remap "C-h", to: invoke("iTerm")
|
120
|
+
remap "C-o", to: invoke("YoruFukurou") # Invoke the app under the /Applications.
|
121
|
+
remap "C-u", to: invoke("Google Chrome") # ditto.
|
122
|
+
remap "C-h", to: invoke("/Users/johndoe/Applications/iTerm.app") # Invoke the app of the specified path.
|
123
123
|
end
|
124
124
|
|
125
125
|
item "Copy date" do
|
data/lib/karabiner/version.rb
CHANGED
@@ -4,7 +4,7 @@ class Karabiner::Vkopenurldef
|
|
4
4
|
include Karabiner::XmlTree
|
5
5
|
|
6
6
|
def self.application_keycode(application)
|
7
|
-
"VK_OPEN_URL_APP_#{application.gsub(/ /, "_")}"
|
7
|
+
"VK_OPEN_URL_APP_#{File.basename(application, '.app').gsub(/ /, "_")}"
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.script_keycode(script)
|
@@ -13,8 +13,15 @@ class Karabiner::Vkopenurldef
|
|
13
13
|
|
14
14
|
def self.for_application(application)
|
15
15
|
self.new.tap do |definition|
|
16
|
+
|
17
|
+
if application =~ %r|\A/.+app\z|
|
18
|
+
app_url = application
|
19
|
+
else
|
20
|
+
app_url = "/Applications/#{application}.app"
|
21
|
+
end
|
22
|
+
|
16
23
|
name = Karabiner::Property.new("name", "KeyCode::#{application_keycode(application)}")
|
17
|
-
url = Karabiner::Property.new("url",
|
24
|
+
url = Karabiner::Property.new("url", app_url, type: "file")
|
18
25
|
definition.add_child(name, url)
|
19
26
|
end
|
20
27
|
end
|
data/spec/lib/karabiner_spec.rb
CHANGED
@@ -203,7 +203,7 @@ describe Karabiner do
|
|
203
203
|
item "Application shortcuts" do
|
204
204
|
remap "C-o", to: invoke("YoruFukurou")
|
205
205
|
remap "C-u", to: invoke("Google Chrome")
|
206
|
-
remap "C-h", to: invoke("iTerm")
|
206
|
+
remap "C-h", to: invoke("/Users/johndoe/Applications/iTerm.app")
|
207
207
|
end
|
208
208
|
|
209
209
|
item "duplicate app" do
|
@@ -240,7 +240,7 @@ describe Karabiner do
|
|
240
240
|
|
241
241
|
<vkopenurldef>
|
242
242
|
<name>KeyCode::VK_OPEN_URL_APP_iTerm</name>
|
243
|
-
<url type="file">/Applications/iTerm.app</url>
|
243
|
+
<url type="file">/Users/johndoe/Applications/iTerm.app</url>
|
244
244
|
</vkopenurldef>
|
245
245
|
</root>
|
246
246
|
EOS
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karabiner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.5.1
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Lightweight keyremap configuration DSL
|
@@ -156,3 +156,4 @@ test_files:
|
|
156
156
|
- spec/lib/karabiner/remap_spec.rb
|
157
157
|
- spec/lib/karabiner_spec.rb
|
158
158
|
- spec/spec_helper.rb
|
159
|
+
has_rdoc:
|