Skip to content

Commit

Permalink
Fixed Gnome 42 issues #226 #225 #222
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceliuice committed Apr 29, 2022
1 parent 9b50682 commit 52c30ce
Show file tree
Hide file tree
Showing 1,559 changed files with 23,455 additions and 19,887 deletions.
84 changes: 37 additions & 47 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ fi
SRC_DIR=$(cd $(dirname $0) && pwd)

THEME_NAME=Qogir
THEME_VARIANTS=('' '-manjaro' '-ubuntu')
WIN_VARIANTS=('' '-win')
COLOR_VARIANTS=('' '-light' '-dark')
THEME_VARIANTS=('' '-Manjaro' '-Ubuntu')
WIN_VARIANTS=('' '-Win')
COLOR_VARIANTS=('' '-Light' '-Dark')
LOGO_NAME=''

image=''
Expand All @@ -28,16 +28,18 @@ theme_color='default'
SASSC_OPT="-M -t expanded"

if [[ "$(command -v gnome-shell)" ]]; then
gnome-shell --version
SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)"
echo "Your gnome-shell version is '$(gnome-shell --version)'"
if [[ "${SHELL_VERSION:-}" -ge "40" ]]; then
GS_VERSION="new"
if [[ "${SHELL_VERSION:-}" -ge "42" ]]; then
GS_VERSION="42-0"
elif [[ "${SHELL_VERSION:-}" -ge "40" ]]; then
GS_VERSION="40-0"
else
GS_VERSION="old"
GS_VERSION="3-32"
fi
else
echo "'gnome-shell' not found, using styles for last gnome-shell version available."
GS_VERSION="new"
GS_VERSION="42-0"
fi

