Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save paxperscientiam/cd05254ddae5b4ee885d8fa1df895f3f to your computer and use it in GitHub Desktop.
Save paxperscientiam/cd05254ddae5b4ee885d8fa1df895f3f to your computer and use it in GitHub Desktop.
tmux-xpanes-implementation-example.bash
#!/usr/bin/env bash
unset CDPATH
PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/opt/local/bin
function title ()
{
echo -ne "\033]0;"$*"\007"
}
function status() {
title Dashboard
xpanes -t -l t -c "{}" "neofetch" "wtf" "vtop"
}
function finances() {
cd "${HOME}/Dropbox/FINANCE/Ledger/transactions" || return 1
title Money Money
xpanes -t -d -l eh -c "{}" "title money; baphomet -s money -- $LEDGER_FILE_PERSONAL" \
"title money; sleep 7; baphomet -j money -- $LEDGER_FILE_BIZ"
"title accounting; clear"
}
function pkgmgnt() {
title Package management
xpanes -t -d -l t -c "{}" "title gems; gem outdated" \
"title macports; port outdated" \
"title pnpm global; pnpm upgrade -g" \
"title composer global; cgr update"
}
function web::server() {
title http-byob
cd "${HOME}/apache2" || return 1
xpanes -t -d -l eh -c "{}" "title serving; sudo sbin/http-byob start --root ." \
"title status; sbin/http-byob status --root ."
}
function web::pax () {
title FuseBox
cd "${HOME}/apache2/www/clients/me/paxperscientiam.com/" || return 1
xpanes -t -d -l eh -c "{}" \
"title compiler && ts-node fuse.ts" \
"title paxperscientiam.com && spacemacs ."
}
"${@}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment