|
1 | 1 | # -*- coding: utf-8 -*-
|
2 | 2 | from .logger import *
|
3 |
| -from .info import __version__, __name__ |
| 3 | +from .info import __version__, __name__, __description__ |
4 | 4 |
|
5 | 5 | CONFIG_HEADER = b"""
|
6 | 6 | # -*- coding: utf-8 -*-
|
@@ -33,21 +33,20 @@ def main():
|
33 | 33 | # Parse args
|
34 | 34 | import argparse
|
35 | 35 | from appdirs import user_config_dir
|
36 |
| - parser = argparse.ArgumentParser(description='Yet another keyboard remapping tool for X environment.') |
37 |
| -# parser.add_argument('config', metavar='config.py', type=str, default=user_config_dir('keyszer/config.py'), nargs='?', |
38 |
| -# help='configuration file (See README.md for syntax)') |
39 |
| - parser.add_argument('-c', '--config', dest="config", metavar="config_file", type=str, |
| 36 | + parser = argparse.ArgumentParser(description=__description__) |
| 37 | + parser.add_argument('-c', '--config', dest="config", metavar="config.py", type=str, |
40 | 38 | default=user_config_dir('keyszer/config.py'),
|
41 |
| - help='configuration file (See README.md for syntax)') |
| 39 | + help='use custom configuration file') |
42 | 40 | parser.add_argument('-d', '--devices', dest="devices", metavar='device', type=str, nargs='+',
|
43 |
| - help='keyboard devices to remap (if omitted, keyszer choose proper keyboard devices)') |
| 41 | + help='manually specify devices to remap') |
44 | 42 | parser.add_argument('-w', '--watch', dest='watch', action='store_true',
|
45 |
| - help='watch keyboard devices plug in ') |
| 43 | + help='watch for new hot-plugged devices') |
46 | 44 | parser.add_argument('-q', '--quiet', dest='quiet', action='store_true',
|
47 | 45 | help='suppress output of key events')
|
48 |
| - parser.add_argument('--list-devices', dest='list_devices', action='store_true') |
| 46 | + parser.add_argument('--list-devices', dest='list_devices', action='store_true', |
| 47 | + help="") |
49 | 48 | parser.add_argument('--version', dest='show_version', action='store_true',
|
50 |
| - help='show version') |
| 49 | + help='') |
51 | 50 | parser.add_argument('--very-bad-idea', dest='run_as_root', action='store_true',
|
52 | 51 | help="(deprecated: run as root, don't do this)")
|
53 | 52 | args = parser.parse_args()
|
|
0 commit comments