diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-02-10 07:24:43 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-02-10 07:24:43 -0500 |
commit | 88b4a4fd4466d2270ec35083bb3959ca17c6d014 (patch) | |
tree | a8d628329212ede0fb97129c5c501c0232082945 | |
parent | b112ccd25f47bdccccbe74aa87cbe42532172c80 (diff) |
Use python for dropdown calc instead of R
-rwxr-xr-x | .local/bin/tmux-py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.local/bin/tmux-py b/.local/bin/tmux-py new file mode 100755 index 0000000..6076f80 --- /dev/null +++ b/.local/bin/tmux-py @@ -0,0 +1,17 @@ +#!/bin/sh + +session="Python" + +# 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" python -q + # R -q --no-save + # ([ -e /usr/bin/R ] && R -q --no-save) || python -q +fi + +# Attach to created session +tmux attach-session -t $session |