From 733cb52491053c34d70d3a557ffc763376963dd0 Mon Sep 17 00:00:00 2001 From: Codename Date: Sun, 23 May 2021 17:56:33 +0200 Subject: [PATCH 1/3] Add support for firefox installed with flatpak --- lib-core.sh | 2 ++ tweaks.sh | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib-core.sh b/lib-core.sh index 96d244c..fc1e191 100755 --- a/lib-core.sh +++ b/lib-core.sh @@ -46,6 +46,8 @@ DASH_TO_DOCK_DIR_HOME="/home/${MY_USERNAME}/.local/share/gnome-shell/extensions/ FIREFOX_SRC_DIR="${REPO_DIR}/src/other/firefox" FIREFOX_DIR_HOME="/home/${MY_USERNAME}/.mozilla/firefox" FIREFOX_THEME_DIR="/home/${MY_USERNAME}/.mozilla/firefox/firefox-themes" +FIREFOX_FLATPAK_DIR_HOME="/home/${MY_USERNAME}/.var/app/org.mozilla.firefox/.mozilla/firefox" +FIREFOX_FLATPAK_THEME_DIR="/home/${MY_USERNAME}/.var/app/org.mozilla.firefox/.mozilla/firefox/firefox-themes" export WHITESUR_TMP_DIR="/tmp/WhiteSur.lock" if [[ -w "/" ]]; then diff --git a/tweaks.sh b/tweaks.sh index 4ccc89a..43e17ff 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -67,7 +67,13 @@ while [[ $# -gt 0 ]]; do edit_firefox="true" ;; esac - if ! has_command firefox; then + if [[ -d "${FIREFOX_FLATPAK_DIR_HOME}" ]]; then + FIREFOX_DIR_HOME=${FIREFOX_FLATPAK_DIR_HOME} + mkdir -p ${FIREFOX_FLATPAK_THEME_DIR} + FIREFOX_THEME_DIR=${FIREFOX_FLATPAK_THEME_DIR} + fi; + + if [[ ! -d "${FIREFOX_FLATPAK_DIR_HOME}" ]] && ! has_command firefox; then prompt -e "'${1}' ERROR: There's no Firefox installed in your system" has_any_error="true" elif [[ ! -d "${FIREFOX_DIR_HOME}" ]]; then From 34786640b9ac0d16f8d8fa53e51433761d94e27f Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sun, 30 May 2021 18:43:23 +0800 Subject: [PATCH 2/3] update --- src/other/firefox/WhiteSur/parts/tabsbar.css | 47 +++----------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/src/other/firefox/WhiteSur/parts/tabsbar.css b/src/other/firefox/WhiteSur/parts/tabsbar.css index 4dc4a4e..07f8d55 100644 --- a/src/other/firefox/WhiteSur/parts/tabsbar.css +++ b/src/other/firefox/WhiteSur/parts/tabsbar.css @@ -122,9 +122,13 @@ tab[selected]:-moz-window-inactive { } /* If tab favicon is not present, force tab label to the center */ -/*.tabbrowser-tab:not([image]):not([busy]):not([progress]):not([class*="identity-color-"]) .tab-label-container {*/ -/* margin-left: auto !important;*/ -/*}*/ +/* .tabbrowser-tab:not([image]):not([busy]):not([progress]):not([class*="identity-color-"]) .tab-label-container { + margin-left: auto !important; +} */ + +/* Fix website with no favicon centred text */ +/* .tabbrowser-tab:not([image]) .tab-icon-overlay:not([pinned], [sharing], [crashed]) .tab-icon-stack { margin-left: 0 !important } +.tabbrowser-tab:not([image]) .tab-icon-stack { margin-left: 0 !important } */ /* If tab close button is not present, don't force favicon to the center */ #tabbrowser-tabs[closebuttons="activetab"] .tabbrowser-tab:not([selected="true"]) .tab-throbber, @@ -286,40 +290,3 @@ tab[selected]:-moz-window-inactive { position: relative; margin-right: -10px; } -/* Fix website with no favicon centred text */ -.tabbrowser-tab:not([image]) .tab-icon-overlay:not([pinned], [sharing], [crashed]) .tab-icon-stack { - margin-left: 0 !important -} - -.tabbrowser-tab:not([image]) .tab-icon-stack { - margin-left: 0 !important -} -@media (-moz-proton) { - - /* Firefox v89 beta tab fix */ - .tab-background { - border-radius: 0 !important; - margin-block: 0 !important; - } - - /*Align personal bookmarks v89 */ - #personal-bookmarks { - -moz-box-align: center !important; - } - - /* fix misc spacing between tabs */ - .tabbrowser-tab { - padding-inline: 0px !important; - } - - .tabbrowser-tab[selected="true"]>.tab-stack>.tab-background { - margin-left: 0px !important; - margin-right: 0px !important; - } - - /* centre text when audio is playing */ - .tabbrowser-tab:is([soundplaying]) .tab-label-container { - margin-left: 0 !important; - margin-right: auto !important - } -} \ No newline at end of file From 1209168a947fde90403ba79d2a2a818ed57705b5 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sun, 30 May 2021 19:55:49 +0800 Subject: [PATCH 3/3] Fixed #273 --- lib-install.sh | 7 ++++--- tweaks.sh | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib-install.sh b/lib-install.sh index 13f20b5..ee969d1 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -434,7 +434,8 @@ revert_gdm_theme() { install_firefox_theme() { remove_firefox_theme - userify cp -rf "${FIREFOX_SRC_DIR}" "${FIREFOX_THEME_DIR}" + [[ ! -d "${FIREFOX_THEME_DIR}" ]] && mkdir -p ${FIREFOX_THEME_DIR} + userify cp -rf "${FIREFOX_SRC_DIR}"/* "${FIREFOX_THEME_DIR}" config_firefox } @@ -462,8 +463,8 @@ edit_firefox_theme_prefs() { } remove_firefox_theme() { - rm -rf "${FIREFOX_DIR_HOME}/"*"default"*"/chrome" - rm -rf "${FIREFOX_THEME_DIR}" + # rm -rf "${FIREFOX_DIR_HOME}/"*"default"*"/chrome" + rm -rf "${FIREFOX_THEME_DIR}/WhiteSur" } ############################################################################### diff --git a/tweaks.sh b/tweaks.sh index cc70701..056e578 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -68,9 +68,9 @@ while [[ $# -gt 0 ]]; do esac if [[ -d "${FIREFOX_FLATPAK_DIR_HOME}" ]]; then - FIREFOX_DIR_HOME=${FIREFOX_FLATPAK_DIR_HOME} - mkdir -p ${FIREFOX_FLATPAK_THEME_DIR} - FIREFOX_THEME_DIR=${FIREFOX_FLATPAK_THEME_DIR} + FIREFOX_DIR_HOME=${FIREFOX_FLATPAK_DIR_HOME} + [[ ! -d "${FIREFOX_FLATPAK_THEME_DIR}" ]] && mkdir -p ${FIREFOX_FLATPAK_THEME_DIR} + FIREFOX_THEME_DIR=${FIREFOX_FLATPAK_THEME_DIR} fi; if [[ ! -d "${FIREFOX_FLATPAK_DIR_HOME}" ]] && ! has_command firefox; then