summaryrefslogtreecommitdiff
path: root/libre/grub/0001-00_header-add-GRUB_COLOR_-variables.patch
blob: b93232a4170c91950c96aa881dba2aa6ecde4d92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 7d7aba5cc8f978ce8f14c4d040fc6ef70b4a14db Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 10 Mar 2021 18:42:25 +0100
Subject: [PATCH 1/4] 00_header: add GRUB_COLOR_* variables

Based on the following downstream commits:

 - https://gitlab.archlinux.org/archlinux/packaging/packages/grub/-/commit/514d26f6eb551b33974a7f05bbc70009f7081a1b
 - https://gitlab.archlinux.org/archlinux/packaging/packages/grub/-/commit/fa9d34525f424546cf83cf396ef7d6d4b817640b
 - https://gitlab.archlinux.org/archlinux/packaging/packages/grub/-/commit/34aabe57e67b8951448b8210ba2fd1b41ac6d19f

Co-Authored-By: Tobias Powalowski <tpowa@archlinux.org> (2013)
Co-Authored-By: Christian Hesse <eworm@archlinux.org> (2021)
---
 util/grub-mkconfig.in    | 2 ++
 util/grub.d/00_header.in | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 32c480dae..1a945085c 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -250,6 +250,8 @@ export GRUB_DEFAULT \
   GRUB_BACKGROUND \
   GRUB_THEME \
   GRUB_GFXPAYLOAD_LINUX \
+  GRUB_COLOR_NORMAL \
+  GRUB_COLOR_HIGHLIGHT \
   GRUB_INIT_TUNE \
   GRUB_SAVEDEFAULT \
   GRUB_ENABLE_CRYPTODISK \
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index 6a316a5ba..6816e09d4 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -125,6 +125,14 @@ cat <<EOF
 
 EOF
 
+if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then
+    cat << EOF
+set menu_color_normal=$GRUB_COLOR_NORMAL
+set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT
+
+EOF
+fi
+
 serial=0;
 gfxterm=0;
 for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
-- 
2.43.0