mirror of
https://github.com/theniceboy/.config.git
synced 2026-02-22 12:55:39 +08:00
add M-w hotkey to watch pane process and notify on completion
This commit is contained in:
parent
4a5044a949
commit
3e14a478a6
4 changed files with 58 additions and 0 deletions
|
|
@ -70,13 +70,22 @@ fi
|
|||
get_session_icon() {
|
||||
local sid="$1"
|
||||
|
||||
# Check for manual @watching on any window in this session
|
||||
local watching_win
|
||||
watching_win=$(tmux list-windows -t "$sid" -F '#{@watching}' 2>/dev/null | grep -m1 '^1$' || true)
|
||||
|
||||
# Check for manual @unread on any window in this session
|
||||
local unread_win
|
||||
unread_win=$(tmux list-windows -t "$sid" -F '#{@unread}' 2>/dev/null | grep -m1 '^1$' || true)
|
||||
|
||||
if [[ -n "$unread_win" ]]; then
|
||||
printf '🔔'
|
||||
return
|
||||
fi
|
||||
if [[ -n "$watching_win" ]]; then
|
||||
printf '⏳'
|
||||
return
|
||||
fi
|
||||
|
||||
[[ -z "$tracker_state" ]] && return
|
||||
local result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue