Skip to content

Instantly share code, notes, and snippets.

@naranyala
Last active August 10, 2023 03:06
Show Gist options
  • Save naranyala/f09090714c8cdddfb1ca3f301ffb6782 to your computer and use it in GitHub Desktop.
Save naranyala/f09090714c8cdddfb1ca3f301ffb6782 to your computer and use it in GitHub Desktop.
# conditional zsh startup
status_01="ENV: mobile | INTERNET: ☑️"
status_02="ENV: mobile | INTERNET: ❎"
status_03="ENV: desktop | INTERNET: ☑️"
status_04="ENV: desktop | INTERNET: ❎"
if [[ -n "$TERMUX_VERSION" ]]; then
alias pbcopy="termux-clipboard-set"
alias pbpaste="termux-clipboard-get"
if ping -c 1 "google.com" >/dev/null 2>&1 ; then
echo $status_01 | glow -
# task list
eval "bash '$HOME/bin/random-quran-13.sh'"
else
echo $status_02 | glow -
# task list
eval "bash '$HOME/bin/show-message-weekly.sh'"
fi
else
alias pbcopy="xclip -selection clipboard"
alias pbpaste="xclip -selection clipboard -o'"
if ping -c 1 "google.com" >/dev/null 2>&1 ; then
echo $status_03 | glow -
# task list
eval "bash '$HOME/bin/random-quran-13.sh'"
else
echo $status_04 | glow -
# task list
eval "bash '$HOME/bin/show-message-weekly.sh'"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment