init
This commit is contained in:
commit
83a98e1bd8
5 changed files with 74 additions and 0 deletions
17
bunkdeck.sh
Executable file
17
bunkdeck.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
set +e
|
||||
sessions=$(tmux list-sessions)
|
||||
set -e
|
||||
|
||||
if [[ $sessions == *"bunkdeck"* ]]; then
|
||||
tmux attach-session -t bunkdeck
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tmux new -d -s bunkdeck heed
|
||||
tmux split-window -h -t bunkdeck -p 70
|
||||
tmux split-window -t bunkdeck:0.0 -v -p 10
|
||||
tmux send-keys -t bunkdeck:0.1 'proclaim' C-m
|
||||
tmux send-keys -t bunkdeck:0.2 'cowsay "press [CTRL+b then o] to cycle through panes"' C-m
|
||||
tmux attach -t bunkdeck:0.2
|
12
heed.sh
Executable file
12
heed.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
clear
|
||||
|
||||
figlet -f future heed - bunkchat
|
||||
echo "#######################################################################"
|
||||
echo "# Take heed, $USER! This is a group chat with everyone on the server! #"
|
||||
echo "# You can view earlier chat with 'scry' or 'less /srv/bunkchat.txt' #"
|
||||
echo "#######################################################################"
|
||||
echo
|
||||
|
||||
tail -f /srv/bunkchat.txt
|
31
proclaim.sh
Executable file
31
proclaim.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# make username uppercase
|
||||
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
|
||||
time=placeholder
|
||||
date=placeholder
|
||||
prompt=placeholder
|
||||
|
||||
|
||||
makeSlug () {
|
||||
# make time and date
|
||||
time=$(TZ=America/New_York date +%I:%M%p)
|
||||
date=$(TZ=America/New_York date +%m/%d)
|
||||
|
||||
# make name/time string
|
||||
prompt="${username}-${date}-${time}"
|
||||
}
|
||||
|
||||
# enter bunkchat mode (clear the screen)
|
||||
clear
|
||||
|
||||
while true
|
||||
do
|
||||
figlet -f future proclaim - bunkchat
|
||||
echo "You may view old chat with 'scry', heathen."
|
||||
echo "-------------------------------------------"
|
||||
read -r -p "speak to the server: " text
|
||||
makeSlug
|
||||
echo "${prompt}: $text" >> /srv/bunkchat.txt
|
||||
clear
|
||||
done
|
11
readme.md
Normal file
11
readme.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# bunkdeck
|
||||
|
||||
bunkdeck is an interface for social tilde computing
|
||||
|
||||
tmux wraps some hand-rolled local chat scripts, and the`bunkdeck` command starts them all cleanly
|
||||
|
||||
bunkdeck is comprised of these lil things:
|
||||
* `bunkdeck` - run this command to start the interface
|
||||
* `proclaim` - post in chat
|
||||
* `heed` - read the chat
|
||||
* `scry` - read the old chat
|
3
scry.sh
Executable file
3
scry.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
less /srv/bunkchat.txt
|
Loading…
Reference in a new issue