Commit Graph

124 Commits

Author SHA1 Message Date
88e991f944 tmux: Add bindings to swap window with prev/next 2023-06-15 12:09:44 +02:00
6a36867d4d tmux: Select windows with Alt-[0-9] 2023-06-15 12:04:23 +02:00
b4eba71b16 tmux: C-v should start the selection if inactive 2023-06-14 12:24:08 +02:00
d4d29b0c64 tmux: Use e prefix when comparing numbers 2023-06-14 11:17:23 +02:00
998c1c3fda tmux: Better simulate vim's C-e & C-y
Keep the cursor position or selection while scrolling.
2023-06-14 10:58:07 +02:00
d85dd89416 tmux: Make selfinsert binding C-v repeatable 2023-06-07 11:58:58 +02:00
52963bf2be tmux: Mimic vim's Y in copy-mode-vi 2023-05-22 15:13:35 +02:00
6ec99f3af7 tmux: Emulate normal-mode y without selection
Try to mimic vim's normal and visual mode behaviour of `y`.

Set 'copy-command' for the copy-pipe commands to fall back to.
2023-05-22 15:12:59 +02:00
3944156168 tmux: Replace selfinsert.sh with a command-prompt 2023-05-22 14:47:48 +02:00
33be2cf3be tmux: Cancel copy-mode with insert-mode bindings 2023-05-22 14:47:13 +02:00
0bb92e80c8 tmux: Clean up some comments 2023-05-22 14:02:17 +02:00
cc299641e5 tmux: Remove code redundancy with hidden variable 2023-05-22 13:49:37 +02:00
1a9780925a tmux: Fix selfinsert key-table
Some keys were missing from the key-table (e.g. C-[hjkl]) as they were
set later in the config.

Fix by moving the script execution to the bottom of the config.
2023-05-22 13:24:30 +02:00
de001db473 tmux: Underline windows in status line when zoomed
I sometimes forget that windows are in zoomed state as I was missing a
visual indicator. Underline the window names in the status line to fix
that.

TODO: Move added code bit into a variable to prevent redundancy. I was
      not able to get it to be expanded, in contrast it would just
      insert the text literally.
2023-03-22 12:31:08 +01:00
4808ba95a5 tmux:TODO: Display when pane is in fullscreen mode
Sometimes I forget that I maximized a pane as there is no visual
indicator.
2023-02-27 14:08:40 +01:00
7dcd00058f tmux:TODO: Do not modify selection when scrolling 2023-02-27 14:07:04 +01:00
67b474e7f6 tmux: Revert "Remove unused status-style"
This reverts commit b4cbd08d3b.

I am not sure why I thought this was irrelevant. But when testing I did
not properly unset it or restart the server, so nothing changed when I
reloaded tmux.conf.

Conflicts:
	.config/tmux/tmux.conf
2023-02-24 10:14:05 +01:00
c6e988e663 tmux: Use user options to define colors only once 2023-01-10 12:32:08 +01:00
b4cbd08d3b tmux: Remove unused status-style 2023-01-10 12:32:08 +01:00
9daeba47ea tmux: Number windows with 1-based indices
It is counter intuitive to have to reach to the right for the first
window.
2023-01-10 12:32:03 +01:00
f6db506f26 tmux: Run resurrect-save on detach in background
Shorten the time it takes to detach.
2023-01-04 11:32:30 +01:00
aee241f3c3 tmux: Fix typo in miswritten extended-keys
extended_keys -> extended-keys
2022-10-21 15:15:13 +02:00
8de8151cbe tmux: Activate extended_keys
With it libtermkey/libtickit[^1] mappings are supported.

[^1] - https://www.leonerd.org.uk/code/libtermkey/
[^2] - https://www.leonerd.org.uk/hacks/fixterms/
2022-10-21 01:21:48 +02:00
764bc6d9b7 tmux: Send 5xup when scrolling in alternate mode 2022-09-19 13:07:35 +02:00
832d1cfd0d tmux: Write prompt history to XDG_DATA 2022-09-19 13:04:29 +02:00
a1e431d3e1 tmux: Use shell script to complete selfinsert
Use a short shell script to complete the `selfinsert` keytable by
binding all keys that have a mapping in the root table.
2022-09-08 18:36:37 +02:00
048933e67d tmux: Make <prefix>[hjkl] bindings repeatable
I sometimes need the `<prefix>[hjkl]` bindings over `C-[hjkl]` (e.g. vim
insert mode). Then it is nice to have them repeatable when navigating to
a pane further away.
2022-09-08 16:41:06 +02:00
eca58c09f8 tmux: Scroll only 5 lines when entering copy-mode
Only scroll 5 lines instead of a full page when entering copy-mode
through the wheel as a full page was too disorienting.

TODO: Pass `WheelUpPane` after entering copy-mode instead of redundantly
executing it's bound command.

Somehow neither of the following worked:

  send -XM WheelUpPane
  send -X WheelUpPane
2022-09-08 16:37:57 +02:00
b807497984 tmux: Mimic copy-mode -e when using the wheel
`copy-mode -e` annoyed me, as it happened sometimes that I would hold
down `C-d` to scroll down, only to close the shell and pane when
reaching the bottom.

But in principal I do like the idea of it and missed the feature when
reaching the bottom by using the scroll wheel.

