From 0bc78c17d8ae261c0d53ca24827e654ae2e93fc7 Mon Sep 17 00:00:00 2001 From: askiiart Date: Thu, 1 Aug 2024 14:48:42 -0500 Subject: [PATCH] add librewolf configs, minor updates --- distro-specific-scripts/fedora-sway.sh | 3 +++ librewolf/prefs.js | 4 +++ notes.md | 3 +++ restore.sh | 36 +++++++++++++++++++------- run-distro-de-script.sh | 0 5 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 librewolf/prefs.js create mode 100644 notes.md mode change 100644 => 100755 run-distro-de-script.sh diff --git a/distro-specific-scripts/fedora-sway.sh b/distro-specific-scripts/fedora-sway.sh index f632d3c..3e74962 100755 --- a/distro-specific-scripts/fedora-sway.sh +++ b/distro-specific-scripts/fedora-sway.sh @@ -24,6 +24,9 @@ elif command_exists "rpm-ostree"; then rpm-ostree install SwayNotificationCenter fi +# make GUI stuff work when running as root (e.g. gparted) +xhost +SI:localuser:root + # Install catppuccin grub theme #git clone --depth=1 https://github.com/catppuccin/grub #sudo mkdir /etc/grub-themes/ diff --git a/librewolf/prefs.js b/librewolf/prefs.js new file mode 100644 index 0000000..c895613 --- /dev/null +++ b/librewolf/prefs.js @@ -0,0 +1,4 @@ +user_pref("dom.private-attribution.submission.enabled", false); +user_pref("media.gmp-gmpopenh264.enabled", true); +user_pref("widget.non-native-theme.scrollbar.size.override", 14); +user_pref("widget.gtk.overlay-scrollbars.enabled", false); \ No newline at end of file diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..ebe440f --- /dev/null +++ b/notes.md @@ -0,0 +1,3 @@ +- i3 is not used nor updated, and its script only exists for arch, however it *should* work. might be used soon but currently is super out of date and i have no plans to update it at the moment. +- librewolf configs are "declarative", so-to-speak, and will not be included in `backup.sh`, they must be set in `prefs.js`. and if one of the already-existing settings it changed, it must be updated manually. +- only currently updated: fedora w/ sway (same for the configs repo) \ No newline at end of file diff --git a/restore.sh b/restore.sh index 808be7e..d5ebd54 100755 --- a/restore.sh +++ b/restore.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -shopt -s extglob +shopt -s extglob # i don't even know what still uses this, if anything, but whatever... i think it's line 12? (commit b8ad9ef339) GIT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) command_exists() { type "$1" &>/dev/null; } @@ -63,8 +63,9 @@ cp -r $GIT_DIR/rofi $HOME/.config/rofi/ # GTK dark theme mkdir ~/.config/gtk-3.0 -echo -e "[settings]\ngtk-application-prefer-dark-theme = true" > ~/.config/gtk-3.0/settings.ini +echo -e "[Settings]\ngtk-application-prefer-dark-theme = true" >~/.config/gtk-3.0/settings.ini gsettings set org.gnome.desktop.interface color-scheme prefer-dark +gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark # fix-gamepad.service if ! command_exists "nixos-rebuild" && command_exists "systemctl"; then @@ -82,6 +83,30 @@ rm -rf $HOME/.config/waybar/ mkdir $HOME/.config/waybar/ cp -r $GIT_DIR/waybar/* $HOME/.config/waybar/ +# sway-runner +# TODO: make this work on nix too +if command_exists "xbps-install"; then + sudo cp $GIT_DIR/sway-runner /usr/bin/sway-runner + sudo chown root /usr/bin/sway-runner +fi + +# Librewolf +# to make sure a profile exists to apply this to +if [ $(find ~/.librewolf -mindepth 1 -maxdepth 1 -type d -name "*.*" | wc -l) -eq 0 ]; then + librewolf & + pkill librewolf + sleep 1 +fi + +cd ~/.librewolf +for dir in $(find . -mindepth 1 -maxdepth 1 -type d -name "*.*"); do + for line in $(cat $GIT_DIR/librewolf/prefs.js); do + if ! grep -q "$line" $dir/prefs.js; then + echo "$line" >>$dir/prefs.js + fi + done +done + # VS code mkdir -p $HOME/.config/Code/User/ mkdir -p $HOME/.vscode/ @@ -96,10 +121,3 @@ elif command_exists "code-oss"; then fi echo "restore.sh done!" - -# sway-runner -# TODO: make this work on nix too -if command_exists "xbps-install"; then - sudo cp $GIT_DIR/sway-runner /usr/bin/sway-runner - sudo chown root /usr/bin/sway-runner -fi diff --git a/run-distro-de-script.sh b/run-distro-de-script.sh old mode 100644 new mode 100755