diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-03 19:27:15 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-03 19:27:15 -0400 |
commit | e371d9edd474bcf89cf5d462eaccb8638900b390 (patch) | |
tree | ed07118f5c514a55f23a779a1507640e46fd9ed2 /.local/bin/tmux-mpsyt |
Initial commit
Diffstat (limited to '.local/bin/tmux-mpsyt')
-rwxr-xr-x | .local/bin/tmux-mpsyt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.local/bin/tmux-mpsyt b/.local/bin/tmux-mpsyt new file mode 100755 index 0000000..b929d52 --- /dev/null +++ b/.local/bin/tmux-mpsyt @@ -0,0 +1,16 @@ +#!/bin/sh +# This script ensures that i3 will spawn a youtube tui. +session="mps-YouTube" + +# Check if the session exists, discarding output +# We can check $? for the exit status (zero for success, non-zero for failure) +tmux has-session -t $session 2>/dev/null + +if [ $? != 0 ]; then + # Set up your session + tmux new-session -d -s "$session" mpsyt +fi + +# Attach to created session +tmux attach-session -t $session + |