Initial commit

This commit is contained in:
Moririn 2023-08-21 14:52:19 +01:00
parent 36ddec488a
commit f654da2e7c
12 changed files with 763 additions and 0 deletions

28
README.md Normal file
View File

@ -0,0 +1,28 @@
# Firefox theme installer
Automated installation of userChrome theming for Firefox and its derivatives' interface via a shell script.
Included theme originally modified from [Filip Sutkowy's *blurclean-firefox-theme* (GitHub)](https://github.com/Filip-Sutkowy/blurclean-firefox-theme).
## Description
This script will create or modify the following files and directories:
+ `<browser profile directory>/chrome/` and subsidiary CSS files will be created if they do not exist, or overwritten if `-o` is passed, in order to provide the necessary styles
+ `<browser profile directory>/user.js` will be created if it does not exist, or appended to in the case of an existing `user.js`, in order to modify the necessary `about:config` settings for the theme
+ `<browser profile directory>/user-overrides.js` will be created if it does not exist, or appended to in the case of an existing `user-overrides.js`, with the same modifications as the regular `user.js` file in order to ensure current or a potential future compatibility with the [arkenfox user.js (GitHub)](https://github.com/arkenfox/user.js) or similar
Note: `user.js` files are read "top-to-bottom" by the browser, thus giving priority to the final alteration of a given preference that appears within the file. As such, the appending of the necessary preferences for this theme may overwrite users' existing settings for those preferences.
## Options
```
Usage: ./foxtheme.sh [OPTIONS] [PROFILE | -a PROFILESDIR]
-a Apply theme to all (current) browser profiles
-j Just create or modify user.js and not user-overrides.js
-o Remove and replace an existing theme if found
-h Display this help message
```
## Custom themes
This script is ultimately just a glorified wrapper for:
```
cp -r chrome/ <browser profile directory>/
cat user.js >> <browser profile directory>/user.js
cat user.js >> <browser profile directory>/user-overrides.js
```
As such, replacing the `user.js` or contents of the `chrome` directory with custom preferences and themes should offer the same functionality.

View File

@ -0,0 +1,14 @@
/* url bar */
#widget-overflow-mainView,
#urlbar[open="true"] > #urlbar-background {
background: var(--bct-e-urlbar-bg) !important;
backdrop-filter: contrast(100%) blur(var(--bct-blur)) saturate(25%) !important;
border: none !important;
}
/* overfow menu in customize menu */
vbox#customization-panelWrapper box.panel-arrowcontent {
background: #0000 !important;
backdrop-filter: contrast(100%) blur(6px) !important;
border: none !important;
}

View File

@ -0,0 +1,43 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/hide_tabs_toolbar.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Hides tabs toolbar */
/* For OSX use hide_tabs_toolbar_osx.css instead */
/* IMPORTANT */
/*
Get window_control_placeholder_support.css
Window controls will be all wrong without it
*/
:root{ --uc-toolbar-height: 32px; }
:root:not([uidensity="compact"]){--uc-toolbar-height: 38px}
#TabsToolbar{ visibility: collapse !important }
:root[sizemode="fullscreen"] #TabsToolbar > #window-controls{ visibility: visible !important; z-index: 2 }
:root:not([inFullscreen]) #nav-bar{
margin-top: calc(0px - var(--uc-toolbar-height));
}
#toolbar-menubar{
min-height:unset !important;
height:var(--uc-toolbar-height) !important;
position: relative;
}
#main-menubar{
-moz-box-flex: 1;
background-color: var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor);
background-clip: padding-box;
border-right: 30px solid transparent;
border-image: linear-gradient(to left, transparent, var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor) 30px) 20 / 30px
}
#toolbar-menubar:not([inactive]){ z-index: 2 }
#toolbar-menubar[inactive] > #menubar-items {
opacity: 0;
pointer-events: none;
margin-left: var(--uc-window-drag-space-width,0px)
}

View File

@ -0,0 +1,411 @@
/*
This component is made by u/qaz69wsx
https://www.reddit.com/r/FirefoxCSS/comments/osles3/menu_icons
*/
.subviewbutton:not(.subviewbutton-iconic, .subviewbutton-back, [checked="true"], [targetURI]) > .toolbarbutton-icon {
width: 16px;
height: 16px;
margin-inline-end: 8px !important;
-moz-context-properties: fill;
fill: currentColor;
}
#appMenu-zoom-controls2 > .toolbarbutton-text {
margin-inline-start: 24px !important;
}
#appMenu-fxa-label2::before {
content: "";
display: block;
width: 16px;
height: 16px;
margin-inline-end: 8px;
border-radius: 50%;
background: var(--avatar-image-url) no-repeat center/16px;
}
.PanelUI-remotetabs-notabsforclient-label {
margin-inline-start: 40px !important;
}
#fxa-menu-avatar {
display: -moz-inline-box;
-moz-box-ordinal-group: 2;
}
#fxa-manage-account-button vbox {
margin-inline-start: 24px;
}
.syncNowBtn {
visibility: visible !important;
-moz-box-ordinal-group: 0 !important;
margin-inline-end: 8px;
}
#PanelUI-fxa-menu-setup-sync-button {
list-style-image: url("chrome://browser/skin/sync.svg");
}
#PanelUI-fxa-menu-sendtab-button {
list-style-image: url("chrome://browser/skin/send-to-device.svg");
}
#PanelUI-fxa-menu-sync-prefs-button,
#appMenu-settings-button {
list-style-image: url("chrome://global/skin/icons/settings.svg");
}
#PanelUI-fxa-menu-account-signout-button {
list-style-image: url("chrome://browser/skin/sign-out.svg");
}
#appMenu-new-tab-button2 {
list-style-image: url("chrome://browser/skin/new-tab.svg");
}
#appMenu-new-window-button2,
#appMenuRecentlyClosedWindows {
list-style-image: url("chrome://browser/skin/window.svg");
}
#appMenu-new-private-window-button2 {
list-style-image: url("chrome://browser/skin/privateBrowsing.svg");
}
#appMenu-bookmarks-button,
#panelMenuBookmarkThisPage[starred],
#appMenu-library-bookmarks-button,
#sidebar-switcher-bookmarks {
list-style-image: url("chrome://browser/skin/bookmark.svg");
}
#panelMenuBookmarkThisPage {
list-style-image: url("chrome://browser/skin/bookmark-hollow.svg");
}
#panelMenu_searchBookmarks,
#appMenu-find-button2,
#allTabsMenu-searchTabs {
list-style-image: url("chrome://global/skin/icons/search-glass.svg");
}
:is(toolbarbutton, menuitem)[id$="_viewBookmarksToolbar"] {
list-style-image: url("chrome://browser/skin/bookmarks-toolbar.svg") !important;
}
#appMenu-history-button,
#appMenu-library-history-button,
#sidebar-switcher-history {
list-style-image: url("chrome://browser/skin/history.svg");
}
#appMenuRecentlyClosedTabs {
list-style-image: url("chrome://devtools/skin/images/debugging-tabs.svg");
}
#appMenuRestoreSession {
list-style-image: url("chrome://browser/skin/restore-session.svg");
}
#appMenuClearRecentHistory {
list-style-image: url("chrome://browser/skin/forget.svg");
}
#appMenu-downloads-button,
#appMenu-library-downloads-button {
list-style-image: url("chrome://browser/skin/downloads/downloads.svg");
}
#appMenu-passwords-button {
list-style-image: url("chrome://browser/skin/login.svg");
}
#appMenu-extensions-themes-button {
list-style-image: url("chrome://mozapps/skin/extensions/extension.svg");
}
#appMenu-print-button2 {
list-style-image: url("chrome://global/skin/icons/print.svg");
}
#appMenu-save-file-button2 {
list-style-image: url("chrome://browser/skin/save.svg");
}
#appmenu-moreTools-button,
#overflowMenu-customize-button {
list-style-image: url("chrome://browser/skin/customize.svg");
}
#appmenu-developer-tools-view > [oncommand="switchToTabHavingURI('about:performance', true)"] {
list-style-image: url("chrome://global/skin/icons/performance.svg");
}
#appmenu-developer-tools-view > [key="key_browserToolbox"] {
list-style-image: url("chrome://devtools/skin/images/fox-smiling.svg");
}
#appmenu-developer-tools-view > [key="key_responsiveDesignMode"] + .subviewbutton {
list-style-image: url("chrome://devtools/skin/images/command-eyedropper.svg");
}
#appmenu-developer-tools-view > [key="key_viewSource"] + .subviewbutton {
list-style-image: url("chrome://activity-stream/content/data/content/assets/glyph-webextension-16.svg");
}
#appMenu-help-button2 {
list-style-image: url("chrome://global/skin/icons/help.svg");
}
#appMenu_aboutName {
list-style-image: url("chrome://devtools/skin/images/browsers/firefox.svg");
}
#appMenu-quit-button2 {
list-style-image: url("chrome://browser/skin/quit.svg");
}
#allTabsMenu-containerTabsButton {
list-style-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="context-fill"><rect width="6" height="6" x="1" y="1" rx="1"/><path d="M14.75 3H13V1.25a.25.25 0 00-.25-.25h-1.5a.25.25 0 00-.25.25V3H9.25a.25.25 0 00-.25.25v1.5a.25.25 0 00.25.25H11v1.75a.25.25 0 00.25.25h1.5a.25.25 0 00.25-.25V5h1.75a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25z"/><rect width="6" height="6" x="1" y="9" rx="1"/><rect width="6" height="6" x="9" y="9" rx="1"/></svg>');
}
#BMB_bookmarksPopup .subviewbutton > .menu-iconic-left {
margin-inline-end: 8px !important;
}
#BMB_bookmarksShowAll {
padding-inline-start: calc(1em + 20px) !important;
}
#BMB_bookmarksPopup .openintabs-menuitem .menu-text {
margin-inline-start: -4px !important;
}
#BMB_viewBookmarksSidebar,
#sidebar-reverse-position[label="Move Sidebar to Left"] {
list-style-image: url("chrome://browser/skin/sidebars.svg") !important;
}
#sidebar-switcher-tabs {
list-style-image: url("chrome://browser/skin/tab.svg");
}
#sidebar-reverse-position[label="Move Sidebar to Right"] {
list-style-image: url("chrome://browser/skin/sidebars-right.svg");
}
#sidebarMenu-popup > [data-l10n-id="sidebar-menu-close"] {
list-style-image: url("chrome://global/skin/icons/close.svg");
}
menupopup > :is(menu:not(.menu-iconic), menuitem:not(.menuitem-iconic, [checked="true"])) {
padding-inline-start: calc(1em + 24px) !important;
background-position: left 1em center;
background-repeat: no-repeat;
background-size: 16px;
-moz-context-properties: fill;
fill: currentColor;
}
#menu_newNavigatorTab,
menuitem[id$="openANewTab"] {
background-image: url("chrome://browser/skin/new-tab.svg");
}
#menu_newUserContext {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="context-fill"><rect width="6" height="6" x="1" y="1" rx="1"/><path d="M14.75 3H13V1.25a.25.25 0 00-.25-.25h-1.5a.25.25 0 00-.25.25V3H9.25a.25.25 0 00-.25.25v1.5a.25.25 0 00.25.25H11v1.75a.25.25 0 00.25.25h1.5a.25.25 0 00.25-.25V5h1.75a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25z"/><rect width="6" height="6" x="1" y="9" rx="1"/><rect width="6" height="6" x="9" y="9" rx="1"/></svg>');
}
#menu_newNavigator,
#historyUndoWindowMenu {
background-image: url("chrome://browser/skin/window.svg");
}
menuitem[data-l10n-id$="-private-window"] {
background-image: url("chrome://browser/skin/privateBrowsing.svg");
}
#menu_openFile {
background-image: url("chrome://browser/skin/open.svg");
}
#menu_savePage,
#context-savepage {
background-image: url("chrome://browser/skin/save.svg");
}
menuitem[data-l10n-id*="-email"] {
background-image: url("chrome://browser/skin/mail.svg");
}
menuitem[data-l10n-id*="-print"] {
background-image: url("chrome://global/skin/icons/print.svg");
}
#menu_importFromAnotherBrowser,
#browserImport {
background-image: url("chrome://browser/skin/import.svg");
}
#menu_FileQuitItem {
background-image: url("chrome://browser/skin/quit.svg");
}
menuitem[data-l10n-id="text-action-undo"],
menuitem[data-l10n-id$="-reopen-closed-tabs"] {
background-image: url("chrome://global/skin/icons/undo.svg");
}
menuitem[data-l10n-id="text-action-cut"] {
background-image: url("chrome://browser/skin/edit-cut.svg");
}
menuitem[data-l10n-id="text-action-copy"],
#syncedTabsCopySelected {
background-image: url("chrome://browser/skin/edit-copy.svg");
}
menuitem[data-l10n-id="text-action-paste"] {
background-image: url("chrome://browser/skin/edit-paste.svg");
}
menuitem[data-l10n-id="text-action-delete"],
menuitem[id^="placesContext_delete"],
menuitem[data-l10n-id="toolbar-context-menu-remove-from-toolbar"],
.downloadRemoveFromHistoryMenuItem {
background-image: url("chrome://global/skin/icons/delete.svg");
}
#menu_find,
#context-searchselect {
background-image: url("chrome://global/skin/icons/search-glass.svg");
}
#toggle_PersonalToolbar {
background-image: url("chrome://browser/skin/bookmarks-toolbar.svg");
}
menuitem[data-l10n-id*="-customize-toolbar"] {
background-image: url("chrome://browser/skin/customize.svg");
}
#viewSidebarMenuMenu {
background-image: url("chrome://browser/skin/sidebars.svg");
}
#menu_zoomEnlarge {
background-image: url("chrome://browser/skin/zoom-in.svg");
}
#menu_zoomReduce {
background-image: url("chrome://browser/skin/zoom-out.svg");
}
#charsetMenu {
background-image: url("chrome://browser/skin/characterEncoding.svg");
}
#fullScreenItem {
background-image: url("chrome://browser/skin/fullscreen.svg");
}
#sanitizeItem,
#placesContext_deleteHost {
background-image: url("chrome://browser/skin/forget.svg");
}
#sync-tabs-menuitem {
background-image: url("chrome://browser/skin/tab.svg");
}
#historyRestoreLastSession {
background-image: url("chrome://browser/skin/restore-session.svg");
}
#historyUndoMenu {
background-image: url("chrome://devtools/skin/images/debugging-tabs.svg");
}
menuitem[data-l10n-id*="bookmark-"]:not(.menuitem-iconic),
#placesContext_createBookmark {
background-image: url("chrome://browser/skin/bookmark-hollow.svg");
}
menuitem[data-l10n-id="menu-bookmark-edit"] {
background-image: url("chrome://browser/skin/bookmark.svg") !important;
}
#menu_openDownloads {
background-image: url("chrome://browser/skin/downloads/downloads.svg");
}
#menu_openAddons {
background-image: url("chrome://mozapps/skin/extensions/extension.svg");
}
menuitem[data-l10n-id$="-sync-now"] {
background-image: url("chrome://browser/skin/sync.svg");
}
#webDeveloperMenu {
background-image: url("chrome://browser/skin/developer.svg");
}
#menu_taskManager {
background-image: url("chrome://global/skin/icons/performance.svg");
}
#menu_browserToolbox {
background-image: url("chrome://devtools/skin/images/fox-smiling.svg");
}
#menu_eyedropper {
background-image: url("chrome://devtools/skin/images/command-eyedropper.svg");
}
#extensionsForDevelopers {
background-image: url("chrome://activity-stream/content/data/content/assets/glyph-webextension-16.svg");
}
#menu_pageInfo {
background-image: url("chrome://global/skin/icons/info.svg");
}
#menu_preferences,
#openSettingsMenuItem {
background-image: url("chrome://global/skin/icons/settings.svg");
}
#aboutName {
background-image: url("chrome://devtools/skin/images/browsers/firefox.svg");
}
menuitem[data-l10n-id*="reload-"] {
background-image: url("chrome://browser/skin/reload.svg");
}
menuitem[id^="context_toggleMute"]:not([soundplaying], [muted]),
menuitem[id^="context_toggleMute"][soundplaying]:not([muted]),
#context-media-mute {
background-image: url("chrome://global/skin/media/audio-muted.svg");
}
menuitem[id^="context_toggleMute"][muted],
#context-media-unmute {
background-image: url("chrome://global/skin/media/audio.svg");
}
menuitem[data-l10n-id^="pin-"],
.customize-context-moveToPanel {
background-image: url("chrome://activity-stream/content/data/content/assets/glyph-pin-16.svg");
}
menuitem[data-l10n-id^="unpin-"],
.customize-context-moveToToolbar {
background-image: url("chrome://activity-stream/content/data/content/assets/glyph-unpin-16.svg");
}
menuitem[id^="context_duplicateTab"] {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="context-fill" fill-opacity="context-fill-opacity"><path d="M15 13a1 1 0 000-2h-1V5a2 2 0 00-2-2H8.402a2 2 0 00-2 2v6h-1a1 1 0 000 2"/><path d="M5.281 10V5c0-.771.301-1.468.78-2H4a2 2 0 00-2 2v6H1a1 1 0 000 2h2.559a1.978 1.978 0 01-.278-1c0-1.103.897-2 2-2z"/></svg>');
}
#context_moveTabOptions {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="context-fill" fill-opacity="context-fill-opacity"><path d="M15.854 12.14s-.001 0 0 0l-3.001-3.001a.496.496 0 00-.707.013.5.5 0 000 .695l2.147 2.148H7.5a.5.5 0 000 1h6.793l-2.147 2.146a.5.5 0 10.695.719l.012-.012 3-3a.5.5 0 00.001-.708z"/><path d="M7.5 10.994h4.38l-.453-.453a1.495 1.495 0 010-2.084 1.503 1.503 0 012.133-.025l.44.44V5a2 2 0 00-2-2H4a2 2 0 00-2 2v6H1a1 1 0 000 2h5.094A1.49 1.49 0 016 12.494c0-.827.673-1.5 1.5-1.5z"/></svg>');
}
#context_sendTabToDevice,
#context-sendpagetodevice,
#context-sendlinktodevice {
background-image: url("chrome://browser/skin/send-to-device.svg");
}
:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup, #context-sendlinktodevice-popup) > [clientType="desktop"] {
background-image: url("chrome://browser/skin/device-desktop.svg");
}
:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup, #context-sendlinktodevice-popup) > [clientType="phone"] {
background-image: url("chrome://browser/skin/device-phone.svg");
}
:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup, #context-sendlinktodevice-popup) > [clientType="tablet"] {
background-image: url("chrome://browser/skin/device-tablet.svg");
}
:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup, #context-sendlinktodevice-popup) > [clientType="tv"] {
background-image: url("chrome://browser/skin/device-tv.svg");
}
:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup, #context-sendlinktodevice-popup) > [clientType="vr"] {
background-image: url("chrome://browser/skin/device-vr.svg");
}
#context_shareTabURL {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="context-fill" d="M12.707 4.294l-4-4A1 1 0 008.38.077a.984.984 0 00-.246-.05A.938.938 0 008 0a.938.938 0 00-.134.027.984.984 0 00-.246.05A1 1 0 007.291.3l-4 4a1 1 0 001.416 1.408L7 3.415V11a1 1 0 002 0V3.415l2.293 2.293a1 1 0 001.414-1.414z"/><path fill="context-fill" d="M14 9a1 1 0 00-1 1v3a1 1 0 01-1 1H4a1 1 0 01-1-1v-3a1 1 0 00-2 0v3a3 3 0 003 3h8a3 3 0 003-3v-3a1 1 0 00-1-1z"/></svg>');
}
#context_reopenInContainer,
#context-openlinkinusercontext-menu {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="context-fill"><rect width="6" height="6" x="1" y="1" rx="1"/><rect width="6" height="6" x="1" y="9" rx="1"/><rect width="6" height="6" x="9" y="9" rx="1"/><path d="M14.92 1.62a1 1 0 00-.54-.54A1 1 0 0014 1h-4a1 1 0 000 2h1.59l-2.3 2.29a1 1 0 000 1.42 1 1 0 001.42 0L13 4.41V6a1 1 0 002 0V2a1 1 0 00-.08-.38z"/></svg>');
}
#context_closeTab,
#orgClose {
background-image: url("chrome://global/skin/icons/close.svg");
}
#context_closeTabOptions {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="context-fill" fill-opacity="context-fill-opacity" d="M14.3 10l-1.8 1.8-1.8-1.8c-.2-.2-.5-.2-.7 0s-.2.5 0 .7l1.8 1.8-1.8 1.8c-.2.2-.2.5 0 .7s.5.2.7 0l1.8-1.8 1.8 1.8c.2.2.5.2.7 0s.2-.5 0-.7l-1.8-1.8 1.8-1.8c.2-.2.2-.5 0-.7s-.5-.2-.7 0z"/><path fill="context-fill" fill-opacity="context-fill-opacity" d="M16 12c0-.2-.1-.5-.2-.6l-1.1 1.1.5.5c.4-.1.8-.5.8-1zm-5.6.5L9 11.1c-.4-.4-.4-1 0-1.4l.7-.7c.4-.4 1-.4 1.4 0l1.4 1.4L13.9 9s.1 0 .1-.1V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v6H1c-.6 0-1 .4-1 1s.4 1 1 1h8.9l.5-.5z"/></svg>');
}
menuitem[data-l10n-id="full-screen-exit"] {
background-image: url("chrome://browser/skin/fullscreen-exit.svg");
}
#paste-and-go {
background-image: url("chrome://browser/skin/forward.svg");
}
.downloadShowMenuItem {
background-image: url("chrome://global/skin/icons/folder.svg");
}
#context-pocket,
#context-savelinktopocket {
background-image: url("chrome://browser/skin/pocket-outline.svg");
}
#context-take-screenshot {
background-image: url("chrome://browser/skin/screenshot.svg");
}
#context-searchselect[label^="Search Google"] {
background-image: url("chrome://activity-stream/content/data/content/tippytop/favicons/google-com.ico");
}
#context-searchselect[label^="Search DuckDuckGo"] {
background-image: url("chrome://activity-stream/content/data/content/tippytop/favicons/duckduckgo-com.ico");
}
#context-inspect-a11y {
background-image: url("chrome://devtools/skin/images/tool-accessibility.svg");
}
#context-inspect {
background-image: url("chrome://devtools/skin/images/command-pick.svg");
}
#context-media-play {
background-image: url("chrome://global/skin/media/play-fill.svg");
}
#context-media-pause,
#doNotDisturbMenuItem {
background-image: url("chrome://global/skin/media/pause-fill.svg");
}
#context-video-fullscreen {
background-image: url("chrome://global/skin/media/fullscreenEnterButton.svg");
}
#context-leave-dom-fullscreen {
background-image: url("chrome://global/skin/media/fullscreenExitButton.svg");
}
#context-video-saveimage {
background-image: url("chrome://devtools/skin/images/command-screenshot.svg");
}
#disableForOriginMenuItem {
background-image: url("chrome://browser/skin/notification-icons/desktop-notification-blocked.svg");
}
menuitem[data-l10n-id^="places-edit-"] {
background-image: url("chrome://global/skin/icons/edit.svg");
}

View File

@ -0,0 +1,11 @@
/* removes sidebar header, you can change sidebar content
with keyboard shortcuts, for example ctrl+B for bookmarks menu */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
visibility: collapse;
}
/* removes handle used to change sidebar width, you can modify width
when you open something else in sidebar, for example bookmarks menu */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
display: none !important;
}

View File

@ -0,0 +1,53 @@
/* default variables */
:root {
--bct-blur: 10px;
--bct-tab-toolbar-bg: #000000AA;
--bct-bg: #00000077;
--bct-color: #F2F2F2;
--bct-e-urlbar-bg: var(--bct-bg);
--bct-e-popups-bg: var(--bct-bg);
--bct-w-sidebar-bg: var(--bct-bg);
--bct-w-sidebar-color: var(--bct-color);
/* transparent window variables */
--bct-main-window: transparent;
--bct-w-pages-bg: var(--bct-bg);
--bct-w-nav-bg: var(--bct-bg);
--bct-w-url-bg: #000000CC;
--bct-w-tab-bg: #00000022;
--bct-w-tab-selected-bg: #77777788;
--bct-moz-appearance: -moz-win-glass !important;
}
/* light theme */
:root:-moz-lwtheme-darktext {
--bct-tab-toolbar-bg: #ffffffaa;
--bct-bg-mt: #ffffff40;
--bct-bg-lt: #ffffff80;
--bct-color: #0A0A0A;
--bct-w-sidebar-bg: var(--bct-bg-mt);
--bct-w-sidebar-color: var(--bct-color);
--bct-e-urlbar-bg: var(--bct-bg-lt);
--bct-e-popups-bg: #ffffffaa;
/* transparent window variables */
--bct-w-pages-bg: var(--bct-bg-lt);
--bct-w-nav-bg: var(--bct-bg-lt);
--bct-w-url-bg: var(--bct-bg-mt);
}
/* dark theme */
:root:-moz-lwtheme-brighttext {
/* there is nothing here, I treat default theme as dark */
}

