From 986e760687a2d34051934d410bec71fa2efc349b Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Mon, 5 Oct 2026 11:27:00 +0300 Subject: tmuxrdr: tmux-mode plugin The tmux default prefix bindings herdr has no built-in action for, as a herdr plugin built on its CLI and socket: break-pane, swap-pane and rotate-window by pane order (focus behaviour measured on tmux 3.7c), mark/clear-mark, last-window and switch-client -l (from focus events, per session), select-window and move-window by index, paste-buffer -p, display-message in tmux's default format, select-layout -E, kill-pane and kill-window behind tmux's y/n prompts, a command prompt taking tmux's commands, clock-mode, show-messages, and automatic-rename. Also a .gitignore for secrets scoped to tmuxrdr/, leaving herdr's own untouched. --- tmuxrdr/plugin/bin/display-message | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tmuxrdr/plugin/bin/display-message (limited to 'tmuxrdr/plugin/bin/display-message') diff --git a/tmuxrdr/plugin/bin/display-message b/tmuxrdr/plugin/bin/display-message new file mode 100755 index 00000000..e2ff0192 --- /dev/null +++ b/tmuxrdr/plugin/bin/display-message @@ -0,0 +1,15 @@ +#!/bin/sh +# tmux prefix+i (display-message), in tmux's default template -- measured on +# tmux 3.7c: "[0] 0:zsh, current pane 0 - (10:30 05-Oct-26)", i.e. +# [#S] #I:#W, current pane #P - (%H:%M %d-%b-%y). Session is the workspace, +# window index its place in the tab bar, window name the tab label. +. "$(dirname "$0")/../lib.sh" + +p="$(active_pane)" +ws="$(pane_info "$p" workspace_id)" +tab="$(pane_info "$p" tab_id)" +session="$("$H" workspace get "$ws" | jq -r '.result.workspace.label // empty')" +line="$(workspace_tabs "$ws" | grep -n -F "$tab " | head -n 1)" +window_index="${line%%:*}" +window_name="$(printf '%s' "${line#*:}" | cut -f2)" +say "[$session] $window_index:$window_name, current pane $(pane_index "$p") - ($(date '+%H:%M %d-%b-%y'))" -- cgit v1.2.3