diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2024-06-05 22:44:59 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2024-06-05 22:44:59 -0700 |
commit | f96d73e8c2b2ca4e9a7897ab98d50d9f2596e223 (patch) | |
tree | 3938064c0dc73b3172179ef4af3c150ac290ceb0 | |
parent | cc49f58b0e702b62f938fd661df7f7e8abd15346 (diff) |
upd: remove dyafk related, dyafk useless, not count as watch time
-rwxr-xr-x | sh/upd | 27 |
1 files changed, 6 insertions, 21 deletions
@@ -8,7 +8,7 @@ all () { qb fi [ "$hostname" = xyzinsp ] && music - if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ] || [ "$hostname" = xyzstudio ]; then + if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then userjs fi } @@ -90,19 +90,12 @@ clean () { fi - if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ] || [ "$hostname" = xyzstudio ]; then - case "$hostname" in - xyzstudio) profile_dir="$HOME/.mozilla/firefox/dyafk";; - *) profile_dir="$HOME/.mozilla/firefox/xxxxxxxx.fly";; - esac - cd "$profile_dir/prefsjs_backups" || exit + if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then + 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 -- - cd "$profile_dir/userjs_backups" || exit + cd "$HOME/.mozilla/firefox/xxxxxxxx.fly/userjs_backups" || exit ls -t | tail -n +11 | tr '\n' '\0' | xargs -0 rm -- - fi - - if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then # 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 @@ -126,20 +119,12 @@ fast () { } userjs () { - case "$hostname" in - xyzstudio) - profile_dir="$HOME/.mozilla/firefox/dyafk" - sudo systemctl stop dyafk@xyz - ;; - *) profile_dir="$HOME/.mozilla/firefox/xxxxxxxx.fly";; - esac kill $(pidof "$BROWSER") # change working dir for cleaner - cd "$profile_dir" || exit + cd "$HOME/.mozilla/firefox/xxxxxxxx.fly" || exit arkenfox-cleaner -s # when multiple firefox profiles, it will prompt me to choose, which breaks automation, so I explicitly specify one profile - arkenfox-updater -s -p "$profile_dir" - [ "$hostname" = xyzstudio ] && sudo systemctl start dyafk@xyz + arkenfox-updater -s -p "$HOME/.mozilla/firefox/xxxxxxxx.fly" } misc () { |