View File

@ -0,0 +1,40 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/window_control_placeholder_support.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Creates placeholders for window controls */
/* This is a supporting file used by other stylesheets */
/* This stylesheet is pretty much unnecessary if window titlebar is enabled */
/* This file should preferably be imported before other stylesheets */
/* Defaults for window controls on RIGHT side of the window */
/* Modify these values to match your preferences */
:root[tabsintitlebar]{
--uc-window-control-width: 138px; /* Space reserved for window controls */
--uc-window-drag-space-width: 24px; /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
}
:root[sizemode="fullscreen"] .titlebar-buttonbox-container{ display: none !important }
:root[sizemode="fullscreen"] #window-controls{
position: fixed;
display: flex;
top: 0;
right:0;
height: 40px;
}
:root[uidensity="compact"][sizemode="fullscreen"] #window-controls{ height: 32px }
#nav-bar{
border-inline: var(--uc-window-drag-space-width,0px) solid var(--toolbar-bgcolor);
border-inline-style: solid !important;
border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px));
}
/* Use this pref to check Mac OS where window controls are on left */
/* This pref defaults to true on Mac and doesn't actually do anything on other platforms. So if your system has window controls on LEFT side you can set the pref to true */
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
:root{ --uc-window-control-width: 72px; }
:root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{
border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px)) var(--uc-window-drag-space-width,0px)
}
}

