Created
March 11, 2015 14:37
-
-
Save runjak/34e92efd7e0804e2eb0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Inspired by https://gist.github.com/runjak/1c76dc9e3fcda878c7c9 | |
SESSION="wlan" | |
# Creating a new session: | |
tmux new-session -d -s $SESSION | |
# Splitting the window: | |
tmux split-window -v -t $Session:0.0 | |
tmux split-window -h -t $Session:0.0 | |
# Execute some fun commands: | |
tmux send-keys -t $SESSION:0.0 "cd /etc/wpa_supplicant" C-m | |
tmux send-keys -t $SESSION:0.0 "wpa_supplicant -iwlan0 -c someWlan.conf" C-m | |
tmux send-keys -t $SESSION:0.2 "sleep 1; dhcpcd -4 -B wlan0" C-m | |
tmux select-pane -t $SESSION:0.1 | |
# Attach! | |
tmux attach -t $SESSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment