Compare commits
9 Commits
4a555a79b1
...
3f4f572330
Author | SHA1 | Date | |
---|---|---|---|
|
3f4f572330 | ||
|
5ba41b3e9e | ||
|
4bfab68b72 | ||
|
160f03d2f2 | ||
|
ce705f4584 | ||
|
6489dc0441 | ||
|
a9eefee9ac | ||
|
cad3d15e55 | ||
|
bb8c792588 |
@ -6,7 +6,6 @@ tap "homebrew/core"
|
||||
tap "homebrew/services"
|
||||
|
||||
brew "asdf"
|
||||
brew "cloc"
|
||||
brew "cmake"
|
||||
brew "git-lfs"
|
||||
brew "git"
|
||||
@ -34,7 +33,6 @@ cask "google-chrome"
|
||||
cask "iina"
|
||||
cask "iterm2"
|
||||
cask "mongodb-compass"
|
||||
cask "onyx"
|
||||
cask "openemu"
|
||||
cask "skype"
|
||||
cask "spotify"
|
||||
|
14
home/.zsh/cmd/adi.sh
Executable file
14
home/.zsh/cmd/adi.sh
Executable file
@ -0,0 +1,14 @@
|
||||
### ADB
|
||||
# mnemonic [AD]b [I]nstall
|
||||
# install apk via adb
|
||||
|
||||
apk=${1}
|
||||
|
||||
if [[ -z $apk ]]; then
|
||||
apk=$(find . -maxdepth 5 -type f -name '*.apk' ! -iname ".*" | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[adb:install]'")
|
||||
fi
|
||||
|
||||
if [[ $apk ]]; then
|
||||
echo "Trying $apk"
|
||||
adb install -g -r "$apk"
|
||||
fi
|
14
home/.zsh/cmd/adpo.sh
Executable file
14
home/.zsh/cmd/adpo.sh
Executable file
@ -0,0 +1,14 @@
|
||||
### ADB
|
||||
# mnemonic [AD]b [P]ush [O]BB
|
||||
# pushes obb directory via adb
|
||||
|
||||
obbdir=${1}
|
||||
|
||||
if [[ -z $obbdir ]]; then
|
||||
obbdir=$(find . -maxdepth 5 -name '*.obb' ! -iname ".*" -exec dirname {} \; | sort -u | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[adb:push]'")
|
||||
fi
|
||||
|
||||
if [[ $obbdir ]]; then
|
||||
echo "Trying $obbdir"
|
||||
adb push "$obbdir" /sdcard/Android/obb/
|
||||
fi
|
14
home/.zsh/cmd/adu.sh
Executable file
14
home/.zsh/cmd/adu.sh
Executable file
@ -0,0 +1,14 @@
|
||||
### ADB
|
||||
# mnemonic [AD]b [U]nistall
|
||||
# install apk via adb
|
||||
|
||||
apk=${1}
|
||||
|
||||
if [[ -z $apk ]]; then
|
||||
apk=$(adb shell cmd package list packages | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[adb:uninstall]'" | sed 's/package://g')
|
||||
fi
|
||||
|
||||
if [[ $apk ]]; then
|
||||
echo "Trying $apk"
|
||||
adb uninstall $apk
|
||||
fi
|
@ -1,5 +1,5 @@
|
||||
### PASS
|
||||
# mnemonic: [P]ass[F]ind
|
||||
# mnemonic: [P]ass [F]ind
|
||||
# search password in the passwotd store
|
||||
# press [enter] to copy selected password
|
||||
# press [escape] to exit
|
||||
@ -32,7 +32,6 @@ candidates=$(list_entries)
|
||||
|
||||
res=$(candidate_selector "$query" "$candidates")
|
||||
if [ -n "$res" ]; then
|
||||
pass show "$res" | tail -n +2 || exit $?
|
||||
pass show -c "$res"
|
||||
else
|
||||
exit 1
|
||||
|
14
home/.zsh/cmd/ssf.sh
Executable file
14
home/.zsh/cmd/ssf.sh
Executable file
@ -0,0 +1,14 @@
|
||||
### SSH
|
||||
# mnemonic [SS]h [F]ind and connect
|
||||
# find ssh host from known hosts and connect
|
||||
|
||||
host=${1}
|
||||
|
||||
if [[ -z $host ]]; then
|
||||
host=$(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e 's/,.*//g' | sort -u | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[ssh:connect]'" | awk '{print $1}')
|
||||
fi
|
||||
|
||||
if [[ $host ]]; then
|
||||
echo "Connecting to $host"
|
||||
ssh $host
|
||||
fi
|
@ -1,41 +0,0 @@
|
||||
_zplug-check-interval() {
|
||||
now=$(date +%s)
|
||||
if [ -f "${1}" ]; then
|
||||
last_update=$(cat "${1}")
|
||||
else
|
||||
last_update=0
|
||||
fi
|
||||
interval=$(expr ${now} - ${last_update})
|
||||
echo "${interval}"
|
||||
}
|
||||
|
||||
_zplug-check-for-updates() {
|
||||
if [ -z "${ZPLUG_PLUGIN_UPDATE_DAYS}" ]; then
|
||||
ZPLUG_PLUGIN_UPDATE_DAYS=14
|
||||
fi
|
||||
|
||||
if [ -z "${ZPLUG_PLUGIN_UPDATE_FILE}" ]; then
|
||||
ZPLUG_PLUGIN_UPDATE_FILE="${ZPLUG_HOME:-}/.zplug_plugin_lastupdate"
|
||||
fi
|
||||
|
||||
local day_seconds=$(expr 24 \* 60 \* 60)
|
||||
local plugins_seconds=$(expr ${day_seconds} \* ${ZPLUG_PLUGIN_UPDATE_DAYS})
|
||||
|
||||
local last_plugin=$(_zplug-check-interval ${ZPLUG_PLUGIN_UPDATE_FILE})
|
||||
|
||||
if [ ${last_plugin} -gt ${plugins_seconds} ]; then
|
||||
echo "It has been $(expr ${last_plugin} / $day_seconds) days since your zplug plugins were updated"
|
||||
zplug update
|
||||
|
||||
date +%s >! ${ZPLUG_PLUGIN_UPDATE_FILE}
|
||||
zplug clean --force
|
||||
fi
|
||||
}
|
||||
|
||||
zmodload zsh/system
|
||||
lockfile=${ZPLUG_HOME:-~}/.zplug_autoupdate_lock
|
||||
touch $lockfile
|
||||
if ! which zsystem &> /dev/null || zsystem flock -t 1 $lockfile; then
|
||||
_zplug-check-for-updates
|
||||
command rm -f $lockfile
|
||||
fi
|
@ -7,3 +7,9 @@ export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
|
||||
export GOPRIVATE="go.pkg.cx"
|
||||
|
||||
if [[ "$(uname -m)" == "arm64" ]]; then
|
||||
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}"
|
||||
fi
|
||||
|
||||
source "$HOME/.cargo/env"
|
||||
|
@ -12,11 +12,8 @@ zplug "zplug/zplug", hook-build:'zplug --self-manage'
|
||||
zplug "BurntSushi/ripgrep", from:gh-r, as:command, rename-to:rg
|
||||
zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf
|
||||
zplug "r-darwish/topgrade", from:gh-r, as:command, rename-to:topgrade
|
||||
zplug "regclient/regclient", from:gh-r, as:command, rename-to:regctl
|
||||
zplug "sharkdp/bat", from:gh-r, as:command, rename-to:bat
|
||||
zplug "sharkdp/hexyl", from:gh-r, as:command, rename-to:hexyl
|
||||
zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq
|
||||
zplug "wagoodman/dive", from:gh-r, as:command, rename-to:dive
|
||||
|
||||
zplug "b4b4r07/enhancd", use:init.sh
|
||||
if zplug check "b4b4r07/enhancd"; then
|
||||
@ -43,8 +40,8 @@ zplug "~/.zsh/cmd", from:local, use:'(*).sh', as:command, rename-to
|
||||
zplug "~/.zsh/themes", from:local, use:cheetah.zsh-theme, as:theme
|
||||
|
||||
if [[ $OSTYPE == *darwin* ]]; then
|
||||
zplug "plugins/osx", from:oh-my-zsh
|
||||
zplug "plugins/pass", from:oh-my-zsh
|
||||
zplug "plugins/macos", from:oh-my-zsh
|
||||
fi
|
||||
|
||||
[ -s "$HOME/.zsh.local" ] && source $HOME/.zsh.local
|
||||
|
Loading…
Reference in New Issue
Block a user