.tmux/popup.conf

Wed, 25 Sep 2024 15:03:13 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 25 Sep 2024 15:03:13 -0500
changeset 1179
b0a0ba3240b5
parent 1133
cb91318a522e
permissions
-rw-r--r--

No LSP autostart when read-only

I think nvim actually threw out 'view' argc detection, I just use -R and alias
view to it.

1133
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 # Open a floating pane running tmux with a session named floating. If inside
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2 # that floating window, detach.
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 bind '~' if-shell -F '#{==:#{session_name},floating}' {
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 detach-client
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 } {
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 set -gF '@last_session_name' '#S'
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 popup -d '#{pane_current_path}' -xC -yC -w70% -h70% -E 'tmux new -A -s floating'
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 }
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 # Normal break pane, but if inside a floating session, breaks pane back into
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 # the most recently opened parent session.
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 bind ! if-shell -F '#{!=:#{session_name},floating}' {
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 break-pane
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 } {
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 run-shell 'bash -c "tmux break-pane -s floating -t \"$(tmux show -gvq '@last_session_name'):\""'
cb91318a522e Add tmux popup bindings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 }

mercurial