all repos

tmux-stare @ edf6ff22d1e6932dfc124ac8162c038d8b0d17a2

session manager, but my session manager
3 files changed, 17 insertions(+), 0 deletions(-)
dont save sessions from ignore list
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-06-07 20:45:50 +0300
Authored at: 2026-06-07 19:03:55 +0300
Change ID: txtpxloqyvrtlswmwqrluvxwktnkvryz
Parent: fdfe6db
M readme
···
        44
        44
             # Default: '$HOME/.local/share/tmux/stare/'

      
        45
        45
             set -g @stare-dir '$HOME/.local/share/tmux/stare/'

      
        46
        46
         

      
        
        47
        +    # Sessions to ignore when saving. Space-separated list.

      
        
        48
        +    # Default: '0'

      
        
        49
        +    set -g @stare-ignore '0 mytemp'

      
        
        50
        +

      
        47
        51
             # Space-separated list of processes allowed to be resurrected.

      
        48
        52
             # - set to 'false' to disable command resurrection

      
        49
        53
             # - set to ':all:' to resurrect everything

      
M scripts/helpers.sh
···
        33
        33
         get_opt_save() { get_tmux_option "@stare-save" "C-s"; }

      
        34
        34
         get_opt_pick() { get_tmux_option "@stare-pick" ""; }

      
        35
        35
         get_opt_processes() { get_tmux_option "@stare-processes" "vi vim nvim man less more tial htop btop claude opencode copilot pi"; }

      
        
        36
        +get_opt_ignore() { get_tmux_option "@stare-ignore" "0"; }

      
        
        37
        +

      
        
        38
        +ignored_session() {

      
        
        39
        +  local name="$1"

      
        
        40
        +  local ignores

      
        
        41
        +  IFS=' ' read -ra ignores <<< "$(get_opt_ignore)"

      
        
        42
        +  local i

      
        
        43
        +  for i in "${ignores[@]}"; do

      
        
        44
        +    [[ "$name" == "$i" ]] && return 0

      
        
        45
        +  done

      
        
        46
        +  return 1

      
        
        47
        +}

      
        36
        48
         get_opt_dir() {

      
        37
        49
           local dir="$(get_tmux_option "@stare-dir" "${HOME}/.local/share/tmux/stare" | sed "s,\$HOME,$HOME,g; s,\~,$HOME,g")"

      
        38
        50
           mkdir -p "$dir"

      
M scripts/sessions.sh
···
        240
        240
         save_all_sessions() {

      
        241
        241
           tmux list-sessions -F "#{session_name} #{status}" | while read -r session status_val; do

      
        242
        242
           [[ "$status_val" == "off" ]] && continue

      
        
        243
        +  ignored_session "$session" && continue

      
        243
        244
           save_session "$session"

      
        244
        245
         done

      
        245
        246