initial stab at systemd support for tmux-continuum

This commit is contained in:
Pete Peteches McCabe
2015-11-23 18:28:38 +00:00
committed by Bruno Sutic
parent 15649e9d07
commit 05a4a827e5
5 changed files with 82 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -x
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_DIR/helpers.sh"
@ -14,14 +16,22 @@ is_osx() {
[ $(uname) == "Darwin" ]
}
is_systemd() {
[ $(ps -o comm= -p1) == 'systemd' ]
}
main() {
if is_tmux_automatic_start_enabled; then
if is_osx; then
"$CURRENT_DIR/handle_tmux_automatic_start/osx_enable.sh"
elif is_systemd; then
"$CURRENT_DIR/handle_tmux_automatic_start/systemd_enable.sh"
fi
else
if is_osx; then
"$CURRENT_DIR/handle_tmux_automatic_start/osx_disable.sh"
elif is_systemd; then
"$CURRENT_DIR/handle_tmux_automatic_start/systemd_disable.sh"
fi
fi
}