configuration.nix/extra-packages/scripts/misc/tmux-sessions.sh

13 lines
304 B
Bash
Raw Normal View History

2023-04-06 03:08:26 +05:30
#!/bin/sh
set -eu
SESSION="$(tmux list-sessions -F "(#{session_attached}) #S [#{pane_current_command} in #{pane_current_path}] #{pane_title}" | sort | rofi -dmenu -p "Running TMUX Sessions" | awk '{print $2}')"
case "$SESSION" in
"")
;;
*)
kitty tmux attach-session -dEt "$SESSION"
;;
esac