View File

@ -0,0 +1,53 @@
/* window transparencies */
#main-window {
background: var(--bct-main-window) !important;
-moz-appearance: var(--bct-moz-appearance) !important;
}
/* customization page */
#customization-container {
background: var(--bct-w-pages-bg) !important;
}
/* blank page */
#tabbrowser-tabpanels{
background: var(--bct-w-pages-bg) !important;
}
/* navbar / tabbar / titlebar */
#nav-bar {
background: transparent !important;
border-color: transparent !important;
}
#navigator-toolbox {
background: var(--bct-w-nav-bg) !important;
border: none !important;
}
#urlbar-background {
background: var(--bct-w-url-bg) !important;
}
#TabsToolbar, #titlebar {
background: var(--bct-w-tab-bg) !important;
appearance: none;
-moz-appearance: none !important;
box-shadow: none !important;
border: none !important;
}
.tab-background[selected="true"] {
background: var(--bct-w-tab-selected-bg) !important;
}
/* Sidebar */
#sidebar-box,
#sidebar-box:-moz-lwtheme-darktext,
#sidebar-box:-moz-lwtheme-brighttext {
--sidebar-background-color: var(--bct-w-sidebar-bg) !important;
--sidebar-text-color: var(--bct-w-sidebar-color) !important;
background: var(--bct-w-sidebar-bg) !important;
}
#sidebar,
.sidebar-panel {
background: transparent !important;
}

