function am() { local name dev lsblk while true; do mapfile -t lsblk < <(lsblk -n --paths --list | grep part) COLUMNS=1 select dev in "${lsblk[@]}"; do if [ -z "$dev" ]; then break fi name="$(awk '{print $1}' <<< "$dev")" if mount | grep -q "$name"; then umount "$name" else cd "$(udisksctl mount -b "$name" | awk '{print $NF}')" return fi break done || return done } function bat() { if [ -z "$1" ]; then return 1 fi TERM='tty' $EDITOR --cmd "set lines=$(grep -c '' "$1")" +redraw +q "$1" } function bd() { echo "$@" | base64 -d; echo } function gi() { curl -fL "https://www.toptal.com/developers/gitignore/api/$(printf '%s\n' "$@" | sort -u | paste -sd,)" } function update() { $TERM --hold -e "$SHELL" -xc "sudo pacman -Syu && echo $'\e[32mDONE'" & $TERM --hold -e "$SHELL" -xc "flatpak update && echo -e $'\e[32mDONE'" & $TERM --hold -e "$SHELL" -xc "git --git-dir='$HOME/.dotfiles/' --work-tree='$HOME' submodule update --remote --recursive && echo $'\e[32mDONE'" & } function tmp() { cd "$(mktemp -d "$1"XXX)" || return } alias -- \ -='cd -' \ ......='../../../../..' \ .....='../../../..' \ ....='../../..' \ ...='../..' \ c='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ cp='cp -vi' \ diff='diff --color' \ feh='feh --auto-zoom --scale-down' \ g=git \ grep='grep --color --exclude-dir={.cache,.git,.idea,.venv,.vscode,node_modules}' \ ip='ip -c=auto' \ l='ll -a' \ la='ll -A' \ ll='ls -lh' \ ls='ls --color' \ mail=aerc \ mkdir='mkdir -v' \ mv='mv -vi' \ neofetch=fastfetch \ qcp='qcp -o tabsize=4' \ qmv='qmv -o tabsize=4' \ rm='rm -vI' \ rss=newsraft \ rsync='rsync -P' \ ssh='TERM=xterm-256color ssh' \ sudo='sudo ' \ vi='$EDITOR' \ watch='watch -c ' \ waydroid='cage -- waydroid' \ xargs='xargs ' \ xmr='monero-wallet-cli --daemon-address monero.maby.dev:18081 --trusted-daemon --log-file=/tmp/monero-wallet-cli.log --wallet-file $XDG_CONFIG_HOME/monero/ange' . /usr/share/git/completion/git-completion.bash $(complete -p git) g c