Skip to content

Commit

Permalink
v1.8.1 - New theme installer
Browse files Browse the repository at this point in the history
v1.8.1
  • Loading branch information
1337kid committed Oct 19, 2023
2 parents c5f64f9 + 8e52bc1 commit d87dbe0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions NoiceGRUB.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from rich.markdown import Markdown
from rich.prompt import IntPrompt,Confirm
from rich.panel import Panel
import subprocess,os
import os

console = Console()

Expand All @@ -33,6 +33,6 @@
if Confirm.ask('[yellow bold]Do you want to place the generated theme in /boot/grub/themes/[/yellow bold]'):
richprint('\n[green bold]Executing scripts/install.sh ... [/green bold]')
os.system('chmod +x ./scripts/install.sh')
subprocess.run(['sudo','./scripts/install.sh'],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
os.system('sudo ./scripts/install.sh')
richprint('[green bold]Done')
richprint('[green bold]Thankyou for using NoiceGRUB[/green bold]')
2 changes: 1 addition & 1 deletion noicegrub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ def preset_table():
8 `b8 8 8 8 8 . 8. 8 8 8 8 8 8 8 8
8 `8 `YooP' 8 `YooP' `Yooo' `YooP8 8 8 `YooP' 8oooP'
..:::..:.....::..:.....::.....::....8 :..:::..:.....::......:
:::::::: @1337kid ::::::::::::::::::8 ::::::: v1.8 ::::::::::\n'''
:::::::: @1337kid ::::::::::::::::::8 ::::::: v1.8.1 :::::::::\n'''
16 changes: 15 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
#!/bin/bash
printf "\033[94m\033[1m"
cat <<EOF
_ _ _ _
___ ___|_|___ ___ ___ ___ _ _| |_ _ _ ___ _| | |_
| | . | | _| -_| . | _| | | . | | | . | . | _|
|_|_|___|_|___|___|_ |_| |___|___|___| _|___|_|
|___| |_|
NoiceGRUB Theme Installer v1.2
EOF

if [[ $(id -u) != "0" ]]
then
echo "Current user does not have root perms"
printf "\033[91mCurrent user does not have root perms\n"
exit
fi

printf "\033[92m[+] \033[94mCreating /boot/grub/themes/noicegrub\n"
mkdir -p /boot/grub/themes/noicegrub
printf "\033[92m[+] \033[94mCopying files\n"
cp ./export/* /boot/grub/themes/noicegrub
sed -i 's/.*GRUB_THEME=.*//' /etc/default/grub
echo "GRUB_THEME=/boot/grub/themes/noicegrub/theme.txt" >> /etc/default/grub
printf "\033[92m[+] \033[94mRunning update-grub\n\033[92m"
update-grub

0 comments on commit d87dbe0

Please sign in to comment.