diff options
author | luxagraf <sng@luxagraf.net> | 2023-06-15 15:58:59 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2023-06-15 15:58:59 -0500 |
commit | ab987e10f154f5536bb8fd936ae0966e909fa969 (patch) | |
tree | 9de5076f38b71ececb1bc94f8d9d19170898d603 /tmuxsh/_tmux_kill_session,--.close.current.session |
added all my scriptssynced/master
Diffstat (limited to 'tmuxsh/_tmux_kill_session,--.close.current.session')
-rwxr-xr-x | tmuxsh/_tmux_kill_session,--.close.current.session | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tmuxsh/_tmux_kill_session,--.close.current.session b/tmuxsh/_tmux_kill_session,--.close.current.session new file mode 100755 index 0000000..24b895a --- /dev/null +++ b/tmuxsh/_tmux_kill_session,--.close.current.session @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +if [ "$(tmux list-sessions | wc -l)" = 1 ]; then + tmux confirm-before -p "Only single session active, kill-server instead (y/n)?" kill-server +else + tmux confirm-before -p "Kill #S session (y/n)?" "run-shell 'tmux switch-client -p \; kill-session -t \"#S\"'" + # tmux confirm-before -p "Kill #S session (y/n)?" "run-shell 'tmux switch-client -l \; kill-session -t \"#S\"'" +fi |