Skip to content

Commit

Permalink
updated code to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryan20 committed Aug 6, 2021
1 parent d3b7d7e commit c7de720
Show file tree
Hide file tree
Showing 11 changed files with 314 additions and 164 deletions.
38 changes: 21 additions & 17 deletions lib-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,23 @@ anim=(
" ${c_blue}${c_green}${c_red}${c_magenta}"
)

# Check command availability
has_command() {
command -v "$1" &> /dev/null
}

has_flatpak_app() {
flatpak list --columns=application | grep "${1}" &> /dev/null || return 1
}

has_snap_app() {
snap list "${1}" &> /dev/null || return 1
}

is_my_distro() {
[[ "$(cat '/etc/os-release' | awk -F '=' '/ID/{print $2}')" =~ "${1}" ]]
}

###############################################################################
# CORE UTILITIES #
###############################################################################
Expand Down Expand Up @@ -286,6 +303,10 @@ signal_error() {
prompt -e "GNOME : ${GNOME_VERSION}"
prompt -e "REPO : ${repo_ver}\n"

if has_command apt; then
prompt -i "HINT: Try install depends to fix this: sudo apt install sassc libglib2.0-dev-bin libxml2-utils\n"
fi

prompt -i "HINT: You can google or report to us the info above\n"
prompt -i "https://github.com/vinceliuice/WhiteSur-gtk-theme/issues\n\n"

Expand Down Expand Up @@ -351,23 +372,6 @@ helpify() {
printf " ${c_blue}%s ${c_green}%s\n ${c_magenta}%s. ${c_cyan}%s\n\n${c_default}" "${1}" "${2}" "${3}" "${4}"
}

# Check command availability
has_command() {
command -v "$1" &> /dev/null
}

has_flatpak_app() {
flatpak list --columns=application | grep "${1}" &> /dev/null || return 1
}

has_snap_app() {
snap list "${1}" &> /dev/null || return 1
}

is_my_distro() {
[[ "$(cat '/etc/os-release' | awk -F '=' '/ID/{print $2}')" =~ "${1}" ]]
}

###############################################################################
# PARAMETERS #
###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion lib-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ customize_theme() {
# Change panel font color
if [[ "${monterey}" == 'true' ]]; then
black_font="true"
prompt -s "Changing to montery style ..."
prompt -s "Changing to Monterey style ..."
sed $SED_OPT "/\$monterey/s/false/true/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
sed $SED_OPT "/\$panel_opacity/s/0.15/0.5/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
fi
Expand Down
6 changes: 0 additions & 6 deletions src/other/firefox/Monterey/parts/headerbar-urlbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,6 @@ toolbarspring {
fill-opacity: 1 !important;
}

.urlbar-icon {
width: 28px !important;
height: 28px !important;
padding: 6px !important;
}

#page-action-buttons {
padding: 2px 0 !important;
}
Expand Down
53 changes: 37 additions & 16 deletions src/other/firefox/Monterey/parts/popups.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ menupopup {
background: var(--gnome-menu-background) !important;
border: 1px solid var(--gnome-menu-border-color) !important;
border-radius: 8px !important;
padding: 8px 0 !important;
padding: 6px 0 !important;
color: var(--gnome-toolbar-color) !important;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}
menupopup menupopup {
margin: -5px 0 0 -4px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

menubar > menu > menupopup {
Expand All @@ -25,6 +22,8 @@ menubar > menu > menupopup {
menuitem, menupopup menu {
-moz-appearance: none !important;
padding: 4px 8px !important;
border: none !important;
box-shadow: none !important;
}

menuitem[type="checkbox"] image, menuitem[type="radio"] image {
Expand All @@ -35,8 +34,30 @@ menuitem[disabled="true"]:hover, menupopup menu[disabled="true"]:hover {
background: transparent !important;
}

menupopup {
--panel-background: transparent !important;
--panel-border-color: transparent !important;
}

panel {
--panel-background: var(--gnome-menu-background) !important;
--panel-border-color: var(--gnome-menu-border-color) !important;
}

:is(menupopup, panel)[type="arrow"] {
--panel-border-radius: 12px !important;
--panel-padding: 8px !important;
}

:is(panel, menupopup)::part(content) {
border: none !important;
}

/* Adjust popovers position */
panel[type=arrow] {
panel[type="arrow"] {
appearance: none !important;
border: none !important;
background-color: transparent !important;
margin-top: 8px !important;
}

Expand All @@ -45,23 +66,23 @@ panel[type=arrow] {
.panel-header, .PanelUI-subView,
.panel-subview-body, #widget-overflow-mainView, #protections-popup-footer,
panelview {
border: 0 !important;
border: none !important;
background: transparent !important;
}

panelview {
padding: 8px !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
border-radius: 12px !important;
}

.panel-arrowcontent {
background: var(--gnome-popover-background) !important;
border: 1px solid !important;
border-color: var(--gnome-popover-border-color) !important;
border-radius: 8px!important;
padding: 12px !important;
border: 1px solid var(--gnome-popover-border-color) !important;
border-radius: 12px !important;
color: var(--gnome-toolbar-color) !important;
}
.panel-arrow {
fill: var(--gnome-popover-background) !important;
stroke: var(--gnome-popover-border-color) !important;
display: -moz-inline-box !important;
}

panel:not([remote]), #BMB_bookmarksPopup {
--arrowpanel-background: var(--gnome-popover-background) !important;
}
Expand Down
6 changes: 0 additions & 6 deletions src/other/firefox/WhiteSur/parts/headerbar-urlbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ toolbarspring {
fill-opacity: 1 !important;
}

.urlbar-icon {
width: 28px !important;
height: 28px !important;
padding: 6px !important;
}

#page-action-buttons {
padding: 2px 0 !important;
}
Expand Down
4 changes: 2 additions & 2 deletions src/other/firefox/WhiteSur/parts/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ menuitem[type="radio"]:not([disabled="true"]):hover .menu-iconic-icon {
list-style-image: url("../icons/drm-symbolic.svg") !important;
}

#reader-mode-button {
#reader-mode-button > .urlbar-icon {
list-style-image: url("../icons/reader-mode.svg") !important;
}

Expand Down Expand Up @@ -524,7 +524,7 @@ menuitem[type="radio"]:not([disabled="true"]):hover .menu-iconic-icon {
#pageActionButton,
#permissions-granted-icon,
#tracking-protection-icon-animatable-image,
#reader-mode-button,
#reader-mode-button > .urlbar-icon,
#star-button:not([starred]),
#geo-sharing-icon[sharing], .geo-icon,
.blocked-permission-icon.popup-icon,
Expand Down
53 changes: 37 additions & 16 deletions src/other/firefox/WhiteSur/parts/popups.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ menupopup {
background: var(--gnome-menu-background) !important;
border: 1px solid var(--gnome-menu-border-color) !important;
border-radius: 8px !important;
padding: 8px 0 !important;
padding: 6px 0 !important;
color: var(--gnome-toolbar-color) !important;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}
menupopup menupopup {
margin: -5px 0 0 -4px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

menubar > menu > menupopup {
Expand All @@ -25,6 +22,8 @@ menubar > menu > menupopup {
menuitem, menupopup menu {
-moz-appearance: none !important;
padding: 4px 8px !important;
border: none !important;
box-shadow: none !important;
}

menuitem[type="checkbox"] image, menuitem[type="radio"] image {
Expand All @@ -35,8 +34,30 @@ menuitem[disabled="true"]:hover, menupopup menu[disabled="true"]:hover {
background: transparent !important;
}

menupopup {
--panel-background: transparent !important;
--panel-border-color: transparent !important;
}

panel {
--panel-background: var(--gnome-menu-background) !important;
--panel-border-color: var(--gnome-menu-border-color) !important;
}

:is(menupopup, panel)[type="arrow"] {
--panel-border-radius: 12px !important;
--panel-padding: 8px !important;
}

:is(panel, menupopup)::part(content) {
border: none !important;
}

/* Adjust popovers position */
panel[type=arrow] {
panel[type="arrow"] {
appearance: none !important;
border: none !important;
background-color: transparent !important;
margin-top: 8px !important;
}

Expand All @@ -45,23 +66,23 @@ panel[type=arrow] {
.panel-header, .PanelUI-subView,
.panel-subview-body, #widget-overflow-mainView, #protections-popup-footer,
panelview {
border: 0 !important;
border: none !important;
background: transparent !important;
}

panelview {
padding: 8px !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
border-radius: 12px !important;
}

.panel-arrowcontent {
background: var(--gnome-popover-background) !important;
border: 1px solid !important;
border-color: var(--gnome-popover-border-color) !important;
border-radius: 8px!important;
padding: 12px !important;
border: 1px solid var(--gnome-popover-border-color) !important;
border-radius: 12px !important;
color: var(--gnome-toolbar-color) !important;
}
.panel-arrow {
fill: var(--gnome-popover-background) !important;
stroke: var(--gnome-popover-border-color) !important;
display: -moz-inline-box !important;
}

panel:not([remote]), #BMB_bookmarksPopup {
--arrowpanel-background: var(--gnome-popover-background) !important;
}
Expand Down
2 changes: 1 addition & 1 deletion src/sass/gnome-shell/common/_app-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
spacing: $base_spacing;
}
}

& .overview-icon {
color: $light_fg_color;
border-radius: $wm_radius;
Expand Down
29 changes: 22 additions & 7 deletions src/sass/gnome-shell/common/_panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,23 @@
&:hover {
color: $panel_fg;
background-color: $panel_divider;

&.clock-display {
.clock {
background-color: $panel_divider;
}
}
}

&:active, &:overview, &:focus, &:checked {
&, &:hover {
background-color: $panel_track;
color: $panel_fg;
box-shadow: none;
background-color: $panel_track;
color: $panel_fg;
box-shadow: none;

&.clock-display {
.clock {
background-color: $panel_track;
}
}
}

Expand All @@ -99,14 +109,18 @@
}

&.clock-display {
StLabel { padding: 0 $base_margin; }
background-color: transparent;

StLabel { padding: 0 $base_padding; }

.clock {
// transition-duration: 150ms;
border: none;
border-radius: 0;
background: none;
border-radius: $bt_radius;
background-color: transparent;
box-shadow: none;
padding: 0 $base_padding * 3;
spacing: $base_padding;
}
}

Expand All @@ -117,6 +131,7 @@
// we want to exclude the do-not-disturb indicator from the background
&.clock-display {
box-shadow: none;
background-color: transparent;

.clock {
box-shadow: none;
Expand Down
Loading

0 comments on commit c7de720

Please sign in to comment.