15 Commits

Author SHA1 Message Date
Vince a697a28fe6 Merge pull request #231 from Ate329/master
Add custom resolution option and fix ImageMagick dependency
2024-09-18 10:59:23 +08:00
Zhiyong (Justin) He 610bc23012 Update README.md 2024-09-17 20:22:28 +03:00
Zhiyong (Justin) He a2b3fa071b Update install.sh 2024-09-17 20:21:13 +03:00
Zhiyong (Justin) He 18ea3defc5 Update README.md 2024-09-17 20:20:35 +03:00
Zhiyong (Justin) He 326a27a6f2 Update install.sh 2024-09-17 20:14:55 +03:00
Zhiyong (Justin) He d73179c4ea Update flake.nix
add imagemagick
2024-09-17 20:08:46 +03:00
Zhiyong (Justin) He daa8aef95f Update install.sh to make it work for customised resolution 2024-09-17 20:02:25 +03:00
Zhiyong (Justin) He 9aa7e35d71 Update flake.nix to fix a bug
ERROR: Unrecognized screen variant 'custom'.
2024-09-17 19:25:41 +03:00
Zhiyong (Justin) He 7cff52a245 Update flake.nix to allow customised resolution for NixOS 2024-09-17 19:08:35 +03:00
vinceliuice e3a5ea51ae update 2024-09-07 11:01:34 +08:00
Vince fa5ec95db0 Merge pull request #229 from paragi/master
Add Nobara Linux icons
2024-09-07 09:37:56 +08:00
Simon Rigét 454f4c6d92 Delete github 2024-09-06 21:39:14 +02:00
Simon Rigét 97ddfd915b Delete excess file 2024-09-06 21:38:53 +02:00
paragi d522f301ef Added Nobara icon 2024-09-06 18:52:08 +02:00
paragi cb1539e4e8 Added Nobara Linux icons 2024-09-06 14:54:10 +02:00
16 changed files with 166 additions and 81 deletions
+16 -25
View File
@@ -1,51 +1,46 @@
![banner](banner.png?raw=true)
## Installation:
Usage: `sudo ./install.sh [OPTIONS...]`
```
-t, --theme theme variant(s) [tela|vimix|stylish|whitesur] (default is tela)
-i, --icon icon variant(s) [color|white|whitesur] (default is color)
-s, --screen screen display variant(s) [1080p|2k|4k|ultrawide|ultrawide2k] (default is 1080p)
-r, --remove Remove theme [tela|vimix|stylish|whitesur] (must add theme name option, default is tela)
-t, --theme theme variant(s) [tela|vimix|stylish|whitesur] (default is tela)
-i, --icon icon variant(s) [color|white|whitesur] (default is color)
-s, --screen screen display variant(s) [1080p|2k|4k|ultrawide|ultrawide2k] (default is 1080p)
-c, --custom-resolution set custom resolution (e.g., 1600x900) (disabled in default)
-r, --remove remove theme [tela|vimix|stylish|whitesur] (must add theme name option, default is tela)
-b, --boot install theme into '/boot/grub' or '/boot/grub2'
-g, --generate do not install but generate theme into chosen directory (must add your directory)
-b, --boot install theme into '/boot/grub' or '/boot/grub2'
-g, --generate do not install but generate theme into chosen directory (must add your directory)
-h, --help Show this help
-h, --help show this help
```
_If no options are used, a user interface `dialog` will show up instead_
*If no options are used, a user interface *`dialog`* will show up instead*
### Examples:
- Install Tela theme on 2k display device:
```sh
sudo ./install.sh -t tela -s 2k
```
- Install Tela theme with custom resolution:
```sh
sudo ./install.sh -t tela -c 1600x900
```
- Install Tela theme into /boot/grub/themes:
```sh
sudo ./install.sh -b -t tela
```
- Uninstall Tela theme:
```sh
sudo ./install.sh -r -t tela
```
## Installation with NixOS:
To use this theme with NixOS you will have to enable [flakes](https://wiki.nixos.org/wiki/flakes). Before you do this, please inform yourself if you really want to, because flakes are still an unstable feature.
First you will have to add grub2 to your `flake.nix` file as a new input.
```nix
# flake.nix
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Add grub2 themes to your inputs ...
@@ -53,13 +48,11 @@ First you will have to add grub2 to your `flake.nix` file as a new input.
url = "github:vinceliuice/grub2-themes";
};
};
outputs = inputs@{ nixpkgs, grub2-themes, ... }: {
nixosConfigurations = {
my_host = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
# ... and then to your modules
modules = [
./configuration.nix
@@ -70,7 +63,6 @@ First you will have to add grub2 to your `flake.nix` file as a new input.
};
}
```
After that, you can configure the theme as shown below. In this example it is inside the `configuration.nix` file but it can be any file you choose.
```nix
# configuration.nix
@@ -81,21 +73,19 @@ After that, you can configure the theme as shown below. In this example it is in
enable = true;
theme = "stylish";
footer = true;
customResolution = "1600x900"; # Optional: Set a custom resolution
};
}
```
## Issues / tweaks:
### Correcting display resolution:
- On the grub screen, press `c` to enter the command line
- Enter `vbeinfo` or `videoinfo` to check available resolutions
- Open `/etc/default/grub`, and edit `GRUB_GFXMODE=[height]x[width]x32` to match your resolution
- Finally, run `grub-mkconfig -o /boot/grub/grub.cfg` to update your grub config
### Setting a custom background:
- Make sure you have `imagemagick` installed, or at least something that provides `convert`
- Find the resolution of your display, and make sure your background matches the resolution
- 1920x1080 >> 1080p
@@ -106,6 +96,7 @@ After that, you can configure the theme as shown below. In this example it is in
- Place your custom background inside the root of the project, and name it `background.jpg`
- Run the installer like normal, but with -s `[YOUR_RESOLUTION]` and -t `[THEME]` and -i `[ICON]`
- Make sure to replace `[YOUR_RESOLUTION]` with your resolution and `[THEME]` with the theme
- Alternatively, use the `-c` option to set a custom resolution
## Contributing:
- If you made changes to icons, or added a new one:
@@ -119,6 +110,6 @@ After that, you can configure the theme as shown below. In this example it is in
## Documents
[Grub2 theme reference](https://wiki.rosalab.ru/en/index.php/Grub2_theme_/_reference)
[Grub2 theme reference](https://wiki.rosalab.ru/en/index.php/Grub2_theme_/_reference)
[Grub2 theme tutorial](https://wiki.rosalab.ru/en/index.php/Grub2_theme_tutorial)
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 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: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+14 -7
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="logos-color.svg"
id="svg371"
viewBox="0 0 304 448"
@@ -17,14 +17,14 @@
inkscape:document-rotation="0"
inkscape:current-layer="svg371"
inkscape:window-maximized="1"
inkscape:window-y="34"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:cy="283.19587"
inkscape:cx="137.0586"
inkscape:zoom="1.7072989"
inkscape:cy="124.17275"
inkscape:cx="199.14498"
inkscape:zoom="0.85364945"
showgrid="false"
id="namedview373"
inkscape:window-height="1010"
inkscape:window-height="1012"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
@@ -1488,4 +1488,11 @@
d="m 8.4665,281.92 c 3.6644,0 6.6145,2.9501 6.6145,6.6145 0,3.6644 -2.9501,6.6145 -6.6145,6.6145 -3.6644,0 -6.6145,-2.9501 -6.6145,-6.6145 0,-3.6644 2.9501,-6.6145 6.6145,-6.6145 z" /></g><path
id="rect1"
style="fill:#ffffff;fill-rule:evenodd;stroke-width:1.97269;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers"
d="m 139.50246,94.999931 c -0.27808,0 -0.50253,0.224446 -0.50253,0.502527 V 102.968 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.465542 c 0,-0.278081 -0.22445,-0.502527 -0.50253,-0.502527 z m 9.52941,0 c -0.27808,0 -0.50253,0.224446 -0.50253,0.502527 V 102.968 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.465542 c 0,-0.278081 -0.22445,-0.502527 -0.50253,-0.502527 z m -9.52941,9.529419 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50253 v 7.46553 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46553 c 0,-0.27808 -0.22445,-0.50253 -0.50253,-0.50253 z m 9.52941,0 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50253 v 7.46553 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46553 c 0,-0.27808 -0.22445,-0.50253 -0.50253,-0.50253 z" /></g></svg>
d="m 139.50246,94.999931 c -0.27808,0 -0.50253,0.224446 -0.50253,0.502527 V 102.968 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.465542 c 0,-0.278081 -0.22445,-0.502527 -0.50253,-0.502527 z m 9.52941,0 c -0.27808,0 -0.50253,0.224446 -0.50253,0.502527 V 102.968 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.465542 c 0,-0.278081 -0.22445,-0.502527 -0.50253,-0.502527 z m -9.52941,9.529419 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50253 v 7.46553 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46553 c 0,-0.27808 -0.22445,-0.50253 -0.50253,-0.50253 z m 9.52941,0 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50253 v 7.46553 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46553 c 0,-0.27808 -0.22445,-0.50253 -0.50253,-0.50253 z" /></g><g
id="nobara"><path
id="path3"
d="m 331.42256,7.9375005 c 8.83687,0 16,7.1631275 16,15.9999945 0,8.836863 -7.16313,15.999991 -16,15.999991 -8.83687,0 -15.99999,-7.163128 -15.99999,-15.999991 0,-8.836867 7.16312,-15.9999945 15.99999,-15.9999945 z"
style="fill:#ffffff;fill-opacity:1" /><path
d="m 332.29044,32.819778 c -0.0269,-0.232768 -0.11775,-0.521595 -0.25003,-0.794301 -0.59159,-1.219628 -1.97601,-1.802867 -3.27906,-1.381423 -0.54525,0.176346 -1.06064,0.575458 -1.41553,1.096184 -0.27575,0.404611 -0.60864,0.697376 -1.02766,0.903785 -0.25439,0.125325 -0.43344,0.187148 -0.69609,0.240367 -0.22313,0.04518 -0.76345,0.03204 -1.03777,-0.0253 -0.96019,-0.200682 -1.73935,-0.893192 -2.03615,-1.809667 -0.13403,-0.413867 -0.12556,0.06875 -0.12556,-7.152871 0,-6.398196 10e-4,-6.649786 0.042,-6.834146 0.12173,-0.555013 0.39726,-1.044613 0.80225,-1.425607 1.08169,-1.017572 2.7785,-0.969967 3.80117,0.106627 0.1589,0.167288 0.19917,0.192098 0.24208,0.149179 0.0285,-0.02855 0.57752,-0.277496 0.83203,-0.377346 0.69106,-0.271125 1.46536,-0.461373 2.28556,-0.5616 0.46181,-0.05644 1.52549,-0.05659 1.98133,-2.95e-4 1.78855,0.220862 3.28248,0.843485 4.66142,1.942722 0.38961,0.310601 1.04885,0.969793 1.35984,1.359754 1.08528,1.360903 1.71883,2.877798 1.94212,4.649924 0.0361,0.28653 0.0405,0.638278 0.0479,3.861795 0.006,2.558334 7.4e-4,3.604594 -0.0176,3.754866 -0.14391,1.170542 -0.99477,2.095149 -2.15028,2.336658 -0.27999,0.05855 -0.81425,0.07056 -1.04766,0.02357 -0.94774,-0.190791 -1.73506,-0.877974 -2.03724,-1.778162 -0.14083,-0.419509 -0.13163,-0.192868 -0.14009,-3.449674 l -0.008,-2.97458 1.32362,-0.377398 c 0.728,-0.207571 1.33067,-0.383895 1.33928,-0.391827 0.009,-0.0079 -0.60607,-0.191759 -1.36597,-0.408487 l -1.38162,-0.394057 -0.0489,-0.180146 c -0.0667,-0.246193 -0.22914,-0.625948 -0.36253,-0.847897 -0.54138,-0.900777 -1.36627,-1.487061 -2.40731,-1.710997 -0.20203,-0.04344 -0.30362,-0.05085 -0.69806,-0.05085 -0.50895,0 -0.72646,0.03234 -1.13715,0.169275 -1.07089,0.35696 -1.93551,1.22296 -2.28317,2.286815 -0.16916,0.517683 -0.18743,0.735854 -0.1769,2.112707 0.008,1.015713 0.0134,1.163924 0.0486,1.282699 0.23817,0.803722 0.94473,1.340119 1.76609,1.340753 1.12472,7.55e-4 2.17653,0.759388 2.53538,1.828412 0.13431,0.400085 0.13159,0.364055 0.14131,1.875631 0.006,0.76785 0.006,1.477163 0.002,1.576234 l -0.007,0.180146 z m -1.33361,-6.853767 c -0.67196,-0.150267 -1.19109,-0.646341 -1.37633,-1.315233 -0.0304,-0.109665 -0.0403,-0.225417 -0.0398,-0.461614 7.6e-4,-0.29241 0.006,-0.330753 0.0718,-0.529175 0.19776,-0.595667 0.64956,-1.026714 1.25429,-1.196683 0.14462,-0.04065 0.23566,-0.0504 0.46162,-0.04948 0.34374,0.0015 0.53874,0.04858 0.83932,0.202797 0.17025,0.08737 0.24658,0.145446 0.4228,0.321663 0.17621,0.176217 0.23428,0.252547 0.32166,0.422797 0.53137,1.035394 0.0117,2.246803 -1.10493,2.57605 -0.21034,0.06203 -0.6373,0.07651 -0.85039,0.02887 z"
id="path1"
style="stroke-width:0.75552" /></g></svg>

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 174 KiB

+17 -6
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="logos-white.svg"
id="svg453"
viewBox="0 0 304 448"
@@ -20,14 +20,14 @@
inkscape:document-rotation="0"
inkscape:current-layer="svg453"
inkscape:window-maximized="1"
inkscape:window-y="34"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:cy="89.030857"
inkscape:cx="-160.00937"
inkscape:zoom="1.2186786"
inkscape:cy="96.897437"
inkscape:cx="259.65032"
inkscape:zoom="3.4469436"
showgrid="true"
id="namedview455"
inkscape:window-height="1010"
inkscape:window-height="1012"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
@@ -1566,4 +1566,15 @@
transform="matrix(2.0001874,0,0,1.9999487,-74.724614,-74.332896)" />
</g>
</g>
<g
id="nobara">
<path
id="path3"
d="m 331.42256,7.9375005 c 8.83687,0 16,7.1631275 16,15.9999945 0,8.836863 -7.16313,15.999991 -16,15.999991 -8.83687,0 -15.99999,-7.163128 -15.99999,-15.999991 0,-8.836867 7.16312,-15.9999945 15.99999,-15.9999945 z"
style="fill:none;fill-opacity:1" />
<path
d="m 332.29044,32.819778 c -0.0269,-0.232768 -0.11775,-0.521595 -0.25003,-0.794301 -0.59159,-1.219628 -1.97601,-1.802867 -3.27906,-1.381423 -0.54525,0.176346 -1.06064,0.575458 -1.41553,1.096184 -0.27575,0.404611 -0.60864,0.697376 -1.02766,0.903785 -0.25439,0.125325 -0.43344,0.187148 -0.69609,0.240367 -0.22313,0.04518 -0.76345,0.03204 -1.03777,-0.0253 -0.96019,-0.200682 -1.73935,-0.893192 -2.03615,-1.809667 -0.13403,-0.413867 -0.12556,0.06875 -0.12556,-7.152871 0,-6.398196 10e-4,-6.649786 0.042,-6.834146 0.12173,-0.555013 0.39726,-1.044613 0.80225,-1.425607 1.08169,-1.017572 2.7785,-0.969967 3.80117,0.106627 0.1589,0.167288 0.19917,0.192098 0.24208,0.149179 0.0285,-0.02855 0.57752,-0.277496 0.83203,-0.377346 0.69106,-0.271125 1.46536,-0.461373 2.28556,-0.5616 0.46181,-0.05644 1.52549,-0.05659 1.98133,-2.95e-4 1.78855,0.220862 3.28248,0.843485 4.66142,1.942722 0.38961,0.310601 1.04885,0.969793 1.35984,1.359754 1.08528,1.360903 1.71883,2.877798 1.94212,4.649924 0.0361,0.28653 0.0405,0.638278 0.0479,3.861795 0.006,2.558334 7.4e-4,3.604594 -0.0176,3.754866 -0.14391,1.170542 -0.99477,2.095149 -2.15028,2.336658 -0.27999,0.05855 -0.81425,0.07056 -1.04766,0.02357 -0.94774,-0.190791 -1.73506,-0.877974 -2.03724,-1.778162 -0.14083,-0.419509 -0.13163,-0.192868 -0.14009,-3.449674 l -0.008,-2.97458 1.32362,-0.377398 c 0.728,-0.207571 1.33067,-0.383895 1.33928,-0.391827 0.009,-0.0079 -0.60607,-0.191759 -1.36597,-0.408487 l -1.38162,-0.394057 -0.0489,-0.180146 c -0.0667,-0.246193 -0.22914,-0.625948 -0.36253,-0.847897 -0.54138,-0.900777 -1.36627,-1.487061 -2.40731,-1.710997 -0.20203,-0.04344 -0.30362,-0.05085 -0.69806,-0.05085 -0.50895,0 -0.72646,0.03234 -1.13715,0.169275 -1.07089,0.35696 -1.93551,1.22296 -2.28317,2.286815 -0.16916,0.517683 -0.18743,0.735854 -0.1769,2.112707 0.008,1.015713 0.0134,1.163924 0.0486,1.282699 0.23817,0.803722 0.94473,1.340119 1.76609,1.340753 1.12472,7.55e-4 2.17653,0.759388 2.53538,1.828412 0.13431,0.400085 0.13159,0.364055 0.14131,1.875631 0.006,0.76785 0.006,1.477163 0.002,1.576234 l -0.007,0.180146 z m -1.33361,-6.853767 c -0.67196,-0.150267 -1.19109,-0.646341 -1.37633,-1.315233 -0.0304,-0.109665 -0.0403,-0.225417 -0.0398,-0.461614 7.6e-4,-0.29241 0.006,-0.330753 0.0718,-0.529175 0.19776,-0.595667 0.64956,-1.026714 1.25429,-1.196683 0.14462,-0.04065 0.23566,-0.0504 0.46162,-0.04948 0.34374,0.0015 0.53874,0.04858 0.83932,0.202797 0.17025,0.08737 0.24658,0.145446 0.4228,0.321663 0.17621,0.176217 0.23428,0.252547 0.32166,0.422797 0.53137,1.035394 0.0117,2.246803 -1.10493,2.57605 -0.21034,0.06203 -0.6373,0.07651 -0.85039,0.02887 z"
id="path1"
style="stroke-width:0.75552;fill:#ffffff" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 135 KiB

+41 -19
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="logos-whitesur.svg"
id="svg1041"
viewBox="0 0 304 448"
@@ -20,13 +20,13 @@
inkscape:bbox-nodes="true"
inkscape:snap-bbox="true"
inkscape:current-layer="svg1041"
inkscape:window-maximized="0"
inkscape:window-y="121"
inkscape:window-x="487"
inkscape:window-height="704"
inkscape:window-width="1522"
inkscape:cy="200.52083"
inkscape:cx="141.04772"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:window-height="1012"
inkscape:window-width="1920"
inkscape:cy="143.05695"
inkscape:cx="130.1979"
inkscape:zoom="1.2442597"
showgrid="false"
inkscape:pagecheckerboard="0"
@@ -867,17 +867,6 @@
offset="1"
stop-color="#a9ff00" />
</radialGradient>
<filter
color-interpolation-filters="sRGB"
height="2.0632422"
width="2.3838971"
y="-0.5316211"
x="-0.69194853"
id="filter8621">
<feGaussianBlur
id="feGaussianBlur254"
stdDeviation="0.72209434" />
</filter>
<filter
color-interpolation-filters="sRGB"
height="2.5046632"
@@ -1132,6 +1121,16 @@
y1="15.081"
x2="7.9373002"
y2="1.852" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2820"
id="linearGradient4"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.8898,0,0,1.889859,317.61655,16.000057)"
x1="7.9373002"
y1="15.081"
x2="7.9373002"
y2="1.852" />
</defs>
<g
transform="matrix(3.7795,0,0,3.7796018,0.6977347,-9.6627411)"
@@ -3289,4 +3288,27 @@
style="fill:#ffffff;fill-rule:evenodd;stroke-width:1.97269;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers"
d="m 143.50254,103 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50252 v 7.46554 c 0,0.27809 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46554 c 0,-0.27808 -0.22445,-0.50252 -0.50253,-0.50252 z m 9.52941,0 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50252 v 7.46554 c 0,0.27809 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46554 c 0,-0.27808 -0.22445,-0.50252 -0.50253,-0.50252 z m -9.52941,9.52942 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50252 v 7.46553 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46553 c 0,-0.27808 -0.22445,-0.50252 -0.50253,-0.50252 z m 9.52941,0 c -0.27808,0 -0.50253,0.22445 -0.50253,0.50252 v 7.46553 c 0,0.27808 0.22445,0.50253 0.50253,0.50253 h 7.46553 c 0.27808,0 0.50253,-0.22445 0.50253,-0.50253 v -7.46553 c 0,-0.27808 -0.22445,-0.50252 -0.50253,-0.50252 z" />
</g>
<g
id="nobara">
<path
style="fill:url(#linearGradient4)"
id="path2"
stroke-width="1.88983"
fill="url(#linearGradient1710)"
d="m 326.12055,17.990119 c -3.6016,0 -6.5012,2.899391 -6.5012,6.501003 V 39.49059 c 0,3.601713 2.8994,6.501003 6.5012,6.501003 h 14.999 c 3.6016,0 6.5012,-2.89939 6.5012,-6.501003 V 24.491122 c 0,-3.601612 -2.8994,-6.501003 -6.5012,-6.501003 z" />
<rect
id="rect2"
stroke-width="0"
opacity="0"
ry="0"
rx="0"
height="31.999998"
width="32"
y="16.000053"
x="317.61655" />
<path
d="m 334.48792,40.873141 c -0.0269,-0.232768 -0.11775,-0.521595 -0.25003,-0.794301 -0.59159,-1.219628 -1.97601,-1.802867 -3.27906,-1.381423 -0.54525,0.176346 -1.06064,0.575458 -1.41553,1.096184 -0.27575,0.404611 -0.60864,0.697376 -1.02766,0.903785 -0.25439,0.125325 -0.43344,0.187148 -0.69609,0.240367 -0.22313,0.04518 -0.76345,0.03204 -1.03777,-0.0253 -0.96019,-0.200682 -1.73935,-0.893192 -2.03615,-1.809667 -0.13403,-0.413867 -0.12556,0.06875 -0.12556,-7.152871 0,-6.398196 10e-4,-6.649786 0.042,-6.834146 0.12173,-0.555013 0.39726,-1.044613 0.80225,-1.425607 1.08169,-1.017572 2.7785,-0.969967 3.80117,0.106627 0.1589,0.167288 0.19917,0.192098 0.24208,0.149179 0.0285,-0.02855 0.57752,-0.277496 0.83203,-0.377346 0.69106,-0.271125 1.46536,-0.461373 2.28556,-0.5616 0.46181,-0.05644 1.52549,-0.05659 1.98133,-2.95e-4 1.78855,0.220862 3.28248,0.843485 4.66142,1.942722 0.38961,0.310601 1.04885,0.969793 1.35984,1.359754 1.08528,1.360903 1.71883,2.877798 1.94212,4.649924 0.0361,0.28653 0.0405,0.638278 0.0479,3.861795 0.006,2.558334 7.4e-4,3.604594 -0.0176,3.754866 -0.14391,1.170542 -0.99477,2.095149 -2.15028,2.336658 -0.27999,0.05855 -0.81425,0.07056 -1.04766,0.02357 -0.94774,-0.190791 -1.73506,-0.877974 -2.03724,-1.778162 -0.14083,-0.419509 -0.13163,-0.192868 -0.14009,-3.449674 l -0.008,-2.97458 1.32362,-0.377398 c 0.728,-0.207571 1.33067,-0.383895 1.33928,-0.391827 0.009,-0.0079 -0.60607,-0.191759 -1.36597,-0.408487 l -1.38162,-0.394057 -0.0489,-0.180146 c -0.0667,-0.246193 -0.22914,-0.625948 -0.36253,-0.847897 -0.54138,-0.900777 -1.36627,-1.487061 -2.40731,-1.710997 -0.20203,-0.04344 -0.30362,-0.05085 -0.69806,-0.05085 -0.50895,0 -0.72646,0.03234 -1.13715,0.169275 -1.07089,0.35696 -1.93551,1.22296 -2.28317,2.286815 -0.16916,0.517683 -0.18743,0.735854 -0.1769,2.112707 0.008,1.015713 0.0134,1.163924 0.0486,1.282699 0.23817,0.803722 0.94473,1.340119 1.76609,1.340753 1.12472,7.55e-4 2.17653,0.759388 2.53538,1.828412 0.13431,0.400085 0.13159,0.364055 0.14131,1.875631 0.006,0.76785 0.006,1.477163 0.002,1.576234 l -0.007,0.180146 z m -1.33361,-6.853767 c -0.67196,-0.150267 -1.19109,-0.646341 -1.37633,-1.315233 -0.0304,-0.109665 -0.0403,-0.225417 -0.0398,-0.461614 7.6e-4,-0.29241 0.006,-0.330753 0.0718,-0.529175 0.19776,-0.595667 0.64956,-1.026714 1.25429,-1.196683 0.14462,-0.04065 0.23566,-0.0504 0.46162,-0.04948 0.34374,0.0015 0.53874,0.04858 0.83932,0.202797 0.17025,0.08737 0.24658,0.145446 0.4228,0.321663 0.17621,0.176217 0.23428,0.252547 0.32166,0.422797 0.53137,1.035394 0.0117,2.246803 -1.10493,2.57605 -0.21034,0.06203 -0.6373,0.07651 -0.85039,0.02887 z"
id="path1"
style="stroke-width:0.75552" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 210 KiB

+1
View File
@@ -47,6 +47,7 @@ gpart
ubuntuDDE
archcraft
brunch
nobara
recovery
restart
+26 -15
View File
@@ -30,13 +30,15 @@
grub2-theme = pkgs.stdenv.mkDerivation {
name = "grub2-theme";
src = "${self}";
buildInputs = [ pkgs.imagemagick ];
installPhase = ''
mkdir -p $out/grub/themes;
bash ./install.sh \
--generate $out/grub/themes \
--screen ${cfg.screen} \
--theme ${cfg.theme} \
--icon ${cfg.icon};
--icon ${cfg.icon} \
${if cfg.customResolution != null then "--custom-resolution ${cfg.customResolution}" else ""}
if [ -n "${splashImage}" ]; then
rm $out/grub/themes/${cfg.theme}/background.jpg;
@@ -61,7 +63,9 @@
fi;
'';
};
resolution = resolutions."${cfg.screen}";
resolution = if cfg.customResolution != null
then cfg.customResolution
else resolutions."${cfg.screen}";
in
rec {
options = {
@@ -98,6 +102,15 @@
The screen resolution to use for grub2.
'';
};
customResolution = mkOption {
default = null;
example = "1600x900";
type = types.nullOr (types.strMatching "[0-9]+x[0-9]+");
description = ''
Custom resolution for grub2 theme. Should be in the format "WIDTHxHEIGHT".
If set, this will override the 'screen' option.
'';
};
splashImage = mkOption {
default = null;
example = "/my/path/background.jpg";
@@ -138,19 +151,17 @@
environment.systemPackages = [
grub2-theme
];
boot.loader.grub =
{
theme = "${grub2-theme}/grub/themes/${cfg.theme}";
splashImage =
"${grub2-theme}/grub/themes/${cfg.theme}/background.jpg";
gfxmodeEfi = "${resolution},auto";
gfxmodeBios = "${resolution},auto";
extraConfig = ''
insmod gfxterm
insmod png
set icondir=($root)/theme/icons
'';
};
boot.loader.grub = {
theme = "${grub2-theme}/grub/themes/${cfg.theme}";
splashImage = "${grub2-theme}/grub/themes/${cfg.theme}/background.jpg";
gfxmodeEfi = "${resolution},auto";
gfxmodeBios = "${resolution},auto";
extraConfig = ''
insmod gfxterm
insmod png
set icondir=($root)/theme/icons
'';
};
}]);
};
};
+51 -9
View File
@@ -14,6 +14,7 @@ REO_DIR="$(cd $(dirname $0) && pwd)"
THEME_VARIANTS=('tela' 'vimix' 'stylish' 'whitesur')
ICON_VARIANTS=('color' 'white' 'whitesur')
SCREEN_VARIANTS=('1080p' '2k' '4k' 'ultrawide' 'ultrawide2k')
custom_resolution=""
#################################
# :::::: C O L O R S :::::: #
@@ -62,15 +63,16 @@ cat << EOF
Usage: $0 [OPTION]...
OPTIONS:
-t, --theme theme variant(s) [tela|vimix|stylish|whitesur] (default is tela)
-i, --icon icon variant(s) [color|white|whitesur] (default is color)
-s, --screen screen display variant(s) [1080p|2k|4k|ultrawide|ultrawide2k] (default is 1080p)
-r, --remove Remove theme [tela|vimix|stylish|whitesur] (must add theme name option, default is tela)
-t, --theme theme variant(s) [tela|vimix|stylish|whitesur] (default is tela)
-i, --icon icon variant(s) [color|white|whitesur] (default is color)
-s, --screen screen display variant(s) [1080p|2k|4k|ultrawide|ultrawide2k] (default is 1080p)
-c, --custom-resolution set custom resolution (e.g., 1600x900) (disabled in default)
-r, --remove remove theme [tela|vimix|stylish|whitesur] (must add theme name option, default is tela)
-b, --boot install theme into '/boot/grub' or '/boot/grub2'
-g, --generate do not install but generate theme into chosen directory (must add your directory)
-b, --boot install theme into '/boot/grub' or '/boot/grub2'
-g, --generate do not install but generate theme into chosen directory (must add your directory)
-h, --help Show this help
-h, --help show this help
EOF
}
@@ -99,6 +101,33 @@ generate() {
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${screen}.txt" "${THEME_DIR}/${theme}/theme.txt"
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
# Function to determine which assets to use based on resolution
get_asset_type() {
local width=$(echo $1 | cut -d'x' -f1)
local height=$(echo $1 | cut -d'x' -f2)
if [ $width -le 1920 ] && [ $height -le 1080 ]; then
echo "1080p"
elif [ $width -le 2560 ] && [ $height -le 1440 ]; then
echo "2k"
else
echo "4k"
fi
}
# Determine which configuration file and assets to use
if [[ -n "$custom_resolution" ]]; then
asset_type=$(get_asset_type "$custom_resolution")
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${asset_type}.txt" "${THEME_DIR}/${theme}/theme.txt"
# Replace resolution in theme.txt
sed -i "s/[0-9]\+x[0-9]\+/${custom_resolution}/" "${THEME_DIR}/${theme}/theme.txt"
# Use appropriate background as base and resize it
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${asset_type}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
convert "${THEME_DIR}/${theme}/background.jpg" -resize ${custom_resolution}^ -gravity center -extent ${custom_resolution} "${THEME_DIR}/${theme}/background.jpg"
else
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${screen}.txt" "${THEME_DIR}/${theme}/theme.txt"
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
fi
# Use custom background.jpg as grub background image
if [[ -f "${REO_DIR}/background.jpg" ]]; then
prompt -w "\n Using custom background.jpg as grub background image..."
@@ -106,7 +135,13 @@ generate() {
convert -auto-orient "${THEME_DIR}/${theme}/background.jpg" "${THEME_DIR}/${theme}/background.jpg"
fi
if [[ ${screen} == 'ultrawide' ]]; then
# Determine which assets to use based on custom resolution or screen
if [[ -n "$custom_resolution" ]]; then
asset_type=$(get_asset_type "$custom_resolution")
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/icons-${asset_type}" "${THEME_DIR}/${theme}/icons"
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-select/select-${asset_type}/"*.png "${THEME_DIR}/${theme}"
cp -a --no-preserve=ownership "${REO_DIR}/assets/info-${asset_type}.png" "${THEME_DIR}/${theme}/info.png"
elif [[ ${screen} == 'ultrawide' ]]; then
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/icons-1080p" "${THEME_DIR}/${theme}/icons"
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-select/select-1080p/"*.png "${THEME_DIR}/${theme}"
cp -a --no-preserve=ownership "${REO_DIR}/assets/info-1080p.png" "${THEME_DIR}/${theme}/info.png"
@@ -186,7 +221,9 @@ install() {
fi
# Make sure the right resolution for grub is set
if [[ ${screen} == '1080p' ]]; then
if [[ -n "$custom_resolution" ]]; then
gfxmode="GRUB_GFXMODE=${custom_resolution},auto"
elif [[ ${screen} == '1080p' ]]; then
gfxmode="GRUB_GFXMODE=1920x1080,auto"
elif [[ ${screen} == 'ultrawide' ]]; then
gfxmode="GRUB_GFXMODE=2560x1080,auto"
@@ -645,6 +682,11 @@ while [[ $# -gt 0 ]]; do
esac
done
;;
-c|--custom-resolution)
shift
custom_resolution="$1"
shift
;;
-h|--help)
usage
exit 0