install.fairie/dotfiles/.local/share/chezmoi/home/private_dot_config/shell/functions
Brian Zalewski 7bd467cb73 Update dotfiles/.local/share/chezmoi/home/Library/Application Support/tabby/plugins/symlink_package-lock.json, dotfiles/.local/share/chezmoi/home/Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Dark.dvtcolortheme, dotfiles/.local/share/chezmoi/home/Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Light.dvtcolortheme, dotfiles/.local/share/chezmoi/home/Library/Preferences/com.apple.Terminal.plist, dotfiles/.local/share/chezmoi/home/run_update, dotfiles/.local/share/chezmoi/home/AppData/Local/clink/oh-my-posh.lua, dotfiles/.local/share/chezmoi/home/.chezmoitemplates/chassis-info, dotfiles/.local/share/chezmoi/home/.chezmoitemplates/cpu-info, dotfiles/.local/share/chezmoi/home/.chezmoitemplates/profile.sh, dotfiles/.local/share/chezmoi/home/dot_cache/zsh/.gitkeep, dotfiles/.local/share/chezmoi/home/dot_local/assets/Betelgeuse.macOS.terminal, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_bwc, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-export, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_chrome-profile-import, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-export, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_firefox-profile-import, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_fonttest, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-dotfiles, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-terminal-theme, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_ksetwallpaper, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_logg, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_opener, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_provision, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_quickstart, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_ramqube, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_slack, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_squash-symlink, dotfiles/.local/share/chezmoi/home/dot_local/konsole/Default.profile, dotfiles/.local/share/chezmoi/home/dot_local/scripts/macos.bash, dotfiles/.local/share/chezmoi/home/dot_local/scripts/motd.bash, dotfiles/.local/share/chezmoi/home/dot_local/scripts/p10k.zsh, dotfiles/.local/share/chezmoi/home/dot_local/share/fonts/FontAwesome.ttf, dotfiles/.local/share/chezmoi/home/dot_local/share/fonts/Weather-Icons.ttf, dotfiles/.local/share/chezmoi/home/dot_local/share/git-core/templates/hooks/post-commit, dotfiles/.local/share/chezmoi/home/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/home/dot_local/state/zsh/.gitkeep, dotfiles/.local/share/chezmoi/home/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/home/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/home/dot_ssh/private_config.tmpl, dotfiles/.local/share/chezmoi/home/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/home/dot_vim/autoload/lightline/colorscheme/Betelgeuse.vim, dotfiles/.local/share/chezmoi/home/dot_vim/colors/Betelgeuse.vim, dotfiles/.local/share/chezmoi/home/dot_vim/vimrc, dotfiles/.local/share/chezmoi/home/private_dot_config/Kvantum/kvantum.config, dotfiles/.local/share/chezmoi/home/private_dot_config/alacritty/alacritty.yml, dotfiles/.local/share/chezmoi/home/private_dot_config/asdf/asdfrc.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/asdf/default-cargo-pkgs.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/asdf/default-golang-pkgs.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/asdf/default-npm-packages, dotfiles/.local/share/chezmoi/home/private_dot_config/asdf/default-python-pkgs.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/asdf/default-ruby-pkgs.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/bashtop/bashtop.cfg, dotfiles/.local/share/chezmoi/home/private_dot_config/bat/config, dotfiles/.local/share/chezmoi/home/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/brew/whalebrew, dotfiles/.local/share/chezmoi/home/private_dot_config/crontab/config, dotfiles/.local/share/chezmoi/home/private_dot_config/direnv/direnv.toml, dotfiles/.local/share/chezmoi/home/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/home/private_dot_config/firejail/bitwarden.local, dotfiles/.local/share/chezmoi/home/private_dot_config/firejail/chromium.local, dotfiles/.local/share/chezmoi/home/private_dot_config/firejail/code.local, dotfiles/.local/share/chezmoi/home/private_dot_config/firejail/gcloud.local, dotfiles/.local/share/chezmoi/home/private_dot_config/firejail/google-chrome-stable.local, dotfiles/.local/share/chezmoi/home/private_dot_config/firejail/slack.local, dotfiles/.local/share/chezmoi/home/private_dot_config/firejail/thunderbird.local, dotfiles/.local/share/chezmoi/home/private_dot_config/fontconfig/fonts.conf, dotfiles/.local/share/chezmoi/home/private_dot_config/ghorg/conf.yaml.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/git/attributes, dotfiles/.local/share/chezmoi/home/private_dot_config/git/commit-template, dotfiles/.local/share/chezmoi/home/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/home/private_dot_config/gtk-1.0/.gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/gtk-2.0/gtkrc, dotfiles/.local/share/chezmoi/home/private_dot_config/gtk-3.0/settings.ini, dotfiles/.local/share/chezmoi/home/private_dot_config/himalaya/config.toml.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/home/private_dot_config/kitty/Betelgeuse-dark.conf, dotfiles/.local/share/chezmoi/home/private_dot_config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/home/private_dot_config/kitty/kitty.conf, dotfiles/.local/share/chezmoi/home/private_dot_config/ngrok/ngrok.yml.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/home/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/home/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/home/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions.json, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/keybindings.json, dotfiles/.local/share/chezmoi/home/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/home/private_dot_config/putty/.gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/home/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/home/private_dot_config/rofi/config.rasi.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/aliases.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/motd, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/profile, dotfiles/.local/share/chezmoi/home/private_dot_config/slack-term/config.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/tabby/config.yaml.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/tabby/package-lock.json, dotfiles/.local/share/chezmoi/home/private_dot_config/terminator/config, dotfiles/.local/share/chezmoi/home/private_dot_config/tmux/.gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/wget/wgetrc, dotfiles/.local/share/chezmoi/home/private_dot_config/xfce4/terminal/terminalrc, dotfiles/.local/share/chezmoi/home/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/home/private_dot_config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/home/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/home/private_dot_config/gtkrc, dotfiles/.local/share/chezmoi/home/private_dot_config/kcminputrc, dotfiles/.local/share/chezmoi/home/private_dot_config/kdeglobals, dotfiles/.local/share/chezmoi/home/private_dot_config/konsolerc, dotfiles/.local/share/chezmoi/home/private_dot_config/ksplashrc, dotfiles/.local/share/chezmoi/home/private_dot_config/ktimezonedrc, dotfiles/.local/share/chezmoi/home/private_dot_config/kwinrc, dotfiles/.local/share/chezmoi/home/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/home/private_dot_config/plasma-localerc, dotfiles/.local/share/chezmoi/home/private_dot_config/plasmarc, dotfiles/.local/share/chezmoi/home/dot_Xresources, dotfiles/.local/share/chezmoi/home/dot_bash_logout, dotfiles/.local/share/chezmoi/home/dot_bash_profile, dotfiles/.local/share/chezmoi/home/dot_bashrc, dotfiles/.local/share/chezmoi/home/dot_editorconfig, dotfiles/.local/share/chezmoi/home/dot_zshrc, dotfiles/.local/share/chezmoi/home/run_once_before_install-software.sh.tmpl, dotfiles/.local/share/chezmoi/home/run_onchange_after_bash-completions, dotfiles/.local/share/chezmoi/home/run_onchange_after_crontab.tmpl, dotfiles/.local/share/chezmoi/.chezmoiroot
2022-11-22 19:59:10 +00:00