19
chrome/userChrome.css Normal file
View File

@ -0,0 +1,19 @@
/* variables used in styling */
@import url('components/variables.css');
/* optional styles for TST,
hide tabbar and move addressbar to the top */
/* @import url('components/window-control-placeholder.css'); */
/* @import url('components/hide-tabbar.css'); */
/* icons in menu */
@import url('components/menu-icons.css');
/* transparencies for browser elements (popups mostly) */
@import url('components/elements-transparencies.css');
/* optional transparencies for window (broken on non GNU/linux systems) */
@import url('components/window-transparencies.css');
/* optional TST tweaks */
/* @import url('components/tst-tweaks.css'); */

8
chrome/userContent.css Normal file
View File

@ -0,0 +1,8 @@
@import url('components/variables.css');
/* Removes the white loading page */
@-moz-document url(about:blank) {
html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
background: var(--bct-w-pages-bg) !important;
}
}

77
foxtheme.sh Executable file
View File

@ -0,0 +1,77 @@
#!/bin/sh
SCRIPTLOCATION=$(dirname -- "$(readlink -f "$0")")
[ -d "$SCRIPTLOCATION" ] || { echo "$0: Could not verify script location as an existing directory. This is probably a bug."; exit 2; }
[ -d "$SCRIPTLOCATION"/chrome ] || { echo "$0: Could not proceed with installation as 'chrome' directory is missing from '$SCRIPTLOCATION'."; exit 2; }
[ -f "$SCRIPTLOCATION"/user.js ] || { echo "$0: Could not proceed with installation as 'user.js' file is missing from '$SCRIPTLOCATION'."; exit 2; }
helptext() {
echo "Usage: ./foxtheme.sh [OPTIONS] [PROFILE | -a PROFILESDIR] "
echo "-a Apply theme to all (current) browser profiles"
echo "-j Just create or modify user.js and not user-overrides.js"
echo "-o Remove and replace an existing theme if found"
echo "-h Display this help message"
}
installtoprofile() {
targetprofile="$1"
[ -d "$targetprofile" ] || { echo "$0: Profile at '$targetprofile' does not exist"; exit 2; }
[ -d "$targetprofile/chrome/" ] && {
[ "$OVERWRITE" ] || { echo "$0: A theme for this profile '${targetprofile}/chrome/' already exists. Pass -o to overwrite existing themes."; exit 2; }
rm -r "${targetprofile:?}/chrome/"
}
cp -r "${SCRIPTLOCATION}/chrome/" "${targetprofile}/"
cat "${SCRIPTLOCATION}/user.js" >> "${targetprofile:?}/user.js"
[ "$NOOVERRIDE" ] || cat "${SCRIPTLOCATION}/user.js" >> "${targetprofile:?}/user-overrides.js"
echo "Successfully installed to '${targetprofile}'"
}
while getopts "ajoh" opt; do
case $opt in
a)
ALL=1
;;
j)
NOOVERRIDE=1
;;
o)
OVERWRITE=1
;;
h)
helptext
exit
;;
*)
helptext
exit 2
;;
esac
done
[ -z "$*" ] && { helptext; exit; }
shift $((OPTIND -1))
[ "$2" ] && { echo "$0: Too many arguments"; helptext; exit 2; }
[ -d "$1" ] || { echo "$0: '$1' is not a valid directory"; helptext; exit 2; }
arg="$1"
if [ "$ALL" ]; then
profilesdir=$(realpath "$arg")
[ -f "$profilesdir"/installs.ini ] && [ -f "$profilesdir"/profiles.ini ] || { echo "$0: '$profilesdir' does not appear to be a valid Firefox (or derivative) profiles directory (could not find 'profiles.ini' or 'installs.ini'). Run without the -a option if you intended to apply the theme to only a single profile."; exit 2; }
IFS_=$IFS
IFS="
"
profiles=$(grep "^Path=" "$profilesdir/profiles.ini" | sed "s/^Path=//")
for profile in $profiles; do
installtoprofile "$profilesdir/$profile"
done
IFS=$IFS_
else
profile=$(realpath "$arg")
[ -f "$profile/times.json" ] || { echo "$0: '$profile' does not appear to be a valid Firefox (or derivative) profile directory (could not find 'times.json')."; exit 2; }
installtoprofile "$profile"
fi
echo "All done."

6
user.js Normal file
View File

@ -0,0 +1,6 @@
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("layers.acceleration.force-enabled", true);
user_pref("gfx.webrender.all", true);
user_pref("gfx.webrender.enabled", true);
user_pref("svg.context-properties.content.enabled", true);
user_pref("layout.css.backdrop-filter.enabled", true);