Skip to content

Commit

Permalink
Make it more explicit that matter is being executed on grub updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mateosss committed Jan 19, 2021
1 parent 21ff16f commit bbeef1d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Matter/theme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
title-text: ""
# desktop-image: "background.png"
desktop-color: "#263238"
terminal-font: "Unifont Regular 16"
terminal-font: "default" # a random name to let the default font for the console
terminal-box: "terminal_box_*.png"
terminal-left: "0"
terminal-top: "0"
Expand All @@ -25,9 +25,9 @@ terminal-border: "0"
top = 29%
width = 28%
height = 60%
item_font = "GoogleSans Regular 32"
item_color = "#cccccc"
selected_item_color = "#E91E63"
item_font = "Google Sans Regular 32"
item_color = "#ffffff"
selected_item_color = "#e91e63"
icon_width = 72
icon_height = 72
item_height = 72
Expand All @@ -43,6 +43,6 @@ terminal-border: "0"
align = "center"
id = "__timeout__"
text = "Booting in %d seconds"
color = "#cccccc"
font = "GoogleSans Regular 32"
color = "#ffffff"
font = "Google Sans Regular 32"
}
7 changes: 5 additions & 2 deletions hookcheck.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@ BEGIN_THEME_OVERRIDES = "{BEGIN_THEME_OVERRIDES}"
END_THEME_OVERRIDES = "{END_THEME_OVERRIDES}"
SETICONS_CALL = "{SETICONS_CALL}"


cyan = "\033[36m"
pink = "\033[38;5;206m"
endcolor ="\033[0m"
def info(msg):
# info with cyan [I]
print(f"\033[36m[I]\033[0m {{msg}}", file=stderr)
print(f"{{cyan}}[I]{{endcolor}} {{msg}}", file=stderr)


def sh(command):
"Executes command in shell and returns its exit status"
return run(command, shell=True).returncode

info(f"{{pink}}[Matter]{{endcolor}} Setting entry icons")

with open(GRUB_MKCONFIG_PATH, "r", newline="") as f:
grub_mkconfig = f.read()
Expand Down
9 changes: 7 additions & 2 deletions matter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
def color_string(string, fg=None):
COLORS = { # List some colors that may be needed
"red": "\033[31m",
"pink": "\033[38;5;206m",
"green": "\033[32m",
"orange": "\033[33m",
"blue": "\033[34m",
Expand All @@ -35,6 +36,8 @@ def color_string(string, fg=None):
"yellow": "\033[93m",
"lightblue": "\033[94m",
"lightcyan": "\033[96m",
"brightwhite": "\u001b[37;1m",
"brightmagenta": "\u001b[35;1m",
}
endcolor = "\033[0m"
return f"{COLORS.get(fg, '')}{string}{endcolor}"
Expand Down Expand Up @@ -478,8 +481,10 @@ def get_entry_names(grub_cfg):

def do_preinstall_hint():
info(
f"[{color_string(THEME_NAME.upper(), fg='pink')} "
f"{color_string('Grub Theme'.upper(), fg='orange')}]"
f"{color_string('[ ', fg='brightwhite')}"
f"{color_string(THEME_NAME, fg='brightmagenta')} "
f"{color_string('Grub Theme'.upper(), fg='lightcyan')}"
f"{color_string(' ]', fg='brightwhite')}"
)
info("Argument -i required. Which icons go to which grub entries?.")
info("Your grub entries are:")
Expand Down

0 comments on commit bbeef1d

Please sign in to comment.