#!/usr/bin/pdmenu

title:Cosmic Voyage

# desktop   The space over which the menus appear.
# title     The line at the top of the screen.
# base      The line at the bottom of the screen.
# menu      The normal color of text in a menu.
# selbar    The selection bar in the menu, when over normal text.
# shadow    The shadow of a window
# menuhot   The color of text in a menu that is a hotkey.
# selbarhot The color of a hotkey when the selection bar is over it.
# unselmenu The color of a menu window that is not currently active.

# possible colors
# (bg valid)      (fg only)
# black           gray
# red             brightred
# green           brightgreen
# brown           yellow
# blue            brightblue
# magenta         brightmagenta
# cyan            brightcyan
# lightgray       white

#Set a pleasing color scheme.
color:desktop:white:black
color:title:white:red
color:base:lightgray:red
color:menu:lightgray:blue
color:selbar:lightgray:red
color:shadow:gray:black
color:menuhot:white:blue
color:selbarhot:white:red
color:unselmenu:lightgray:black

#this is a comment
menu:main:Main Menu:Cosmic Voyage Menu System v1.0
     show:Cosmic _Tools..::cosmic
     show:_Communication..::comms
     show:_Fun & Games..::games
     nop
     exec:_Wiki::/usr/local/bin/wiki
     exec:_FAQ::/usr/local/bin/faq
     nop
     exit:E_xit

menu:comms:Communication:Reach out and touch someone
     exec:_Mail (alpine)::/usr/bin/alpine
     exec:_Mail (mutt)::/usr/bin/mutt
     exec:tilde _net news (forums)::/usr/local/bin/news
     exec:_bbj (Bulletin Butter & Jelly!)::/usr/local/bin/bbj
     exec:_fellowsh::clear;/usr/local/bin/fellowsh
     exec:_IRC (weechat)::/usr/local/bin/chat
     group:_Finger..
       exec::makemenu: \
       echo "menu:finger:Finger:Finger other cosmic users"; \
       for u in `/usr/local/bin/voyagers | sort`; do \
         echo "exec:$u:truncate:/usr/bin/finger ${u}@cosmic.voyage"; \
       done; \
       echo "nop"; \
       echo "exec:_Remote User:truncate,edit:/usr/bin/finger \"~user name:~\""; \
       echo "nop"; \
       echo "exit:E_xit"
       show:::finger
       remove:::finger
     endgroup
     group:_Talk..
       exec::makemenu: \
       echo "menu:talk:Talk:Talk to other users"; \
       for u in `/usr/bin/who | /usr/bin/cut -f 1 -d " "| /usr/bin/sort -u `; do \
         echo "exec:$u::/usr/local/bin/ytalk $u"; \
       done; \
       echo "nop"; \
       echo "exit:E_xit"
       show:::talk
       remove:::talk
     endgroup
     group:_Unison (folder sync)..
       exec::makemenu: \
       echo "menu:unison:Unison:Synchronize folders to other systems"; \
       for f in ~/.unison/*.prf; do \
         profile="$(basename $f)"; \
         profile="${profile%.*}"; \
         echo "exec:profile\: $profile::/usr/bin/unison $profile"; \
       done; \
       echo "exec:_New command:truncate,edit:/usr/bin/unison \"~[ships/] [ssh\://remote/folder]:~\""; \
       echo "nop"; \
       echo "exit:E_xit"
       show:::unison
       remove:::unison
     endgroup
     nop
     exit:E_xit

menu:games:Fun & Games:Games and fun distractions
    exec:_Allegra::/usr/bin/rlwrap nc localhost 1822
    exec:_Among Sus::/usr/bin/rlwrap nc sus.tildeverse.org 1234
    exec:_Bastard Tetris::/usr/games/bastet
    show:_Botany..::botany
    exec:_cbonsai::/usr/local/bin/cbonsai --live
    exec:_chess::/usr/local/bin/chs
    exec:clidle (wordle)::/usr/games/clidle
    group:_Crossword..
     exec::makemenu: \
     echo "menu:crossword:Crossword:Play Crossword Puzzles"; \
     for c in `/usr/local/bin/crossword`; do \
       echo "exec:$c::/usr/local/bin/crossword ${c}"; \
     done; \
     echo "nop"; \
     echo "exit:E_xit"
     show:::crossword
     remove:::crossword
    endgroup
    exec:_Dungeon Crawl Stone Soup::/usr/local/bin/dcss
    exec:_Fortune:truncate:/usr/games/fortune | par -w 60
    exec:_Freesweep::/usr/games/freesweep
    exec:_Go::/usr/games/gnugo
    exec:_Gorched::/snap/bin/gorched
    exec:Greed::/usr/games/greed
    exec:_I Ching::/usr/games/iching
    exec:_JPL Horizons::telnet horizons.jpl.nasa.gov 6775
    exec:_Moon Buggy::/usr/games/moon-buggy
    exec:Multi_Zork::/usr/bin/rlwrap nc multizork.icculus.org 23
    exec:_Nethack::/usr/games/nethack-console
    exec:_Random Chess Endgame Puzzle:truncate:shuf -n 1 /var/packages/fen/endgames-fen.txt | xargs fen
    exec:_SLASHEM (Nethack clone)::/usr/games/slashem
    exec:_Space Invaders::/usr/games/ninvaders
    exec:_Sudoku::/usr/games/nudoku
    exec:_Tron::ssh sshtron.zachlatta.com
    exec:_Zangband::/usr/games/zangband
    exec:2048::/usr/games/2048
    nop
    exit:_Back to main menu..

menu:cosmic:Cosmic Tools:Tools related to the cosmic voyage story
    exec:_QEC browser::/usr/local/bin/qec
    exec:_Recent QEC logs:truncate:/usr/local/bin/latest
    exec:_Rate of QEC logs:truncate:/usr/local/bin/rate
    exec:High _Scores:truncate:/usr/local/bin/scores | column -t -s,
    nop
    show:_Write a new message..::write
    exec:_Log a new message::/usr/local/bin/log
    exec:_Gemini capsule regeneration:truncate:/usr/local/bin/gemini
    exec:_Dictionary/Thesaurus..:truncate,edit:/usr/bin/sdcv -n --utf8-output "~word:~"
    nop
    exec:_Author and Ship Lists:truncate,edit:/usr/local/bin/roster "~user or ship name (or blank for all):~"
    exec:_Create a new ship::/usr/local/bin/ship
    nop
    exit:_Back to main menu..

menu:botany:Botany Tools:Tools related to botany
    exec:_Botany::/usr/local/bin/botany
    exec:_List Living Plants:truncate:/usr/local/bin/wilty list
    exec:_Water Random Plant:truncate:/usr/local/bin/wilty water
    nop
    exit:_Back to main menu..

# write a message menu
preproc:/usr/local/bin/menu_write
