From 6d618af224229ae653ffcc6d12c2146d536af79b Mon Sep 17 00:00:00 2001 From: jaclu Date: Wed, 9 Feb 2022 18:55:28 +0100 Subject: [PATCH] TODO: focus moude overed pane prior to zoom --- .gitignore | 1 + README.md | 17 ++++++++++------- power-zoom.tmux | 6 ++++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index fa6f5a8..2c6bb7d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ \#* tests/ .DS_Store +*.sublime-* diff --git a/README.md b/README.md index 6f8691d..9d9d26e 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,12 @@ This way you can open other panes whilst focusing on the zoomed pane, without ri Quite often when I zoom a pane, work in it for a while and then figure out I need to open a pane to check something I have completely forgotten I am working in a zoomed pane, so as I open a new pane the new pane suddenly becomes squeezed in next to the original pane, often far to small to be practicaly usable. -This plugin zooms panes into a new window, so that it is convenient to open support panes. Hitting Smart Zoom again will unzoom and move the pane back to it's original location, if no other panes are present the temp window is closed. +This plugin zooms panes into a new window, so that it is convenient to open support panes. Hitting Smart Zoom again will unzoom and move the pane back to it's original location, if no other panes are present the temp window is closed. The temp window is named using title and ID of the zoomed pane, so that if other panes were open and it is left running, it will later be a hint as the pupose of that window. ## Usage + Hit `` + `@power_zoom_trigger` to toggle Power Zoom. If `@power_zoom_mouse` is enabled, right double click also toggles Power Zoom. ## Install @@ -43,12 +44,15 @@ Reload TMUX environment with `$ tmux source-file ~/.tmux.conf`, and that's it. ## Configuration Options -Option | Default | Description --|-|- -`@power_zoom_trigger`| Z | Key that triggers Power Zoom to toggle -`@power_zoom_without_prefix`| 0 | If set to 1, trigger key is independent of `` -`@power_zoom_mouse` | 0 | If set to 1, right double click toggles Power Zoom +| Option | Default | Description | +| ---------------------------- | ------- | ----------------------------------------------------- | +| `@power_zoom_trigger` | Z | Key that triggers Power Zoom to toggle | +| `@power_zoom_without_prefix` | 0 | If set to 1, trigger key is independent of `` | +| `@power_zoom_mouse` | 0 | If set to 1, right double click toggles Power Zoom | + +## TODO +Figure out how to use `-t '{mouse}'` with the mouse trigger to activate mouse-overed pane before zoom happens, to ensure the intended pane is zoomed. ## Contributing @@ -56,7 +60,6 @@ Contributions are welcome, and they are greatly appreciated! Every little bit he The best way to send feedback is to file an issue at https://github.com/jaclu/tmux-menus/issues - ##### License [MIT](LICENSE.md) diff --git a/power-zoom.tmux b/power-zoom.tmux index 22a636d..e64945a 100755 --- a/power-zoom.tmux +++ b/power-zoom.tmux @@ -5,7 +5,7 @@ # # Part of https://github.com/jaclu/tmux-menus # -# Version: 0.0.1 2022-02-04 +# Version: 0.0.2 2022-02-09 # @@ -58,5 +58,7 @@ else fi if [ "$mouse_zoom" -eq 1 ]; then - tmux bind -n DoubleClick3Pane run-shell "$SCRIPTS_DIR"/power_zoom.sh + # -t '{mouse}' binds the action to the mouse-overed pane + # TODO: Figure out how to use it in this context! + tmux bind -n DoubleClick3Pane run-shell"$SCRIPTS_DIR"/power_zoom.sh fi