parent
4b6922f8e1
commit
1d81d10bb3
22
add_user.sh
22
add_user.sh
@ -47,21 +47,19 @@ bind -n F1 select-window -t 0
|
|||||||
bind -n F2 select-window -t 1
|
bind -n F2 select-window -t 1
|
||||||
bind -n F3 select-window -t 2
|
bind -n F3 select-window -t 2
|
||||||
bind -n F12 detach
|
bind -n F12 detach
|
||||||
|
|
||||||
|
if-shell "tmux has-session -t main 2>/dev/null" "detach" \
|
||||||
|
"new-session -d -s main -n Mail 'neomutt'; \
|
||||||
|
new-window -t main:1 -n IRC 'weechat'; \
|
||||||
|
new-window -t main:2 -n Shell 'ash'; \
|
||||||
|
send-keys -t main:2 '/usr/local/bin/tylda-motd.sh' C-m; \
|
||||||
|
select-window -t main:0"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF > /home/$LOGIN/.profile
|
cat << EOF > /home/$LOGIN/.profile
|
||||||
if [ -z "$TMUX" ]; then
|
if [ -z "\$TMUX" ]; then
|
||||||
if ! tmux has-session -t main 2>/dev/null; then
|
tmux attach -t main || exec tmux new -s main
|
||||||
tmux new-session -d -s main -n Mail 'neomutt'
|
|
||||||
tmux new-window -t main:1 -n IRC 'weechat'
|
|
||||||
tmux new-window -t main:2 -n Shell 'ash'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Uruchom motd tylko gdy user wchodzi do Shell – okno 2
|
|
||||||
tmux send-keys -t main:2 '/usr/local/bin/tylda-motd.sh' C-m
|
|
||||||
|
|
||||||
tmux select-window -t main:0
|
|
||||||
exec tmux attach-session -t main
|
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user