diff --git a/README.md b/README.md index 82eb604..d03915a 100644 --- a/README.md +++ b/README.md @@ -101,29 +101,28 @@ The following shortcuts are enabled in tmux mode: | ` }` | `Ctrl+}` | `swap-pane -D` | | ` [` | `Ctrl+[` | `copy-mode` | | ` ]` | `Ctrl+]` | `paste-buffer` | -| ` x` | `Ctrl+x` | `confirm-before kill-pane` | To reap maximum benefits, add the following to your `.tmux.conf`, taking care of other common tmux shortcuts that do not get mangled by typical terminal emulators: ```bash # Generally shorten `Ctrl+b ` to `Ctrl+` for various ``. -bind -n C-Up resize-pane -U # Ctrl+Up -bind -n C-Down resize-pane -D # Ctrl+Down -bind -n C-Left resize-pane -L # Ctrl+Left -bind -n C-Right resize-pane -R # Ctrl+Right +bind -n C-Up resize-pane -U +bind -n C-Down resize-pane -D +bind -n C-Left resize-pane -L +bind -n C-Right resize-pane -R # Generally shorten `Ctrl+b Meta+` to `Meta+`. -bind -n M-Up resize-pane -U 5 # Alt+Up -bind -n M-Down resize-pane -D 5 # Alt+Down -bind -n M-Left resize-pane -L 5 # Alt+Left -bind -n M-Right resize-pane -R 5 # Alt+Right +bind -n M-Up resize-pane -U 5 +bind -n M-Down resize-pane -D 5 +bind -n M-Left resize-pane -L 5 +bind -n M-Right resize-pane -R 5 # Note that `new-window` is not shortened because `Ctrl+c` should send `SIGINT`. -bind -n C-n next-window # Ctrl+n -bind -n C-p previous-window # Ctrl+p - -bind -n C-Space next-layout # Ctrl+Space +bind -n C-n next-window +bind -n C-p previous-window +bind -n C-Space next-layout +bind -n C-x confirm-before -p 'kill-pane #P? (y/n)' kill-pane ``` This all goes especially well with [vim-tmux-navigator][11], diff --git a/setup.cfg b/setup.cfg index 3bbc4fe..bcfbcfc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = terminalle -version = 0.3 +version = attr: terminalle.__version__ description = A fancy drop-down terminal emulateur. license = MIT author = Will diff --git a/terminalle.1 b/terminalle.1 index d00d161..f80392e 100644 --- a/terminalle.1 +++ b/terminalle.1 @@ -1,4 +1,4 @@ -.TH terminalle 1 "2021-09-18" "v0.3" +.TH terminalle 1 "2021-09-18" "v0.4" .SH NAME Terminalle diff --git a/terminalle/__init__.py b/terminalle/__init__.py index 882f99d..2260fd6 100644 --- a/terminalle/__init__.py +++ b/terminalle/__init__.py @@ -1,3 +1,5 @@ from .terminalle import Terminalle from .settings import load as load_settings + +__version__ = '0.4' diff --git a/terminalle/__main__.py b/terminalle/__main__.py index 147fe17..27cb30f 100755 --- a/terminalle/__main__.py +++ b/terminalle/__main__.py @@ -3,14 +3,14 @@ from os.path import join as join_path from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter -from . import Terminalle, load_settings +from . import Terminalle, load_settings, __version__ from .auto import auto, no_auto, xdg_config_home_path def build_argparse() -> ArgumentParser: parser = ArgumentParser(description='A fancy "drop-down" terminal emulateur.', formatter_class=ArgumentDefaultsHelpFormatter, epilog='https://will.party/terminalle') - parser.add_argument('-v', '--version', action='version', version='1.0') + parser.add_argument('-v', '--version', action='version', version=__version__) parser.add_argument('-c', '--config', metavar='PATH', help='load config settings from PATH', default=join_path(xdg_config_home_path, 'terminalle.yaml')) diff --git a/terminalle/terminalle.py b/terminalle/terminalle.py index 4638281..00a0c16 100644 --- a/terminalle/terminalle.py +++ b/terminalle/terminalle.py @@ -64,8 +64,7 @@ def __init__(self, settings: Dict[str, object], show: bool): ('braceleft', 'swap-pane -U'), ('braceright', 'swap-pane -D'), ('bracketleft', 'copy-mode'), - ('bracketright', 'paste-buffer'), - ('x', 'confirm-before -p \'kill-pane #P? (y/n)\' kill-pane')]: + ('bracketright', 'paste-buffer')]: _init_ctrl_handler(key_name, window, accel_group, _tmux_cmd(cmd)) window.add_accel_group(accel_group)