Move to using kernel options
This commit is contained in:
parent
506b9f2ec9
commit
546beb372b
8 changed files with 172 additions and 164 deletions
23
README.md
23
README.md
|
@ -34,17 +34,32 @@
|
|||
</details>
|
||||
|
||||
## Usage
|
||||
### Read before installing
|
||||
Installing multiple times will result in the first theme you installed overriding the others. To uninstall or install a new theme simply remove the first line of `/etc/issue`
|
||||
|
||||
1. Clone this repo.
|
||||
2. Run `./build.sh`
|
||||
3. Run `./install.sh <theme>` (eg `./install.sh mocha`)
|
||||
2. Run `./generate.sh <theme>` (eg `./generate.sh mocha`)
|
||||
3. Copy the text it outputs and set it in your kernel options
|
||||
4. Restart your computer!
|
||||
|
||||
### GRUB
|
||||
|
||||
Edit `/etc/default/grub` and append to the `GRUB_CMDLINE_LINUX` string
|
||||
|
||||
### systemd-boot
|
||||
|
||||
Edit the boot entry located in `/boot/loader/entries/` and append to the line starting with `options`
|
||||
|
||||
### Limine
|
||||
|
||||
Edit `/boot/limine.cfg` and append to the `CMDLINE` line of the entry
|
||||
|
||||
### Other
|
||||
|
||||
For other bootloaders or for more information, [see here on ArchWiki](https://wiki.archlinux.org/title/Kernel_parameters)
|
||||
|
||||
## 💝 Thanks to
|
||||
|
||||
- [Echo](https://github.com/CallMeEchoCodes)
|
||||
- [mekb](https://github.com/mekb-turtle)
|
||||
|
||||
|
||||
|
||||
|
|
11
build.sh
11
build.sh
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
ScriptDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
mkdir "$ScriptDir/dist" &>/dev/null
|
||||
rm -f "$ScriptDir/dist/*"
|
||||
|
||||
"$ScriptDir/src/frappe.sh" >> "$ScriptDir/dist/frappe"
|
||||
"$ScriptDir/src/latte.sh" >> "$ScriptDir/dist/latte"
|
||||
"$ScriptDir/src/macchiato.sh" >> "$ScriptDir/dist/macchiato"
|
||||
"$ScriptDir/src/mocha.sh" >> "$ScriptDir/dist/mocha"
|
||||
|
41
generate.sh
Executable file
41
generate.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
ProgName="$(basename -- "$0")"
|
||||
ScriptDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
sub_help() {
|
||||
echo "Usage: $ProgName <theme>"
|
||||
echo "Available themes:"
|
||||
echo " mocha"
|
||||
echo " macchiato"
|
||||
echo " latte"
|
||||
echo " frappe"
|
||||
}
|
||||
|
||||
subcommand="$1"
|
||||
case "$subcommand" in
|
||||
"" | "-h" | "--help")
|
||||
sub_help
|
||||
exit
|
||||
;;
|
||||
mocha | macchiato | latte | frappe)
|
||||
. "${ScriptDir}/src/${subcommand}.sh" || exit 1
|
||||
default_red=()
|
||||
default_grn=()
|
||||
default_blu=()
|
||||
IFS=','
|
||||
for i in "${colors[@]}"; do
|
||||
read -r r g b <<< "$i"
|
||||
default_red+=("$r")
|
||||
default_grn+=("$g")
|
||||
default_blu+=("$b")
|
||||
done
|
||||
echo "vt.default_red=${default_red[*]} vt.default_grn=${default_grn[*]} vt.default_blu=${default_blu[*]}"
|
||||
unset IFS
|
||||
;;
|
||||
*)
|
||||
echo "Error: '$subcommand' is not a known theme." >&2
|
||||
echo "Run '$ProgName --help' for help." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
40
install.sh
40
install.sh
|
@ -1,40 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
ProgName="$(basename -- "$0")"
|
||||
ScriptDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
sub_help() {
|
||||
echo "Usage: $ProgName <theme>"
|
||||
}
|
||||
|
||||
sub_mocha() {
|
||||
sudo sed -i "1s/^/$(cat "$ScriptDir/dist/mocha")\n/" /etc/issue
|
||||
}
|
||||
|
||||
sub_macchiato() {
|
||||
sudo sed -i "1s/^/$(cat "$ScriptDir/dist/macchiato")\n/" /etc/issue
|
||||
}
|
||||
|
||||
sub_latte() {
|
||||
sudo sed -i "1s/^/$(cat "$ScriptDir/dist/latte")\n/" /etc/issue
|
||||
}
|
||||
|
||||
sub_frappe() {
|
||||
sudo sed -i "1s/^/$(cat "$ScriptDir/dist/frappe")\n/" /etc/issue
|
||||
}
|
||||
|
||||
subcommand=$1
|
||||
case $subcommand in
|
||||
"" | "-h" | "--help")
|
||||
sub_help
|
||||
;;
|
||||
*)
|
||||
shift
|
||||
sub_"${subcommand}" "$@"
|
||||
if [ $? = 127 ]; then
|
||||
echo "Error: '$subcommand' is not a known subcommand." >&2
|
||||
echo " Run '$ProgName --help' for a list of known subcommands." >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
|
@ -1,28 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
printf %b '\e]P0303446' # set background color to "Base"
|
||||
printf %b '\e]P8626880' # set bright black to "Surface2"
|
||||
|
||||
printf %b '\e]P7C6D0F5' # set text color to "Text"
|
||||
printf %b '\e]PFA5ADCE' # set bright white to "Subtext0"
|
||||
|
||||
printf %b '\e]P1E78284' # set red to "Red"
|
||||
printf %b '\e]P9E78284' # set bright red to "Red"
|
||||
|
||||
printf %b '\e]P2A6D189' # set green to "Green"
|
||||
printf %b '\e]PAA6D189' # set bright green to "Green"
|
||||
|
||||
printf %b '\e]P3E5C890' # set yellow to "Yellow"
|
||||
printf %b '\e]PBE5C890' # set bright yellow to "Yellow"
|
||||
|
||||
printf %b '\e]P48CAAEE' # set blue to "Blue"
|
||||
printf %b '\e]PC8CAAEE' # set bright blue to "Blue"
|
||||
|
||||
printf %b '\e]P5F4B8E4' # set magenta to "Pink"
|
||||
printf %b '\e]PDF4B8E4' # set bright magenta to "Pink"
|
||||
|
||||
printf %b '\e]P681C8BE' # set cyan to "Teal"
|
||||
printf %b '\e]PE81C8BE' # set bright cyan to "Teal"
|
||||
|
||||
clear
|
||||
|
||||
#!/bin/bash
|
||||
rosewater=242,213,207
|
||||
flamingo=238,190,190
|
||||
pink=244,184,228
|
||||
mauve=202,158,230
|
||||
red=231,130,132
|
||||
maroon=234,153,156
|
||||
peach=239,159,118
|
||||
yellow=229,200,144
|
||||
green=166,209,137
|
||||
teal=129,200,190
|
||||
sky=153,209,219
|
||||
sapphire=133,193,220
|
||||
blue=140,170,238
|
||||
lavender=186,187,241
|
||||
text=198,208,245
|
||||
subtext1=181,191,226
|
||||
subtext0=165,173,206
|
||||
overlay2=148,156,187
|
||||
overlay1=131,139,167
|
||||
overlay0=115,121,148
|
||||
surface2=98,104,128
|
||||
surface1=81,87,109
|
||||
surface0=65,69,89
|
||||
base=48,52,70
|
||||
mantle=41,44,60
|
||||
crust=35,38,52
|
||||
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext1" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0")
|
||||
|
|
55
src/latte.sh
55
src/latte.sh
|
@ -1,27 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
printf %b '\e]P0EFF1F5' # set background color to "Base"
|
||||
printf %b '\e]P86C6F85' # set bright black to "Subtext0"
|
||||
|
||||
printf %b '\e]P74C4F69' # set text color to "Text"
|
||||
printf %b '\e]PFBCC0CC' # set bright white to "Surface1"
|
||||
|
||||
printf %b '\e]P1D20F39' # set red to "Red"
|
||||
printf %b '\e]P9D20F39' # set bright red to "Red"
|
||||
|
||||
printf %b '\e]P240A02B' # set green to "Green"
|
||||
printf %b '\e]PA40A02B' # set bright green to "Green"
|
||||
|
||||
printf %b '\e]P3DF8E1D' # set yellow to "Yellow"
|
||||
printf %b '\e]PBDF8E1D' # set bright yellow to "Yellow"
|
||||
|
||||
printf %b '\e]P41E66F5' # set blue to "Blue"
|
||||
printf %b '\e]PC1E66F5' # set bright blue to "Blue"
|
||||
|
||||
printf %b '\e]P5EA76CB' # set magenta to "Pink"
|
||||
printf %b '\e]PDEA76CB' # set bright magenta to "Pink"
|
||||
|
||||
printf %b '\e]P6179299' # set cyan to "Teal"
|
||||
printf %b '\e]PE179299' # set bright cyan to "Teal"
|
||||
|
||||
clear
|
||||
#!/bin/bash
|
||||
rosewater=220,138,120
|
||||
flamingo=221,120,120
|
||||
pink=234,118,203
|
||||
mauve=136,57,239
|
||||
red=210,15,57
|
||||
maroon=230,69,83
|
||||
peach=254,100,11
|
||||
yellow=223,142,29
|
||||
green=64,160,43
|
||||
teal=23,146,153
|
||||
sky=4,165,229
|
||||
sapphire=32,159,181
|
||||
blue=30,102,245
|
||||
lavender=114,135,253
|
||||
text=76,79,105
|
||||
subtext1=92,95,119
|
||||
subtext0=108,111,133
|
||||
overlay2=124,127,147
|
||||
overlay1=140,143,161
|
||||
overlay0=156,160,176
|
||||
surface2=172,176,190
|
||||
surface1=188,192,204
|
||||
surface0=204,208,218
|
||||
base=239,241,245
|
||||
mantle=230,233,239
|
||||
crust=220,224,232
|
||||
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$text")
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
printf %b '\e]P024273A' # set background color to "Base"
|
||||
printf %b '\e]P85B6078' # set bright black to "Surface2"
|
||||
|
||||
printf %b '\e]P7CAD3F5' # set text color to "Text"
|
||||
printf %b '\e]PFA5ADCB' # set bright white to "Subtext0"
|
||||
|
||||
printf %b '\e]P1ED8796' # set red to "Red"
|
||||
printf %b '\e]P9ED8796' # set bright red to "Red"
|
||||
|
||||
printf %b '\e]P2A6DA95' # set green to "Green"
|
||||
printf %b '\e]PAA6DA95' # set bright green to "Green"
|
||||
|
||||
printf %b '\e]P3EED49f' # set yellow to "Yellow"
|
||||
printf %b '\e]PBEED49f' # set bright yellow to "Yellow"
|
||||
|
||||
printf %b '\e]P48AADF4' # set blue to "Blue"
|
||||
printf %b '\e]PC8AADF4' # set bright blue to "Blue"
|
||||
|
||||
printf %b '\e]P5F5BDE6' # set magenta to "Pink"
|
||||
printf %b '\e]PDF5BDE6' # set bright magenta to "Pink"
|
||||
|
||||
printf %b '\e]P68BD5CA' # set cyan to "Teal"
|
||||
printf %b '\e]PE8BD5CA' # set bright cyan to "Teal"
|
||||
|
||||
clear
|
||||
#!/bin/bash
|
||||
rosewater=244,219,214
|
||||
flamingo=240,198,198
|
||||
pink=245,189,230
|
||||
mauve=198,160,246
|
||||
red=237,135,150
|
||||
maroon=238,153,160
|
||||
peach=245,169,127
|
||||
yellow=238,212,159
|
||||
green=166,218,149
|
||||
teal=139,213,202
|
||||
sky=145,215,227
|
||||
sapphire=125,196,228
|
||||
blue=138,173,244
|
||||
lavender=183,189,248
|
||||
text=202,211,245
|
||||
subtext1=184,192,224
|
||||
subtext0=165,173,203
|
||||
overlay2=147,154,183
|
||||
overlay1=128,135,162
|
||||
overlay0=110,115,141
|
||||
surface2=91,96,120
|
||||
surface1=73,77,100
|
||||
surface0=54,58,79
|
||||
base=36,39,58
|
||||
mantle=30,32,48
|
||||
crust=24,25,38
|
||||
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext1" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0")
|
||||
|
|
55
src/mocha.sh
55
src/mocha.sh
|
@ -1,27 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
printf %b '\e]P01E1E2E' # set background color to "Base"
|
||||
printf %b '\e]P8585B70' # set bright black to "Surface2"
|
||||
|
||||
printf %b '\e]P7BAC2DE' # set text color to "Text"
|
||||
printf %b '\e]PFA6ADC8' # set bright white to "Subtext0"
|
||||
|
||||
printf %b '\e]P1F38BA8' # set red to "Red"
|
||||
printf %b '\e]P9F38BA8' # set bright red to "Red"
|
||||
|
||||
printf %b '\e]P2A6E3A1' # set green to "Green"
|
||||
printf %b '\e]PAA6E3A1' # set bright green to "Green"
|
||||
|
||||
printf %b '\e]P3F9E2AF' # set yellow to "Yellow"
|
||||
printf %b '\e]PBF9E2AF' # set bright yellow to "Yellow"
|
||||
|
||||
printf %b '\e]P489B4FA' # set blue to "Blue"
|
||||
printf %b '\e]PC89B4FA' # set bright blue to "Blue"
|
||||
|
||||
printf %b '\e]P5F5C2E7' # set magenta to "Pink"
|
||||
printf %b '\e]PDF5C2E7' # set bright magenta to "Pink"
|
||||
|
||||
printf %b '\e]P694E2D5' # set cyan to "Teal"
|
||||
printf %b '\e]PE94E2D5' # set bright cyan to "Teal"
|
||||
|
||||
clear
|
||||
#!/bin/bash
|
||||
rosewater=245,224,220
|
||||
flamingo=242,205,205
|
||||
pink=245,194,231
|
||||
mauve=203,166,247
|
||||
red=243,139,168
|
||||
maroon=235,160,172
|
||||
peach=250,179,135
|
||||
yellow=249,226,175
|
||||
green=166,227,161
|
||||
teal=148,226,213
|
||||
sky=137,220,235
|
||||
sapphire=116,199,236
|
||||
blue=137,180,250
|
||||
lavender=180,190,254
|
||||
text=205,214,244
|
||||
subtext1=186,194,222
|
||||
subtext0=166,173,200
|
||||
overlay2=147,153,178
|
||||
overlay1=127,132,156
|
||||
overlay0=108,112,134
|
||||
surface2=88,91,112
|
||||
surface1=69,71,90
|
||||
surface0=49,50,68
|
||||
base=30,30,46
|
||||
mantle=24,24,37
|
||||
crust=17,17,27
|
||||
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext1" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0")
|
||||
|
|
Loading…
Reference in a new issue