os-specific td launcher
This commit is contained in:
parent
c1ca16583b
commit
8effb9cb27
@ -1,2 +1,2 @@
|
||||
#!/bin/zsh
|
||||
#!/bin/sh
|
||||
node ~/git/td/dist/cli.js
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#!/bin/zsh
|
||||
#!/bin/sh
|
||||
|
||||
if ! tmux has-session -t td-cli 2>/dev/null; then
|
||||
tmux setenv -g TD_TASK_DIR ~/git/tasks/
|
||||
tmux new-session -d -s td-cli ~/installs/scripts/td
|
||||
fi
|
||||
|
||||
if [[ "$(tmux display-message -p -F "#{session_name}")" == "td-cli" ]]; then
|
||||
tmux detach-client
|
||||
tmux display-popup -C
|
||||
# Check if Zsh is available
|
||||
if command -v zsh >/dev/null 2>&1; then
|
||||
zsh scripts/tmux-td-zsh
|
||||
else
|
||||
tmux display-popup -d -C -E -w90% -h90% 'tmux attach-session -x -f wait-exit -t td-cli'
|
||||
bash scripts/tmux-td-bash
|
||||
fi
|
||||
|
||||
13
scripts/tmux-td-bash
Executable file
13
scripts/tmux-td-bash
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! tmux has-session -t td-cli 2>/dev/null; then
|
||||
tmux setenv -g TD_TASK_DIR ~/git/tasks/
|
||||
tmux new-session -d -s td-cli /home/omnissiah/installs/scripts/td
|
||||
fi
|
||||
|
||||
if [ "$(tmux display-message -p -F "#{session_name}")" = "td-cli" ]; then
|
||||
tmux detach-client
|
||||
tmux display-popup -C
|
||||
else
|
||||
tmux display-popup -d -C -E -w90% -h90% 'tmux attach-session -x -t td-cli'
|
||||
fi
|
||||
13
scripts/tmux-td-zsh
Executable file
13
scripts/tmux-td-zsh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/zsh
|
||||
|
||||
if ! tmux has-session -t td-cli 2>/dev/null; then
|
||||
tmux setenv -g TD_TASK_DIR ~/git/tasks/
|
||||
tmux new-session -d -s td-cli ~/installs/scripts/td
|
||||
fi
|
||||
|
||||
if [[ "$(tmux display-message -p -F "#{session_name}")" == "td-cli" ]]; then
|
||||
tmux detach-client
|
||||
tmux display-popup -C
|
||||
else
|
||||
tmux display-popup -d -C -E -w90% -h90% 'tmux attach-session -x -f wait-exit -t td-cli'
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user