diff --git a/README.md b/README.md
index abf684f..c546c4e 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ It aims to replace default Grub look, with nice and colorful theme.
- Rocky Linux
- Solus
- Ubuntu
+- Ubuntu Mate
- Ventoy
- Void Linux
- Windows 10
@@ -83,13 +84,14 @@ It aims to replace default Grub look, with nice and colorful theme.
+
+
+
-
-
-
+
diff --git a/assets/background_template/mate_1080p.psd b/assets/background_template/mate_1080p.psd
new file mode 100644
index 0000000..caabbb4
Binary files /dev/null and b/assets/background_template/mate_1080p.psd differ
diff --git a/assets/icons/mate.png b/assets/icons/mate.png
new file mode 100644
index 0000000..b2fc22a
Binary files /dev/null and b/assets/icons/mate.png differ
diff --git a/assets/preview_template/mate_1080p.psd b/assets/preview_template/mate_1080p.psd
new file mode 100644
index 0000000..cafd46c
Binary files /dev/null and b/assets/preview_template/mate_1080p.psd differ
diff --git a/customize/mate/background.png b/customize/mate/background.png
new file mode 100644
index 0000000..42f1003
Binary files /dev/null and b/customize/mate/background.png differ
diff --git a/customize/mate/icons/4MLinux.png b/customize/mate/icons/4MLinux.png
new file mode 100644
index 0000000..1c6fe5e
Binary files /dev/null and b/customize/mate/icons/4MLinux.png differ
diff --git a/customize/mate/icons/AlpineLinux.png b/customize/mate/icons/AlpineLinux.png
new file mode 100644
index 0000000..6212a1f
Binary files /dev/null and b/customize/mate/icons/AlpineLinux.png differ
diff --git a/customize/mate/icons/Manjaro.i686.png b/customize/mate/icons/Manjaro.i686.png
new file mode 100644
index 0000000..611a6fb
Binary files /dev/null and b/customize/mate/icons/Manjaro.i686.png differ
diff --git a/customize/mate/icons/Manjaro.x86_64.png b/customize/mate/icons/Manjaro.x86_64.png
new file mode 100644
index 0000000..611a6fb
Binary files /dev/null and b/customize/mate/icons/Manjaro.x86_64.png differ
diff --git a/customize/mate/icons/SystemRescueCD.png b/customize/mate/icons/SystemRescueCD.png
new file mode 100644
index 0000000..7c41182
Binary files /dev/null and b/customize/mate/icons/SystemRescueCD.png differ
diff --git a/customize/mate/icons/android.png b/customize/mate/icons/android.png
new file mode 100644
index 0000000..dad066f
Binary files /dev/null and b/customize/mate/icons/android.png differ
diff --git a/customize/mate/icons/anonymous.png b/customize/mate/icons/anonymous.png
new file mode 100644
index 0000000..7d165b6
Binary files /dev/null and b/customize/mate/icons/anonymous.png differ
diff --git a/customize/mate/icons/antergos.png b/customize/mate/icons/antergos.png
new file mode 100644
index 0000000..32e3a3a
Binary files /dev/null and b/customize/mate/icons/antergos.png differ
diff --git a/customize/mate/icons/arch.png b/customize/mate/icons/arch.png
new file mode 100644
index 0000000..f6cd870
Binary files /dev/null and b/customize/mate/icons/arch.png differ
diff --git a/customize/mate/icons/archlinux.png b/customize/mate/icons/archlinux.png
new file mode 100644
index 0000000..f6cd870
Binary files /dev/null and b/customize/mate/icons/archlinux.png differ
diff --git a/customize/mate/icons/arcolinux.png b/customize/mate/icons/arcolinux.png
new file mode 100644
index 0000000..c5e5e5e
Binary files /dev/null and b/customize/mate/icons/arcolinux.png differ
diff --git a/customize/mate/icons/artix.png b/customize/mate/icons/artix.png
new file mode 100644
index 0000000..0cbeb11
Binary files /dev/null and b/customize/mate/icons/artix.png differ
diff --git a/customize/mate/icons/cancel.png b/customize/mate/icons/cancel.png
new file mode 100644
index 0000000..fca2ac9
Binary files /dev/null and b/customize/mate/icons/cancel.png differ
diff --git a/customize/mate/icons/centos.png b/customize/mate/icons/centos.png
new file mode 100644
index 0000000..23fe2fa
Binary files /dev/null and b/customize/mate/icons/centos.png differ
diff --git a/customize/mate/icons/chakra.png b/customize/mate/icons/chakra.png
new file mode 100644
index 0000000..6f63a95
Binary files /dev/null and b/customize/mate/icons/chakra.png differ
diff --git a/customize/mate/icons/debian.png b/customize/mate/icons/debian.png
new file mode 100644
index 0000000..20bea8c
Binary files /dev/null and b/customize/mate/icons/debian.png differ
diff --git a/customize/mate/icons/deepin.png b/customize/mate/icons/deepin.png
new file mode 100644
index 0000000..61c92fb
Binary files /dev/null and b/customize/mate/icons/deepin.png differ
diff --git a/customize/mate/icons/devuan.png b/customize/mate/icons/devuan.png
new file mode 100644
index 0000000..ff65401
Binary files /dev/null and b/customize/mate/icons/devuan.png differ
diff --git a/customize/mate/icons/driver.png b/customize/mate/icons/driver.png
new file mode 100644
index 0000000..1621ee7
Binary files /dev/null and b/customize/mate/icons/driver.png differ
diff --git a/customize/mate/icons/edit.png b/customize/mate/icons/edit.png
new file mode 100644
index 0000000..6a43bd9
Binary files /dev/null and b/customize/mate/icons/edit.png differ
diff --git a/customize/mate/icons/efi.png b/customize/mate/icons/efi.png
new file mode 100644
index 0000000..4ecf3b9
Binary files /dev/null and b/customize/mate/icons/efi.png differ
diff --git a/customize/mate/icons/elementary.png b/customize/mate/icons/elementary.png
new file mode 100644
index 0000000..2840354
Binary files /dev/null and b/customize/mate/icons/elementary.png differ
diff --git a/customize/mate/icons/endeavouros.png b/customize/mate/icons/endeavouros.png
new file mode 100644
index 0000000..6b1e530
Binary files /dev/null and b/customize/mate/icons/endeavouros.png differ
diff --git a/customize/mate/icons/fedora.png b/customize/mate/icons/fedora.png
new file mode 100644
index 0000000..926b56d
Binary files /dev/null and b/customize/mate/icons/fedora.png differ
diff --git a/customize/mate/icons/find.efi.png b/customize/mate/icons/find.efi.png
new file mode 100644
index 0000000..0e32321
Binary files /dev/null and b/customize/mate/icons/find.efi.png differ
diff --git a/customize/mate/icons/find.none.png b/customize/mate/icons/find.none.png
new file mode 100644
index 0000000..87d4d0e
Binary files /dev/null and b/customize/mate/icons/find.none.png differ
diff --git a/customize/mate/icons/freebsd.png b/customize/mate/icons/freebsd.png
new file mode 100644
index 0000000..fb9408c
Binary files /dev/null and b/customize/mate/icons/freebsd.png differ
diff --git a/customize/mate/icons/garuda.png b/customize/mate/icons/garuda.png
new file mode 100644
index 0000000..f699718
Binary files /dev/null and b/customize/mate/icons/garuda.png differ
diff --git a/customize/mate/icons/gentoo.png b/customize/mate/icons/gentoo.png
new file mode 100644
index 0000000..bc0ed70
Binary files /dev/null and b/customize/mate/icons/gentoo.png differ
diff --git a/customize/mate/icons/gnu-linux.png b/customize/mate/icons/gnu-linux.png
new file mode 100644
index 0000000..326b659
Binary files /dev/null and b/customize/mate/icons/gnu-linux.png differ
diff --git a/customize/mate/icons/haiku.png b/customize/mate/icons/haiku.png
new file mode 100644
index 0000000..ce7f818
Binary files /dev/null and b/customize/mate/icons/haiku.png differ
diff --git a/customize/mate/icons/help.png b/customize/mate/icons/help.png
new file mode 100644
index 0000000..d8b5a17
Binary files /dev/null and b/customize/mate/icons/help.png differ
diff --git a/customize/mate/icons/kali.png b/customize/mate/icons/kali.png
new file mode 100644
index 0000000..900dc82
Binary files /dev/null and b/customize/mate/icons/kali.png differ
diff --git a/customize/mate/icons/kaos.png b/customize/mate/icons/kaos.png
new file mode 100644
index 0000000..9fd4e89
Binary files /dev/null and b/customize/mate/icons/kaos.png differ
diff --git a/customize/mate/icons/kbd.png b/customize/mate/icons/kbd.png
new file mode 100644
index 0000000..6ace3ac
Binary files /dev/null and b/customize/mate/icons/kbd.png differ
diff --git a/customize/mate/icons/korora.png b/customize/mate/icons/korora.png
new file mode 100644
index 0000000..456e876
Binary files /dev/null and b/customize/mate/icons/korora.png differ
diff --git a/customize/mate/icons/kubuntu.png b/customize/mate/icons/kubuntu.png
new file mode 100644
index 0000000..7a79ff3
Binary files /dev/null and b/customize/mate/icons/kubuntu.png differ
diff --git a/customize/mate/icons/lang.png b/customize/mate/icons/lang.png
new file mode 100644
index 0000000..3c9c1d7
Binary files /dev/null and b/customize/mate/icons/lang.png differ
diff --git a/customize/mate/icons/lfs.png b/customize/mate/icons/lfs.png
new file mode 100644
index 0000000..326b659
Binary files /dev/null and b/customize/mate/icons/lfs.png differ
diff --git a/customize/mate/icons/linux.png b/customize/mate/icons/linux.png
new file mode 100644
index 0000000..326b659
Binary files /dev/null and b/customize/mate/icons/linux.png differ
diff --git a/customize/mate/icons/linuxmint.png b/customize/mate/icons/linuxmint.png
new file mode 100644
index 0000000..7d9da81
Binary files /dev/null and b/customize/mate/icons/linuxmint.png differ
diff --git a/customize/mate/icons/lubuntu.png b/customize/mate/icons/lubuntu.png
new file mode 100644
index 0000000..057c8e2
Binary files /dev/null and b/customize/mate/icons/lubuntu.png differ
diff --git a/customize/mate/icons/macosx.png b/customize/mate/icons/macosx.png
new file mode 100644
index 0000000..ea03e77
Binary files /dev/null and b/customize/mate/icons/macosx.png differ
diff --git a/customize/mate/icons/mageia.png b/customize/mate/icons/mageia.png
new file mode 100644
index 0000000..79afa76
Binary files /dev/null and b/customize/mate/icons/mageia.png differ
diff --git a/customize/mate/icons/manjaro.png b/customize/mate/icons/manjaro.png
new file mode 100644
index 0000000..611a6fb
Binary files /dev/null and b/customize/mate/icons/manjaro.png differ
diff --git a/customize/mate/icons/memtest.png b/customize/mate/icons/memtest.png
new file mode 100644
index 0000000..1621ee7
Binary files /dev/null and b/customize/mate/icons/memtest.png differ
diff --git a/customize/mate/icons/mx-linux.png b/customize/mate/icons/mx-linux.png
new file mode 100644
index 0000000..49f1133
Binary files /dev/null and b/customize/mate/icons/mx-linux.png differ
diff --git a/customize/mate/icons/neon.png b/customize/mate/icons/neon.png
new file mode 100644
index 0000000..e41906e
Binary files /dev/null and b/customize/mate/icons/neon.png differ
diff --git a/customize/mate/icons/opensuse.png b/customize/mate/icons/opensuse.png
new file mode 100644
index 0000000..d844fd5
Binary files /dev/null and b/customize/mate/icons/opensuse.png differ
diff --git a/customize/mate/icons/parrot.png b/customize/mate/icons/parrot.png
new file mode 100644
index 0000000..3333de9
Binary files /dev/null and b/customize/mate/icons/parrot.png differ
diff --git a/customize/mate/icons/pop-os.png b/customize/mate/icons/pop-os.png
new file mode 100644
index 0000000..014d9f3
Binary files /dev/null and b/customize/mate/icons/pop-os.png differ
diff --git a/customize/mate/icons/pop.png b/customize/mate/icons/pop.png
new file mode 100644
index 0000000..014d9f3
Binary files /dev/null and b/customize/mate/icons/pop.png differ
diff --git a/customize/mate/icons/recovery.png b/customize/mate/icons/recovery.png
new file mode 100644
index 0000000..7b69b14
Binary files /dev/null and b/customize/mate/icons/recovery.png differ
diff --git a/customize/mate/icons/regolith.png b/customize/mate/icons/regolith.png
new file mode 100644
index 0000000..5ece07b
Binary files /dev/null and b/customize/mate/icons/regolith.png differ
diff --git a/customize/mate/icons/restart.png b/customize/mate/icons/restart.png
new file mode 100644
index 0000000..9715302
Binary files /dev/null and b/customize/mate/icons/restart.png differ
diff --git a/customize/mate/icons/rocky.png b/customize/mate/icons/rocky.png
new file mode 100644
index 0000000..be144f6
Binary files /dev/null and b/customize/mate/icons/rocky.png differ
diff --git a/customize/mate/icons/shutdown.png b/customize/mate/icons/shutdown.png
new file mode 100644
index 0000000..fc9cf16
Binary files /dev/null and b/customize/mate/icons/shutdown.png differ
diff --git a/customize/mate/icons/siduction.png b/customize/mate/icons/siduction.png
new file mode 100644
index 0000000..d16549b
Binary files /dev/null and b/customize/mate/icons/siduction.png differ
diff --git a/customize/mate/icons/solus.png b/customize/mate/icons/solus.png
new file mode 100644
index 0000000..338718b
Binary files /dev/null and b/customize/mate/icons/solus.png differ
diff --git a/customize/mate/icons/steamos.png b/customize/mate/icons/steamos.png
new file mode 100644
index 0000000..df28bcc
Binary files /dev/null and b/customize/mate/icons/steamos.png differ
diff --git a/customize/mate/icons/type.png b/customize/mate/icons/type.png
new file mode 100644
index 0000000..5c48476
Binary files /dev/null and b/customize/mate/icons/type.png differ
diff --git a/customize/mate/icons/tz.png b/customize/mate/icons/tz.png
new file mode 100644
index 0000000..220b29b
Binary files /dev/null and b/customize/mate/icons/tz.png differ
diff --git a/customize/mate/icons/ubuntu.png b/customize/mate/icons/ubuntu.png
new file mode 100644
index 0000000..352fbe0
Binary files /dev/null and b/customize/mate/icons/ubuntu.png differ
diff --git a/customize/mate/icons/unknown.png b/customize/mate/icons/unknown.png
new file mode 100644
index 0000000..326b659
Binary files /dev/null and b/customize/mate/icons/unknown.png differ
diff --git a/customize/mate/icons/unset.png b/customize/mate/icons/unset.png
new file mode 100644
index 0000000..15e3d3c
Binary files /dev/null and b/customize/mate/icons/unset.png differ
diff --git a/customize/mate/icons/ventoy.png b/customize/mate/icons/ventoy.png
new file mode 100644
index 0000000..7abdc6c
Binary files /dev/null and b/customize/mate/icons/ventoy.png differ
diff --git a/customize/mate/icons/void.png b/customize/mate/icons/void.png
new file mode 100644
index 0000000..01cc2f3
Binary files /dev/null and b/customize/mate/icons/void.png differ
diff --git a/customize/mate/icons/windows.png b/customize/mate/icons/windows.png
new file mode 100644
index 0000000..d5c7cc3
Binary files /dev/null and b/customize/mate/icons/windows.png differ
diff --git a/customize/mate/icons/xubuntu.png b/customize/mate/icons/xubuntu.png
new file mode 100644
index 0000000..f43abc7
Binary files /dev/null and b/customize/mate/icons/xubuntu.png differ
diff --git a/customize/mate/icons/zorin.png b/customize/mate/icons/zorin.png
new file mode 100644
index 0000000..c1506c4
Binary files /dev/null and b/customize/mate/icons/zorin.png differ
diff --git a/customize/mate/select_c.png b/customize/mate/select_c.png
new file mode 100644
index 0000000..b1f8d58
Binary files /dev/null and b/customize/mate/select_c.png differ
diff --git a/customize/mate/select_e.png b/customize/mate/select_e.png
new file mode 100644
index 0000000..9332368
Binary files /dev/null and b/customize/mate/select_e.png differ
diff --git a/customize/mate/select_w.png b/customize/mate/select_w.png
new file mode 100644
index 0000000..28f6424
Binary files /dev/null and b/customize/mate/select_w.png differ
diff --git a/customize/mate/terminal_box_c.png b/customize/mate/terminal_box_c.png
new file mode 100644
index 0000000..d0dd52a
Binary files /dev/null and b/customize/mate/terminal_box_c.png differ
diff --git a/customize/mate/terminal_box_e.png b/customize/mate/terminal_box_e.png
new file mode 100644
index 0000000..394cbe4
Binary files /dev/null and b/customize/mate/terminal_box_e.png differ
diff --git a/customize/mate/terminal_box_n.png b/customize/mate/terminal_box_n.png
new file mode 100644
index 0000000..476f8bc
Binary files /dev/null and b/customize/mate/terminal_box_n.png differ
diff --git a/customize/mate/terminal_box_ne.png b/customize/mate/terminal_box_ne.png
new file mode 100644
index 0000000..9e26959
Binary files /dev/null and b/customize/mate/terminal_box_ne.png differ
diff --git a/customize/mate/terminal_box_nw.png b/customize/mate/terminal_box_nw.png
new file mode 100644
index 0000000..5c3cba8
Binary files /dev/null and b/customize/mate/terminal_box_nw.png differ
diff --git a/customize/mate/terminal_box_s.png b/customize/mate/terminal_box_s.png
new file mode 100644
index 0000000..85a8901
Binary files /dev/null and b/customize/mate/terminal_box_s.png differ
diff --git a/customize/mate/terminal_box_se.png b/customize/mate/terminal_box_se.png
new file mode 100644
index 0000000..d8627ee
Binary files /dev/null and b/customize/mate/terminal_box_se.png differ
diff --git a/customize/mate/terminal_box_sw.png b/customize/mate/terminal_box_sw.png
new file mode 100644
index 0000000..67c600c
Binary files /dev/null and b/customize/mate/terminal_box_sw.png differ
diff --git a/customize/mate/terminal_box_w.png b/customize/mate/terminal_box_w.png
new file mode 100644
index 0000000..d066e2d
Binary files /dev/null and b/customize/mate/terminal_box_w.png differ
diff --git a/customize/mate/terminus-12.pf2 b/customize/mate/terminus-12.pf2
new file mode 100644
index 0000000..6092035
Binary files /dev/null and b/customize/mate/terminus-12.pf2 differ
diff --git a/customize/mate/terminus-14.pf2 b/customize/mate/terminus-14.pf2
new file mode 100644
index 0000000..8ab8bd1
Binary files /dev/null and b/customize/mate/terminus-14.pf2 differ
diff --git a/customize/mate/terminus-16.pf2 b/customize/mate/terminus-16.pf2
new file mode 100644
index 0000000..6e6b25d
Binary files /dev/null and b/customize/mate/terminus-16.pf2 differ
diff --git a/customize/mate/terminus-18.pf2 b/customize/mate/terminus-18.pf2
new file mode 100644
index 0000000..129cef1
Binary files /dev/null and b/customize/mate/terminus-18.pf2 differ
diff --git a/customize/mate/theme.txt b/customize/mate/theme.txt
new file mode 100644
index 0000000..493d48f
--- /dev/null
+++ b/customize/mate/theme.txt
@@ -0,0 +1,42 @@
+# Main options
+title-text: ""
+desktop-image: "background.png"
+desktop-color: "#000000"
+terminal-font: "Terminus Regular 14"
+terminal-box: "terminal_box_*.png"
+terminal-left: "0"
+terminal-top: "0"
+terminal-width: "100%"
+terminal-height: "100%"
+terminal-border: "0"
+
+# Boot menu
++ boot_menu {
+ left = 15%
+ top = 40%
+ width = 27%
+ height = 65%
+ item_font = "Ubuntu Regular 20"
+ item_color = "#cccccc"
+ selected_item_color = "#ffffff"
+ icon_width = 36
+ icon_height = 36
+ item_icon_space = 20
+ item_height = 40
+ item_padding = 2
+ item_spacing = 10
+ selected_item_pixmap_style = "select_*.png"
+}
+
+
+# Countdown label
+# You can change the name of default starting OS here
++ label {
+ left = 15%
+ top = 31%
+ align = "center"
+ id = "__timeout__"
+ text = "Ubuntu Mate will start in %d seconds"
+ color = "#cccccc"
+ font = "Ubuntu Regular 17"
+}
diff --git a/customize/mate/ubuntu_regular_17.pf2 b/customize/mate/ubuntu_regular_17.pf2
new file mode 100644
index 0000000..9405954
Binary files /dev/null and b/customize/mate/ubuntu_regular_17.pf2 differ
diff --git a/customize/mate/ubuntu_regular_20.pf2 b/customize/mate/ubuntu_regular_20.pf2
new file mode 100644
index 0000000..3d903ba
Binary files /dev/null and b/customize/mate/ubuntu_regular_20.pf2 differ
diff --git a/preview/UbuntuMate.png b/preview/UbuntuMate.png
new file mode 100644
index 0000000..68bf06e
Binary files /dev/null and b/preview/UbuntuMate.png differ
diff --git a/src/ArchiveManager.cs b/src/ArchiveManager.cs
index 0f57a72..2cd62fc 100644
--- a/src/ArchiveManager.cs
+++ b/src/ArchiveManager.cs
@@ -1,46 +1,53 @@
-using System;
+using ICSharpCode.SharpZipLib.Tar;
+using System;
+using System.IO;
-namespace DistroGrubThemes
+namespace DistroGrubThemes;
+
+public static class ArchiveManager
{
- public class ArchiveManager
+ public static void CreateTarArchive(string sourceDirectory, string outputFile, bool verbose)
{
- public static void CreateTarArchive(string sourceDirectory, string outputFile, bool verbose)
+ Stream outStream = File.Create(outputFile);
+ TarArchive tarArchive = TarArchive.CreateOutputTarArchive(outStream);
+
+ // Case sensitive
+ tarArchive.RootPath = sourceDirectory.Replace('\\', '/');
+ if (tarArchive.RootPath.EndsWith("/"))
+ tarArchive.RootPath = tarArchive.RootPath.Remove(tarArchive.RootPath.Length - 1);
+
+ AddDirectoryFilesToTar(tarArchive, sourceDirectory, true);
+ tarArchive.Close();
+
+ if (verbose)
{
- Chilkat.Tar tar = new Chilkat.Tar
- {
- WriteFormat = "gnu"
- };
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.Write("OK\n");
+ Console.ResetColor();
+ }
+ }
- // Add a directory tree to be included in the output TAR archive:
- bool success = tar.AddDirRoot(sourceDirectory);
- if (success != true)
- {
- Console.ForegroundColor = ConsoleColor.Red;
- Console.Write("ERROR\n\n");
- Console.Write("error: ");
- Console.ResetColor();
- Console.Write(tar.LastErrorText + "\n");
- return;
- }
+ // Example: https://github.com/icsharpcode/SharpZipLib/wiki/GZip-and-Tar-Samples
+ private static void AddDirectoryFilesToTar(TarArchive tarArchive, string sourceDirectory, bool recurse)
+ {
+ // Optionally, write an entry for the directory itself.
+ // Specify false for recursion here if we will add the directory's files individually.
+ TarEntry tarEntry = TarEntry.CreateEntryFromFile(sourceDirectory);
+ tarArchive.WriteEntry(tarEntry, false);
- // Create the TAR archive.
- success = tar.WriteTar(outputFile);
- if (success != true)
- {
- Console.ForegroundColor = ConsoleColor.Red;
- Console.Write("ERROR\n\n");
- Console.Write("error: ");
- Console.ResetColor();
- Console.Write(tar.LastErrorText + "\n");
- return;
- }
+ // Write each file to the tar.
+ string[] filenames = Directory.GetFiles(sourceDirectory);
+ foreach (string filename in filenames)
+ {
+ tarEntry = TarEntry.CreateEntryFromFile(filename);
+ tarArchive.WriteEntry(tarEntry, true);
+ }
- if (verbose)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- Console.Write("OK\n");
- Console.ResetColor();
- }
+ if (recurse)
+ {
+ string[] directories = Directory.GetDirectories(sourceDirectory);
+ foreach (string directory in directories)
+ AddDirectoryFilesToTar(tarArchive, directory, recurse);
}
}
}
diff --git a/src/DistroGrubThemes.csproj b/src/DistroGrubThemes.csproj
index 6b12645..74a441a 100644
--- a/src/DistroGrubThemes.csproj
+++ b/src/DistroGrubThemes.csproj
@@ -5,11 +5,12 @@
netcoreapp3.1
Adison Cavani
Adison Cavani
+ 10
-
+
diff --git a/src/Program.cs b/src/Program.cs
index c696dc1..e16fc07 100644
--- a/src/Program.cs
+++ b/src/Program.cs
@@ -4,161 +4,158 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
-namespace DistroGrubThemes
+namespace DistroGrubThemes;
+
+internal class Program
{
- internal class Program
+ static void Main(string[] args)
{
- static void Main(string[] args)
+ var parser = new Parser(with => with.HelpWriter = null);
+ var parserResult = parser.ParseArguments(args);
+ parserResult.WithParsed(options => RunOptions(options)).WithNotParsed(errs => Help.DisplayHelp(parserResult, errs));
+ }
+
+ static void RunOptions(ProgramOptions opts)
+ {
+ Program program = new();
+ string path = program.CheckRepoPath(opts.RepositoryPath);
+
+ if (opts.UpdateFonts)
+ program.UpdateFonts($"{path}\\font", $"{path}\\customize", opts.VerboseMode);
+
+ if (opts.UpdateIcons)
{
- var parser = new Parser(with => with.HelpWriter = null);
- var parserResult = parser.ParseArguments(args);
- parserResult.WithParsed(options => RunOptions(options)).WithNotParsed(errs => Help.DisplayHelp(parserResult, errs));
+ if (opts.VerboseMode)
+ Console.WriteLine();
+
+ program.UpdateIcons($"{path}\\assets\\icons", $"{path}\\customize", opts.VerboseMode);
}
- static void RunOptions(ProgramOptions opts)
+ if (opts.UpdateArchives)
{
- Program program = new Program();
- string path = program.CheckRepoPath(opts.RepositoryPath);
+ if (opts.VerboseMode)
+ Console.WriteLine();
- if (opts.UpdateFonts)
- {
- program.UpdateFonts(path + @"\font", path + @"\customize", opts.VerboseMode);
- }
+ program.UpdateArchive(path, opts.VerboseMode);
+ }
+ }
- if (opts.UpdateIcons)
- {
- if (opts.VerboseMode)
- Console.WriteLine();
+ void UpdateArchive(string path, bool verbose)
+ {
+ if (!verbose)
+ Console.Write("Creating .tar archives ... ");
- program.UpdateIcons(path + @"\assets\icons", path + @"\customize", opts.VerboseMode);
- }
+ foreach (var directory in DirectoriesDictionary($"{path}\\customize", path))
+ {
+ if (verbose)
+ Console.Write($"Creating {directory.Value}.tar archive ... ");
- if (opts.UpdateArchives)
- {
- if (opts.VerboseMode)
- Console.WriteLine();
-
- program.UpdateArchive(path, opts.VerboseMode);
- }
+ ArchiveManager.CreateTarArchive(directory.Key, $"{path}\\themes\\{directory.Value}.tar", verbose);
}
- void UpdateArchive(string path, bool verbose)
+ if (!verbose)
{
- if (!verbose)
- Console.Write("Creating .tar archives ... ");
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.Write("OK\n");
+ Console.ResetColor();
+ }
+ }
- foreach (var directory in DirectoriesDictionary(path + @"\customize", path))
+ void UpdateIcons(string iconsPath, string customizePath, bool verbose)
+ {
+ if (!verbose)
+ Console.Write("Copying icons ... ");
+
+ foreach (var directory in DirectoriesArray(customizePath))
+ {
+ foreach (var icon in FilesArray(iconsPath))
{
if (verbose)
- Console.Write("Creating " + directory.Value + ".tar archive ... ");
+ Console.Write($"Copying {icon} ... ");
- ArchiveManager.CreateTarArchive(directory.Key, path + @"\themes\" + directory.Value + ".tar", verbose);
- }
+ File.Copy($"{iconsPath}\\{icon}", $"{directory}\\icons\\{icon}", true);
- if (!verbose)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- Console.Write("OK\n");
- Console.ResetColor();
- }
- }
-
- void UpdateIcons(string iconsPath, string customizePath, bool verbose)
- {
- if (!verbose)
- Console.Write("Copying icons ... ");
-
- foreach (var directory in DirectoriesArray(customizePath))
- {
- foreach (var icon in FilesArray(iconsPath))
+ if (verbose)
{
- if (verbose)
- Console.Write("Copying " + icon + " ... ");
-
- File.Copy(iconsPath + @"\" + icon, directory + @"\icons\" + icon, true);
-
- if (verbose)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- Console.Write("OK\n");
- Console.ResetColor();
- }
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.Write("OK\n");
+ Console.ResetColor();
}
}
-
- if (!verbose)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- Console.Write("OK\n");
- Console.ResetColor();
- }
}
- void UpdateFonts(string fontsPath, string customizePath, bool verbose)
+ if (!verbose)
{
- if (!verbose)
- Console.Write("Copying fonts ... ");
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.Write("OK\n");
+ Console.ResetColor();
+ }
+ }
- foreach (var directory in DirectoriesArray(customizePath))
+ void UpdateFonts(string fontsPath, string customizePath, bool verbose)
+ {
+ if (!verbose)
+ Console.Write("Copying fonts ... ");
+
+ foreach (var directory in DirectoriesArray(customizePath))
+ {
+ foreach (var font in FilesArray(fontsPath))
{
- foreach (var font in FilesArray(fontsPath))
+ if (verbose)
+ Console.Write($"Copying {font} ... ");
+
+ File.Copy($"{fontsPath}\\{font}", $"{directory}\\{font}", true);
+
+ if (verbose)
{
- if (verbose)
- Console.Write("Copying " + font + " ... ");
-
- File.Copy(fontsPath + @"\" + font, directory + @"\" + font, true);
-
- if (verbose)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- Console.Write("OK\n");
- Console.ResetColor();
- }
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.Write("OK\n");
+ Console.ResetColor();
}
}
-
- if (!verbose)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- Console.Write("OK\n");
- Console.ResetColor();
- }
}
- List FilesArray(string folderPath)
+ if (!verbose)
{
- return new List(Directory.GetFiles(folderPath).Select(Path.GetFileName));
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.Write("OK\n");
+ Console.ResetColor();
+ }
+ }
+
+ List FilesArray(string folderPath)
+ {
+ return new List(Directory.GetFiles(folderPath).Select(Path.GetFileName));
+ }
+
+ string[] DirectoriesArray(string directoryPath)
+ {
+ return Directory.GetDirectories(directoryPath);
+ }
+
+ Dictionary DirectoriesDictionary(string directoryPath, string repoPath)
+ {
+ var dirsArray = Directory.GetDirectories(directoryPath);
+
+ return dirsArray.ToDictionary(key => key, value => value[(value.IndexOf(@"customize\") + 10)..]);
+ }
+
+ string CheckRepoPath(string path)
+ {
+ if (Directory.Exists(path) && path.Contains("distro-grub-themes"))
+ {
+ int index = path.IndexOf("distro-grub-themes") + 18;
+ return path[..index];
}
- string[] DirectoriesArray(string directoryPath)
+ else
{
- return Directory.GetDirectories(directoryPath);
- }
-
- Dictionary DirectoriesDictionary(string directoryPath, string repoPath)
- {
- var dirsArray = Directory.GetDirectories(directoryPath);
-
- return dirsArray.ToDictionary(key => key, value => value.Substring(value.IndexOf(@"customize\") + 10));
- }
-
- string CheckRepoPath(string path)
- {
- if (Directory.Exists(path) && path.Contains("distro-grub-themes"))
- {
- int index = path.IndexOf("distro-grub-themes") + 18;
- return path.Substring(0, index);
- }
-
- else
- {
- Console.ForegroundColor = ConsoleColor.Red;
- Console.Write("error: ");
- Console.ResetColor();
- Console.Write("could not find repository in this path");
- Environment.Exit(1);
- return null;
- }
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Write("error: ");
+ Console.ResetColor();
+ Console.Write("could not find repository in this path");
+ Environment.Exit(1);
+ return null;
}
}
}
diff --git a/themes/CentOS.tar b/themes/CentOS.tar
index 0f67023..3e8e861 100644
Binary files a/themes/CentOS.tar and b/themes/CentOS.tar differ
diff --git a/themes/Debian.tar b/themes/Debian.tar
index a20e62b..c616438 100644
Binary files a/themes/Debian.tar and b/themes/Debian.tar differ
diff --git a/themes/Deepin.tar b/themes/Deepin.tar
index 39382a3..37671ab 100644
Binary files a/themes/Deepin.tar and b/themes/Deepin.tar differ
diff --git a/themes/EndeavourOS.tar b/themes/EndeavourOS.tar
index ea0caa6..6645cde 100644
Binary files a/themes/EndeavourOS.tar and b/themes/EndeavourOS.tar differ
diff --git a/themes/Fedora.tar b/themes/Fedora.tar
index d4bde22..fcbebbf 100644
Binary files a/themes/Fedora.tar and b/themes/Fedora.tar differ
diff --git a/themes/FreeBSD.tar b/themes/FreeBSD.tar
index 856222e..4a23ddf 100644
Binary files a/themes/FreeBSD.tar and b/themes/FreeBSD.tar differ
diff --git a/themes/Garuda.tar b/themes/Garuda.tar
index 128ce9b..e797484 100644
Binary files a/themes/Garuda.tar and b/themes/Garuda.tar differ
diff --git a/themes/Gentoo.tar b/themes/Gentoo.tar
index af86091..7fb178c 100644
Binary files a/themes/Gentoo.tar and b/themes/Gentoo.tar differ
diff --git a/themes/KDEneon.tar b/themes/KDEneon.tar
index e3dc19f..192218c 100644
Binary files a/themes/KDEneon.tar and b/themes/KDEneon.tar differ
diff --git a/themes/Manjaro.tar b/themes/Manjaro.tar
index e0ba751..b0054ba 100644
Binary files a/themes/Manjaro.tar and b/themes/Manjaro.tar differ
diff --git a/themes/Solus.tar b/themes/Solus.tar
index ca63c3b..928d765 100644
Binary files a/themes/Solus.tar and b/themes/Solus.tar differ
diff --git a/themes/Ubuntu.tar b/themes/Ubuntu.tar
index 79a8582..7621d66 100644
Binary files a/themes/Ubuntu.tar and b/themes/Ubuntu.tar differ
diff --git a/themes/Ventoy.tar b/themes/Ventoy.tar
index 0b84fd0..c16d781 100644
Binary files a/themes/Ventoy.tar and b/themes/Ventoy.tar differ
diff --git a/themes/Windows10.tar b/themes/Windows10.tar
index d207a5d..ad4291d 100644
Binary files a/themes/Windows10.tar and b/themes/Windows10.tar differ
diff --git a/themes/ZorinOS.tar b/themes/ZorinOS.tar
index 6b96683..76f157b 100644
Binary files a/themes/ZorinOS.tar and b/themes/ZorinOS.tar differ
diff --git a/themes/aorus.tar b/themes/aorus.tar
index 90a519d..fe3cb12 100644
Binary files a/themes/aorus.tar and b/themes/aorus.tar differ
diff --git a/themes/arch.tar b/themes/arch.tar
index 9c5e59e..278b705 100644
Binary files a/themes/arch.tar and b/themes/arch.tar differ
diff --git a/themes/arco.tar b/themes/arco.tar
index f9db83e..6f6cb37 100644
Binary files a/themes/arco.tar and b/themes/arco.tar differ
diff --git a/themes/artix.tar b/themes/artix.tar
index 13c5ec9..2c34b3c 100644
Binary files a/themes/artix.tar and b/themes/artix.tar differ
diff --git a/themes/asus.tar b/themes/asus.tar
index f334e85..f4c0a27 100644
Binary files a/themes/asus.tar and b/themes/asus.tar differ
diff --git a/themes/elementary.tar b/themes/elementary.tar
index eef452e..0409d25 100644
Binary files a/themes/elementary.tar and b/themes/elementary.tar differ
diff --git a/themes/gigabyte-with-hue.tar b/themes/gigabyte-with-hue.tar
index 1049b20..de55e23 100644
Binary files a/themes/gigabyte-with-hue.tar and b/themes/gigabyte-with-hue.tar differ
diff --git a/themes/hp.tar b/themes/hp.tar
index 70af530..39df7cf 100644
Binary files a/themes/hp.tar and b/themes/hp.tar differ
diff --git a/themes/lenovo.tar b/themes/lenovo.tar
index 911d236..3ebc16d 100644
Binary files a/themes/lenovo.tar and b/themes/lenovo.tar differ
diff --git a/themes/mate.tar b/themes/mate.tar
new file mode 100644
index 0000000..9e0db99
Binary files /dev/null and b/themes/mate.tar differ
diff --git a/themes/mint.tar b/themes/mint.tar
index 66d60de..085de96 100644
Binary files a/themes/mint.tar and b/themes/mint.tar differ
diff --git a/themes/mx.tar b/themes/mx.tar
index 4f56259..9907791 100644
Binary files a/themes/mx.tar and b/themes/mx.tar differ
diff --git a/themes/openSUSE.tar b/themes/openSUSE.tar
index 91d2e83..cd2be74 100644
Binary files a/themes/openSUSE.tar and b/themes/openSUSE.tar differ
diff --git a/themes/pop.tar b/themes/pop.tar
index 81e3762..1f02e39 100644
Binary files a/themes/pop.tar and b/themes/pop.tar differ
diff --git a/themes/rocky.tar b/themes/rocky.tar
index a3945fd..3987c34 100644
Binary files a/themes/rocky.tar and b/themes/rocky.tar differ
diff --git a/themes/toshiba.tar b/themes/toshiba.tar
index 409ce5c..d9c4928 100644
Binary files a/themes/toshiba.tar and b/themes/toshiba.tar differ
diff --git a/themes/void.tar b/themes/void.tar
index 3786317..3cc7e19 100644
Binary files a/themes/void.tar and b/themes/void.tar differ