Skip to content

Commit

Permalink
Switch to pysassc
Browse files Browse the repository at this point in the history
  • Loading branch information
leigh123linux committed Dec 14, 2023
1 parent 73333b7 commit 132ec1f
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: mint-themes
Section: gnome
Priority: optional
Maintainer: Clement Lefebvre <[email protected]>
Build-Depends: debhelper (>= 9), sassc
Build-Depends: debhelper (>= 9), pysassc
Standards-Version: 3.9.5

Package: mint-themes
Expand Down
34 changes: 17 additions & 17 deletions generate-themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ def y_colorize_directory (path, variation):

# First build the Gtk4 css
os.chdir("src/Mint-X/theme/Mint-X/gtk-4.0/")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.chdir(start_dir)

# Then the Gtk3 css
os.chdir("src/Mint-X/theme/Mint-X/gtk-3.0/")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.chdir(start_dir)

os.system("cp -R src/Mint-X/theme/* usr/share/themes/")
Expand All @@ -60,15 +60,15 @@ def y_colorize_directory (path, variation):
# Build sass
sass_dir = os.path.join(theme, "gtk-4.0")
os.chdir(sass_dir)
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("rm -rf sass parse-sass.sh")
os.chdir(start_dir)

sass_dir = os.path.join(theme, "gtk-3.0")
os.chdir(sass_dir)
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("rm -rf sass parse-sass.sh")
os.chdir(start_dir)

Expand Down Expand Up @@ -115,12 +115,12 @@ def y_colorize_directory (path, variation):

if (variant == "-Dark"):
os.system("cp sass/gtk-dark.scss sass/gtk.scss")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
# Add a gtk-dark.css (this is needed by libhandy/libadwaita apps when prefer-dark is on)
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
else:
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")

os.system("rm -rf sass .sass-cache")
os.chdir(curdir)
Expand All @@ -133,12 +133,12 @@ def y_colorize_directory (path, variation):
# os.system("sed -i 's/no-tint/tint/gI' ./sass/gtk-dark.scss")
if (variant == "-Dark"):
os.system("cp sass/gtk-dark.scss sass/gtk.scss")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
# Add a gtk-dark.css (this is needed by libhandy/libadwaita apps when prefer-dark is on)
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
else:
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")

os.system("rm -rf sass .sass-cache")
os.chdir(curdir)
Expand All @@ -149,7 +149,7 @@ def y_colorize_directory (path, variation):
os.chdir("%s/cinnamon" % theme)
if (variant == "-Dark"):
os.system("cp sass/cinnamon-dark.scss sass/cinnamon.scss")
os.system("sassc ./sass/cinnamon.scss cinnamon.css")
os.system("pysassc ./sass/cinnamon.scss cinnamon.css")
os.system("rm -rf sass .sass-cache")
os.chdir(curdir)

Expand Down
4 changes: 2 additions & 2 deletions src/Mint-X/theme/Mint-X/gtk-3.0/parse-sass.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash

sassc ./sass/gtk.scss gtk.css
sassc ./sass/gtk-dark.scss gtk-dark.css
pysassc ./sass/gtk.scss gtk.css
pysassc ./sass/gtk-dark.scss gtk-dark.css
4 changes: 2 additions & 2 deletions src/Mint-X/theme/Mint-X/gtk-4.0/parse-sass.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash

sassc ./sass/gtk.scss gtk.css
sassc ./sass/gtk-dark.scss gtk-dark.css
pysassc ./sass/gtk.scss gtk.css
pysassc ./sass/gtk-dark.scss gtk-dark.css
12 changes: 6 additions & 6 deletions src/Mint-Y/build-themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

print("Updating Gtk4 assets")
os.chdir("gtk-4.0/")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("./render-assets.sh")
print("Gtk4 assets updated")

os.chdir(curdir)

print("Updating Gtk3 assets")
os.chdir("gtk-3.0/")
os.system("sassc ./sass/gtk.scss gtk.css")
os.system("sassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("pysassc ./sass/gtk.scss gtk.css")
os.system("pysassc ./sass/gtk-dark.scss gtk-dark.css")
os.system("./render-assets.sh")
print("Gtk3 assets updated")

Expand All @@ -37,8 +37,8 @@

print("Updating Cinnamon assets")
os.chdir("cinnamon/")
os.system("sassc ./sass/cinnamon.scss cinnamon.css")
os.system("sassc ./sass/cinnamon-dark.scss cinnamon-dark.css")
os.system("pysassc ./sass/cinnamon.scss cinnamon.css")
os.system("pysassc ./sass/cinnamon-dark.scss cinnamon-dark.css")
print("Cinnamon assets updated")

os.chdir(curdir)
Expand Down
4 changes: 2 additions & 2 deletions src/Mint-Y/cinnamon/parse-sass.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash

sassc ./sass/cinnamon.scss cinnamon.css
sassc ./sass/cinnamon-dark.scss cinnamon-dark.css
pysassc ./sass/cinnamon.scss cinnamon.css
pysassc ./sass/cinnamon-dark.scss cinnamon-dark.css
4 changes: 2 additions & 2 deletions src/Mint-Y/gtk-3.0/parse-sass.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash

sassc ./sass/gtk.scss gtk.css
sassc ./sass/gtk-dark.scss gtk-dark.css
pysassc ./sass/gtk.scss gtk.css
pysassc ./sass/gtk-dark.scss gtk-dark.css
4 changes: 2 additions & 2 deletions src/Mint-Y/gtk-4.0/parse-sass.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash

sassc ./sass/gtk.scss gtk.css
sassc ./sass/gtk-dark.scss gtk-dark.css
pysassc ./sass/gtk.scss gtk.css
pysassc ./sass/gtk-dark.scss gtk-dark.css

0 comments on commit 132ec1f

Please sign in to comment.