From df7081a02994bdf0ec6ae79477ef6bad9b41d837 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Mon, 19 Sep 2022 14:48:12 +0200 Subject: [PATCH] (firefox) Recolor menu panel and add instructions --- .config/setup.sh | 4 + .mozilla/firefox/{ => chrome}/add.svg | 0 .mozilla/firefox/{ => chrome}/left-arrow.svg | 0 .mozilla/firefox/{ => chrome}/right-arrow.svg | 0 .../firefox/chrome/rotate-right-solid.svg | 1 + .mozilla/firefox/{ => chrome}/userChrome.css | 75 +++++++++++++++++++ .mozilla/firefox/chrome/xmark-solid.svg | 1 + README.md | 8 ++ 8 files changed, 89 insertions(+) rename .mozilla/firefox/{ => chrome}/add.svg (100%) rename .mozilla/firefox/{ => chrome}/left-arrow.svg (100%) rename .mozilla/firefox/{ => chrome}/right-arrow.svg (100%) create mode 100644 .mozilla/firefox/chrome/rotate-right-solid.svg rename .mozilla/firefox/{ => chrome}/userChrome.css (84%) create mode 100644 .mozilla/firefox/chrome/xmark-solid.svg diff --git a/.config/setup.sh b/.config/setup.sh index 9baadad..afab788 100755 --- a/.config/setup.sh +++ b/.config/setup.sh @@ -96,3 +96,7 @@ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm ## Install powerlevel10k git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k + +## Setup userchromecss +cd ~/.mozilla/firefox && ls | grep default | xargs -I '{}' ln -s $PWD/chrome '{}'/chrome +cd ~ diff --git a/.mozilla/firefox/add.svg b/.mozilla/firefox/chrome/add.svg similarity index 100% rename from .mozilla/firefox/add.svg rename to .mozilla/firefox/chrome/add.svg diff --git a/.mozilla/firefox/left-arrow.svg b/.mozilla/firefox/chrome/left-arrow.svg similarity index 100% rename from .mozilla/firefox/left-arrow.svg rename to .mozilla/firefox/chrome/left-arrow.svg diff --git a/.mozilla/firefox/right-arrow.svg b/.mozilla/firefox/chrome/right-arrow.svg similarity index 100% rename from .mozilla/firefox/right-arrow.svg rename to .mozilla/firefox/chrome/right-arrow.svg diff --git a/.mozilla/firefox/chrome/rotate-right-solid.svg b/.mozilla/firefox/chrome/rotate-right-solid.svg new file mode 100644 index 0000000..5ef7a1b --- /dev/null +++ b/.mozilla/firefox/chrome/rotate-right-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.mozilla/firefox/userChrome.css b/.mozilla/firefox/chrome/userChrome.css similarity index 84% rename from .mozilla/firefox/userChrome.css rename to .mozilla/firefox/chrome/userChrome.css index 100fbf1..fe72f06 100644 --- a/.mozilla/firefox/userChrome.css +++ b/.mozilla/firefox/chrome/userChrome.css @@ -25,6 +25,8 @@ --mff-urlbar-results-font-size: 12pt; --mff-urlbar-results-font-weight: 700; --mff-urlbar-results-url-color: #81A1C1; + + --mff-menu-background: #32373b; /* --mff-tab-selected-bg: linear-gradient(90deg, rgba(232,74,95,1) 0%, rgba(255,132,124,1) 50%, rgba(254,206,168,1) 100%); */ /* --mff-urlbar-font-weight: 600; */ @@ -736,3 +738,76 @@ tree, .tab-container[pinned] { width: 50px !important; } + +menupopup:not(.in-menulist) > menuitem, +menupopup:not(.in-menulist) > menu { + padding-block: 4px !important; /* reduce to 3px, 2px, 1px or 0px as needed */ + min-height: unset !important; /* v92.0 - for padding below 4px */ +} +:root { + --arrowpanel-menuitem-padding: 4px 8px !important; +} + +/* Bookmarks Toolbar folders */ +#PersonalToolbar menupopup, +/* Right-click context menus */ +#mainPopupSet menupopup, +/* Top menu bar on Windows (not sure about others) */ +#toolbar-menubar menupopup, +/* Sidebar/Library bookmark/history context menus */ +#placesContext, +/* Address bar context menu/* Bookmarks Toolbar folders */ +#PersonalToolbar menupopup, +/* Right-click context menus */ +#mainPopupSet menupopup, +/* Top menu bar on Windows (not sure about others) */ +#toolbar-menubar menupopup, +/* Sidebar/Library bookmark/history context menus */ +#placesContext, +/* Address bar context menu (2021-10-25) */ +#urlbar-input-container menupopup, +/* Various toolbar drop-down panels (Fx96) */ +#back-button menupopup, #forward-button menupopup, +#identity-popup, #appMenu-popup, #downloadsPanel, #BMB_bookmarksPopup { + /* Text color */ + --menu-color: #fff !important; + --arrowpanel-color: #fff !important; + --panel-color: #fff !important; + /* Background color */ + --menu-background-color: var(--mff-menu-background) !important; + --arrowpanel-background: var(--mff-menu-background) !important; + --panel-background: var(--mff-menu-background) !important; + /* Border color (if any) */ + --menu-border-color: threedshadow !important; + --arrowpanel-border-color: threedshadow !important; + --panel-border-color: threedshadow !important; + /* Hovered/expanded item background color */ + --menuitem-hover-background-color: #e0e0e6 !important; + --button-hover-bgcolor: #e0e0e6 !important; + /* Disabled items text color and hovered background */ + --menu-disabled-color: rgba(21, 20, 26, 0.4) !important; + --menuitem-disabled-hover-background-color: rgba(224, 224, 230, 0.4) !important; +} (2021-10-25) */ +#urlbar-input-container menupopup, +/* Various toolbar drop-down panels (Fx96) */ +#back-button menupopup, #forward-button menupopup, +#identity-popup, #appMenu-popup, #downloadsPanel, #BMB_bookmarksPopup { + /* Text color */ + --menu-color: #000 !important; + --arrowpanel-color: #000 !important; + --panel-color: #000 !important; + /* Background color */ + --menu-background-color: #f0f0f0 !important; + --arrowpanel-background: #f0f0f0 !important; + --panel-background: #f0f0f0 !important; + /* Border color (if any) */ + --menu-border-color: threedshadow !important; + --arrowpanel-border-color: threedshadow !important; + --panel-border-color: threedshadow !important; + /* Hovered/expanded item background color */ + --menuitem-hover-background-color: #e0e0e6 !important; + --button-hover-bgcolor: #e0e0e6 !important; + /* Disabled items text color and hovered background */ + --menu-disabled-color: rgba(21, 20, 26, 0.4) !important; + --menuitem-disabled-hover-background-color: rgba(224, 224, 230, 0.4) !important; +} \ No newline at end of file diff --git a/.mozilla/firefox/chrome/xmark-solid.svg b/.mozilla/firefox/chrome/xmark-solid.svg new file mode 100644 index 0000000..22d0dda --- /dev/null +++ b/.mozilla/firefox/chrome/xmark-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/README.md b/README.md index 5907ccf..a149d7f 100644 --- a/README.md +++ b/README.md @@ -128,3 +128,11 @@ Some machines, lacking discrete or recent GPU, will not be able to start Alacrit Updated as of [this commit](https://github.com/TanguyHerbron/dotfiles/commit/9adabddf70494ba534bcc5dd94260a92e1c996c3) `#0F1419,#1F2430,#73D0FF,#1F2430,#1F2430,#D9D7CE,#BAE67E,#FF6666,#1F2430,#FFFFFF` + +### Debugger for Firefox userChrome.css modification +- F12 or Ctrl+Shift+c menu +- Three dots > Cog icon +- Check "Enable browser chrome and add-on debugging toolboxes" and "Enable remote debugging" +- Ctrl+Shift+Alt+I and confirm security prompt +#### Live edit +- Style editor > userChrome.css