Skip to content

Commit

Permalink
get default config from XDG_CONFIG_HOME if omitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Koell committed Jun 24, 2020
1 parent 51c3690 commit 19cbfc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
packages = ["xkeysnail"],
scripts = ["bin/xkeysnail"],
license = "GPL",
install_requires = ["evdev", "python-xlib", "inotify_simple"]
install_requires = ["evdev", "python-xlib", "inotify_simple", "appdirs"]
)
3 changes: 2 additions & 1 deletion xkeysnail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def cli_main():

# Parse args
import argparse
from appdirs import user_config_dir
parser = argparse.ArgumentParser(description='Yet another keyboard remapping tool for X environment.')
parser.add_argument('config', metavar='config.py', type=str,
parser.add_argument('config', metavar='config.py', type=str, default=user_config_dir('xkeysnail/config.py'), nargs='?',
help='configuration file (See README.md for syntax)')
parser.add_argument('--devices', dest="devices", metavar='device', type=str, nargs='+',
help='keyboard devices to remap (if omitted, xkeysnail choose proper keyboard devices)')
Expand Down

0 comments on commit 19cbfc4

Please sign in to comment.