fusuma 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c708c719000a0e9262b277082a059b281d2e777
4
- data.tar.gz: 63827d6c9b79a52ce278497163b9bd1291405a36
3
+ metadata.gz: 45e3e3c6fb9720c3ba2b9a5326654a14b2a2daa7
4
+ data.tar.gz: 86240a1c766363f3d028b46740aea8fbaaf8de8f
5
5
  SHA512:
6
- metadata.gz: cd97d8433bcda14d65a2d7a9e7a269828b25827d3f1a9d39da41c942a96cc0f6ebcd5fc237043e4565b1ed213830fe2e836b9bff3b5defcd26d474bc774880e5
7
- data.tar.gz: 83cbe4251fb751030d925cb128c24e7adf1ee6aa2e16f71a980ca0076de5c1d646a080ceeb46ff475b5d23f2627f06aa4a8eeea657c3b70d692df46119ecb147
6
+ metadata.gz: c9d835c20d8ad97b03c9cac293961a10ee61fa8458d5b3e1ce79352896127cf81eb5cc3b3e3c5573b34774a17545106ef796c950e98c1418a4d97b85130c4799
7
+ data.tar.gz: 11699f299247c0bd80ec568189e040726d1785827aeb9ae756e9147d37eb04c982a689e67ea158fb1277f575a5fc4acdce66313f5a663f4f05ee26dcd01f43e6
data/README.md CHANGED
@@ -3,13 +3,14 @@
3
3
  Fusuma is multitouch gesture recognizer.
4
4
  This gem makes your linux PC able to recognize swipes or pinchs and assign commands to them.
5
5
 
6
- [![https://gyazo.com/757fef526310b9d68f68e80eb1e4540f](https://i.gyazo.com/757fef526310b9d68f68e80eb1e4540f.png)](https://gyazo.com/757fef526310b9d68f68e80eb1e4540f)
6
+ ![fusuma_image](https://i.gyazo.com/757fef526310b9d68f68e80eb1e4540f.png)
7
7
 
8
8
  襖(Fusuma) means sliding door used to partition off rooms in a Japanese house.
9
9
 
10
10
  ## Installation
11
11
 
12
- ### 1. **IMPORTANT**: You **MUST** be a member of the _input_ group to have permission to read the touchpad device:
12
+ ### 1. Grant permission to read the touchpad device
13
+ **IMPORTANT**: You **MUST** be a member of the **INPUT** group to read touchpad by Fusuma.
13
14
 
14
15
  ```bash
15
16
  $ sudo gpasswd -a $USER input
@@ -17,23 +18,24 @@ $ sudo gpasswd -a $USER input
17
18
 
18
19
  Then, You **MUST** **LOGOUT/LOGIN or REBOOT** to assign this group.
19
20
 
20
- ### 2. You need `libinput` release 1.0 or later.
21
- Install `libinput-tools`:
21
+ ### 2. Install libinput-tools
22
+ You need `libinput` release 1.0 or later.
22
23
 
23
24
  ```bash
24
25
  $ sudo apt-get install libinput-tools
25
26
  ```
26
27
 
27
- ### 3. For sending shortcuts(optional):
28
+ ### 3. Install Fusuma
28
29
 
29
30
  ```bash
30
- $ sudo apt-get install xdotool
31
+ $ sudo gem install fusuma
31
32
  ```
32
33
 
33
- ### 4. Install Fusuma:
34
+ ### 4. Install xdotool(optional)
34
35
 
36
+ For sending shortcuts:
35
37
  ```bash
36
- $ sudo gem install fusuma
38
+ $ sudo apt-get install xdotool
37
39
  ```
38
40
 
39
41
  ### Touchpad not working in GNOME
@@ -140,7 +142,7 @@ swipe:
140
142
  * `--device="Device name"` : Open the given device only
141
143
  * `--version` : Show fusuma version
142
144
 
143
- ## AutoStart(gnome-session-properties)
145
+ ## Autostart(gnome-session-properties)
144
146
  1. Check where you installed fusuma
145
147
  2. Open `$ gnome-session-properties`
146
148
  3. Add Fusuma and input location where you checked above's path
@@ -75,7 +75,7 @@ module Fusuma
75
75
  @action_stack ||= ActionStack.new
76
76
  @action_stack << gesture_action
77
77
  event_trigger = @action_stack.generate_event_trigger
78
- event_trigger.send_command unless event_trigger.nil?
78
+ event_trigger.exec_command unless event_trigger.nil?
79
79
  end
80
80
  end
81
81
  end
@@ -17,11 +17,18 @@ swipe:
17
17
  command: 'xdotool key super+a'
18
18
  down:
19
19
  command: 'xdotool key super+s'
20
+
20
21
  pinch:
21
- in:
22
- command: 'xdotool key ctrl+plus'
23
- out:
24
- command: 'xdotool key ctrl+minus'
22
+ 2:
23
+ in:
24
+ command: 'xdotool key ctrl+equal'
25
+ out:
26
+ command: 'xdotool key ctrl+minus'
27
+ 4:
28
+ in:
29
+ command: 'xdotool key super+a'
30
+ out:
31
+ command: 'xdotool key super+s'
25
32
 
26
33
  threshold:
27
34
  swipe: 0.3
@@ -8,19 +8,17 @@ module Fusuma
8
8
  end
9
9
  attr_reader :finger, :direction, :action_type
10
10
 
11
- def send_command
11
+ def exec_command
12
+ return if command.nil?
13
+ `#{command}`
12
14
  MultiLogger.info("trigger event: #{command}")
13
- exec_command(command)
14
15
  end
15
16
 
16
17
  private
17
18
 
18
- def exec_command(command)
19
- `#{command}` unless command.nil?
20
- end
21
-
22
19
  def command
23
- Config.command(self) || "xdotool key #{Config.shortcut(self)}"
20
+ Config.command(self).tap { |c| return c if c }
21
+ Config.shortcut(self).tap { |s| return "xdotool key #{s}" if s }
24
22
  end
25
23
  end
26
24
  end
@@ -29,8 +29,7 @@ module Fusuma
29
29
 
30
30
  def gesture_action_arguments(libinput_line)
31
31
  action, time, finger, other = parse_libinput(libinput_line)
32
- move_x, move_y, zoom =
33
- parse_finger_directions(other)
32
+ move_x, move_y, zoom = parse_finger_directions(other)
34
33
  directions = { move: { x: move_x, y: move_y }, zoom: zoom }
35
34
  [time, action, finger, directions]
36
35
  end
@@ -1,3 +1,3 @@
1
1
  module Fusuma
2
- VERSION = '0.9.1'.freeze
2
+ VERSION = '0.9.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusuma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-16 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler