dotfiles/dot_config/tmux/scripts/executable_tmuxctl

24 lines
566 B
Bash

#!/bin/bash
session_name=0
if [[ -z "$1" ]]; then
echo "Need a command to perform"
exit 1
elif [[ "$1" == "start" ]]; then
tmux new-session -s "$session_name" -d
elif [[ "$1" == "stop" ]]; then
tmux kill-session -t "$session_name"
elif [[ "$1" == "toggle-theme" ]]; then
[ $(tmux show -v @dark-theme) == 0 ] && theme=1 || theme=0
tmux set @dark-theme $theme
elif [[ "$1" == "dark-theme" ]]; then
tmux set @dark-theme 1
elif [[ "$1" == "light-theme" ]]; then
tmux set @dark-theme 0
else
echo 'Invalid command'
exit 1
fi