From e371d9edd474bcf89cf5d462eaccb8638900b390 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 3 Oct 2020 19:27:15 -0400 Subject: Initial commit --- .local/bin/tmux-vlc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 .local/bin/tmux-vlc (limited to '.local/bin/tmux-vlc') diff --git a/.local/bin/tmux-vlc b/.local/bin/tmux-vlc new file mode 100755 index 0000000..dc26c49 --- /dev/null +++ b/.local/bin/tmux-vlc @@ -0,0 +1,19 @@ +#!/bin/sh +# This script ensures that i3 will spawn a youtube tui. +session="Podcast" +url=$1 + +# 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" vlc -I ncurses "$url" + # R -q --no-save + # ([ -e /usr/bin/R ] && R -q --no-save) || python -q +fi + +# Attach to created session +tmux attach-session -t $session + -- cgit v1.2.3