118 lines
3.5 KiB
Text

# Install WebDriverAgent on iOS device
appiumwebdriver() {
# read -r "Enter the UDID of the device you wish to install WebDriverAgent on: " UDID_INPUT
mkdir -p Resources/WebDriverAgent.bundle
bash ./Scripts/bootstrap.sh -d
cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent || return
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=${UDID_INPUT}" test
}
# Change directories and view contents at the same time
cl() {
DIR="$*"
# if no DIR given, go home
if [ $# -lt 1 ]; then
DIR=$HOME
fi
builtin cd "${DIR}" &&
# use your preferred ls command
ls -F --color=auto
}
# Safer cp with progress bar and backup to /tmp
cpv() {
rsync -pogbr -hhh --backup-dir="/tmp/rsync-${USERNAME}" -e /dev/null --progress "$@"
}
# Checks status of a website on downforeveryoneorjustme.com
down4me() {
curl -s "http://www.downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g'
}
# Easier version of find command
find() {
if [ $# = 1 ]; then
# shellcheck disable=SC2145
command find . -iname "*$@*"
else
command find "$@"
fi
}
# Opens current repository in browser
gitopen() {
git remote -v | head -n 1 | awk -F "@" '{print $2}' | awk -F " " '{print $1}' | sed 's/:/\//g' | sed 's/.git//g' | awk '{print "http://"$1}' | xargs open
}
# Open Mac OS X desktop on a Linux machine
macosx() {
docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:big-sur
}
# Generate a random string of X length
randomstring() {
if [ -z "$1" ]; then
head /dev/urandom | tr -dc A-Za-z0-9 | head -c "$1"
else
echo "Pass the number of characters you would like the string to be. Example: randomstring 14"
fi
}
# Reset Docker to factory settings
resetdocker() {
set +e
CONTAINER_COUNT="$(docker ps -a -q | wc -l)"
if [ "$CONTAINER_COUNT" -gt 0 ]; then
docker stop "$(docker ps -a -q)"
docker rm "$(docker ps -a -q)"
fi
VOLUME_COUNT="$(docker volume ls -q | wc -l)"
if [ "$VOLUME_COUNT" -gt 0 ]; then
docker volume rm "$(docker volume ls -q)"
fi
NETWORK_COUNT="$(docker network ls -q | wc -l)"
if [ "$NETWORK_COUNT" -gt 0 ]; then
docker network rm "$(docker network ls -q)"
fi
docker system prune -a --force
}
# ripgrep-all
rgafzf() {
RG_PREFIX="rga --files-with-matches"
local file
file="$(
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \
fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \
--phony -q "$1" \
--bind "change:reload:$RG_PREFIX {q}" \
--preview-window="70%:wrap"
)" &&
echo "opening $file" &&
xdg-open "$file"
}
# Easy file sharing from the command line, using transfer.sh
transfer() {
if [ $# -eq 0 ]; then
echo -e "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>" >&2
return 1
fi
if tty -s; then
file="$1"
file_name=$(basename "$file")
if [ ! -e "$file" ]; then
echo "$file: No such file or directory" >&2
return 1
fi
if [ -d "$file" ]; then
file_name="$file_name.zip"
(cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null,
else
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" <"$file" | tee /dev/null
fi
else
file_name=$1
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
fi
}