Skip to content

Instantly share code, notes, and snippets.

@Babkock
Last active November 29, 2025 19:39
Show Gist options
  • Select an option

  • Save Babkock/e0209ff6090c76fbd028fcb6956a1a35 to your computer and use it in GitHub Desktop.

Select an option

Save Babkock/e0209ff6090c76fbd028fcb6956a1a35 to your computer and use it in GitHub Desktop.
My Zsh config
# __
# ____ _____/ /_ __________
# /_ / / ___/ __ \/ ___/ ___/
# / /_(__ ) / / / / / /__
# /___/____/_/ /_/_/ \___/
export PATH=/sbin:$HOME/bin:$HOME/.emacs.d/bin:/usr/local/bin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/go/bin:/usr/local/i386elfgcc/bin:$HOME/.zsh/forgit/bin:$PATH
# test
export PREFIX="/usr/local/i386elfgcc"
export TARGET=i386-elf
export VOIDPKG="/home/babkock/git/void-packages"
source "$HOME/.ssh/zsh/secrets.zsh"
VIVID_THEME="alabaster_dark"
if [ -v $TERM ]; then
if [[ ${TERM} = "st-256color" || ${TERM} = "rxvt-unicode" || ${TERM} = "xterm-256color" || ${TERM} = "foot" || ${TERM} = "kitty" || ${TERM} = "alacritty" ]]; then
export LS_COLORS="$(vivid generate $VIVID_THEME)"
else
export LS_COLORS="$(vivid -m 8-bit generate $VIVID_THEME)"
fi
else
export LS_COLORS="$(vivid -m 8-bit generate $VIVID_THEME)"
fi
export LSCOLORS=$LS_COLORS
export ZLS_COLORS=$LS_COLORS
zstyle ':completion:*:*:kill:*' list-colors '=(#b) #([0-9]#)*( *[a-z])*=34=31=33'
zstyle ':completion:*' use-cache on
zstyle ':completion:' cache-path "$HOME/.cache/zsh/.zcompcache"
zstyle ':completion:*:parameters' list-colors '=*=1;35'
zstyle ':completion:*:builtins' list-colors '=*=1;34'
zstyle ':completion:*:aliases' list-colors '=*=1;33'
zstyle ':completion:*:*:*:*:descriptions' format '%F{yellow}%d %f'
zstyle ':completion:*:warnings' format ' %F{red}no matches found %f'
zstyle ':completion:*:options' list-colors '=^(-- *)=34'
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} "ma=4;37"
zstyle ':completion:*:*:-command-:*:*' group-order alias functions builtins commands
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
export LANG=en_US.UTF-8
source <(fzf --zsh)
setopt autocd
setopt appendhistory
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_find_no_dups
setopt hist_ignore_dups
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
alias d="fd"
alias c="/usr/bin/cat"
alias cat="/usr/bin/cat"
alias grep="/usr/bin/grep --color=auto"
alias g="/usr/bin/grep --color=auto"
alias gy="/usr/bin/grep --color=auto --context=4"
alias xx="echo Can not reboot from SSH > /dev/stderr"
alias reboot="echo Can not reboot from SSH > /dev/stderr"
alias shutdown="echo Can not shutdown from SSH > /dev/stderr"
else
alias c="bat"
alias cat="bat"
alias d="fd"
alias grep="rg"
alias g="rg"
alias gy="rg --context=4"
alias reboot="loginctl reboot"
alias shutdown="sudo /usr/bin/shutdown -h now"
alias xx="loginctl reboot"
# functions only for login shells
if [[ "$TERM" == "linux" ]]; then
function pu() {
hydroxide imap &> /dev/null &
hydroxide smtp &> /dev/null &
tmux new-session "neomutt -F $HOME/.muttrc" \; split-window -v "BROWSER='lynx -accept_all_cookies -nomargins -nostatus' newsraft -c $HOME/.config/newsraft/config"
fg
pkill -x hydroxide
true
}
function pn() {
pkill -x pipewire
pipewire &> /dev/null &
sleep 1
tmux new-session "/usr/bin/zsh -c \"EDITOR=vim lf -command 'set icons false; set drawbox false;'\"" \; split-window -v "ncmpcpp --host '$MPD_PASS' --port 6602"
fg
pkill -x pipewire
true
}
function shy() {
#export WLR_RENDERER="vulkan"
export WLR_DRM_NO_ATOMIC=1
export GTK_THEME="Vimix-dark-ruby"
export GDK_BACKEND="wayland"
export SDL_VIDEODRIVER="wayland"
export XDG_CURRENT_DESKTOP="Hyprland"
export XDG_SESSION_DESKTOP="Hyprland"
export XDG_SESSION_TYPE="wayland"
export QT_QPA_PLATFORM="wayland-egl"
export QT_QPA_PLATFORMTHEME="qt6ct"
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XCURSOR_THEME="Adwaita"
export XCURSOR_SIZE=32
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
export WLR_DRM_NO_MODIFIERS=1
export AQ_DRM_DEVICES="/dev/dri/card0:/dev/dri/renderD128"
pgrep mpdas | xargs kill 2> /dev/null
pgrep pipewire | xargs kill 2> /dev/null
pgrep pulseaudio | xargs kill 2> /dev/null
echo -e '\e[1;31m'
banner "Starting"
sleep 1
pkill -x pipewire
pkill -x pipewire-pul
echo -e '\e[1;32m'
figlet -W -f ivrit "dnalrpyH"
gsettings set org.gnome.desktop.interface color-scheme prefer-dark &> /dev/null
gsettings set org.gnome.desktop.interface gtk-theme Vimix-dark-ruby &> /dev/null
gsettings set org.gnome.desktop.interface cursor-theme Adwaita &> /dev/null
gsettings set org.gnome.desktop.interface cursor-size 32 &> /dev/null
dbus-launch --exit-with-session Hyprland &> /dev/null
pgrep hypridle | xargs kill 2> /dev/null
pgrep stash | xargs kill 2> /dev/null
pgrep mako | xargs kill 2> /dev/null
pgrep emacs | xargs kill 2> /dev/null
pgrep hydroxide | xargs kill 2> /dev/null
pkill -x hydroxide
pgrep mpdas | xargs kill 2> /dev/null
pkill -x mpdas
true
}
function swa() {
#export WLR_RENDERER="vulkan"
export WLR_DRM_NO_ATOMIC=1
export GTK_THEME="Vimix-dark-ruby"
export GDK_BACKEND="wayland"
export SDL_VIDEODRIVER="wayland"
export XDG_CURRENT_DESKTOP="sway"
export XDG_SESSION_DESKTOP="sway"
export XDG_SESSION_TYPE="wayland"
export QT_QPA_PLATFORM="wayland-egl"
export QT_QPA_PLATFORMTHEME="qt6ct"
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XCURSOR_THEME="Adwaita"
export XCURSOR_SIZE=32
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
pgrep mpdas | xargs kill 2> /dev/null
pgrep pipewire | xargs kill 2> /dev/null
pgrep pulseaudio | xargs kill 2> /dev/null
echo -e '\e[1;31m'
banner "Starting"
sleep 1
pkill -x pipewire
pkill -x pipewire-pul
echo -e '\e[1;33m'
figlet -W -f ivrit "yawS"
gsettings set org.gnome.desktop.interface color-scheme prefer-dark &> /dev/null
gsettings set org.gnome.desktop.interface gtk-theme Vimix-dark-ruby &> /dev/null
gsettings set org.gnome.desktop.interface cursor-theme Adwaita &> /dev/null
gsettings set org.gnome.desktop.interface cursor-size 32 &> /dev/null
dbus-launch --exit-with-session sway &> /dev/null
pkill -x eww
pgrep emacs | xargs kill 2> /dev/null
pgrep stash | xargs kill 2> /dev/null
pgrep hydroxide | xargs kill 2> /dev/null
pkill -x hydroxide
pgrep mpdas | xargs kill 2> /dev/null
pkill -x mpdas
true
}
function swf() {
export GTK_THEME="Vimix-dark-ruby"
export GDK_BACKEND="wayland"
export SDL_VIDEODRIVER="wayland"
export XDG_CURRENT_DESKTOP="sway"
export XDG_SESSION_DESKTOP="sway"
export XDG_SESSION_TYPE="wayland"
export QT_QPA_PLATFORM="wayland-egl"
export QT_QPA_PLATFORMTHEME="qt6ct"
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XCURSOR_THEME="Adwaita"
export XCURSOR_SIZE=32
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
pgrep mpdas | xargs kill 2> /dev/null
pgrep pipewire | xargs kill 2> /dev/null
pgrep pulseaudio | xargs kill 2> /dev/null
echo -e '\e[1;31m'
banner "Starting"
sleep 1
echo -e '\e[1;35m'
figlet -W -f ivrit "erifyaW"
gsettings set org.gnome.desktop.interface color-scheme prefer-dark &> /dev/null
gsettings set org.gnome.desktop.interface gtk-theme Vimix-dark-ruby &> /dev/null
gsettings set org.gnome.desktop.interface cursor-theme Adwaita &> /dev/null
gsettings set org.gnome.desktop.interface cursor-size 32 &> /dev/null
dbus-launch --exit-with-session wayfire &> /dev/null
pkill -x eww
pgrep emacs | xargs kill 2> /dev/null
pgrep stash | xargs kill 2> /dev/null
pgrep hydroxide | xargs kill 2> /dev/null
pkill -x hydroxide
pgrep mpdas | xargs kill 2> /dev/null
pkill -x mpdas
true
}
function sni() {
#export WLR_RENDERER="vulkan"
export WLR_DRM_NO_ATOMIC=1
export GTK_THEME="Vimix-dark-ruby"
export GDK_BACKEND="wayland"
export SDL_VIDEODRIVER="wayland"
export XDG_CURRENT_DESKTOP="niri"
export XDG_SESSION_DESKTOP="niri"
export XDG_SESSION_TYPE="wayland"
export QT_QPA_PLATFORM="wayland-egl"
export QT_QPA_PLATFORMTHEME="qt6ct"
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XCURSOR_THEME="Adwaita"
export XCURSOR_SIZE=32
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
pgrep mpdas | xargs kill 2> /dev/null
pgrep pipewire | xargs kill 2> /dev/null
pgrep pulseaudio | xargs kill 2> /dev/null
echo -e '\e[1;31m'
banner "Starting"
sleep 1
pkill -x pipewire
pkill -x pipewire-pul
echo -e '\e[1;34m'
figlet -W -f ivrit "iriN"
dbus-launch --exit-with-session niri &> /dev/null
pkill -x eww
pgrep emacs | xargs kill 2> /dev/null
pgrep stash | xargs kill 2> /dev/null
pgrep hydroxide | xargs kill 2> /dev/null
pkill -x hydroxide
pgrep mpdas | xargs kill 2> /dev/null
true
}
fi
fi
if [ -v TERM ]; then
if [[ ${TERM} = "st-256color" || ${TERM} = "rxvt-unicode" || ${TERM} = "xterm-256color" || ${TERM} = "foot" || ${TERM} = "alacritty" || ${TERM} = "kitty" ]]; then
# graphical terminal
alias ls="eza --icons --group-directories-first --no-quotes -X -F"
#alias l="eza --icons --group-directories-first --no-quotes -X -F"
alias lsla="eza --icons --group-directories-first --no-quotes -X -F -l -A --git --git-repos --time-style=relative -S"
alias la="eza --icons --group-directories-first --no-quotes -X -F -A"
alias ll="eza --icons --group-directories-first --no-quotes -X -F -l --git --git-repos --time-style=relative -S"
alias lsl="eza --icons --group-directories-first --no-quotes -X -F -l --git --git-repos --time-style=relative -S"
alias lsa="eza --icons --group-directories-first --no-quotes -X -F -l -A --git --git-repos --time-style=relative -S"
alias lst="eza --icons --group-directories-first --no-quotes -X -F -l -A --git --git-repos --time-style=relative -S -T --level 3"
alias lstl="eza --icons --group-directories-first --no-quotes -X -F -l -A --git --git-repos --time-style=relative -S -T --level 3"
alias ltl="eza --icons --group-directories-first --no-quotes -X -F -l -A --git --git-repos --time-style=relative -S -T --level 3"
alias lc="eza --icons --group-directories-first --no-quotes -X -F -l -A --total-size --git --git-repos --time-style=relative -S"
alias lct="eza --icons --group-directories-first --no-quotes -X -F -l -A --total-size --git --git-repos --time-style=relative -S -T --level 3"
alias lctl="eza --icons --group-directories-first --no-quotes -X -F -l -A --total-size --git --git-repos --time-style=relative -S -T --level 3"
alias a="yt-dlp --remux-video 'mkv' --embed-metadata --embed-chapters --sleep-requests 3 --limit-rate 9M --exec '/home/babkock/bin/ytdone'"
alias al="eza --icons --group-directories-first --no-quotes -X -F -l --git --git-repos --time-style=relative -S"
alias e="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q"
alias ee="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r . &"
alias ea="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/alacritty/config.org\" &"
alias ez="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.zsh.org\" &"
#alias eb="hyprctl dispatch workspace 4 2> /dev/null; swaymsg \"workspace 4\" 2> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/bspwm/bspwm.org\" &"
#alias ep="hyprctl dispatch workspace 4 2> /dev/null; swaymsg \"workspace 4\" 2> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/polybar/config.org\" &"
alias eq="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/qutebrowser/config.org\" &"
alias ec="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.doom.d/init.org\" &"
alias ed="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.doom.d/config.org\" &"
alias ew="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/waybar/config.org\" &"
alias es="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/waybar/style.org\" &"
alias ef="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/foot/foot.org\" &"
alias egp="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r --eval \"(magit-push)\" > /dev/null &"
alias egs="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r --eval \"(magit-status)\" > /dev/null &"
alias ei="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r --eval \"(magit-log-all)\" > /dev/null &"
alias egl="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r --eval \"(magit-log-all)\" > /dev/null &"
alias er="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r --eval \"(elfeed)\" > /dev/null &"
alias eo="swaymsg \"workspace 4\" 2> /dev/null; hyprctl dispatch workspace 4 &> /dev/null; emacsclient -c -a 'emacs' -q -r \"$HOME/.config/eww/eww.org\" &"
alias mx="mpv av://v4l2:/dev/video0 --vo=gpu --hwdec=vaapi --untimed --profile=low-latency --no-osc --ontop --cache=no"
alias mo="mpv av://v4l2:/dev/video2 --vo=gpu --hwdec=vaapi --untimed --profile=low-latency --no-osc --ontop --cache=no"
alias me="mpv av://v4l2:/dev/video2 --untimed --profile=low-latency --no-osc --ontop --cache=no --demuxer-lavf-format=video4linux2 --demuxer-lavf-o=video_size=960x720,input_format=mjpeg,framerate=30 --window-scale=0.5"
alias mj="mpv av://v4l2:/dev/video0 --untimed --profile=low-latency --no-osc --ontop --cache=no --demuxer-lavf-format=video4linux2 --demuxer-lavf-o=video_size=1920x1080,input_format=mjpeg,framerate=30 --window-scale=0.55"
else
# login shell or SSH
alias ls="ls --group-directories-first -F --color=auto"
alias lsla="ls -l -A -h --group-directories-first -F --color=auto"
alias l="ls --group-directories-first -F --color=auto"
alias lsl="ls -l -A -h --group-directories-first -F --color=auto"
alias la="ls -l -A -h --group-directories-first -F --color=auto"
alias ll="ls -l -A -h --group-directories-first -F --color=auto"
alias e="emacsclient -c -a 'emacs' -nw"
alias ee="emacsclient -c -a 'emacs' -nw ."
alias ez="emacsclient -c -a 'emacs' -nw \"$HOME/.zsh.org\""
alias eb="emacsclient -c -a 'emacs' -nw \"$HOME/.config/bspwm/bspwm.org\""
alias ep="emacsclient -c -a 'emacs' -nw \"$HOME/.config/polybar/config.org\""
alias eq="emacsclient -c -a 'emacs' -nw \"$HOME/.config/qutebrowser/config.org\""
alias ec="emacsclient -c -a 'emacs' -nw \"$HOME/.doom.d/init.org\""
alias ed="emacsclient -c -a 'emacs' -nw \"$HOME/.doom.d/config.org\""
alias ew="emacsclient -c -a 'emacs' -nw \"$HOME/.config/waybar/config.org\""
alias es="emacsclient -c -a 'emacs' -nw \"$HOME/.config/waybar/style.org\""
alias ef="emacsclient -c -a 'emacs' -nw \"$HOME/.config/foot/foot.org\""
alias ea="emacsclient -c -a 'emacs' -nw \"$HOME/.config/alacritty/config.org\""
alias eo="emacsclient -c -a 'emacs' -nw \"$HOME/.config/eww/eww.org\""
alias egp="emacsclient -c -a 'emacs' -nw --eval \"(magit-push)\""
alias egs="emacsclient -c -a 'emacs' -nw --eval \"(magit-status)\""
alias ei="emacsclient -c -a 'emacs' -nw --eval \"(magit-log-all)\""
alias egl="emacsclient -c -a 'emacs' -nw --eval \"(magit-log-all)\""
fi
fi
function tbef() {
if [ -z "$1" ]; then
printf "Must specify the name of a film file to edit\n" > /dev/stderr
false
elif [ -z "$2" ]; then
vim -n -T alacritty "$HOME/TBcom/resources/op/film/$1.html"
pushd "$HOME/TBcom/resources/op" > /dev/null
git add film
popd > /dev/null
true
else
vim -n -T alacritty "$HOME/TBcom/resources/op/film/$1.html"
vim -n -T alacritty "$HOME/TBcom/resources/op/film/$2.html"
pushd "$HOME/TBcom/resources/op" > /dev/null
git add film
popd > /dev/null
true
fi
}
function tbem() {
if [ -z "$1" ]; then
printf "Must specify the name of an artist file to edit\n" > /dev/stderr
false
elif [ -z "$2" ]; then
vim -n -T alacritty "$HOME/TBcom/resources/op/music/$1.html"
pushd "$HOME/TBcom/resources/op" > /dev/null
git add music
popd > /dev/null
true
else
vim -n -T alacritty "$HOME/TBcom/resources/op/music/$1.html"
vim -n -T alacritty "$HOME/TBcom/resources/op/music/$2.html"
pushd "$HOME/TBcom/resources/op" > /dev/null
git add music
popd > /dev/null
true
fi
}
function pf() {
if [ -z "$1" ]; then
printf "pf needs a process name to search for\n" > /dev/stderr
false
else
ps -aux | rg "$1"
fi
}
function t() {
if [ -z "$1" ]; then
tremc --ssl -X -r -c "$TRANS_CREDENTIALS" 2> /dev/null
true
elif [ -z "$2" ]; then
printf "Starting %s...\n" "$1"
tremc --ssl -c "$TRANS_CREDENTIALS" "$1" > /dev/null
rm "$1" 2> /dev/null
tremc --ssl -X -r -c "$TRANS_CREDENTIALS" 2> /dev/null
true
elif [ -z "$3" ]; then
printf "Starting %s with speed %s kbps...\n" "$1" "$2"
tremc --ssl -c "$1" > /dev/null
transmission-remote --auth="$TRANS_PASS" -asd "$2"
rm "$1" 2> /dev/null
tremc --ssl -X -r -c "$TRANS_CREDENTIALS" 2> /dev/null
true
else
printf "Too many arguments\n" > /dev/stderr
false
fi
}
function y() {
if [ -z "$1" ]; then
printf "Please specify file to read\n" > /dev/stderr
false
else
mupdf -I "$1"
true
fi
}
function xs() {
if [ -z "$1" ]; then
printf "Please specify package name\n" > /dev/stderr
false
else
pushd $VOIDPKG > /dev/null
./xbps-src show "$1"
popd > /dev/null
true
fi
}
function xb() {
if [ -z "$1" ]; then
printf "Please specify package name\n" > /dev/stderr
false
else
pushd $VOIDPKG > /dev/null
./xbps-src build -C -f -j 4 "$1"
popd > /dev/null
true
fi
}
function xp() {
if [ -z "$1" ]; then
printf "Please specify package name\n" > /dev/stderr
false
else
pushd $VOIDPKG > /dev/null
./xbps-src pkg -C -f -Q -j 4 "$1"
popd > /dev/null
true
fi
}
function xxr() {
if [ -z "$1" ]; then
printf "Please specify package name\n" > /dev/stderr
false
elif [ -z "$2" ]; then
pushd $VOIDPKG > /dev/null
./xbps-src remove "$1"
popd > /dev/null
true
elif [ -z "$3" ]; then
pushd $VOIDPKG > /dev/null
./xbps-src remove "$1" "$2"
popd > /dev/null
true
elif [ -z "$4" ]; then
pushd $VOIDPKG > /dev/null
./xbps-src remove "$1" "$2" "$3"
popd > /dev/null
true
fi
}
function j()
{
if [[ ${TERM} = "screen-256color" ]]; then
\nnn -d -i -l 2 -HGURQD -x -e -P preview-tui & ~/.config/nnn/plugins/preview-tui; fg
return
fi
# Block nesting of nnn in subshells
if [[ "${NNNLVL:-0}" -ge 1 ]]; then
echo "nnn is already running"
return
fi
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
\nnn -d -i -l 2 -GUHRQD -x -e "$@"
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
function l()
{
export EDITOR="vim"
cd "$(lf -print-last-dir)"
}
function trybg() {
swaybg -o eDP-1 -i "$1" -o HDMI-A-2 -i "$2" -o DP-1 -i "$3" &
}
function vf()
{
fzf -i --walker=file,dir,follow,hidden --walker-skip=.git,node_modules --header="Select a file to edit" --input-label="Filename" --preview-label="Edit this file:" --preview="bat --color=always --style=plain,changes,numbers {}" --preview-window="border:rounded" --border=double --scroll-off=3 --prompt="$ " --pointer="->" --layout=reverse --multi=3 > /tmp/fzf.txt
xargs -r -o -a /tmp/fzf.txt vim -n -T alacritty -o
}
function yz()
{
yazi --cwd-file=/tmp/yazi.txt
cd "$(cat /tmp/yazi.txt)"
}
function wb() {
swaybg -o eDP-1 -i "$1" -o HDMI-A-2 -i "$2"
}
function backup() {
if [ -z "$1" ]; then
printf "Please specify directory to store backup in\n" > /dev/stderr
false
else
sudo rsync -Pa -e "ssh -p 2222 -i $HOME/.ssh/tbcom_ssh" "$WEBSITE_ADDRESS:$RSYNC_PATH" "$1"
true
fi
}
function twitch() {
/home/babkock/git/twitch-chat-cli/cli.js connect babkock
}
function record() {
if [[ -z "$1" && -z "$2" ]]; then
printf "USAGE: %s [display] [output file]\n" "$0" > /dev/stderr
false
elif [ -z "$2" ]; then
wf-recorder --audio=alsa_input.pci-0000_00_1f.3.analog-stereo -o HDMI-A-2 -c libx264rgb -r 60 -f "$1"
true
else
wf-recorder --audio=alsa_input.pci-0000_00_1f.3.analog-stereo -o "$1" -c libx264rgb -r 60 -f "$2"
true
fi
}
function mm() {
sudo cryptsetup luksOpen /dev/sda mega
sudo mount -o rw,users /dev/mapper/mega /mnt/mega
sudo chown -R babkock:babkock /mnt/mega
sudo chown babkock:audio /mnt/mega
sudo chown -R babkock:audio /mnt/mega/Music
echo "sda Mounted"
}
function um() {
sudo umount /mnt/mega
sudo cryptsetup luksClose mega
echo "sda Unmounted"
}
function b() {
pkill -x ssh-agent
eval $(ssh-agent) > /dev/null 2>&1
printf "SSH identities loaded\n"
ssh-add "$HOME/.ssh/gitlab_new" &> /dev/null
ssh-add "$HOME/.ssh/github_rsa" &> /dev/null
ssh-add "$HOME/.ssh/tbcom_ssh" &> /dev/null
ssh-add "$HOME/.ssh/codeberg" &> /dev/null
}
function pcp() {
if [[ -z "$1" ]]; then
printf "No file specified\n" > /dev/stderr
false
elif [[ -z "$2" ]]; then
scp -i "$HOME/.ssh/comp2pinew" "$1" pi@192.168.0.13:~
else
scp -i "$HOME/.ssh/comp2pinew" "$1" "$2" pi@192.168.0.13:~
fi
}
function ch() {
if [[ -z "$1" ]]; then
printf "No command to look up\n" > /dev/stderr
false
elif [[ -z "$2" ]]; then
curl "https://cht.sh/$1"
true
else
curl "https://cht.sh/$1/$2"
true
fi
}
function chp() {
if [[ -z "$1" ]]; then
printf "Enter a programming language to learn\n" > /dev/stderr
false
else
curl "https://cht.sh/$1/:learn"
true
fi
}
function chl() {
if [[ -z "$1" ]]; then
printf "Enter a programming language to list topics for\n" > /dev/stderr
false
else
curl "https://cht.sh/$1/:list"
true
fi
}
function pv() {
pactl set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereo
pactl set-default-source alsa_input.pci-0000_00_1f.3.analog-stereo
}
function uu() {
BROWSER="qutebrowser --qt-arg stylesheet '/home/babkock/.local/share/qutebrowser/fix-tooltips.qss' --qt-wrapper PyQt6 --backend webengine --qt-flag enable-features=WebRTCPipeWireCapturer --qt-flag ozone-platform-hint=wayland --qt-flag enable-accelerated-video --qt-flag enable-gpu --qt-flag enable-native-gpu-memory-buffers --qt-flag enable-zero-copy --qt-flag enable-gpu-rasterization" newsraft
}
# show weather in Denver today
alias ba="ansiweather -l '$CITY' -u imperial -H true -h false -p false -i false -s true"
# neofetch
alias bb="fastfetch -s 'Title:OS:Host:Kernel:Packages:Uptime:Break:WM:Shell:Terminal:Break:CPU:GPU:CPUUsage:Memory:Swap:Break:Display:Disk:Break:Colors' --color-keys blue"
alias cb="cargo build --release"
alias co="btm"
alias c="bat" # like cat
alias ci="cargo init"
alias ct="cargo test --release"
alias df="duf -hide-mp \"/run/systemd,/boot/efi,/run,/run/user,/sys/fs/cgroup,/dev/shm\"" # like df
# fzf file picker with preview
alias f="fzf --preview=\"bat --color=always --style=plain {}\" --preview-window=\"border:rounded\" --border=rounded --prompt=\"$ \" --pointer=\"->\""
alias fp="ftp -t -v '$FTP_ADDRESS'"
alias i="tig"
alias h="htop"
# encrypt file with GPG
alias ncr="gpg --encrypt --armor -r Tanner"
# decrypt file and output (use > direct)
alias dcr="gpg --decrypt"
alias g="rg"
alias gz="ug -I --depth=2 --exclude-dir='node_modules' --exclude-dir='vendor' --exclude-dir='.git'"
alias gy="rg --context=4"
alias gb="onefetch --no-color-palette -d head dependencies --text-colors 7 9 1 10 1 4"
alias gp="gpg"
alias gs="git status -sb"
alias ga="git add"
alias ge="git fetch --all"
alias gf="git checkout HEAD --"
alias gcm="git commit -m"
alias gca="git commit --allow-empty-message -m ''"
alias gc="git checkout"
alias gcb="git checkout -b"
alias gd="git diff"
alias gdt="git diff-tree"
alias gdz="git diff HEAD^"
alias gdy="git diff HEAD^^"
# git log with special formatting
alias gl="git log --date=relative --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %C(yellow)(%cr) %C(bold blue) %an%Creset'"
alias gw="git show"
alias gr="git rm"
alias grc="git rm --cached"
alias gm="git mv"
alias gn="git clone"
alias gnn="git clone --depth 2"
alias ggo="git remote get-url origin"
alias gso="git remote set-url origin"
alias ggu="git remote get-url upstream"
alias gsu="git remote set-url upstream"
# use these if branch is 'master'
alias gpush="git push origin master"
alias gpull="git pull origin master"
# use these if branch is 'main'
alias gpusm="git push origin main"
alias gpulm="git pull origin main"
# push 'master' to multiple remotes
alias gpash="git push all master; git pull origin master; git pull upstream master"
# push 'main' to multiple remotes
alias gpasm="git push all main; git pull origin main; git pull upstream main"
alias v="vim -n -T alacritty"
alias vh="vim -n -T alacritty -o"
alias vv="vim -n -T alacritty -O"
alias vim="vim -n -T alacritty"
alias vm="virt-manager"
alias lb="lsblk --paths --fs --perms"
alias r="ranger"
alias m="mpv"
alias mb="mount /mnt/Baby; echo 'sdb Mounted'"
alias md="mount /mnt/drive; echo 'sdb Mounted'"
alias mi="mpv --mute=yes"
alias mt="mpv --audio-device=alsa/hdmi:CARD=PCH,DEV=1"
alias mn="man"
alias tl="tldr"
alias n="rmpc -c '$HOME/.config/rmpc/config.ron'"
alias npi="nix profile install"
alias npl="nix profile list"
alias npr="nix profile remove"
alias nb="nix build --extra-experimental-features nix-command --extra-experimental-features flakes"
alias nfi="nix flake --extra-experimental-features nix-command --extra-experimental-features flakes init"
alias nfm="nix flake --extra-experimental-features nix-command --extra-experimental-features flakes metadata"
alias nfc="nix show-config --extra-experimental-features nix-command"
alias nsh="nix-shell"
alias nr="nix repl"
alias o="pkill -x"
alias oa="eww active-windows"
alias oc="eww close"
alias of="eww open waymem; eww open waycalendar"
alias oi="eww inspector"
alias ol="eww list-windows"
alias oo="eww open"
alias or="eww reload"
alias ow="eww open mem; eww open calendar"
#alias oh="pgrep Hyprland | xargs kill 2> /dev/null ; pgrep mako | xargs kill 2> /dev/null"
alias u="neomutt -F '$HOME/.muttrc'"
alias spi="TERM=xterm-256color ssh -i '$HOME/.ssh/comp2pinew' pi@192.168.0.13"
alias sk="ssh -i '$HOME/.ssh/me2newmac' kristinowens@192.168.0.17"
alias po="gotop"
alias p="sudo flowtop -46UTDISs -t 2"
alias q="swayimg"
alias qw="swayimg -g -r -w 1920,1080 -p 0,0"
alias qi="identify"
alias qg="gimp"
alias s="ssh $WEBSITE_ADDRESS -p 2222 -i '$HOME/.ssh/tbcom_ssh'"
alias sb="sudo sv restart bluez-alsa; sudo sv restart bluetoothd"
alias se="pkill -x emacs; emacs --daemon"
alias sw="pkill -x waybar; waybar -c '$HOME/.config/waybar/sway.json' -s '$HOME/.config/waybar/sway.css' -l off &"
alias sf="pkill -x waybar; waybar -c '$HOME/.config/waybar/wayfire.json' -s '$HOME/.config/waybar/wayfire.css' -l off &"
alias so="pkill -x eww"
alias sy="pkill -x waybar; waybar -c '$HOME/.config/waybar/hyprland.json' -s '$HOME/.config/waybar/hyprland.css' -l off &"
alias sn="pkill -x waybar; waybar -c '$HOME/.config/waybar/niri.json' -s '$HOME/.config/waybar/niri.css' -l off &"
alias sp="pkill -x pipewire; pkill -x pulseaudio; pkill -x pipewire; pipewire &"
alias sz="sudo pkill -x wpa_supplicant; sudo wpa_supplicant -B -Dwired -ienp0s31f6 -c/etc/wpa_supplicant/wpa_supplicant.conf"
alias svi="sudo vim -n -T alacritty"
alias ta="tar xvf"
alias td="tar czf"
alias ti="transmission-remote --auth='$TRANS_PASS' -l"
alias ts="transmission-remote --auth='$TRANS_PASS' -si"
alias tt="transmission-remote --auth='$TRANS_PASS' -st"
alias tr="transmission-remote --auth='$TRANS_PASS'"
alias ub="sudo umount /mnt/Baby; echo Unmounted"
alias ud="sudo umount /mnt/drive; echo Unmounted"
alias k="make"
alias kc="make clean"
alias ki="sudo make install"
alias km="meson setup build --buildtype=release --prefix=/usr"
alias kn="ninja -j4"
alias wh="which"
alias x="sudo zsh"
alias xxb="cd $VOIDPKG; ./xbps-src binary-bootstrap; cd $OLDPWD"
alias xz="cd $VOIDPKG; ./xbps-src zap; cd $OLDPWD"
alias xi="sudo xbps-install -S"
alias xl="sudo xbps-query -l"
alias xr="sudo xbps-remove"
alias xo="sudo xbps-query -O"
alias xu="sudo xbps-install -Su"
#alias xb="./xbps-src build -C -f -j 4"
#alias xp="./xbps-src pkg -C -f -Q -j 4"
#alias xxr="./xbps-src remove"
alias xxu="cd $VOIDPKG; ./xbps-src update-sys; cd $OLDPWD"
alias xxl="cd $VOIDPKG; ./xbps-src list; cd $OLDPWD"
#alias xs="./xbps-src show"
alias xlu="cd $VOIDPKG; ./xbps-src show-local-updates; cd $OLDPWD"
alias xsu="cd $VOIDPKG; ./xbps-src show-sys-updates; cd $OLDPWD"
#alias yz="yazi"
alias z="bluetoothctl"
fpath+=$HOME/.zsh/typewritten
fpath+=$HOME/.zsh/nix-zsh-completions
fpath+=$HOME/.zsh/zsh-completions/src
autoload -U compinit; compinit
autoload -U promptinit; promptinit
prompt typewritten
source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $HOME/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=""
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=""
source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source $HOME/.zsh/zsh-autopair/autopair.zsh
source $HOME/.zsh/zsh-fzf-history-search/zsh-fzf-history-search.zsh
source $HOME/.zsh/zsh-nix-shell/nix-shell.plugin.zsh
source $HOME/.zsh/you-should-use/you-should-use.plugin.zsh
source $HOME/.zsh/completion.zsh
source $HOME/.zsh/nix-zsh-completions/nix-zsh-completions.plugin.zsh
source $HOME/.zsh/correction.zsh
source $HOME/.zsh/history.zsh
source $HOME/.zsh/colored-man-pages.plugin.zsh
source $HOME/.zsh/niri.zsh
bindkey -M menuselect '^[[Z' reverse-menu-complete # Shift+Tab
bindkey -M menuselect '^@' reverse-menu-complete
bindkey -M menuselect '^[[27;2;13~' accept-and-hold # Shift+Enter
bindkey -M menuselect '^{' clear-screen # Escape
bindkey -M menuselect '^[[A' vi-up-line-or-history
bindkey -M menuselect '^[[B' vi-down-line-or-history
bindkey -M menuselect '^[[D' vi-backward-char
bindkey -M menuselect '^[[C' vi-forward-char
bindkey -M menuselect '^[[1;2D' beginning-of-buffer-or-history # Shift+Left Arrow
bindkey -M menuselect '^[[1;2C' end-of-buffer-or-history # Shift+Right Arrow
bindkey -M main '^[[A' history-substring-search-up
bindkey -M main '^[[B' history-substring-search-down
bindkey -M main '^Z' undo # Control+Z
bindkey -M main '^Y' redo # Control+Y
export GPG_TTY=$(tty)
gpgconf --launch gpg-agent
export GREP_COLORS="fn=bh:ln=gh:mt=rh:cx=y"
export EDITOR=vim
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#555555"
export NNN_FIFO=/tmp/nnn.fifo
export NNN_PLUG="p:-preview-tui;v:imgview;g:!tig*;v:!vim"
export NNN_COLORS="2365"
export BAT_STYLE="header,header-filesize,header-filename,changes"
export FZF_DEFAULT_OPTS="--border=horizontal --color=bg+:black,fg+:bright-green:italic,gutter:-1,hl:blue,hl+:bright-blue,query:bright-yellow,prompt:bright-yellow,pointer:black:dim,info:magenta,preview-bg:black,border:black:dim"
export WOBSOCK="$HOME/.wob.sock"
prompt_nix_shell_setup "$@"
random=$(shuf -i 1-3 -n 1)
if [[ ${TERM} = "st-256color" || ${TERM} = "rxvt-unicode" || ${TERM} = "xterm-256color" || ${TERM} = "foot" || ${TERM} = "kitty" || ${TERM} = "alacritty" ]]; then
if [[ "$random" == "1" ]]; then
pokemon-colorscripts --no-title -r 1-3
elif [[ "$random" == "2" ]]; then
pokemon-colorscripts --no-title -s -r 1-3
else
echo -e '\e[5;31m'
colorscript -r
fi
else
colorscript -r
fi
random=$(shuf -i 1-35 -n 1)
if [[ ${TERM} = "st-256color" || ${TERM} = "rxvt-unicode" || ${TERM} = "xterm-256color" || ${TERM} = "foot" || ${TERM} = "kitty" || ${TERM} = "alacritty" ]]; then
if [[ "$random" == "1" ]]; then
echo -e '\e[5;30m'
fortune anarchism | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "2" ]]; then
echo -e '\e[5;30m'
fortune drugs | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "3" ]]; then
echo -e '\e[5;30m'
fortune linux | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "4" ]]; then
echo -e '\e[5;30m'
fortune void | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "5" ]]; then
echo -e '\e[5;30m'
fortune computers | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "6" ]]; then
echo -e '\e[5;30m'
fortune paradoxum | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "7" ]]; then
echo -e '\e[5;30m'
fortune men-women | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "8" ]]; then
echo -e '\e[5;30m'
fortune linux | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "9" ]]; then
echo -e '\e[5;30m'
fortune magic | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "10" ]]; then
echo -e '\e[5;30m'
fortune linuxcookie | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "11" ]]; then
echo -e '\e[5;30m'
fortune wisdom | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "12" ]]; then
echo -e '\e[5;30m'
fortune ethnic | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "13" ]]; then
echo -e '\e[5;30m'
fortune literature | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "14" ]]; then
echo -e '\e[5;30m'
fortune art | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "15" ]]; then
echo -e '\e[5;30m'
fortune platitudes | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "16" ]]; then
echo -e '\e[5;30m'
fortune pets | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "17" ]]; then
echo -e '\e[5;30m'
fortune computers | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "18" ]]; then
echo -e '\e[5;30m'
fortune law | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "19" ]]; then
fortune ascii-art | lolcat --random -b -v 0.3
elif [[ "$random" == "20" ]]; then
echo -e '\e[5;30m'
fortune cookie | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "21" ]]; then
echo -e '\e[5;30m'
fortune definitions | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "22" ]]; then
echo -e '\e[5;30m'
fortune miscellaneous | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "23" ]]; then
echo -e '\e[5;30m'
fortune goedel | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "24" ]]; then
echo -e '\e[5;30m'
fortune news | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "25" ]]; then
echo -e '\e[5;30m'
fortune people | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "26" ]]; then
echo -e '\e[5;30m'
fortune science | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "27" ]]; then
echo -e '\e[5;30m'
fortune art | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "28" ]]; then
echo -e '\e[5;30m'
fortune perl | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "29" ]]; then
echo -e '\e[5;30m'
fortune songs-poems | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "30" ]]; then
echo -e '\e[5;30m'
fortune fortunes | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "31" ]]; then
echo -e '\e[5;30m'
fortune knghtbrd | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "32" ]]; then
echo -e '\e[5;30m'
fortune zippy | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "33" ]]; then
echo -e '\e[5;30m'
fortune love | cowsay -w | lolcat --random -b -v 0.2
elif [[ "$random" == "34" ]]; then
echo -e '\e[5;30m'
fortune work | cowsay -w | lolcat --random -b -v 0.2
else
echo -e '\e[5;30m'
fortune humorists | cowsay -w | lolcat --random -b -v 0.2
fi
else
if [[ "$random" == "1" ]]; then
fortune anarchism | cowsay -w | lolcat --random -x
elif [[ "$random" == "2" ]]; then
fortune linux | cowsay -w | lolcat --random -x
elif [[ "$random" == "3" ]]; then
fortune drugs | cowsay -w | lolcat --random -x
elif [[ "$random" == "4" ]]; then
fortune void | cowsay -w | lolcat --random -x
elif [[ "$random" == "5" ]]; then
fortune computers | cowsay -w | lolcat --random -x
elif [[ "$random" == "6" ]]; then
fortune linuxcookie | cowsay -w | lolcat --random -x
elif [[ "$random" == "7" ]]; then
fortune paradoxum | cowsay -w | lolcat --random -x
elif [[ "$random" == "8" ]]; then
fortune men-women | cowsay -w | lolcat --random -x
elif [[ "$random" == "9" ]]; then
fortune wisdom | cowsay -w | lolcat --random -x
elif [[ "$random" == "10" ]]; then
fortune magic | cowsay -w | lolcat --random -x
elif [[ "$random" == "11" ]]; then
fortune humorists | cowsay -w | lolcat --random -x
elif [[ "$random" == "12" ]]; then
fortune ethnic | cowsay -w | lolcat --random -x
elif [[ "$random" == "13" ]]; then
fortune void | cowsay -w | lolcat --random -x
elif [[ "$random" == "14" ]]; then
fortune law | cowsay -w | lolcat --random -x
elif [[ "$random" == "15" ]]; then
fortune literature | cowsay -w | lolcat --random -x
elif [[ "$random" == "16" ]]; then
fortune cookie | cowsay -w | lolcat --random -x
elif [[ "$random" == "17" ]]; then
fortune politics | cowsay -w | lolcat --random -x
elif [[ "$random" == "18" ]]; then
fortune linux | cowsay -w | lolcat --random -x
elif [[ "$random" == "19" ]]; then
fortune law | cowsay -w | lolcat --random -x
elif [[ "$random" == "20" ]]; then
fortune art | cowsay -w | lolcat --random -x
elif [[ "$random" == "21" ]]; then
fortune people | cowsay -w | lolcat --random -x
elif [[ "$random" == "22" ]]; then
fortune fortunes | cowsay -w | lolcat --random -x
elif [[ "$random" == "23" ]]; then
fortune knghtbrd | cowsay -w | lolcat --random -x
elif [[ "$random" == "24" ]]; then
fortune zippy | cowsay -w | lolcat --random -x
elif [[ "$random" == "25" ]]; then
fortune science | cowsay -w | lolcat --random -x
elif [[ "$random" == "26" ]]; then
fortune news | cowsay -w | lolcat --random -x
elif [[ "$random" == "27" ]]; then
fortune miscellaneous | cowsay -w | lolcat --random -x
elif [[ "$random" == "28" ]]; then
fortune perl | cowsay -w | lolcat --random -x
elif [[ "$random" == "29" ]]; then
fortune goedel | cowsay -w | lolcat --random -x
elif [[ "$random" == "30" ]]; then
fortune love | cowsay -w | lolcat --random -x
elif [[ "$random" == "31" ]]; then
fortune definitions | cowsay -w | lolcat --random -x
elif [[ "$random" == "32" ]]; then
fortune platitudes | cowsay -w | lolcat --random -x
elif [[ "$random" == "33" ]]; then
fortune work | cowsay -w | lolcat --random -x
elif [[ "$random" == "34" ]]; then
fortune pets | cowsay -w | lolcat --random -x
else
fortune ascii-art | lolcat --random -x
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment