From bb88742ca8df0f7636abd34e5a3cf375c05fa758 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 2 Feb 2023 12:25:52 -0500 Subject: [PATCH] arkenfox user.js to update automatically --- static/larbs.sh | 22 ++++++++++++++++++++-- static/progs.csv | 3 ++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/static/larbs.sh b/static/larbs.sh index 353ac25..52c984b 100644 --- a/static/larbs.sh +++ b/static/larbs.sh @@ -203,12 +203,30 @@ vimplugininstall() { } makeuserjs(){ + # Get the Arkenfox user.js and prepare it. arkenfox="$pdir/arkenfox.js" - larbs="/home/$name/.config/firefox/larbs.js" + overrides="$pdir/user-overrides.js" userjs="$pdir/user.js" + ln -fs "/home/$name/.config/firefox/larbs.js" "$overrides" [ ! -f "$arkenfox" ] && curl -sL "https://raw.githubusercontent.com/arkenfox/user.js/master/user.js" > "$arkenfox" - cat "$arkenfox" "$larbs" > "$userjs" + cat "$arkenfox" "$overrides" > "$userjs" chown "$name:wheel" "$arkenfox" "$userjs" + # Install the updating script. + mkdir -p /usr/local/lib /etc/pacman.d/hooks + cp "/home/$name/.local/bin/arkenfox-auto-update" /usr/local/lib/ + chown root:root /usr/local/lib/arkenfox-auto-update + chmod 755 /usr/local/lib/arkenfox-auto-update + # Trigger the update when needed via a pacman hook. + echo "[Trigger] +Operation = Upgrade +Type = Package +Target = firefox +Target = librewolf +[Action] +Description=Update Arkenfox user.js +When=PostTransaction +Depends=arkenfox-user.js +Exec=/usr/local/lib/arkenfox-auto-update" > /etc/pacman.d/hooks/arkenfox.hook } installffaddons(){ diff --git a/static/progs.csv b/static/progs.csv index dea7086..eb628f8 100644 --- a/static/progs.csv +++ b/static/progs.csv @@ -29,7 +29,8 @@ A,gtk-theme-arc-gruvbox-git,"gives the dark GTK theme used in LARBS." ,man-db,"lets you read man pages of programs." ,ncmpcpp,"a ncurses interface for music with multiple formats and a powerful tag editor." ,newsboat,"is a terminal RSS client." -A,librewolf-bin,"the default browser of LARBS which also comes with ad-blocking and other sensible and necessary features by default." +A,librewolf-bin,"is the default browser of LARBS which also comes with ad-blocking and other sensible and necessary features by default." +A,arkenfox-user.js,"provides hardened security settings for Firefox and Librewolf to avoid Mozilla spyware and general web fingerprinting." ,noto-fonts,"is an expansive font package." ,noto-fonts-emoji,"is an emoji font." ,ntfs-3g,"allows accessing NTFS partitions."