usage() {
Expand Down Expand Up @@ -76,8 +78,8 @@ install() {
local color=${4}
local logo=${5}

[[ ${color} == '-dark' ]] && local ELSE_DARK=${color}
[[ ${color} == '-light' ]] && local ELSE_LIGHT=${color}
[[ ${color} == '-Dark' ]] && local ELSE_DARK=${color}
[[ ${color} == '-Light' ]] && local ELSE_LIGHT=${color}

local THEME_DIR=${dest}/${name}${theme}${color}

Expand Down Expand Up @@ -128,16 +130,10 @@ install() {

if [[ "$tweaks" == 'true' ]]; then
sassc $SASSC_OPT ${SRC_DIR}/src/gtk/theme-3.0/gtk${color}.scss ${THEME_DIR}/gtk-3.0/gtk.css
sassc $SASSC_OPT ${SRC_DIR}/src/gtk/theme-3.0/gtk-Dark.scss ${THEME_DIR}/gtk-3.0/gtk-dark.css
else
cp -r ${SRC_DIR}/src/gtk/theme-3.0/gtk${color}.css ${THEME_DIR}/gtk-3.0/gtk.css
fi

if [[ ${color} != '-dark' ]]; then
if [[ "$tweaks" == 'true' ]]; then
sassc $SASSC_OPT ${SRC_DIR}/src/gtk/theme-3.0/gtk-dark.scss ${THEME_DIR}/gtk-3.0/gtk-dark.css
else
cp -r ${SRC_DIR}/src/gtk/theme-3.0/gtk-dark.css ${THEME_DIR}/gtk-3.0/gtk-dark.css
fi
cp -r ${SRC_DIR}/src/gtk/theme-3.0/gtk-Dark.css ${THEME_DIR}/gtk-3.0/gtk-dark.css
fi

cp -r ${SRC_DIR}/src/gtk/assets/thumbnail${theme}${ELSE_DARK}.png ${THEME_DIR}/gtk-3.0/thumbnail.png
Expand All @@ -159,21 +155,22 @@ install() {

if [[ "$tweaks" == 'true' ]]; then
sassc $SASSC_OPT ${SRC_DIR}/src/gtk/theme-4.0/gtk${color}.scss ${THEME_DIR}/gtk-4.0/gtk.css
sassc $SASSC_OPT ${SRC_DIR}/src/gtk/theme-4.0/gtk-Dark.scss ${THEME_DIR}/gtk-4.0/gtk-dark.css
else
cp -r ${SRC_DIR}/src/gtk/theme-4.0/gtk${color}.css ${THEME_DIR}/gtk-4.0/gtk.css
fi

if [[ ${color} != '-dark' ]]; then
if [[ "$tweaks" == 'true' ]]; then
sassc $SASSC_OPT ${SRC_DIR}/src/gtk/theme-4.0/gtk-dark.scss ${THEME_DIR}/gtk-4.0/gtk-dark.css
else
cp -r ${SRC_DIR}/src/gtk/theme-4.0/gtk-dark.css ${THEME_DIR}/gtk-4.0/gtk-dark.css
fi
cp -r ${SRC_DIR}/src/gtk/theme-4.0/gtk-Dark.css ${THEME_DIR}/gtk-4.0/gtk-dark.css
fi

cp -r ${SRC_DIR}/src/gtk/assets/thumbnail${theme}${ELSE_DARK}.png ${THEME_DIR}/gtk-4.0/thumbnail.png

# GNOME SHELL
# link gtk4.0 for libadwaita
mkdir -p ${HOME}/.config/gtk-4.0
rm -rf ${HOME}/.config/gtk-4.0/{assets,gtk.css,gtk-dark.css}
ln -sf ${THEME_DIR}/gtk-4.0/assets ${HOME}/.config/gtk-4.0/assets
ln -sf ${THEME_DIR}/gtk-4.0/gtk.css ${HOME}/.config/gtk-4.0/gtk.css
ln -sf ${THEME_DIR}/gtk-4.0/gtk-dark.css ${HOME}/.config/gtk-4.0/gtk-dark.css

# GNOME SHELL
mkdir -p ${THEME_DIR}/gnome-shell
cp -r ${SRC_DIR}/src/gnome-shell/common-assets ${THEME_DIR}/gnome-shell/assets
cp -r ${SRC_DIR}/src/gnome-shell/assets${theme}/{background.jpg,calendar-today.svg} ${THEME_DIR}/gnome-shell/assets
Expand All @@ -189,18 +186,11 @@ install() {
cp -r ${SRC_DIR}/src/gnome-shell/icons ${THEME_DIR}/gnome-shell
cp -r ${SRC_DIR}/src/gnome-shell/pad-osd.css ${THEME_DIR}/gnome-shell

if [[ "${GS_VERSION:-}" == 'new' ]]; then
if [[ "$tweaks" == 'true' ]]; then
sassc $SASSC_OPT ${SRC_DIR}/src/gnome-shell/theme-40-0/gnome-shell${ELSE_DARK}.scss ${THEME_DIR}/gnome-shell/gnome-shell.css
else
cp -r ${SRC_DIR}/src/gnome-shell/theme-40-0/gnome-shell${ELSE_DARK}.css ${THEME_DIR}/gnome-shell/gnome-shell.css
fi

if [[ "$tweaks" == 'true' ]]; then
sassc $SASSC_OPT ${SRC_DIR}/src/gnome-shell/theme-${GS_VERSION}/gnome-shell${ELSE_DARK}.scss ${THEME_DIR}/gnome-shell/gnome-shell.css
else
if [[ "$tweaks" == 'true' ]]; then
sassc $SASSC_OPT ${SRC_DIR}/src/gnome-shell/theme-3-32/gnome-shell${ELSE_DARK}.scss ${THEME_DIR}/gnome-shell/gnome-shell.css
else
cp -r ${SRC_DIR}/src/gnome-shell/theme-3-32/gnome-shell${ELSE_DARK}.css ${THEME_DIR}/gnome-shell/gnome-shell.css
fi
cp -r ${SRC_DIR}/src/gnome-shell/theme-${GS_VERSION}/gnome-shell${ELSE_DARK}.css ${THEME_DIR}/gnome-shell/gnome-shell.css
fi

cd ${THEME_DIR}/gnome-shell
Expand All @@ -224,14 +214,14 @@ install() {
mkdir -p ${THEME_DIR}/metacity-1

if [[ "$window" == 'round' ]]; then
cp -r ${SRC_DIR}/src/metacity-1/assets-round ${THEME_DIR}/metacity-1/assets
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-3-round.xml ${THEME_DIR}/metacity-1/metacity-theme-3.xml
cp -r ${SRC_DIR}/src/metacity-1/assets-Round ${THEME_DIR}/metacity-1/assets
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-3-Round.xml ${THEME_DIR}/metacity-1/metacity-theme-3.xml
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-1${ELSE_LIGHT}-round.xml ${THEME_DIR}/metacity-1/metacity-theme-1.xml
else
if [[ "$square" == 'true' ]]; then
cp -r ${SRC_DIR}/src/metacity-1/assets${ELSE_LIGHT}-win/*.png ${THEME_DIR}/metacity-1
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-3-win.xml ${THEME_DIR}/metacity-1/metacity-theme-3.xml
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-1${ELSE_LIGHT}-win.xml ${THEME_DIR}/metacity-1/metacity-theme-1.xml
cp -r ${SRC_DIR}/src/metacity-1/assets${ELSE_LIGHT}-Win/*.png ${THEME_DIR}/metacity-1
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-3-Win.xml ${THEME_DIR}/metacity-1/metacity-theme-3.xml
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-1${ELSE_LIGHT}-Win.xml ${THEME_DIR}/metacity-1/metacity-theme-1.xml
else
cp -r ${SRC_DIR}/src/metacity-1/assets${ELSE_LIGHT}/*.png ${THEME_DIR}/metacity-1
cp -r ${SRC_DIR}/src/metacity-1/metacity-theme-3.xml ${THEME_DIR}/metacity-1/metacity-theme-3.xml
Expand All @@ -248,11 +238,11 @@ install() {

if [[ "$square" == 'true' ]]; then
if [[ "$hidpi" == 'true' ]]; then
cp -r ${SRC_DIR}/src/xfwm4/themerc-win${ELSE_LIGHT} ${THEME_DIR}/xfwm4/themerc
cp -r ${SRC_DIR}/src/xfwm4/assets-win${ELSE_LIGHT}-hidpi/*.png ${THEME_DIR}/xfwm4
cp -r ${SRC_DIR}/src/xfwm4/themerc-Win${ELSE_LIGHT} ${THEME_DIR}/xfwm4/themerc
cp -r ${SRC_DIR}/src/xfwm4/assets-Win${ELSE_LIGHT}-hidpi/*.png ${THEME_DIR}/xfwm4
else
cp -r ${SRC_DIR}/src/xfwm4/themerc-win${ELSE_LIGHT} ${THEME_DIR}/xfwm4/themerc
cp -r ${SRC_DIR}/src/xfwm4/assets-win${ELSE_LIGHT}/*.png ${THEME_DIR}/xfwm4
cp -r ${SRC_DIR}/src/xfwm4/themerc-Win${ELSE_LIGHT} ${THEME_DIR}/xfwm4/themerc
cp -r ${SRC_DIR}/src/xfwm4/assets-Win${ELSE_LIGHT}/*.png ${THEME_DIR}/xfwm4
fi
else
if [[ "$hidpi" == 'true' ]]; then
Expand Down
6 changes: 4 additions & 2 deletions parse-sass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ SASSC_OPT="-M -t expanded"

SRC_DIR=$(cd $(dirname $0) && pwd)

_COLOR_VARIANTS=('' '-light' '-dark')
_COLOR_VARIANTS=('' '-Light' '-Dark')

if [ ! -z "${COLOR_VARIANTS:-}" ]; then
IFS=', ' read -r -a _COLOR_VARIANTS <<< "${COLOR_VARIANTS:-}"
fi

_COLOR_D_VARIANTS=('' '-dark')
_COLOR_D_VARIANTS=('' '-Dark')

if [ ! -z "${COLOR_D_VARIANTS:-}" ]; then
IFS=', ' read -r -a _COLOR_D_VARIANTS <<< "${COLOR_D_VARIANTS:-}"
Expand All @@ -35,6 +35,8 @@ for color in "${_COLOR_D_VARIANTS[@]}"; do
echo "==> Generating the gnome-shell-3-32${color}.css..."
sassc $SASSC_OPT src/gnome-shell/theme-40-0/gnome-shell${color}.{scss,css}
echo "==> Generating the gnome-shell-40-0${color}.css..."
sassc $SASSC_OPT src/gnome-shell/theme-42-0/gnome-shell${color}.{scss,css}
echo "==> Generating the gnome-shell-42-0${color}.css..."
sassc $SASSC_OPT src/cinnamon/cinnamon${color}.{scss,css}
echo "==> Generating the cinnamon${color}.css..."
done
Expand Down
8 changes: 4 additions & 4 deletions src/_sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ $suggested_fg_color: white;
$drop_target_color: #F08437;
$progress_color: $selected_bg_color;

$borders_color: if($variant == 'light', rgba(black, 0.15), rgba(white, 0.12));
$borders_color: if($variant == 'light', rgba(black, 0.12), rgba(white, 0.12));
$alt_borders_color: if($variant == 'light', rgba(black, 0.05), rgba(white, 0.05));
$solid_borders_color: if($variant == 'light', darken($bg_color, 15%), lighten($bg_color, 10%));
$solid_borders_color: if($variant == 'light', mix(black, $base_color, 12%), mix(white, $base_color, 12%));
$highlight: if($variant == 'light', rgba(white, 0.13), rgba(white, 0.10));
$alt_highlight_color: rgba(white, 0.2);

Expand All @@ -63,8 +63,8 @@ $header_bg_backdrop: if($titlebar == 'dark' or $variant == 'dark', lighten($head

$header_border: if($variant == 'light' and $titlebar == 'light', darken($header_bg, 10%), lighten($header_bg, 10%));

$header_fg: if($titlebar == 'dark', saturate(rgba(#e6ebef, 0.8), 10%), saturate(rgba($fg_color, 0.8), 10%));
$alt_header_fg: if($titlebar == 'dark', lighten($header_fg, 10%), darken($header_fg, 10%));
$header_fg: if($titlebar == 'light', #4a4c59, #e0e5eb);
$alt_header_fg: mix($header_fg, $header_bg, 75%);

$dark_sidebar_bg: white;
@if $trans == 'true' and $titlebar == 'light' { $dark_sidebar_bg: rgba(#f6f9fb, 0.95); }
Expand Down
3 changes: 1 addition & 2 deletions src/_sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ $asset_suffix_win: if($titlebutton == 'circle', '', '-win');
// sizes
$small_size: 16px;
$medium_size: 28px;
$large_size: 38px;
$large_size: 40px;

$cont_padding: 6px;
$menuitem_size: 28px;
$icon_padding: 5px;

// radiuses
$bt_radius: if($window == 'round', 4px, 2px);
Expand Down
2 changes: 2 additions & 0 deletions src/_sass/gnome-shell/_widgets-3-32.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@
@import 'widgets-3-32/dash';
@import 'widgets-3-32/misc';
@import 'widgets-3-32/workspace-thumbnails';
@import 'widgets-3-32/popovers';
@import 'widgets-3-32/osd';
2 changes: 2 additions & 0 deletions src/_sass/gnome-shell/_widgets-40-0.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@
@import 'widgets-40-0/search-entry';
@import 'widgets-40-0/window-picker';
@import 'widgets-40-0/workspace-thumbnails';
@import 'widgets-40-0/popovers';
@import 'widgets-40-0/osd';
58 changes: 58 additions & 0 deletions src/_sass/gnome-shell/_widgets-42-0.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

// widgets-common

@import 'common';

// Primary widgets-common
@import 'widgets-common/base';
@import 'widgets-common/entries';
@import 'widgets-common/buttons';
@import 'widgets-common/check-box';
@import 'widgets-common/switches';
@import 'widgets-common/slider';
@import 'widgets-common/scrollbars';
// Popovers
@import 'widgets-common/popovers';
@import 'widgets-common/calendar';
@import 'widgets-common/message-list';
@import 'widgets-common/ibus-popup';
// Notifications
@import 'widgets-common/notifications';
@import 'widgets-common/hotplug';
// Dialogs
@import 'widgets-common/dialogs';
@import 'widgets-common/network-dialog';
// OSDs
@import 'widgets-common/osd';
@import 'widgets-common/switcher-popup';
@import 'widgets-common/workspace-switcher';
// Panel
@import 'widgets-common/panel';
@import 'widgets-common/corner-ripple';
// Overview
@import 'widgets-common/overview';
@import 'widgets-common/window-picker';
@import 'widgets-common/search-entry';
@import 'widgets-common/search-results';
@import 'widgets-common/app-grid';
@import 'widgets-common/dash';
@import 'widgets-common/workspace-thumbnails';
// A11y / misc
@import 'widgets-common/a11y';
@import 'widgets-common/misc';
@import 'widgets-common/tiled-previews';
@import 'widgets-common/keyboard';
@import 'widgets-common/looking-glass';
// Lock / login screens
@import 'widgets-common/login-dialog';
@import 'widgets-common/screen-shield';

// widgets-40-0
@import 'widgets-40-0/app-grid';
@import 'widgets-40-0/dash';
@import 'widgets-40-0/overview';
@import 'widgets-40-0/search-entry';
@import 'widgets-40-0/window-picker';
@import 'widgets-40-0/workspace-thumbnails';
@import 'widgets-42-0/popovers';
@import 'widgets-42-0/osd';
11 changes: 11 additions & 0 deletions src/_sass/gnome-shell/widgets-3-32/_osd.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

.osd-window {
spacing: 12px; // 12px
margin: 32px; // 32px
min-width: 64px;
min-height: 64px;

StIcon {
icon-size: 96px;
}
}
19 changes: 19 additions & 0 deletions src/_sass/gnome-shell/widgets-3-32/_popovers.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

// menu items
.popup-menu-item {
&:ltr { padding-right: 1.75em; padding-left: 0; }
&:rtl { padding-right: 0; padding-left: 1.75em; }
}

// system status menu
.popup-sub-menu .popup-menu-item > :first-child {
// account for icons in submenus with padding
&:ltr {
padding-left: 14px;
margin-left: 16px;
}
&:rtl {
padding-right: 14px;
margin-right: 16px;
}
}
11 changes: 11 additions & 0 deletions src/_sass/gnome-shell/widgets-40-0/_osd.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

.osd-window {
spacing: 12px; // 12px
margin: 32px; // 32px
min-width: 64px;
min-height: 64px;

StIcon {
icon-size: 96px;
}
}
19 changes: 19 additions & 0 deletions src/_sass/gnome-shell/widgets-40-0/_popovers.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

// menu items
.popup-menu-item {
&:ltr { padding-right: 1.75em; padding-left: 0; }
&:rtl { padding-right: 0; padding-left: 1.75em; }
}

// system status menu
.popup-sub-menu .popup-menu-item > :first-child {
// account for icons in submenus with padding
&:ltr {
padding-left: 14px;
margin-left: 16px;
}
&:rtl {
padding-right: 14px;
margin-right: 16px;
}
}
14 changes: 14 additions & 0 deletions src/_sass/gnome-shell/widgets-42-0/_osd.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

.osd-window {
spacing: 12px; // 12px
padding: 12px 18px;
& > * { spacing: 8px; }
margin-bottom: 4em;

StIcon { icon-size: 32px; } // 32px

StLabel {
&:ltr { margin-right: 6px; }
&:rtl { margin-left: 6px; }
}
}
Loading

0 comments on commit 52c30ce

Please sign in to comment.