Skip to content

Commit

Permalink
TODO: focus moude overed pane prior to zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclu committed Feb 9, 2022
1 parent 7045fb3 commit 6d618af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
\#*
tests/
.DS_Store
*.sublime-*
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<prefix>` + `@power_zoom_trigger` to toggle Power Zoom. If `@power_zoom_mouse` is enabled, right double click also toggles Power Zoom.

## Install
Expand Down Expand Up @@ -43,20 +44,22 @@ 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 `<prefix>`
`@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 `<prefix>` |
| `@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

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

The best way to send feedback is to file an issue at https://github.com/jaclu/tmux-menus/issues


##### License

[MIT](LICENSE.md)
6 changes: 4 additions & 2 deletions power-zoom.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -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
#


Expand Down Expand Up @@ -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

0 comments on commit 6d618af

Please sign in to comment.