Changed gigabyte tarball to raise logo

This commit is contained in:
grohan47 2022-01-03 00:46:04 +05:30
commit c5021b08db
130 changed files with 209 additions and 160 deletions

View file

@ -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.
</p>
<p float="left">
<img src="https://raw.githubusercontent.com/AdisonCavani/distro-grub-themes/master/preview/Ubuntu.png" width="49%"/>
<img src="https://raw.githubusercontent.com/AdisonCavani/distro-grub-themes/master/preview/UbuntuMate.png" width="49%"/>
</p>
<p float="left">
<img src="https://raw.githubusercontent.com/AdisonCavani/distro-grub-themes/master/preview/Void%20Linux.png" width="49%"/>
</p>
<p float="left">
<img src="https://raw.githubusercontent.com/AdisonCavani/distro-grub-themes/master/preview/Ventoy.png" width="49%"/>
<img src="https://raw.githubusercontent.com/AdisonCavani/distro-grub-themes/master/preview/Windows%2010.png" width="49%"/>
</p>
<p float="left">
<img src="https://raw.githubusercontent.com/AdisonCavani/distro-grub-themes/master/preview/Windows%2010.png" width="49%"/>
<img src="https://raw.githubusercontent.com/AdisonCavani/distro-grub-themes/master/preview/ZorinOS.png" width="49%"/>
</p>

Binary file not shown.

BIN
assets/icons/mate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

BIN
customize/mate/icons/tz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

BIN
customize/mate/select_c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

BIN
customize/mate/select_e.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

BIN
customize/mate/select_w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

42
customize/mate/theme.txt Normal file
View file

@ -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"
}

Binary file not shown.

Binary file not shown.

BIN
preview/UbuntuMate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View file

@ -1,39 +1,23 @@
using System;
using ICSharpCode.SharpZipLib.Tar;
using System;
using System.IO;
namespace DistroGrubThemes
{
public class ArchiveManager
namespace DistroGrubThemes;
public static class ArchiveManager
{
public static void CreateTarArchive(string sourceDirectory, string outputFile, bool verbose)
{
Chilkat.Tar tar = new Chilkat.Tar
{
WriteFormat = "gnu"
};
Stream outStream = File.Create(outputFile);
TarArchive tarArchive = TarArchive.CreateOutputTarArchive(outStream);
// 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;
}
// Case sensitive
tarArchive.RootPath = sourceDirectory.Replace('\\', '/');
if (tarArchive.RootPath.EndsWith("/"))
tarArchive.RootPath = tarArchive.RootPath.Remove(tarArchive.RootPath.Length - 1);
// 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;
}
AddDirectoryFilesToTar(tarArchive, sourceDirectory, true);
tarArchive.Close();
if (verbose)
{
@ -42,5 +26,28 @@ namespace DistroGrubThemes
Console.ResetColor();
}
}
// 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);
// 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 (recurse)
{
string[] directories = Directory.GetDirectories(sourceDirectory);
foreach (string directory in directories)
AddDirectoryFilesToTar(tarArchive, directory, recurse);
}
}
}

View file

@ -5,11 +5,12 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
<Authors>Adison Cavani</Authors>
<Company>Adison Cavani</Company>
<LangVersion>10</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ChilkatDnCore" Version="9.5.0.88" />
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
</ItemGroup>
</Project>

View file

@ -4,8 +4,8 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace DistroGrubThemes
{
namespace DistroGrubThemes;
internal class Program
{
static void Main(string[] args)
@ -17,20 +17,18 @@ namespace DistroGrubThemes
static void RunOptions(ProgramOptions opts)
{
Program program = new Program();
Program program = new();
string path = program.CheckRepoPath(opts.RepositoryPath);
if (opts.UpdateFonts)
{
program.UpdateFonts(path + @"\font", path + @"\customize", opts.VerboseMode);
}
program.UpdateFonts($"{path}\\font", $"{path}\\customize", opts.VerboseMode);
if (opts.UpdateIcons)
{
if (opts.VerboseMode)
Console.WriteLine();
program.UpdateIcons(path + @"\assets\icons", path + @"\customize", opts.VerboseMode);
program.UpdateIcons($"{path}\\assets\\icons", $"{path}\\customize", opts.VerboseMode);
}
if (opts.UpdateArchives)
@ -47,12 +45,12 @@ namespace DistroGrubThemes
if (!verbose)
Console.Write("Creating .tar archives ... ");
foreach (var directory in DirectoriesDictionary(path + @"\customize", path))
foreach (var directory in DirectoriesDictionary($"{path}\\customize", path))
{
if (verbose)
Console.Write("Creating " + directory.Value + ".tar archive ... ");
Console.Write($"Creating {directory.Value}.tar archive ... ");
ArchiveManager.CreateTarArchive(directory.Key, path + @"\themes\" + directory.Value + ".tar", verbose);
ArchiveManager.CreateTarArchive(directory.Key, $"{path}\\themes\\{directory.Value}.tar", verbose);
}
if (!verbose)
@ -73,9 +71,9 @@ namespace DistroGrubThemes
foreach (var icon in FilesArray(iconsPath))
{
if (verbose)
Console.Write("Copying " + icon + " ... ");
Console.Write($"Copying {icon} ... ");
File.Copy(iconsPath + @"\" + icon, directory + @"\icons\" + icon, true);
File.Copy($"{iconsPath}\\{icon}", $"{directory}\\icons\\{icon}", true);
if (verbose)
{
@ -104,9 +102,9 @@ namespace DistroGrubThemes
foreach (var font in FilesArray(fontsPath))
{
if (verbose)
Console.Write("Copying " + font + " ... ");
Console.Write($"Copying {font} ... ");
File.Copy(fontsPath + @"\" + font, directory + @"\" + font, true);
File.Copy($"{fontsPath}\\{font}", $"{directory}\\{font}", true);
if (verbose)
{
@ -139,7 +137,7 @@ namespace DistroGrubThemes
{
var dirsArray = Directory.GetDirectories(directoryPath);
return dirsArray.ToDictionary(key => key, value => value.Substring(value.IndexOf(@"customize\") + 10));
return dirsArray.ToDictionary(key => key, value => value[(value.IndexOf(@"customize\") + 10)..]);
}
string CheckRepoPath(string path)
@ -147,7 +145,7 @@ namespace DistroGrubThemes
if (Directory.Exists(path) && path.Contains("distro-grub-themes"))
{
int index = path.IndexOf("distro-grub-themes") + 18;
return path.Substring(0, index);
return path[..index];
}
else
@ -161,4 +159,3 @@ namespace DistroGrubThemes
}
}
}
}

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more