Change the `WheelDownPane` in copy-mode to exit when the bottom is
reached.
2022-09-08 16:31:42 +02:00
7d58be4365 tmux: Scroll without selecting the pane 2022-09-08 15:41:53 +02:00
17fd0409a4 tmux: Make { and } repeatable 2022-07-14 14:24:59 +02:00
a8f6973968 tmux: Use pane-border as indicator for {copy,sync}
In tmux version 3.2 all style options were changed to string
options, making them support formats.[^1]

From that version on, use the pane-borders as indicator for the
{copy,sync}-mode instead of the prefix_highlight plugin.

Keep the pure style fallback, as Ubuntu 20.4 for example still only
ships with version 3.0a.

[^1]: https://github.com/tmux/tmux/commit/f03b61131b34079
2022-07-12 21:00:10 +02:00
747ffd01e3 tmux:prefix_highlight: Invert fg,bg + red for sync
- Invert the prefix_highlight colors so that it is less obtrusive.
 - Use `brightred` for the background of the sync-mode indicator.

This way the prefix, copy-mode and sync-mode indicators are visually
differentiable.
2022-07-12 21:00:10 +02:00
18625091ed tmux: Add a 'resize mode' similar to my i3 config
Add a 'resize mode' that behaves similar to the one in my i3 config.
When pressing the binding `<prefix>r`, a new key-table is selected that
allows resizing with `hjkl` as well as choosing the different layouts
directly over the number row.
2022-07-12 21:00:09 +02:00
e0fdd45e6c tmux: Add binding to synchronize panes
Synchronize the panes in the current window with `<prefix>S`.
2022-07-12 21:00:09 +02:00
d9ea048411 tmux: Also display indicator for copy-mode 2022-07-12 21:00:09 +02:00
e609efc385 tmux: Also display indicator for synchronize-panes
Also display an indicator when synchronize-panes is turned on in the
status bar, not only for the prefix.
2022-07-12 21:00:08 +02:00
f2978fa030 tmux: Remove unneeded prefix_highlight_*fix
Remove unneeded `prefix_highlight_output_{pre,suf}fix` option, as a
space is the default value from the `tmux-prefix-highlight` plugin.
2022-07-12 21:00:08 +02:00
75611be2f8 tmux: Use short command variants
Use short variants of commands and get rid of redundant `-T prefix` flag
to `bind`.
2022-07-12 21:00:08 +02:00
f429da3fd9 tmux: Use short command variants
Use short variants of commands and get rid of redundant `-T prefix` flag
to `bind`.
2022-07-12 21:00:08 +02:00
8755ade944 tmux: Format lines to fit into a width of 80 2022-07-12 21:00:07 +02:00
79e34c3e4f tmux: Use <Esc> to clear selection and cancel
Use <Esc> to clear the selection and cancel copy-mode depending on if
something is selected.
2022-07-12 21:00:07 +02:00
b4e0d4111b tmux: Allow C-h to still be passed
Some programs (e.g. the UEFI shell) expect it for backspace.
2022-07-12 21:00:07 +02:00
d5fdfd37e9 tmux: Do not auto exit copy-mode when at bottom
Do not exit automatically the copy-mode when reaching the bottom.  This
was especially annoying/dangerous when holding `C-d` down to scroll to
the bottom.
2022-07-12 21:00:07 +02:00
392bc1c49b tmux:plugs: Remove tmux-yank
It messes with mappings I set (e.g. `MouseDragEnd1Pane`) and brings no
real addition in functionality.
2022-07-12 21:00:04 +02:00
40416ebd9c *: Move third-party plugins into .local/share/
Move all submodules that were under .config/ into .local/share/ (alias
XDG_DATA_HOME). I got convinced that they feel out of place in .config/.

Instead of updating the paths from which they are sourced (e.g.
`TMUX_PLUGIN_MANAGER_PATH` or `packpath`), keep a symlink in the old
location that points to the new one. This has the benefit that
everything related to one program remains mostly accessible from the
same place instead of spreading everything out.

I am still unsure if I really like the new location as I affiliate user
**data** more with something that has to be backed up as it is
non-recreatable. And moving them out of .config/ had the reasoning that
they are not my config files but rather data from the internet that
could be retrieved when deleting. But using XDG_CACHE_HOME seems
unreasonable as well.
We'll see.

Move the fzf-repo from ./local/bin/ to .local/share/.

Update all relative symlinks' (e.g. fzf) targets.
2022-07-12 21:00:01 +02:00
b96d32996b *: Wrap lines at 80 columns where appropriate
Wrap lines at 80 columns where appropriate and I had the energy to think
about how/where to wrap.

There are still lines longer than that, which I plan to wrap in the
future. But that is enough for now.
2022-06-23 23:59:00 +02:00
b7d333ef81 tmux: Make window-navigation bindings repeatable
This way the prefix only has to be pressed once. (As long as the key is
repeated in `repeat-time`)
2022-06-23 23:58:55 +02:00
afd4b933a2 tmux: Enter copy-mode w/o prefix on PageUp
Enter copy-mode and scroll one page up directly with PageUp without the
need of the prefix. This binding exists per default already in the
prefix keytable.
2022-06-23 23:58:53 +02:00
c46a352c35 tmux: Add tmux-yank
[tmux-yank][1]:

> Tmux plugin for copying to system clipboard. Works on OSX, Linux and
> Cygwin.

[1]: https://github.com/tmux-plugins/tmux-yank
2022-06-23 23:58:51 +02:00