Move to using kernel options

This commit is contained in:
mekb the turtle 2023-05-27 21:40:10 +10:00
parent 506b9f2ec9
commit 546beb372b
No known key found for this signature in database
GPG key ID: 39F3751CDD35BB5F
8 changed files with 172 additions and 164 deletions

View file

@ -34,17 +34,32 @@
</details> </details>
## Usage ## 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. 1. Clone this repo.
2. Run `./build.sh` 2. Run `./generate.sh <theme>` (eg `./generate.sh mocha`)
3. Run `./install.sh <theme>` (eg `./install.sh mocha`) 3. Copy the text it outputs and set it in your kernel options
4. Restart your computer! 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 ## 💝 Thanks to
- [Echo](https://github.com/CallMeEchoCodes) - [Echo](https://github.com/CallMeEchoCodes)
- [mekb](https://github.com/mekb-turtle)
&nbsp; &nbsp;

View file

@ -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
View 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

View file

@ -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

View file

@ -1,28 +1,28 @@
#!/usr/bin/env bash #!/bin/bash
rosewater=242,213,207
printf %b '\e]P0303446' # set background color to "Base" flamingo=238,190,190
printf %b '\e]P8626880' # set bright black to "Surface2" pink=244,184,228
mauve=202,158,230
printf %b '\e]P7C6D0F5' # set text color to "Text" red=231,130,132
printf %b '\e]PFA5ADCE' # set bright white to "Subtext0" maroon=234,153,156
peach=239,159,118
printf %b '\e]P1E78284' # set red to "Red" yellow=229,200,144
printf %b '\e]P9E78284' # set bright red to "Red" green=166,209,137
teal=129,200,190
printf %b '\e]P2A6D189' # set green to "Green" sky=153,209,219
printf %b '\e]PAA6D189' # set bright green to "Green" sapphire=133,193,220
blue=140,170,238
printf %b '\e]P3E5C890' # set yellow to "Yellow" lavender=186,187,241
printf %b '\e]PBE5C890' # set bright yellow to "Yellow" text=198,208,245
subtext1=181,191,226
printf %b '\e]P48CAAEE' # set blue to "Blue" subtext0=165,173,206
printf %b '\e]PC8CAAEE' # set bright blue to "Blue" overlay2=148,156,187
overlay1=131,139,167
printf %b '\e]P5F4B8E4' # set magenta to "Pink" overlay0=115,121,148
printf %b '\e]PDF4B8E4' # set bright magenta to "Pink" surface2=98,104,128
surface1=81,87,109
printf %b '\e]P681C8BE' # set cyan to "Teal" surface0=65,69,89
printf %b '\e]PE81C8BE' # set bright cyan to "Teal" base=48,52,70
mantle=41,44,60
clear crust=35,38,52
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext1" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0")

View file

@ -1,27 +1,28 @@
#!/usr/bin/env bash #!/bin/bash
rosewater=220,138,120
printf %b '\e]P0EFF1F5' # set background color to "Base" flamingo=221,120,120
printf %b '\e]P86C6F85' # set bright black to "Subtext0" pink=234,118,203
mauve=136,57,239
printf %b '\e]P74C4F69' # set text color to "Text" red=210,15,57
printf %b '\e]PFBCC0CC' # set bright white to "Surface1" maroon=230,69,83
peach=254,100,11
printf %b '\e]P1D20F39' # set red to "Red" yellow=223,142,29
printf %b '\e]P9D20F39' # set bright red to "Red" green=64,160,43
teal=23,146,153
printf %b '\e]P240A02B' # set green to "Green" sky=4,165,229
printf %b '\e]PA40A02B' # set bright green to "Green" sapphire=32,159,181
blue=30,102,245
printf %b '\e]P3DF8E1D' # set yellow to "Yellow" lavender=114,135,253
printf %b '\e]PBDF8E1D' # set bright yellow to "Yellow" text=76,79,105
subtext1=92,95,119
printf %b '\e]P41E66F5' # set blue to "Blue" subtext0=108,111,133
printf %b '\e]PC1E66F5' # set bright blue to "Blue" overlay2=124,127,147
overlay1=140,143,161
printf %b '\e]P5EA76CB' # set magenta to "Pink" overlay0=156,160,176
printf %b '\e]PDEA76CB' # set bright magenta to "Pink" surface2=172,176,190
surface1=188,192,204
printf %b '\e]P6179299' # set cyan to "Teal" surface0=204,208,218
printf %b '\e]PE179299' # set bright cyan to "Teal" base=239,241,245
mantle=230,233,239
clear crust=220,224,232
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$text")

View file

@ -1,27 +1,28 @@
#!/usr/bin/env bash #!/bin/bash
rosewater=244,219,214
printf %b '\e]P024273A' # set background color to "Base" flamingo=240,198,198
printf %b '\e]P85B6078' # set bright black to "Surface2" pink=245,189,230
mauve=198,160,246
printf %b '\e]P7CAD3F5' # set text color to "Text" red=237,135,150
printf %b '\e]PFA5ADCB' # set bright white to "Subtext0" maroon=238,153,160
peach=245,169,127
printf %b '\e]P1ED8796' # set red to "Red" yellow=238,212,159
printf %b '\e]P9ED8796' # set bright red to "Red" green=166,218,149
teal=139,213,202
printf %b '\e]P2A6DA95' # set green to "Green" sky=145,215,227
printf %b '\e]PAA6DA95' # set bright green to "Green" sapphire=125,196,228
blue=138,173,244
printf %b '\e]P3EED49f' # set yellow to "Yellow" lavender=183,189,248
printf %b '\e]PBEED49f' # set bright yellow to "Yellow" text=202,211,245
subtext1=184,192,224
printf %b '\e]P48AADF4' # set blue to "Blue" subtext0=165,173,203
printf %b '\e]PC8AADF4' # set bright blue to "Blue" overlay2=147,154,183
overlay1=128,135,162
printf %b '\e]P5F5BDE6' # set magenta to "Pink" overlay0=110,115,141
printf %b '\e]PDF5BDE6' # set bright magenta to "Pink" surface2=91,96,120
surface1=73,77,100
printf %b '\e]P68BD5CA' # set cyan to "Teal" surface0=54,58,79
printf %b '\e]PE8BD5CA' # set bright cyan to "Teal" base=36,39,58
mantle=30,32,48
clear crust=24,25,38
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext1" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0")

