-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interval and threshold specific for a trigger #92
Conversation
spec/lib/config_spec.rb
Outdated
|
||
context 'when threshold is set on the trigger' do | ||
before do | ||
allow(YAML).to receive(:load_file).and_return keymap_with_trigger_threshold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[RuboCop]
Metrics/LineLength: Line is too long. [85/80]
spec/lib/config_spec.rb
Outdated
{ | ||
'swipe' => { | ||
4 => { | ||
'right' => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[RuboCop]
Layout/SpaceAroundOperators: Operator =>
should be surrounded by a single space.
spec/lib/config_spec.rb
Outdated
|
||
context 'when interval is set on the trigger' do | ||
before do | ||
allow(YAML).to receive(:load_file).and_return keymap_with_trigger_interval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[RuboCop]
Metrics/LineLength: Line is too long. [84/80]
spec/lib/config_spec.rb
Outdated
'right' => { | ||
'shortcut' => 'alt+Right', | ||
'interval' => 0.3 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[RuboCop]
Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.
spec/lib/config_spec.rb
Outdated
'left' => { | ||
'shortcut' => 'alt+Left', | ||
'threshold' => 0.8 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[RuboCop]
Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.
Perfect! 💯 BTW, I will add pinch rotation to fusuma. |
I want to be able to use this project for controlling the volume on my computer with a 3 finger swipe, so I added the possibility to add a custom interval and threshold for a trigger.
With this code I can setup my config like below and it will be possible to smoothly control the volume on the touchpad.
Let me know what you think. I don't have any experience with Ruby, but I hope it looks good.