aboutsummaryrefslogtreecommitdiff
path: root/linux/home/.config/tmux/tmux.conf
diff options
context:
space:
mode:
Diffstat (limited to 'linux/home/.config/tmux/tmux.conf')
-rw-r--r--linux/home/.config/tmux/tmux.conf19
1 files changed, 14 insertions, 5 deletions
diff --git a/linux/home/.config/tmux/tmux.conf b/linux/home/.config/tmux/tmux.conf
index 8a821e6..a62e3e3 100644
--- a/linux/home/.config/tmux/tmux.conf
+++ b/linux/home/.config/tmux/tmux.conf
@@ -46,9 +46,7 @@ set -sg escape-time 10
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"
# Use <Prefix>L to clear terminal
-#bind -r L send-keys C-l \; send-keys -R \; clear-history
-bind -r L send-keys C-l \; send-keys 'Enter'
-#bind-key -n C-L if-shell "$is_vim" "send-keys C-l" "send-keys C-l"
+bind -r L send-keys "clear" Enter
# Rename current window (Ctrl + A, A)
bind R rename-window '' \; \
@@ -392,8 +390,11 @@ bind -n M-t if-shell -F '#{==:#{session_name},term}' {
## Toggle popup "note" session
-bind-key -n M-n run-shell ~/.config/tmux/tmux-notes-menu.sh
-bind-key -n M-N run-shell "~/.config/tmux/tmux-notes-menu.sh --new"
+bind-key -n M-n if-shell -F "#{client_in_popup}" \
+ "detach-client -P" \
+ "run-shell ~/.config/tmux/notes.sh"
+
+bind-key -n M-N run-shell "~/.config/tmux/notes.sh --new"
# Toggle popup "pack" session
bind-key -n M-p if-shell -F '#{==:#{session_name},pack}' {
@@ -413,6 +414,14 @@ bind-key -n M-o if-shell -F '#{==:#{session_name},todo}' {
display-popup -E -x200% -y0 -w50% -h99% "tmux new-session -A -s todo 'nvim ~/documents/main/inbox/tasks/TODO.md'"
}
+# M-y → Toggle VM popup (starts/attaches session "virt" inside popup)
+bind-key -n M-y if-shell -F '#{==:#{session_name},virt}' {
+ detach-client -P
+} {
+ set -gF '@last_session_name' '#S'
+ display-popup -E -x200% -y0 -w40% -h60% "tmux new-session -A -s virt bash -lc 'echo \"### VM Manager ###\"; echo; echo \"Available VM scripts:\"; ls -1 ~/.scripts/env/virt/ 2>/dev/null || echo \"No scripts found in ~/.scripts/env/virt/\"; echo; echo \"Run your VM by typing its script name (e.g., ubuntu, fedora, win11).\"; exec \$SHELL'"
+}
+
# M-H → Open history in popup
bind-key -n M-H if-shell -F '#{==:#{session_name},hist}' {
detach-client