Skip to content

Commit

Permalink
Bump version, simplify kill-pane
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Sep 19, 2021
1 parent c614204 commit db093fc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,28 @@ The following shortcuts are enabled in tmux mode:
| `<Prefix> }` | `Ctrl+}` | `swap-pane -D` |
| `<Prefix> [` | `Ctrl+[` | `copy-mode` |
| `<Prefix> ]` | `Ctrl+]` | `paste-buffer` |
| `<Prefix> 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 <X>` to `Ctrl+<X>` for various `<X>`.
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+<X>` to `Meta+<X>`.
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],
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion terminalle.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH terminalle 1 "2021-09-18" "v0.3"
.TH terminalle 1 "2021-09-18" "v0.4"

.SH NAME
Terminalle
Expand Down
2 changes: 2 additions & 0 deletions terminalle/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

from .terminalle import Terminalle
from .settings import load as load_settings

__version__ = '0.4'
4 changes: 2 additions & 2 deletions terminalle/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
3 changes: 1 addition & 2 deletions terminalle/terminalle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit db093fc

Please sign in to comment.