Remove some unused aliases and files
This commit is contained in:
parent
558fecd30b
commit
4a995cecc8
2 changed files with 2 additions and 50 deletions
37
dotdrop.sh
37
dotdrop.sh
|
@ -1,37 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# author: deadc0de6 (https://github.com/deadc0de6)
|
|
||||||
# Copyright (c) 2017, deadc0de6
|
|
||||||
|
|
||||||
# check for readlink/realpath presence
|
|
||||||
# https://github.com/deadc0de6/dotdrop/issues/6
|
|
||||||
rl="readlink -f"
|
|
||||||
|
|
||||||
if ! ${rl} "${0}" >/dev/null 2>&1; then
|
|
||||||
rl="realpath"
|
|
||||||
|
|
||||||
if ! hash ${rl}; then
|
|
||||||
echo "\"${rl}\" not found!" && exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# setup variables
|
|
||||||
args=("$@")
|
|
||||||
cur=$(dirname "$(${rl} "${0}")")
|
|
||||||
opwd=$(pwd)
|
|
||||||
cfg="${cur}/config.yaml"
|
|
||||||
sub="dotdrop"
|
|
||||||
|
|
||||||
# pivot
|
|
||||||
cd "${cur}" || { echo "Directory \"${cur}\" doesn't exist, aborting." && exit 1; }
|
|
||||||
# init/update the submodule
|
|
||||||
if [ "${DOTDROP_AUTOUPDATE-yes}" = yes ] ; then
|
|
||||||
git submodule update --init --recursive
|
|
||||||
git submodule update --remote dotdrop
|
|
||||||
fi
|
|
||||||
# launch dotdrop
|
|
||||||
PYTHONPATH=dotdrop python3 -m dotdrop.dotdrop "${args[@]}"
|
|
||||||
ret="$?"
|
|
||||||
# pivot back
|
|
||||||
cd "${opwd}" || { echo "Directory \"${opwd}\" doesn't exist, aborting." && exit 1; }
|
|
||||||
# exit with dotdrop exit code
|
|
||||||
exit ${ret}
|
|
|
@ -102,9 +102,6 @@ clean() {
|
||||||
alias startvpn='sudo systemctl start wg-quick@wg0.service'
|
alias startvpn='sudo systemctl start wg-quick@wg0.service'
|
||||||
alias stopvpn='sudo systemctl stop wg-quick@wg0.service'
|
alias stopvpn='sudo systemctl stop wg-quick@wg0.service'
|
||||||
|
|
||||||
# connect to metropolia vpn
|
|
||||||
alias metropoliavpn='sudo openconnect -u markoak --passwd-on-stdin vpn.metropolia.fi'
|
|
||||||
|
|
||||||
# read qrcode from selection
|
# read qrcode from selection
|
||||||
qr() { grim -g "$(slurp -d)" - | zbarimg PNG:- }
|
qr() { grim -g "$(slurp -d)" - | zbarimg PNG:- }
|
||||||
|
|
||||||
|
@ -117,21 +114,13 @@ cpick() { grim -g "$(slurp -p)" -t ppm - | convert - -format "%[pixel:p{0,0}]" t
|
||||||
#iwctl aliases
|
#iwctl aliases
|
||||||
alias i='iwctl station wlan0'
|
alias i='iwctl station wlan0'
|
||||||
|
|
||||||
# change cpu power settings
|
|
||||||
gpulow() {
|
|
||||||
echo low | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level
|
|
||||||
}
|
|
||||||
gpuauto() {
|
|
||||||
echo auto | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level
|
|
||||||
}
|
|
||||||
|
|
||||||
# monitor cpu freq
|
# monitor cpu freq
|
||||||
cpufreq() { watch -n 1 eval "cat /proc/cpuinfo | grep MHz" }
|
cpufreq() { watch -n 1 eval "cat /proc/cpuinfo | grep MHz" }
|
||||||
|
|
||||||
# dotdrop
|
# dotdrop
|
||||||
|
dotdrop() { source $DOTREPO/secrets/secrets && $DOTREPO/dotdrop/dotdrop.sh --cfg=$DOTREPO/config.toml $@ }
|
||||||
|
sdotdrop() { source $DOTREPO/secrets/secrets && sudo -E $DOTREPO/dotdrop/dotdrop.sh --cfg=$DOTREPO/config-root.toml $@ }
|
||||||
updatesecrets() { bash $DOTREPO/secrets/secrets.sh; chmod 600 $DOTREPO/secrets/secrets }
|
updatesecrets() { bash $DOTREPO/secrets/secrets.sh; chmod 600 $DOTREPO/secrets/secrets }
|
||||||
dotdrop() { source $DOTREPO/secrets/secrets && $DOTREPO/dotdrop.sh --cfg=$DOTREPO/config.toml $@ }
|
|
||||||
sdotdrop() { source $DOTREPO/secrets/secrets && sudo -E $DOTREPO/dotdrop.sh --cfg=$DOTREPO/config-root.toml $@ }
|
|
||||||
compdef _dotdrop-completion.zsh sdotdrop
|
compdef _dotdrop-completion.zsh sdotdrop
|
||||||
alias dotgit='git -C $DOTREPO'
|
alias dotgit='git -C $DOTREPO'
|
||||||
dotsync() { cd $DOTREPO && gpull && ga && gc && gpush && cd $OLDPWD }
|
dotsync() { cd $DOTREPO && gpull && ga && gc && gpush && cd $OLDPWD }
|
||||||
|
|
Loading…
Reference in a new issue