diff --git a/.gitignore b/.gitignore
index 341e31e..d8da396 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
__pycache__
-.idea
\ No newline at end of file
+.idea
+.temp
\ No newline at end of file
diff --git a/README.md b/README.md
index 94630a5..af046d6 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Icon theme: https://github.com/vinceliuice/Colloid-icon-theme
#### Panel

-#### Quick settings ([Fresh green leaves with fragile veins](https://www.pexels.com/photo/fresh-green-leaves-with-fragile-veins-6423448/))
+#### Quick settings ([Fresh green leaves with fragile veins](https://www.pexels.com/photo/fresh-green-leaves-with-fragile-veins-6423448/) / [Close-Up Photo of Wrinkled Parchment Paper](https://www.pexels.com/photo/close-up-photo-of-wrinkled-parchment-paper-7233131/))

#### Modal dialog ([Wide Angle Photography of Mountain](https://www.pexels.com/photo/wide-angle-photography-of-mountain-1612559/))
@@ -47,17 +47,22 @@ Icon theme: https://github.com/vinceliuice/Colloid-icon-theme
## 💡 Installation
1. Open the terminal.
2. Clone git and change directory:
-```shell
-git clone https://github.com/imarkoff/Marble-shell-theme.git
-cd Marble-shell-theme
-```
+ ```shell
+ git clone https://github.com/imarkoff/Marble-shell-theme.git
+ cd Marble-shell-theme
+ ```
3. Run the program (install all accent colors, light & dark mode):
-```shell
-python install.py -a
-```
+ ```shell
+ python install.py -a
+ ```
+ - [vibrant](./readme-images/qs.png) active button colors:
+ ```shell
+ python istall.py -a --filled
+ ```
4. After successful file creation open GNOME Tweaks, go to `Appearance - Themes - Shell`.
5. Select shell theme you want.
+
## 🏮 Installation tweaks
#### Install default color
@@ -80,6 +85,11 @@ You can install several themes in one string: `python install.py --red --green -
| --hue | (0 - 360) | Generate theme from Hue prompt [0 - 360] |
| --name | NAME | Custom theme name |
+#### Theme colors
+| Option | Description |
+|----------|--------------------------------|
+| --filled | Make accent color [more vibrant](./readme-images/qs.png?raw=true) |
+
#### Optional theme tweaks
| Option | Secondary option | Description |
|--------|------------------|------------------------------------------------------------|
diff --git a/colors.json b/colors.json
index 99281b4..315c985 100644
--- a/colors.json
+++ b/colors.json
@@ -1,6 +1,28 @@
{
"elements" : {
- "accent-color" : {
+ "BUTTON-COLOR" : {
+ "_comment" : "Color for buttons. Replaced by ACCENT-COLOR / ACCENT-FILLED-COLOR",
+ "default" : "ACCENT-COLOR"
+ },
+ "BUTTON_HOVER" : {
+ "_comment" : "Hover color for buttons.",
+ "default" : "ACCENT_HOVER"
+ },
+ "BUTTON_INSENSITIVE" : {
+ "_comment" : "Color of disabled buttons",
+ "default" : "ACCENT_INSENSITIVE"
+ },
+
+ "BUTTON-TEXT-COLOR" : {
+ "_comment" : "Text color for buttons",
+ "default" : "TEXT-PRIMARY-COLOR"
+ },
+ "BUTTON-TEXT_SECONDARY" : {
+ "_comment" : "Text color for buttons",
+ "default" : "TEXT-SECONDARY-COLOR"
+ },
+
+ "ACCENT-COLOR" : {
"_comment" : "Active buttons/toggles",
"replace" : "ACCENT-COLOR",
@@ -16,9 +38,8 @@
"a" : 1
}
},
- "accent_hover" : {
+ "ACCENT_HOVER" : {
"_comment" : "Hover color in active buttons/toggles",
- "replace" : "ACCENT_HOVER",
"light" : {
"s" : 50,
@@ -32,10 +53,24 @@
"a" : 1
}
},
+ "ACCENT_INSENSITIVE" : {
+ "_comment" : "Accent color for insensitive elements",
+
+ "light" : {
+ "s" : 52,
+ "l" : 50,
+ "a" : 0.5
+ },
- "accent-disabled" : {
+ "dark" : {
+ "s" : 42,
+ "l" : 26,
+ "a" : 0.6
+ }
+ },
+
+ "ACCENT-DISABLED-COLOR" : {
"_comment" : "Buttons / disabled toggles",
- "replace" : "ACCENT-DISABLED-COLOR",
"light" : {
"s" : 40,
@@ -49,9 +84,8 @@
"a" : 0.08
}
},
- "accent-disabled_hover" : {
+ "ACCENT-DISABLED_HOVER" : {
"_comment" : "Hover color in buttons / disabled toggles",
- "replace" : "ACCENT-DISABLED_HOVER",
"light" : {
"s" : 35,
@@ -66,9 +100,8 @@
}
},
- "accent-secondary-color" : {
+ "ACCENT-SECONDARY-COLOR" : {
"_comment" : "Capture button in Screenshot UI, checkboxes; borders when focusing on element",
- "replace" : "ACCENT-SECONDARY-COLOR",
"light" : {
"s" : 20,
@@ -82,9 +115,8 @@
"a" : 1
}
},
- "accent-secondary_hover" : {
+ "ACCENT-SECONDARY_HOVER" : {
"_comment" : "Secondary accent color on hover",
- "replace" : "ACCENT-SECONDARY_HOVER",
"light" : {
"s" : 20,
@@ -99,9 +131,8 @@
}
},
- "accent-opacity-color" : {
+ "ACCENT-OPACITY-COLOR" : {
"_comment" : "Accent color, but with transparency. Used in selected workspace indicator / tiled windows / window selection (Screenshot UI)",
- "replace": "ACCENT-OPACITY-COLOR",
"light" : {
"s" : 78,
@@ -116,9 +147,54 @@
}
},
- "background-color" : {
+ "ACCENT-FILLED-COLOR" : {
+ "_comment" : "Accent color but more vibrant",
+
+ "light" : {
+ "s" : 76,
+ "l" : 68,
+ "a" : 1
+ },
+
+ "dark" : {
+ "s" : 76,
+ "l" : 68,
+ "a" : 1
+ }
+ },
+ "ACCENT-FILLED_HOVER" : {
+ "_comment" : "Hover effect for accent filled color",
+
+ "light" : {
+ "s" : 70,
+ "l" : 60,
+ "a" : 1
+ },
+
+ "dark" : {
+ "s" : 80,
+ "l" : 75,
+ "a" : 1
+ }
+ },
+ "ACCENT-FILLED_INSENSITIVE" : {
+ "_comment" : "Vibrant color for insensitive elements",
+
+ "light" : {
+ "s" : 76,
+ "l" : 40,
+ "a" : 0.4
+ },
+
+ "dark" : {
+ "s" : 76,
+ "l" : 68,
+ "a" : 0.5
+ }
+ },
+
+ "BACKGROUND-COLOR" : {
"_comment" : "Background color. Used in overview, panel, different menus...",
- "replace" : "BACKGROUND-COLOR",
"light" : {
"s" : 64,
@@ -133,9 +209,8 @@
}
},
- "dash-color" : {
- "_comment" : "Special color for dash background",
- "replace" : "DASH-COLOR",
+ "DASH-COLOR" : {
+ "_comment" : "Special background color for dash",
"light" : {
"s" : 40,
@@ -149,9 +224,8 @@
"a" : 0.7
}
},
- "dash_overview" : {
- "_comment" : "Dash backround when in overview",
- "replace" : "DASH_OVERVIEW",
+ "DASH_OVERVIEW" : {
+ "_comment" : "Dash background when in overview",
"light" : {
"s" : 60,
@@ -166,9 +240,8 @@
}
},
- "well-app-selected" : {
+ "WELL-APP-SELECTED" : {
"_comment" : "Running app dot",
- "replace" : "WELL-APP-SELECTED",
"light" : {
"s" : 20,
@@ -183,9 +256,8 @@
}
},
- "text-primary-color" : {
+ "TEXT-PRIMARY-COLOR" : {
"_comment" : "Used as primary color in text",
- "replace" : "TEXT-PRIMARY-COLOR",
"light" : {
"s" : 71,
@@ -199,9 +271,8 @@
"a" : 1
}
},
- "text-secondary-color" : {
+ "TEXT-SECONDARY-COLOR" : {
"_comment" : "Item description, time stamp",
- "replace" : "TEXT-SECONDARY-COLOR",
"light" : {
"s" : 71,
@@ -215,9 +286,8 @@
"a" : 0.67
}
},
- "text-disabled-color" : {
+ "TEXT-DISABLED-COLOR" : {
"_comment" : "No notifications, Searching..., etc. labels",
- "replace" : "TEXT-DISABLED-COLOR",
"light" : {
"s" : 71,
@@ -232,9 +302,8 @@
}
},
- "text-inverted-color": {
+ "TEXT-INVERTED-COLOR": {
"_comment" : "Screenshot UI shot/cast button",
- "replace" : "TEXT-INVERTED-COLOR",
"light" : {
"s" : 65,
@@ -249,9 +318,51 @@
}
},
- "border-shadow" : {
+ "TEXT-WHITE-COLOR" : {
+
+ "light" : {
+ "s" : 65,
+ "l" : 95,
+ "a" : 1
+ },
+
+ "dark" : {
+ "s" : 65,
+ "l" : 95,
+ "a" : 1
+ }
+ },
+ "TEXT-BLACK-COLOR" : {
+
+ "light" : {
+ "s" : 71,
+ "l" : 10,
+ "a" : 0.87
+ },
+
+ "dark" : {
+ "s" : 71,
+ "l" : 10,
+ "a" : 0.87
+ }
+ },
+ "TEXT-BLACK_SECONDARY" : {
+
+ "light" : {
+ "s" : 71,
+ "l" : 10,
+ "a" : 0.6
+ },
+
+ "dark" : {
+ "s" : 71,
+ "l" : 10,
+ "a" : 0.67
+ }
+ },
+
+ "BORDER-SHADOW" : {
"_comment" : "Used as border in buttons",
- "replace" : "BORDER-SHADOW",
"light" : {
"s" : 0,
@@ -265,9 +376,8 @@
"a" : 0.03
}
},
- "border-menu-shadow" : {
+ "BORDER-MENU-SHADOW" : {
"_comment" : "Used as border in menus",
- "replace" : "BORDER-MENU-SHADOW",
"light" : {
"s" : 0,
@@ -282,9 +392,8 @@
}
},
- "separator-color" : {
+ "SEPARATOR-COLOR" : {
"_comment" : "Color for separators",
- "replace" : "SEPARATOR-COLOR",
"light" : {
"s" : 0,
@@ -299,9 +408,8 @@
}
},
- "show-apps-icon-color" : {
+ "SHOW-APPS-ICON-COLOR" : {
"_comment" : "Dash: Show Apps icon",
- "replace" : "SHOW-APPS-ICON-COLOR",
"light" : {
"s" : 4,
@@ -316,9 +424,8 @@
}
},
- "scrollbar-color" : {
+ "SCROLLBAR-COLOR" : {
"_comment" : "Special color for scrollbars",
- "replace" : "SCROLLBAR-COLOR",
"light" : {
"s" : 20,
@@ -332,8 +439,7 @@
"a" : 0.75
}
},
- "scrollbar_hover" : {
- "replace" : "SCROLLBAR_HOVER",
+ "SCROLLBAR_HOVER" : {
"light" : {
"s" : 20,
@@ -347,8 +453,7 @@
"a" : 1
}
},
- "scrollbar_active" : {
- "replace" : "SCROLLBAR_ACTIVE",
+ "SCROLLBAR_ACTIVE" : {
"light" : {
"s" : 20,
@@ -363,9 +468,8 @@
}
},
- "page-nav-hint" : {
+ "PAGE-NAV-HINT" : {
"_comment" : "Left and right hints on edges of the screen when dragging app icon ",
- "replace" : "PAGE-NAV-HINT",
"light" : {
"s" : 95,
@@ -380,9 +484,8 @@
}
},
- "section-color" : {
+ "SECTION-COLOR" : {
"_comment" : "Same as ACCENT-DISABLED-COLOR, but less contrast and has no transparency",
- "replace" : "SECTION-COLOR",
"light" : {
"s" : 45,
@@ -397,9 +500,8 @@
}
},
- "close-button-color" : {
+ "BUTTON-CLOSE-COLOR" : {
"_comment" : "Same as ACCENT-DISABLED-COLOR, but has no transparency",
- "replace" : "CLOSE-BUTTON-COLOR",
"light" : {
"s" : 35,
@@ -413,9 +515,8 @@
"a" : 1
}
},
- "close-button_hover" : {
+ "BUTTON-CLOSE_HOVER" : {
"_comment" : "Same as ACCENT-DISABLED_HOVER, but has no transparency",
- "replace" : "CLOSE-BUTTON_HOVER",
"light" : {
"s" : 35,
diff --git a/gnome-shell/calendar-event-disabled.svg b/gnome-shell/calendar-event-disabled.svg
deleted file mode 100644
index 861c9a3..0000000
--- a/gnome-shell/calendar-event-disabled.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/gnome-shell/calendar-event.svg b/gnome-shell/calendar-event.svg
deleted file mode 100644
index 5f0d45d..0000000
--- a/gnome-shell/calendar-event.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/gnome-shell/checkbox-focused.svg b/gnome-shell/checkbox-focused.svg
deleted file mode 100644
index bf0a93c..0000000
--- a/gnome-shell/checkbox-focused.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/gnome-shell/checkbox-off-focused.svg b/gnome-shell/checkbox-off-focused.svg
deleted file mode 100644
index d41edc1..0000000
--- a/gnome-shell/checkbox-off-focused.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/gnome-shell/checkbox-off.svg b/gnome-shell/checkbox-off.svg
deleted file mode 100644
index e566b47..0000000
--- a/gnome-shell/checkbox-off.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/gnome-shell/checkbox.svg b/gnome-shell/checkbox.svg
deleted file mode 100644
index 2970168..0000000
--- a/gnome-shell/checkbox.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/gnome-shell/toggle-off.svg b/gnome-shell/toggle-off.svg
deleted file mode 100644
index 18916ba..0000000
--- a/gnome-shell/toggle-off.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
\ No newline at end of file
diff --git a/gnome-shell/toggle-on.svg b/gnome-shell/toggle-on.svg
deleted file mode 100644
index 078ea01..0000000
--- a/gnome-shell/toggle-on.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
\ No newline at end of file
diff --git a/install.py b/install.py
index 19aed4e..5203b4b 100644
--- a/install.py
+++ b/install.py
@@ -15,11 +15,22 @@
# along with this program. If not, see .
-import colorsys
-import os
-import json
-import argparse
-import textwrap
+import colorsys # convert hsl to rgv
+import os # system commands, working with files
+import json # colors.json
+import argparse # command-line options
+import textwrap # example text in argparse
+
+
+# folder definitions
+temp_folder = "./.temp"
+gnome_folder = "gnome-shell"
+temp_gnome_folder = f"{temp_folder}/{gnome_folder}"
+tweaks_folder = "./tweaks"
+themes_folder = "~/.themes"
+
+# files definitions
+gnome_shell_css = f"{temp_gnome_folder}/gnome-shell.css"
def generate_file(folder, final_file):
@@ -38,20 +49,27 @@ def generate_file(folder, final_file):
def concatenate_files(file, edit_file):
+ """
+ Merge two files
+ :param file: file you want to append
+ :param edit_file: where it will be appended
+ """
+
open(edit_file, 'a').write('\n' + open(file).read())
def remove_files():
- # Define the paths of the folders to be deleted
- paths = ["~/.themes", "~/.local/share/themes"]
+ """
+ Delete already installed Marble theme
+ """
- # Ask for confirmation before deleting
- confirmation = input(f"Do you want to delete all \"Marble\" folders in {' and in '.join(paths)}? (y/N) ")
+ paths = (themes_folder, "~/.local/share/themes")
+
+ print("💡 You do not need to delete files if you want to update theme.\n")
+
+ confirmation = input(f"Do you want to delete all \"Marble\" folders in {' and in '.join(paths)}? (y/N) ").lower()
- # If the user confirms, delete the folder
if confirmation == "y":
-
- # Loop through the paths
for path in paths:
# Check if the path exists
@@ -60,13 +78,10 @@ def remove_files():
# Get the list of folders in the path
folders = os.listdir(os.path.expanduser(path))
- # Loop through the folders
+ # toggle if folder has no marble theme
found_folder = False
- # Loop through the folders
for folder in folders:
-
- # Check if the folder starts with "Marble"
if folder.startswith("Marble"):
folder_path = os.path.join(os.path.expanduser(path), folder)
print(f"Deleting folder {folder_path}...", end='')
@@ -90,13 +105,13 @@ def remove_files():
def destination_return(path_name, theme_mode):
"""
- Copied/modified gnome-shell theme location
+ Copied/modified theme location
:param path_name: color name
:param theme_mode: theme name (light or dark)
:return: copied files' folder location
"""
- return f"~/.themes/Marble-{path_name}-{theme_mode}/gnome-shell"
+ return f"{themes_folder}/Marble-{path_name}-{theme_mode}/"
def copy_files(source, destination):
@@ -106,10 +121,10 @@ def copy_files(source, destination):
:param destination: where files will be pasted
"""
- destination_dirs = destination.split("/")
+ destination_dirs = destination.split("/") # list of folders
loop_create_dirs = f"{destination_dirs[0]}/"
- # create necessary folders
+ # traverse through folders and create them
for i in range(1, len(destination_dirs)):
loop_create_dirs += f"{destination_dirs[i]}/"
os.system(f"mkdir -p {loop_create_dirs}")
@@ -117,6 +132,27 @@ def copy_files(source, destination):
os.system(f"cp -aT {source} {destination}")
+def replace_keywords(file, *args):
+ """
+ Replace file with several keywords
+ :param file: file name where keywords must be replaced
+ :param args: (keyword, replacement), (...), ...
+ """
+
+ # skip binary files in project
+ if not file.lower().endswith(('.css', '.scss', '.svg')):
+ return
+
+ with open(file, "r") as read_file:
+ content = read_file.read()
+
+ for keyword, replacement in args:
+ content = content.replace(keyword, replacement)
+
+ with open(file, "w") as write_file:
+ write_file.write(content)
+
+
def apply_colors(hue, destination, theme_mode, apply_file, sat=None):
"""
Install accent colors from colors.json to different file
@@ -127,30 +163,31 @@ def apply_colors(hue, destination, theme_mode, apply_file, sat=None):
:param sat: color saturation (optional)
"""
- if (not apply_file.lower().endswith(('.css', '.svg'))):
- return
+ # list of (keyword, replaced value)
+ replaced_colors = list()
- with open(os.path.expanduser(f"{destination}/{apply_file}"), "r") as file:
- edit_file = file.read()
+ # colorsys works in range(0, 1)
+ h = hue / 360
+ for element in colors["elements"]:
+ # if color is has default color and hasn't been replaced
+ if theme_mode not in colors["elements"][element] and colors["elements"][element]["default"]:
+ default_element = colors["elements"][element]["default"]
+ default_color = colors["elements"][default_element][theme_mode]
+ colors["elements"][element][theme_mode] = default_color
- # colorsys works in range(0, 1)
- h = hue / 360
- for element in colors["elements"]:
- # convert to range(0, 1)
- lightness = int(colors["elements"][element][theme_mode]["l"]) / 100
- saturation = int(colors["elements"][element][theme_mode]["s"]) / 100 if sat is None else int(
- colors["elements"][element][theme_mode]["s"]) * (sat / 100) / 100
- alpha = colors["elements"][element][theme_mode]["a"]
+ # convert sla to range(0, 1)
+ lightness = int(colors["elements"][element][theme_mode]["l"]) / 100
+ saturation = int(colors["elements"][element][theme_mode]["s"]) / 100 if sat is None else \
+ int(colors["elements"][element][theme_mode]["s"]) * (sat / 100) / 100
+ alpha = colors["elements"][element][theme_mode]["a"]
- # convert hsl to rgb and multiple every item
- red, green, blue = [int(item * 256) for item in colorsys.hls_to_rgb(h, lightness, saturation)]
+ # convert hsl to rgb and multiply every item
+ red, green, blue = [int(item * 256) for item in colorsys.hls_to_rgb(h, lightness, saturation)]
- replace_keyword = colors["elements"][element]["replace"]
+ replaced_colors.append((element, f"rgba({red}, {green}, {blue}, {alpha})"))
- edit_file = edit_file.replace(replace_keyword, f"rgba({red}, {green}, {blue}, {alpha})")
-
- with open(os.path.expanduser(f"{destination}/{apply_file}"), "w") as file:
- file.write(edit_file)
+ # replace colors
+ replace_keywords(os.path.expanduser(f"{destination}/{apply_file}"), *replaced_colors)
def apply_theme(hue, destination, theme_mode, sat=None):
@@ -162,7 +199,7 @@ def apply_theme(hue, destination, theme_mode, sat=None):
:param sat: color saturation (optional)
"""
- for apply_file in os.listdir("./gnome-shell/"):
+ for apply_file in os.listdir(f"{temp_gnome_folder}/"):
apply_colors(hue, destination, theme_mode, apply_file, sat=sat)
@@ -179,9 +216,10 @@ def install_color(hue, name, theme_mode, sat=None):
try:
for mode in theme_mode:
- copy_files("./gnome-shell", destination_return(name, mode))
+ destination = destination_return(name, mode)
- apply_theme(hue, destination_return(name, mode), mode, sat=sat)
+ copy_files(temp_folder, destination)
+ apply_theme(hue, f"{destination}/{gnome_folder}", mode, sat=sat)
except Exception as err:
print("\nError: " + str(err))
@@ -199,7 +237,7 @@ def hex_to_rgba(hex_color):
try:
if len(hex_color) in range(6, 10):
hex_color = hex_color.lstrip('#') + "ff"
- # is convertable
+ # if is convertable
int(hex_color[:], 16)
else:
raise ValueError
@@ -208,10 +246,14 @@ def hex_to_rgba(hex_color):
raise ValueError(f'Error: Invalid HEX color code: {hex_color}')
else:
- return int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16), int(hex_color[6:8], 16) / 255
+ return int(hex_color[0:2], 16), \
+ int(hex_color[2:4], 16), \
+ int(hex_color[4:6], 16), \
+ int(hex_color[6:8], 16) / 255
def main():
+ # script description
parser = argparse.ArgumentParser(prog="python install.py",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=textwrap.dedent('''
@@ -228,7 +270,6 @@ def main():
# Default arguments
parser.add_argument('-r', '--remove', action='store_true', help='remove all "Marble" themes')
- # Default accent colors
default_args = parser.add_argument_group('Install default theme')
default_args.add_argument('-a', '--all', action='store_true', help='all available accent colors')
default_args.add_argument('--red', action='store_true', help='red theme only')
@@ -239,43 +280,49 @@ def main():
default_args.add_argument('--yellow', action='store_true', help='yellow theme only')
default_args.add_argument('--gray', action='store_true', help='gray theme only')
- # Custom accent colors
custom_args = parser.add_argument_group('Install custom color theme')
custom_args.add_argument('--hue', type=int, choices=range(0, 361), help='generate theme from Hue prompt',
metavar='(0 - 360)')
custom_args.add_argument('--name', nargs='?', help='theme name (optional)')
- # Optional theme tweaks
+ color_styles = parser.add_argument_group("Theme color tweaks")
+ color_styles.add_argument("--filled", action="store_true", help="make accent color more vibrant")
+
color_tweaks = parser.add_argument_group('Optional theme tweaks')
color_tweaks.add_argument('--mode', choices=['light', 'dark'], help='select a specific theme mode to install')
color_tweaks.add_argument('--sat', type=int, choices=range(0, 251),
help='custom color saturation (<100%% - reduce, >100%% - increase)', metavar='(0 - 250)%')
- # Panel tweaks
panel_args = parser.add_argument_group('Panel tweaks')
panel_args.add_argument('-Pds', '--panel_default_size', action='store_true', help='set default panel size')
panel_args.add_argument('-Pnp', '--panel_no_pill', action='store_true', help='remove panel button background')
panel_args.add_argument('-Ptc', '--panel_text_color', type=str, nargs='?', help='custom panel HEX(A) text color')
- # Overview tweaks
overview_args = parser.add_argument_group('Overview tweaks')
overview_args.add_argument('--launchpad', action='store_true', help='change Show Apps icon to MacOS Launchpad icon')
args = parser.parse_args()
+ # is used as list because of install_color
mode = [args.mode] if args.mode else ['light', 'dark']
- generate_file("./css/", gnome_shell_css)
+ # move files to temp folder
+ copy_files(f"./theme/{gnome_folder}/", f"{temp_gnome_folder}")
+ generate_file(f"./theme/{gnome_folder}_css/", gnome_shell_css)
+
+ # remove marble theme
+ if args.remove:
+ remove_files()
# panel tweaks
if args.panel_default_size:
- concatenate_files("./tweaks/panel/def-size.css", gnome_shell_css)
+ concatenate_files(f"{tweaks_folder}/panel/def-size.css", gnome_shell_css)
if args.panel_no_pill:
- concatenate_files("./tweaks/panel/no-pill.css", gnome_shell_css)
+ concatenate_files(f"{tweaks_folder}/panel/no-pill.css", gnome_shell_css)
if args.panel_text_color:
- open('./gnome-shell/gnome-shell.css', 'a') \
+ open(f"{temp_gnome_folder}/{gnome_folder}.css", "a") \
.write(".panel-button,\
.clock,\
.clock-display StIcon {\
@@ -284,45 +331,52 @@ def main():
# dock tweaks
if args.launchpad:
- concatenate_files("./tweaks/launchpad/launchpad.css", gnome_shell_css)
- os.system("cp ./tweaks/launchpad/launchpad.png ./gnome-shell/")
+ concatenate_files(f"{tweaks_folder}/launchpad/launchpad.css", gnome_shell_css)
+ os.system(f"cp {tweaks_folder}/launchpad/launchpad.png {temp_gnome_folder}/")
- # Process the arguments and perform the installation accordingly
- if args.remove:
- remove_files()
+ # color tweaks
+ if args.filled:
+ for apply_file in os.listdir(f"{temp_gnome_folder}/"):
+ replace_keywords(f"{temp_gnome_folder}/{apply_file}",
+ ("BUTTON-COLOR", "ACCENT-FILLED-COLOR"),
+ ("BUTTON_HOVER", "ACCENT-FILLED_HOVER"),
+ ("BUTTON_INSENSITIVE", "ACCENT-FILLED_INSENSITIVE"),
+ ("BUTTON-TEXT-COLOR", "TEXT-BLACK-COLOR"),
+ ("BUTTON-TEXT_SECONDARY", "TEXT-BLACK_SECONDARY"))
- elif args.all:
+ # what argument colors defined
+ if args.all:
# install hue colors listed in colors.json
for color in colors["colors"]:
hue = colors["colors"][color]["h"]
+ # if saturation already defined in color (gray)
sat = colors["colors"][color]["s"] if colors["colors"][color]["s"] is not None else args.sat
install_color(hue, color, mode, sat)
elif args.red or args.pink or args.purple or args.blue or args.green or args.yellow or args.gray:
- for color_name in colors["colors"]:
- if getattr(args, color_name):
- hue = colors["colors"][color_name]["h"]
- sat = colors["colors"][color_name]["s"] if colors["colors"][color_name]["s"] is not None else args.sat
+ for color in colors["colors"]:
+ if getattr(args, color): # if argument name is in defined colors
+ hue = colors["colors"][color]["h"]
+ # if saturation already defined in color (gray)
+ sat = colors["colors"][color]["s"] if colors["colors"][color]["s"] is not None else args.sat
- install_color(hue, color_name, mode, sat)
+ install_color(hue, color, mode, sat)
+ # custom color
elif args.hue:
hue = args.hue
- theme_name = args.name if args.name else f'hue{hue}'
+ theme_name = args.name if args.name else f'hue{hue}' # if defined name
install_color(hue, theme_name, mode, args.sat)
else:
- print('No arguments specified. Use -h or --help to see the available options.')
+ print('No arguments or no color arguments specified. Use -h or --help to see the available options.')
if __name__ == "__main__":
- gnome_shell_css = "./gnome-shell/gnome-shell.css"
colors = json.load(open("colors.json")) # used as database for replacing colors
main()
- os.remove(gnome_shell_css)
- if os.path.exists("./gnome-shell/launchpad.png"):
- os.remove("./gnome-shell/launchpad.png")
+ os.system(f"rm -r {temp_folder}")
diff --git a/readme-images/qs.png b/readme-images/qs.png
old mode 100755
new mode 100644
index 45aac8d..e6f27eb
Binary files a/readme-images/qs.png and b/readme-images/qs.png differ
diff --git a/theme/gnome-shell/calendar-event-disabled.svg b/theme/gnome-shell/calendar-event-disabled.svg
new file mode 100644
index 0000000..dd924fb
--- /dev/null
+++ b/theme/gnome-shell/calendar-event-disabled.svg
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/theme/gnome-shell/calendar-event-today.svg b/theme/gnome-shell/calendar-event-today.svg
new file mode 100644
index 0000000..7b60511
--- /dev/null
+++ b/theme/gnome-shell/calendar-event-today.svg
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/theme/gnome-shell/calendar-event.svg b/theme/gnome-shell/calendar-event.svg
new file mode 100644
index 0000000..4269e9f
--- /dev/null
+++ b/theme/gnome-shell/calendar-event.svg
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/theme/gnome-shell/checkbox-focused.svg b/theme/gnome-shell/checkbox-focused.svg
new file mode 100644
index 0000000..c5a2fa3
--- /dev/null
+++ b/theme/gnome-shell/checkbox-focused.svg
@@ -0,0 +1,80 @@
+
\ No newline at end of file
diff --git a/theme/gnome-shell/checkbox-off-focused.svg b/theme/gnome-shell/checkbox-off-focused.svg
new file mode 100644
index 0000000..2b92ddd
--- /dev/null
+++ b/theme/gnome-shell/checkbox-off-focused.svg
@@ -0,0 +1,70 @@
+
\ No newline at end of file
diff --git a/theme/gnome-shell/checkbox-off.svg b/theme/gnome-shell/checkbox-off.svg
new file mode 100644
index 0000000..a5ca426
--- /dev/null
+++ b/theme/gnome-shell/checkbox-off.svg
@@ -0,0 +1,50 @@
+
\ No newline at end of file
diff --git a/theme/gnome-shell/checkbox.svg b/theme/gnome-shell/checkbox.svg
new file mode 100644
index 0000000..e3efa5e
--- /dev/null
+++ b/theme/gnome-shell/checkbox.svg
@@ -0,0 +1,61 @@
+
\ No newline at end of file
diff --git a/theme/gnome-shell/toggle-off.svg b/theme/gnome-shell/toggle-off.svg
new file mode 100644
index 0000000..927331e
--- /dev/null
+++ b/theme/gnome-shell/toggle-off.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/theme/gnome-shell/toggle-on.svg b/theme/gnome-shell/toggle-on.svg
new file mode 100644
index 0000000..43f914f
--- /dev/null
+++ b/theme/gnome-shell/toggle-on.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/gnome-shell/workspace-placeholder.svg b/theme/gnome-shell/workspace-placeholder.svg
similarity index 100%
rename from gnome-shell/workspace-placeholder.svg
rename to theme/gnome-shell/workspace-placeholder.svg
diff --git a/css/apps.css b/theme/gnome-shell_css/apps.css
similarity index 100%
rename from css/apps.css
rename to theme/gnome-shell_css/apps.css
diff --git a/css/aylur.css b/theme/gnome-shell_css/aylur.css
similarity index 100%
rename from css/aylur.css
rename to theme/gnome-shell_css/aylur.css
diff --git a/css/controls.css b/theme/gnome-shell_css/controls.css
similarity index 94%
rename from css/controls.css
rename to theme/gnome-shell_css/controls.css
index 5bdc20b..7edb00f 100644
--- a/css/controls.css
+++ b/theme/gnome-shell_css/controls.css
@@ -34,7 +34,7 @@
.toggle-switch:checked {
background-image: url("./toggle-on.svg");
- background-color: ACCENT-COLOR;
+ background-color: BUTTON-COLOR;
}
@@ -54,11 +54,11 @@
}
.dnd-button .toggle-switch:checked {
- background-color: ACCENT-COLOR;
+ background-color: BUTTON-COLOR;
}
.dnd-button:hover .toggle-switch:checked {
- background-color: ACCENT_HOVER;
+ background-color: BUTTON_HOVER;
}
.dnd-button:focus {
@@ -109,7 +109,7 @@
-barlevel-background-color: ACCENT-DISABLED-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
/* fill */
- -barlevel-active-background-color: ACCENT-COLOR;
+ -barlevel-active-background-color: BUTTON-COLOR;
/* overfill */
-barlevel-overdrive-color: #c01c28;
-barlevel-overdrive-separator-width: 2px;
diff --git a/css/datemenu.css b/theme/gnome-shell_css/datemenu.css
similarity index 91%
rename from css/datemenu.css
rename to theme/gnome-shell_css/datemenu.css
index 8ad1d29..bdfd37b 100644
--- a/css/datemenu.css
+++ b/theme/gnome-shell_css/datemenu.css
@@ -71,7 +71,6 @@
}
.calendar-day-base:hover,
-.calendar-day-base:active:hover,
.calendar-day-base:selected:hover,
.calendar .calendar-month-header .pager-button:hover {
background-color: ACCENT-DISABLED_HOVER;
@@ -85,7 +84,6 @@
box-shadow: inset 0 0 0 2px ACCENT-SECONDARY-COLOR;
}
-.calendar-day-base:active,
.calendar-day-base:selected {
background: ACCENT-DISABLED_HOVER;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
@@ -94,15 +92,17 @@
/* today button */
.calendar-today,
.calendar-today:selected {
- background-color: ACCENT-COLOR;
- color: TEXT-PRIMARY-COLOR !important;
+ background-color: BUTTON-COLOR;
+ color: BUTTON-TEXT-COLOR !important;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.calendar-today:hover,
-.calendar-today:selected:hover {
- background-color: ACCENT_HOVER;
-}
+.calendar-today:selected:hover,
+.calendar-today:focus,
+.calendar-today:selected:focus {
+ background-color: BUTTON_HOVER;
+}
/* if day has event */
.calendar .calendar-day-with-events {
@@ -111,6 +111,11 @@
font-weight: 700;
}
+.calendar .calendar-today.calendar-day-with-events {
+ background-image: url("calendar-event-today.svg");
+ background-size: contain;
+}
+
/* weekend day button */
.calendar .calendar-nonwork-day {
color: TEXT-SECONDARY-COLOR;
diff --git a/css/entries.css b/theme/gnome-shell_css/entries.css
similarity index 100%
rename from css/entries.css
rename to theme/gnome-shell_css/entries.css
diff --git a/css/lookingglass.css b/theme/gnome-shell_css/lookingglass.css
similarity index 100%
rename from css/lookingglass.css
rename to theme/gnome-shell_css/lookingglass.css
diff --git a/css/messages.css b/theme/gnome-shell_css/messages.css
similarity index 100%
rename from css/messages.css
rename to theme/gnome-shell_css/messages.css
diff --git a/css/osd.css b/theme/gnome-shell_css/osd.css
similarity index 95%
rename from css/osd.css
rename to theme/gnome-shell_css/osd.css
index d98a877..16f361a 100644
--- a/css/osd.css
+++ b/theme/gnome-shell_css/osd.css
@@ -112,12 +112,13 @@
}
.modal-dialog-linked-button:last-child {
- background-color: ACCENT-COLOR;
+ background-color: BUTTON-COLOR;
+ color: BUTTON-TEXT-COLOR;
}
.modal-dialog-linked-button:last-child:hover,
.modal-dialog-linked-button:last-child:focus {
- background-color: ACCENT_HOVER;
+ background-color: BUTTON_HOVER;
}
.modal-dialog-linked-button:focus,
@@ -139,6 +140,6 @@
.modal-dialog .modal-dialog-linked-button:insensitive,
.hotplug-notification-item:insensitive,
.notification-banner .notification-button:insensitive {
- color: TEXT-SECONDARY-COLOR;
- background-color: ACCENT_HOVER;
+ color: BUTTON-TEXT_SECONDARY;
+ background-color: BUTTON_INSENSITIVE;
}
\ No newline at end of file
diff --git a/css/overview.css b/theme/gnome-shell_css/overview.css
similarity index 95%
rename from css/overview.css
rename to theme/gnome-shell_css/overview.css
index fdc48ce..b991b60 100644
--- a/css/overview.css
+++ b/theme/gnome-shell_css/overview.css
@@ -59,7 +59,7 @@
/* Tiled window previews */
.tile-preview {
background-color: ACCENT-OPACITY-COLOR;
- border: 1px solid ACCENT-COLOR;
+ border: 1px solid BUTTON-COLOR;
}
/* .windows-close in screenshot.css */
\ No newline at end of file
diff --git a/css/panel.css b/theme/gnome-shell_css/panel.css
similarity index 97%
rename from css/panel.css
rename to theme/gnome-shell_css/panel.css
index 67d4c43..51013d0 100644
--- a/css/panel.css
+++ b/theme/gnome-shell_css/panel.css
@@ -10,6 +10,7 @@
/* panel in overview, lock screen */
#panel:overview, #panel.unlock-screen, #panel.login-screen {
background-color: transparent;
+ transition-duration: 0.25s;
}
@@ -36,7 +37,7 @@
#panel .screencast-indicator,
#panel .remote-access-indicator,
#panel .panel-button.screen-sharing-indicator { /* when sharing screen */
- color: #cd9309;
+ background: #cd9309;
}
#panel .panel-button.screen-sharing-indicator:hover {
diff --git a/css/popovers.css b/theme/gnome-shell_css/popovers.css
similarity index 100%
rename from css/popovers.css
rename to theme/gnome-shell_css/popovers.css
diff --git a/css/quick-settings.css b/theme/gnome-shell_css/quick-settings.css
similarity index 95%
rename from css/quick-settings.css
rename to theme/gnome-shell_css/quick-settings.css
index 5403c5e..ad67607 100644
--- a/css/quick-settings.css
+++ b/theme/gnome-shell_css/quick-settings.css
@@ -69,15 +69,15 @@
.quick-toggle:checked,
.quick-menu-toggle .quick-toggle:checked,
.quick-menu-toggle .quick-toggle-arrow:checked {
- color: TEXT-PRIMARY-COLOR;
- background-color: ACCENT-COLOR;
+ color: BUTTON-TEXT-COLOR;
+ background-color: BUTTON-COLOR;
border-color: transparent;
}
.quick-toggle:checked:hover,
.quick-menu-toggle .quick-toggle:checked:hover,
.quick-menu-toggle .quick-toggle-arrow:checked:hover {
- background-color: ACCENT_HOVER;
+ background-color: BUTTON_HOVER;
}
@@ -86,7 +86,7 @@
.quick-slider .slider-bin {
padding: 2px 1px;
margin: 0;
- color: TEXT-PRIMARY-COLOR;
+ color: BUTTON-TEXT-COLOR;
}
.quick-slider .slider-bin:focus {
@@ -130,7 +130,8 @@ https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/beb77f58243265a6cc62b720a5b0
}
.quick-toggle-menu .header .icon.active {
- background-color: ACCENT-COLOR;
+ background-color: BUTTON-COLOR;
+ color: BUTTON-TEXT-COLOR;
}
/* connect / disconnect text color (expanded menu) */
diff --git a/css/screenshot.css b/theme/gnome-shell_css/screenshot.css
similarity index 95%
rename from css/screenshot.css
rename to theme/gnome-shell_css/screenshot.css
index c9d9345..8e02201 100644
--- a/css/screenshot.css
+++ b/theme/gnome-shell_css/screenshot.css
@@ -55,18 +55,18 @@
/* window border when selecting */
.screenshot-ui-window-selector-window:hover .screenshot-ui-window-selector-window-border {
- border-color: ACCENT-COLOR;
+ border-color: BUTTON-COLOR;
}
.screenshot-ui-window-selector-window:checked .screenshot-ui-window-selector-window-border {
- border-color: ACCENT-COLOR;
+ border-color: BUTTON-COLOR;
background-color: ACCENT-OPACITY-COLOR;
}
/* check icon when selected window */
.screenshot-ui-window-selector-window:checked .screenshot-ui-window-selector-check {
- color: TEXT-PRIMARY-COLOR;
- background-color: ACCENT-COLOR;
+ color: BUTTON-TEXT-COLOR;
+ background-color: BUTTON-COLOR;
}
@@ -149,7 +149,7 @@
.window-close, /* close button (Overview - Workspaces - Selected window) */
.screenshot-ui-close-button { /* close button (Screenshot UI) */
- background-color: CLOSE-BUTTON-COLOR;
+ background-color: BUTTON-CLOSE-COLOR;
color: TEXT-PRIMARY-COLOR;
border: 1px solid BORDER-SHADOW;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
@@ -158,5 +158,5 @@
.window-close:hover,
.screenshot-ui-close-button:hover {
- background-color: CLOSE-BUTTON_HOVER;
+ background-color: BUTTON-CLOSE_HOVER;
}
\ No newline at end of file
diff --git a/css/search.css b/theme/gnome-shell_css/search.css
similarity index 100%
rename from css/search.css
rename to theme/gnome-shell_css/search.css