add tmux systemd service
This commit is contained in:
parent
3e1ad38e3e
commit
120f7fe29e
@ -1,8 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# .bashrc by TheK4n
|
||||
# https://github.com/TheK4n/dotfiles
|
||||
|
||||
if command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ "$(tty)" != "/dev/tty3" ]; then
|
||||
if \
|
||||
[ "$(tty)" != "/dev/tty3" ] && \
|
||||
[ -z "$TMUX" ] && \
|
||||
[[ ! "$TERM" =~ tmux ]] && \
|
||||
command -v tmux &>/dev/null
|
||||
then
|
||||
exec tmux
|
||||
fi
|
||||
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
# .zshrc by TheK4n
|
||||
# https://github.com/TheK4n/dotfiles
|
||||
|
||||
if command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ "$(tty)" != "/dev/tty3" ]; then
|
||||
if \
|
||||
[ "$(tty)" != "/dev/tty3" ] && \
|
||||
[ -z "$TMUX" ] && \
|
||||
[[ ! "$TERM" =~ tmux ]] && \
|
||||
command -v tmux &>/dev/null
|
||||
then
|
||||
exec tmux
|
||||
fi
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ if ! tmux has-session -t "$SESSION"; then
|
||||
tmux new-session -s "$SESSION" -d -n "$MAINW" -c "$WORKING_PROJECT"
|
||||
tmux send-keys -t "$SESSION:$MAINW" '$EDITOR' Enter
|
||||
tmux send-keys -t "$SESSION:$MAINW" , f f
|
||||
tmux splitw -t "$SESSION:$MAINW" -d -h -l 35% -c '#{pane_current_path}'
|
||||
tmux splitw -t "$SESSION:$MAINW" -d -h -l 40% -c '#{pane_current_path}'
|
||||
fi
|
||||
|
||||
tmux switch-client -t "$SESSION"
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
systemctl --user enable --now tmux
|
||||
command -v systemctl && systemctl --user enable --now tmux
|
||||
git clone https://github.com/tmux-plugins/tpm "$HOME/.config/tmux/plugins/tpm"
|
||||
Loading…
x
Reference in New Issue
Block a user