diff options
author | 2022-07-01 18:55:02 -0700 | |
---|---|---|
committer | 2022-09-22 23:52:01 -0700 | |
commit | 513459d4dd6986c325ee18e4dee8502542e029c6 (patch) | |
tree | 82c1fdd5e9975aea378342b976cbb2a7d1cec9de /GNUmakefile | |
parent | 1d8a14276dad110fac18fb9d307941a31b984990 (diff) | |
download | new-dotfiles-513459d4dd6986c325ee18e4dee8502542e029c6.tar.gz new-dotfiles-513459d4dd6986c325ee18e4dee8502542e029c6.zip |
[firefox] Make it possible to stow firefox configuration
- Put ‘userChrome.css’ into the ‘src/’ directory and have stow ignore any such
directory.
- Dynamically find the name of the default firefox profile.
- In case the firefox profile can't be found, output some messages stating such.
- Update the ‘userChrome.css’ as used by Firefox.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index f368adb..15c6712 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,9 +1,11 @@ MODULES=xmodmap emacs xdg shepherd dunst zsh mcron mbsync nyxt work \ - herbstluftwm mpd polybar xbindkeys + herbstluftwm mpd polybar xbindkeys firefox STOW = stow EMACS = emacs SCHEME_IMPLEMENTATION = guile +# Found this sed command here: https://stackoverflow.com/a/40778047 +FIREFOX_PROFILE := $(shell sed -nr "/^Name=default/ { :l /^Path=/ { s/[^=]*=[ ]*//; p; q; }; n; b l; }" ~/.mozilla/firefox/profiles.ini 2>/dev/null) .PRECIOUS: %.el @@ -125,6 +127,21 @@ zsh: zsh/.profile zsh/.zshrc zsh/.zsh/functions/unzip.zwc \ nyxt: nyxt/.config/nyxt/init.lisp +## Firefox + +ifneq ($(FIREFOX_PROFILE),) +firefox: firefox/.mozilla/firefox/$(FIREFOX_PROFILE)/chrome/userChrome.css + +firefox/.mozilla/firefox/$(FIREFOX_PROFILE)/chrome/userChrome.css: firefox/src/userChrome.css + mkdir -p $$(dirname $@) + cp $^ $@ +else +firefox: + @echo "Error finding firefox default profile, can't make" >&2 +firefox-stow: + @echo "Error finding firefox default profile, can't stow" >&2 +endif + ## Helper %.el: %.org |