View file

@ -1,27 +1,28 @@
#!/usr/bin/env bash #!/bin/bash
rosewater=245,224,220
printf %b '\e]P01E1E2E' # set background color to "Base" flamingo=242,205,205
printf %b '\e]P8585B70' # set bright black to "Surface2" pink=245,194,231
mauve=203,166,247
printf %b '\e]P7BAC2DE' # set text color to "Text" red=243,139,168
printf %b '\e]PFA6ADC8' # set bright white to "Subtext0" maroon=235,160,172
peach=250,179,135
printf %b '\e]P1F38BA8' # set red to "Red" yellow=249,226,175
printf %b '\e]P9F38BA8' # set bright red to "Red" green=166,227,161
teal=148,226,213
printf %b '\e]P2A6E3A1' # set green to "Green" sky=137,220,235
printf %b '\e]PAA6E3A1' # set bright green to "Green" sapphire=116,199,236
blue=137,180,250
printf %b '\e]P3F9E2AF' # set yellow to "Yellow" lavender=180,190,254
printf %b '\e]PBF9E2AF' # set bright yellow to "Yellow" text=205,214,244
subtext1=186,194,222
printf %b '\e]P489B4FA' # set blue to "Blue" subtext0=166,173,200
printf %b '\e]PC89B4FA' # set bright blue to "Blue" overlay2=147,153,178
overlay1=127,132,156
printf %b '\e]P5F5C2E7' # set magenta to "Pink" overlay0=108,112,134
printf %b '\e]PDF5C2E7' # set bright magenta to "Pink" surface2=88,91,112
surface1=69,71,90
printf %b '\e]P694E2D5' # set cyan to "Teal" surface0=49,50,68
printf %b '\e]PE94E2D5' # set bright cyan to "Teal" base=30,30,46
mantle=24,24,37
clear crust=17,17,27
colors=("$base" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext1" "$surface2" "$red" "$green" "$yellow" "$blue" "$pink" "$teal" "$subtext0")