From 4a995cecc8d844585bd98fa00f705e4820933fb9 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 6 Aug 2022 12:18:43 +0300 Subject: [PATCH] Remove some unused aliases and files --- dotdrop.sh | 37 --------------------------------- home/.config/zsh/03-aliases.zsh | 15 ++----------- 2 files changed, 2 insertions(+), 50 deletions(-) delete mode 100755 dotdrop.sh diff --git a/dotdrop.sh b/dotdrop.sh deleted file mode 100755 index 8c458a5..0000000 --- a/dotdrop.sh +++ /dev/null @@ -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} diff --git a/home/.config/zsh/03-aliases.zsh b/home/.config/zsh/03-aliases.zsh index dedf1c3..755b078 100644 --- a/home/.config/zsh/03-aliases.zsh +++ b/home/.config/zsh/03-aliases.zsh @@ -102,9 +102,6 @@ clean() { alias startvpn='sudo systemctl start 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 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 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 cpufreq() { watch -n 1 eval "cat /proc/cpuinfo | grep MHz" } # 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 } -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 alias dotgit='git -C $DOTREPO' dotsync() { cd $DOTREPO && gpull && ga && gc && gpush && cd $OLDPWD }