💾 Archived View for gopher.zcrayfish.soy › 0 › irc › profile captured on 2022-03-01 at 15:34:01.

View Raw

More Information

-=-=-=-=-=-=-

# Some applications read the EDITOR variable to determine your favourite text
# editor. So uncomment the line below and enter the editor of your choice :-)
export EDITOR=/usr/bin/nano
export VISUAL=/usr/bin/nano

calcurse() {
umask 027
rm -rf /tmp/calcurse-zachary/
mkdir -p /tmp/calcurse-zachary/notes
wget -q https://calendar.google.com/calendar/ical/en.christian%23holiday%40group.v.calendar.google.com/public/basic.ics -O /tmp/calcurse-zachary/christian_holidays.ics
wget -q https://calendar.google.com/calendar/ical/en.philippines%23holiday%40group.v.calendar.google.com/public/basic.ics -O /tmp/calcurse-zachary/philippine_holidays.ics
wget -q https://calendar.google.com/calendar/ical/en-gb.usa%23holiday%40group.v.calendar.google.com/public/basic.ics -O /tmp/calcurse-zachary/us_holidays.ics
wget -q https://calendar.google.com/calendar/ical/en.islamic%23holiday%40group.v.calendar.google.com/public/basic.ics -O /tmp/calcurse-zachary/islamic_holidays.ics
/usr/bin/calcurse -qi /tmp/calcurse-zachary/zach.ics
/usr/bin/calcurse -qi /tmp/calcurse-zachary/christian_holidays.ics
/usr/bin/calcurse -qi /tmp/calcurse-zachary/philippine_holidays.ics
/usr/bin/calcurse -qi /tmp/calcurse-zachary/us_holidays.ics
/usr/bin/calcurse -qi /tmp/calcurse-zachary/islamic_holidays.ics
/usr/bin/calcurse "$@"
}

logmultitail="\
/var/log/acpid.log \
/var/log/apcupsd.events \
/var/log/dmesg \
/var/log/messages \
/var/log/lighttpd/access.log \
/var/log/lighttpd/error.log \
/tmp/gopher.access.log"

case "$TERM" in
    dumb*|glasstty*|lpr*|patch*|printer*|switch*|unknown*|vanilla*)
	:;;
    vt240*|vt241*|vt330*|vt340*)
	echo "Use tmux attach if you are not doing REGIS or SIXEL graphics"
	:;;
    screen*|tmux*)
	burrow() {
             #tmux setw force-width 73
	     tmux resize-window -x 73
             env EDITOR="/usr/bin/nano -r72" burrow "$@"
             tmux setw window-size smallest
	}
        :;;
    *)
	#The following assumes that procfs is mounted with hidepid option!
        pgrep -f tmux > /dev/null
	if [[ $? = 0 ]]; then
	     tmux attach
	else
	     echo Working . . . Please wait . . .
             tmux new-session -d -s "$USER" -n "alpine" "env DISPLAY=null alpine" &>/dev/null &
	     sleep 1s && tmux new-window -t "$USER:2" -n "calcurse" "calcurse" &>/dev/null &
	     sleep 1s && tmux new-window -t "$USER:3" -n "weechat" "weechat" &>/dev/null &
	     sleep 1s && tmux new-window -t "$USER:4" -n "ash" "/bin/ash -l" &>/dev/null &
	     sleep 1s && tmux new-window -t "$USER:5" -n "ash" "/bin/ash -l" &>/dev/null &
	     sleep 1s && tmux new-window -t "$USER:6" -n "ash" "/bin/ash -l" &>/dev/null &
	     sleep 1s && tmux new-window -t "$USER:10" -n "logs" /bin/su -c "tail -F $logmultitail" root &>/dev/null &
	     echo "New tmux session started in background, please use tmux attach"
	fi
        :;;
esac