diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-05-31 19:49:37 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-05-31 19:49:37 -0700 |
commit | ad382962e017140c8f2a0b0df520fb9c7f27a38b (patch) | |
tree | aa97112b885c409c4e372e4ecbfdb860b8c35681 /home | |
parent | ff6261c2772612a7a5949737660614ee24b61587 (diff) |
edit some files
Diffstat (limited to 'home')
-rw-r--r-- | home/xyz/.config/git/config | 6 | ||||
-rwxr-xr-x | home/xyz/.local/bin/upd | 84 | ||||
-rw-r--r-- | home/xyz/.profile | 26 |
3 files changed, 55 insertions, 61 deletions
diff --git a/home/xyz/.config/git/config b/home/xyz/.config/git/config index e37c22e9..832decc8 100644 --- a/home/xyz/.config/git/config +++ b/home/xyz/.config/git/config @@ -8,9 +8,3 @@ program = gpg [url "https://github.com/"] insteadOf = git://github.com/ -# `git lfs install` -[filter "lfs"] - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true - clean = git-lfs clean -- %f 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 diff --git a/home/xyz/.profile b/home/xyz/.profile index f6dd5e8c..051d6345 100644 --- a/home/xyz/.profile +++ b/home/xyz/.profile @@ -21,7 +21,7 @@ export HISTFILESIZE=15000 export HISTCONTROL=ignorespace export EDITOR=nvim -export BROWSER=firefox +#export BROWSER=firefox export PAGER=less # -X seems can keep the output if exit less? # -F is useful when sdcv need user to manually select similar word, after selection if no -F less will not quit if one screen @@ -30,16 +30,16 @@ export PAGER=less # CALCURSE_PAGER less can't use -F, else ? and > hotkey will only blink the text export LESS=-FRXi -export SDCV_PAGER="$PAGER" -export SDCV_HISTSIZE=10000 +#export SDCV_PAGER="$PAGER" +#export SDCV_HISTSIZE=10000 export MANPAGER='nvim -M +Man!' # This MANSECT prioritize POSIX manpages. After use it for a long time, I think it is suitable for me any more. #export MANSECT='1p:1:n:l:8:3p:3:0p:0:2:5:4:9:6:7' -export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" +#export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" export INPUTRC="$XDG_CONFIG_HOME/.inputrc" # Thanks to https://github.com/trialuser02/qt6gtk2/pull/5 # Now qt5 with aur qt5-styleplugins and qt6 with aur qt6gtk2 makes qt5 and qt6 appearance universal! -export QT_QPA_PLATFORMTHEME=gtk2 +#export QT_QPA_PLATFORMTHEME=gtk2 #export QT_STYLE_OVERRIDE=kvantum #export SXHKD_SHELL=sh # enable color for `tree` command, not forced @@ -47,10 +47,10 @@ export CLICOLOR=1 # for pacdiff, without using aur neovim-drop-in or neovim-symlinks export DIFFPROG='nvim -d' export MAKEFLAGS="-j$(nproc --all)" -export DOTREMINDERS="$HOME/programs/reminders/.reminders" -export GTK_IM_MODULE=fcitx -export QT_IM_MODULE=fcitx -export XMODIFIERS=@im=fcitx +#export DOTREMINDERS="$HOME/programs/reminders/.reminders" +#export GTK_IM_MODULE=fcitx +#export QT_IM_MODULE=fcitx +#export XMODIFIERS=@im=fcitx # use sudo find for some files or dirs that has no permission ex: ~/.cache/paru/clone/ #export FZF_DEFAULT_COMMAND="fd --no-ignore --hidden --exclude .git" #export FZF_CTRL_T_COMMAND="fd --absolute-path --no-ignore --hidden --exclude .git" @@ -81,7 +81,7 @@ export SCR_HEIGHT=1080 #export GDK_SCALE=2 #export GDK_DPI_SCALE=0.5 -playerctld daemon +#playerctld daemon # must source .bashrc after export _ZO_ECHO=1 and INPUTRC=..., else these two env will has no effect, don't know why # here `. ~/.bashrc` same as `source ~/.bashrc`, see `source filename` in `man bash`, and `. file` in `man dash` @@ -92,6 +92,6 @@ playerctld daemon # startx when login, should be put after environmental variables for .xinitrc to use # use `[ "$XDG_VTNR" ]` to avoid "-bash: [: : integer expression expected" warning/error message, when `sudo su - xyz` or ssh into a remote server, not sure if best practice or not -if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then - exec startx -fi +#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then +# exec startx +#fi |