diff --git a/.librewolf/generate.sh b/.librewolf/generate.sh index eb3f078a..62f45e41 100755 --- a/.librewolf/generate.sh +++ b/.librewolf/generate.sh @@ -1,4 +1,3 @@ #!/bin/sh -cd $HOME/.dotfiles || exit -envsubst <.librewolf/installs.template >$HOME/.librewolf/installs.ini -envsubst <.librewolf/profiles.template >$HOME/.librewolf/profiles.ini +cd $HOME/.dotfiles/.librewolf || exit +librewolf --no-remote --CreateProfile "librewolf $HOME/.local/share/librewolf" diff --git a/.librewolf/installs.template b/.librewolf/installs.template deleted file mode 100644 index af226456..00000000 --- a/.librewolf/installs.template +++ /dev/null @@ -1,4 +0,0 @@ -[6C4726F70D182CF7] -Default=$XDG_DATA_HOME/librewolf -Locked=1 - diff --git a/.librewolf/librewolf.overrides.cfg b/.librewolf/librewolf.overrides.cfg index 5f35fd4b..38b0362e 100644 --- a/.librewolf/librewolf.overrides.cfg +++ b/.librewolf/librewolf.overrides.cfg @@ -6,3 +6,4 @@ defaultPref("browser.uidensity", 1); defaultPref("browser.compactmode.show", true); defaultPref("browser.fullscreen.autohide", false); defaultPref("full-screen-api.ignore-widgets", true); +defaultPref("toolkit.legacyUserProfileCustomizations.stylesheets", true); diff --git a/.librewolf/profiles.template b/.librewolf/profiles.template deleted file mode 100644 index d5996a0c..00000000 --- a/.librewolf/profiles.template +++ /dev/null @@ -1,13 +0,0 @@ -[Install6C4726F70D182CF7] -Default=$XDG_DATA_HOME/librewolf -Locked=1 - -[Profile0] -Name=librewolf -IsRelative=0 -Path=$XDG_DATA_HOME/librewolf -Default=1 - -[General] -StartWithLastProfile=1 -Version=2 diff --git a/.local/bin/dotsync b/.local/bin/dotsync index bd896f5d..42006dcc 100755 --- a/.local/bin/dotsync +++ b/.local/bin/dotsync @@ -6,44 +6,53 @@ RED='\033[1;30m' NC='\033[0m' dotfiles="${1:-$HOME/.dotfiles}" -echo "${BLUE}Changing directory to $dotfiles${NC}" +printf "${BLUE}Changing directory to $dotfiles${NC}\n" if ! cd "$dotfiles"; then - echo "${RED}Could not CD into $dotfiles${NC}" + printf "${RED}Could not CD into $dotfiles${NC}\n" exit fi -echo +printf "\n" -echo "${BLUE}Stashing existing changes...${NC}" +printf "${BLUE}Stashing existing changes...${NC}\n" stash_result=$(git stash push -m "sync-dotfiles: Before syncing dotfiles") needs_pop=1 if [ "$stash_result" = "No local changes to save" ]; then needs_pop=0 fi -echo +printf "\n" -echo "${BLUE}Pulling updates from dotfiles repo...${NC}" +printf "${BLUE}Pulling updates from dotfiles repo...${NC}\n" git pull origin main git submodule update --remote --recursive --init -echo +printf "\n" if [ $needs_pop -eq 1 ]; then - echo "${BLUE}Popping stashed changes...${NC}" + printf "${BLUE}Popping stashed changes...${NC}\n" git stash pop fi -echo +printf "\n" unmerged_files=$(git diff --name-only --diff-filter=U) if [ -n "$unmerged_files" ]; then - echo "${RED}The following files have merge conflicts after popping the stash:${NC}" - echo - printf %"s\n" "$unmerged_files" + printf "${RED}The following files have merge conflicts after popping the stash:${NC}\n" + printf "\n" + printf %"s\n" "$unmerged_files\n" else - stow -t "$HOME" . || echo "${RED}Stow uninstalled or not in path!${NC}" + stow -t "$HOME" . || printf "${RED}Stow uninstalled or not in path!${NC}\n" fi -echo "${BLUE}Generating librewolf profiles...${NC}" -envsubst <.librewolf/installs.template >$HOME/.librewolf/installs.ini -envsubst <.librewolf/profiles.template >$HOME/.librewolf/profiles.ini -echo +printf "${BLUE}Generating librewolf profiles...${NC}\n" +$dotfiles/.librewolf/generate.sh +printf "\n" -echo "${GREEN}Dotfiles Synced Successfully!${NC}" +printf "Recompile/Install src files? [y/N] \n" +read ans +[ $ans = "y" ] && for f in $dotfiles/.local/src/*; do + if ! cd "$f"; then + printf "${RED}Could not CD into $f${NC}\n" + exit + fi + sudo make install +done + +printf "${GREEN}Dotfiles Synced Successfully!${NC}\n"