[config] Change defaults

Improve user experience by reflecting default Ubuntu configurations.
This commit is contained in:
Rico Tiongson 2017-11-11 13:49:00 +08:00
parent 8a18ebddb8
commit a57f7f50e3
3 changed files with 58 additions and 61 deletions

View File

@ -54,10 +54,11 @@ Sometimes, you'll need some permissions to read touchpad input data.
crw-rw---- 1 root input 13, 67 Oct 23 23:09 /dev/input/event3
```
2. Check the fourth column (e.g. `input`) then run
2. Check the fourth column (e.g. `input`) then run:
```bash
sudo gpasswd -a $USER input
```
> Note: Don't forget to input your `sudo` password!
3. ***Important***: Log out / Log back in
@ -67,15 +68,15 @@ Make sure to run `comfortable-swipe restart` after making changes.
Property | Description | Default Value | Default Behavior
--------- | ----------- | -------------- | -----
threshold | mouse pixels to activate swipe; higher = less sensitive; floating-point | 0.0
left3 | 3-finger swipe left | ctrl+shift+Right | switch to right workspace
right3 | 3-finger swipe right | ctrl+shift+Left | switch to left workspace
up3 | 3-finger swipe up | super+w | window spread
down3 | 3-finger swipe down | super+w | window spread
left4 | 4-finger swipe left | ctrl+alt+shift+Right | move window to right workspace
right3 | 3-finger swipe right | ctrl+shift+Left | switch to left workspace
right4 | 4-finger swipe right | ctrl+alt+shift+Left | move window to left workspace
up4 | 4-finger swipe up | super+d | show desktop
down4 | 4-finger swipe down | super+d | show desktop
threshold | mouse pixels to activate swipe; higher = less sensitive; integers only | 20
up3 | 3-finger swipe up | ctrl+shift+Down | switch to bottom workspace
up4 | 4-finger swipe up | ctrl+alt+shift+Down | move window to bottom workspace
down3 | 3-finger swipe down | ctrl+shift+Down | switch to above workspace
down4 | 4-finger swipe down | ctrl+alt+shift+Up | move window to above workpace
## Uninstall
Download the `uninstall` script then run `bash uninstall`

View File

@ -111,12 +111,12 @@ const char* const command_map[] = {
};
struct swipe_gesture_impl : swipe_gesture {
int screen_num, ix, iy, threshold;
float x, y;
int screen_num, ix, iy;
float x, y, threshold;
int previous_gesture;
const char** commands;
swipe_gesture_impl(
const int threshold,
const float threshold,
const char* left3 /* 000 */,
const char* left4 /* 001 */,
const char* right3 /* 010 */,
@ -229,7 +229,7 @@ namespace service {
auto config = util::read_config_file(conf_filename().data());
// initialize gesture handler
swipe_gesture_impl swipe(
config.count("threshold") ? stoi(config["threshold"]) : 20,
config.count("threshold") ? stof(config["threshold"]) : 0.0,
config["left3"].c_str(),
config["left4"].c_str(),
config["right3"].c_str(),

View File

@ -6,54 +6,6 @@
# Refer to https://www.linux.org/threads/xdotool-keyboard.10528/ for a list of
# keycodes you can use.
######################
# THREE FINGER SWIPE #
######################
# 3-finger swipe left
# The default shortcut is switching to the right workspace.
# Default: left3 = ctrl+alt+Right
left3 = ctrl+alt+Right
# 3-finger swipe right
# The default shortcut is switching to the left workspace.
# Default: right3 = ctrl+alt+Left
right3 = ctrl+alt+Left
# 3-finger swipe up
# The default shortcut is window spread.
# Default: up3 = super+w
up3 = super+w
# 3-finger swipe down
# The default shortcut is window spread.
# Default: down3 = super+w
down3 = super+w
#####################
# FOUR FINGER SWIPE #
#####################
# 4-finger swipe left
# The default shortcut is moving current window to the right workspace.
# Default: left4=ctrl+alt+shift+Right
left4 = ctrl+alt+shift+Right
# 4-finger swipe right
# The default shortcut is moving current window to the left workspace.
# Default: right4=ctrl+alt+shift+Left
right4 = ctrl+alt+shift+Left
# 4-finger swipe up
# The default shortcut is show desktop.
# Default: up4=super+d
up4 = super+d
# 4-finger swipe down
# The default shortcut is show desktop.
# Default: down4=super+d
down4 = super+d
#################
# MISCELLANEOUS #
#################
@ -61,5 +13,49 @@ down4 = super+d
# Threshold
# Tweak this value depending on the sensitivity of your mousepad to perform
# gestures. A higher value means less sensitive.
# Default: threshold = 20
threshold = 20
# Default: threshold = 0.0
threshold = 0.0
#############################
# THREE / FOUR FINGER SWIPE #
#############################
# 3-finger swipe left
# The default shortcut is switching to the right workspace.
# Default: left3 = ctrl+alt+Right
left3 = ctrl+alt+Right
# 4-finger swipe left
# The default shortcut is moving current window to the right workspace.
# Default: left4=ctrl+alt+shift+Right
left4 = ctrl+alt+shift+Right
# 3-finger swipe right
# The default shortcut is switching to the left workspace.
# Default: right3 = ctrl+alt+Left
right3 = ctrl+alt+Left
# 4-finger swipe right
# The default shortcut is moving current window to the left workspace.
# Default: right4=ctrl+alt+shift+Left
right4 = ctrl+alt+shift+Left
# 3-finger swipe up
# The default shortcut is switching to the workspace below.
# Default: up3 = ctrl+alt+Down
up3 = ctrl+alt+Down
# 4-finger swipe up
# The default shortcut is moving current window to the bottom workspace.
# Default: ctrl+alt+shift+Down
up4 = ctrl+alt+shift+Down
# 3-finger swipe down
# The default shortcut is switching to the workspace above.
# Default: down3 = ctrl+alt+Up
down3 = ctrl+alt+Up
# 4-finger swipe down
# The default shortcut is moving current window to the above workspace.
# Default: ctrl+alt+shift+Up
down4 = ctrl+alt+shift+Up