Compare commits
	
		
			No commits in common. "df86403bfaef46fb1d0545f6a1978b148fd6414b" and "4b6922f8e1225abb1c60578efb854c00e384f0b8" have entirely different histories.
		
	
	
		
			df86403bfa
			...
			4b6922f8e1
		
	
		
							
								
								
									
										22
									
								
								add_user.sh
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								add_user.sh
									
									
									
									
									
								
							@ -47,19 +47,21 @@ bind -n F1 select-window -t 0
 | 
			
		||||
bind -n F2 select-window -t 1
 | 
			
		||||
bind -n F3 select-window -t 2
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
cat << EOF > /home/$LOGIN/.profile
 | 
			
		||||
if [ -z "\$TMUX" ]; then
 | 
			
		||||
  tmux attach -t main || exec tmux new -s main
 | 
			
		||||
if [ -z "$TMUX" ]; then
 | 
			
		||||
    if ! tmux has-session -t main 2>/dev/null; then
 | 
			
		||||
        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
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user