diff options
Diffstat (limited to 'home/xyz/.local')
-rwxr-xr-x | home/xyz/.local/bin/upd | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/home/xyz/.local/bin/upd b/home/xyz/.local/bin/upd index 1245ec22..10f1d853 100755 --- a/home/xyz/.local/bin/upd +++ b/home/xyz/.local/bin/upd @@ -2,35 +2,35 @@ all () { fast - userjs + #userjs clean - qb + #qb refl - music + #music usb - xmr + #xmr } clean () { - nsxiv -c + #nsxiv -c # my ways # -exec can't replace -execdir here - find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty -execdir rmdir -- '{}' \+ + #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty -execdir rmdir -- '{}' \+ # -exec can replace -execdir here #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -execdir rmdir --ignore-fail-on-non-empty -- '{}' \+ # nsxiv man page way #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty ! -name '.' -exec rmdir -- '{}' \; - cd "$HOME/.mozilla/firefox/xxxxxxxx.fly/prefsjs_backups" || exit + #cd "$HOME/.mozilla/firefox/xxxxxxxx.fly/prefsjs_backups" || exit # https://stackoverflow.com/a/34862475/9008720 - ls -t | tail -n +11 | tr '\n' '\0' | xargs -0 rm -- + #ls -t | tail -n +11 | tr '\n' '\0' | xargs -0 rm -- # https://unix.stackexchange.com/questions/92095/reset-atq-list-to-zero - sudo systemctl stop atd - echo 0 | sudo tee /var/spool/atd/.SEQ > /dev/null - sudo systemctl start atd + #sudo systemctl stop atd + #echo 0 | sudo tee /var/spool/atd/.SEQ > /dev/null + #sudo systemctl start atd - rm -rf "$XDG_VIDEOS_DIR/recordings/tmp/" + #rm -rf "$XDG_VIDEOS_DIR/recordings/tmp/" paru -aSc --noconfirm } @@ -41,21 +41,21 @@ fast () { misc } -userjs () { - kill $(pidof "$BROWSER") - # change working dir for cleaner - cd "$HOME/.mozilla/firefox/xxxxxxxx.fly" || exit - arkenfox-cleaner -s - arkenfox-updater -s -} +#userjs () { +# kill $(pidof "$BROWSER") +# # change working dir for cleaner +# cd "$HOME/.mozilla/firefox/xxxxxxxx.fly" || exit +# arkenfox-cleaner -s +# arkenfox-updater -s +#} misc () { "$EDITOR" +PlugClean! +PlugUpdate +qa tldr --update - sudo hardcode-fixer - awk '!a[$0]++' "$XDG_DATA_HOME/sdcv_history" | sponge "$XDG_DATA_HOME/sdcv_history" + #sudo hardcode-fixer + #awk '!a[$0]++' "$XDG_DATA_HOME/sdcv_history" | sponge "$XDG_DATA_HOME/sdcv_history" # temperory solution before find a way of using git submodule or subtree with `cfg -l` - git --git-dir=/home/xyz/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks/.git/ --work-tree=/home/xyz/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks/ pull + #git --git-dir=/home/xyz/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks/.git/ --work-tree=/home/xyz/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks/ pull rustup update } @@ -80,10 +80,10 @@ checkrebuild: $(checkrebuild | awk '$2!~"zoom|miniconda3"{printf("%s ",$2)}') " } -qb () { - rm -r -- "$HOME/programs/qbittorrent_search_plugins/" - curlqb "$HOME/programs/qbittorrent_search_plugins/" -} +#qb () { +# rm -r -- "$HOME/programs/qbittorrent_search_plugins/" +# curlqb "$HOME/programs/qbittorrent_search_plugins/" +#} refl () { # why not use http: @@ -92,7 +92,7 @@ refl () { # rsync may need to change XferCommand in /etc/pacman.conf # https://www.reddit.com/r/archlinux/comments/mynw6e/rsync_mirrors_with_pacman/ # need --delay so no super out of sync mirrors - sudo reflector --verbose --save /etc/pacman.d/mirrorlist --country us --protocol https --delay 1 --latest 25 --score 25 --fastest 10 + sudo reflector --verbose --save /etc/pacman.d/mirrorlist --country ro --protocol https --delay 1 --latest 20 --score 20 --fastest 10 } usb () { @@ -109,34 +109,34 @@ usb () { sync } -xmr () { - # use cd to workaround monero-blockchain-export.log log file save in current dir? issue, haven't tested - cd "$HOME/.bitmonero" || exit - monero-blockchain-export --output-file /run/media/xyz/bd0/archive/monero/blockchain.raw - # not sure if useful or not - sync -} +#xmr () { +# # use cd to workaround monero-blockchain-export.log log file save in current dir? issue, haven't tested +# cd "$HOME/.bitmonero" || exit +# monero-blockchain-export --output-file /run/media/xyz/bd0/archive/monero/blockchain.raw +# # not sure if useful or not +# sync +#} -music () { - yt-dlp -f 'bestaudio[ext=opus]/bestaudio' --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks -} +#music () { +# yt-dlp -f 'bestaudio[ext=opus]/bestaudio' --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks +#} if [ $# -eq 0 ]; then fast else - while getopts acfjmMpqrux opt; do + while getopts acfmpru opt; do case $opt in a)all;; c)clean;; f)fast;; - j)userjs;; + #j)userjs;; m)misc;; - M)music;; + #M)music;; p)pac;; - q)qb;; + #q)qb;; r)refl;; u)usb;; - x)xmr;; + #x)xmr;; \?)exit 1;; esac done |