add tmux systemd service
This commit is contained in:
parent
2b1aa6a84b
commit
d09449411b
@ -7,8 +7,12 @@ if \
|
|||||||
[[ ! "$TERM" =~ tmux ]] && \
|
[[ ! "$TERM" =~ tmux ]] && \
|
||||||
command -v tmux &>/dev/null
|
command -v tmux &>/dev/null
|
||||||
then
|
then
|
||||||
|
if systemctl -q --user is-active tmux; then
|
||||||
|
exec tmux -N -L "$USER" new
|
||||||
|
else
|
||||||
exec tmux
|
exec tmux
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.config/bash/sourcer" ]; then
|
if [ -f "$HOME/.config/bash/sourcer" ]; then
|
||||||
source "$HOME/.config/bash/sourcer"
|
source "$HOME/.config/bash/sourcer"
|
||||||
|
|||||||
@ -5,7 +5,7 @@ After=default.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/tmux -D
|
ExecStart=/usr/bin/tmux -D -L %u
|
||||||
ExecStop=/usr/bin/tmux kill-server
|
ExecStop=/usr/bin/tmux kill-server
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
|
|||||||
@ -7,8 +7,12 @@ if \
|
|||||||
[[ ! "$TERM" =~ tmux ]] && \
|
[[ ! "$TERM" =~ tmux ]] && \
|
||||||
command -v tmux &>/dev/null
|
command -v tmux &>/dev/null
|
||||||
then
|
then
|
||||||
|
if systemctl -q --user is-active tmux; then
|
||||||
|
exec tmux -N -L "$USER" new
|
||||||
|
else
|
||||||
exec tmux
|
exec tmux
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$ZDOTDIR/sourcer" ]; then
|
if [ -f "$ZDOTDIR/sourcer" ]; then
|
||||||
source "$ZDOTDIR/sourcer"
|
source "$ZDOTDIR/sourcer"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user