mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
New Feature : Setting Default TTY Fonts to Terminus Fonts (#698)
* Terminus Fonts TTY Setup * Update the dectection of the Terminus Fonts * Undo the Commit * Update Fedora Path * Fixing Fedora issues * Fix Fedora issues * Switch to another method * Fix Debian Message and Add Change to Terminus Font after Applied * Update tty command * Randomly trying things to see if it work or not * Adding Debug messages * Remove Debug Command and specifiy tty terminal * Fix the setfont issue * Set only tty1 to terminus font * Execute using sudo * Remove Debug Messages * Add comment for easy to understand * Update core/tabs/system-setup/tab_data.toml Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/system-setup/tab_data.toml Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update the Docs and Fixing the Typo by @adamperkowski * From Utilitys to System Setup * Update core/tabs/system-setup/tab_data.toml Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Remove Comments --------- Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
This commit is contained in:
parent
f85074f065
commit
6c08422615
|
@ -100,3 +100,9 @@ name = "Remove Snaps"
|
|||
description = "This script is designed to remove snap"
|
||||
script = "remove-snaps.sh"
|
||||
task_list = "RP"
|
||||
|
||||
[[data]]
|
||||
name = "TTY Fonts"
|
||||
description = "This Script will set the default TTY font to Terminus size 32 Bold"
|
||||
script = "terminus-tty.sh"
|
||||
task_list = "I PFM"
|
||||
|
|
62
core/tabs/system-setup/terminus-tty.sh
Executable file
62
core/tabs/system-setup/terminus-tty.sh
Executable file
|
@ -0,0 +1,62 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ../common-script.sh
|
||||
InstallTermiusFonts() {
|
||||
if [ ! -f "/usr/share/kbd/consolefonts/ter-c18b.psf.gz" ] &&
|
||||
[ ! -f "/usr/share/consolefonts/Uni3-TerminusBold18x10.psf.gz" ] &&
|
||||
[ ! -f "/usr/lib/kbd/consolefonts/ter-p32n.psf.gz" ]; then
|
||||
printf "%b\n" "${YELLOW}Installing Terminus Fonts...${RC}"
|
||||
case "$PACKAGER" in
|
||||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm terminus-font
|
||||
;;
|
||||
apt-get|nala)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y fonts-terminus
|
||||
;;
|
||||
dnf)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y terminus-fonts-console
|
||||
;;
|
||||
esac
|
||||
else
|
||||
printf "%b\n" "${GREEN}Terminus Fonts is already installed.${RC}"
|
||||
fi
|
||||
}
|
||||
|
||||
SetTermiusFonts() {
|
||||
case "$DTYPE" in
|
||||
arch)
|
||||
printf "%b\n" "${YELLOW}Updating FONT= line in /etc/vconsole.conf...${RC}"
|
||||
"$ESCALATION_TOOL" sed -i 's/^FONT=.*/FONT=ter-v32b/' /etc/vconsole.conf
|
||||
if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
|
||||
"$ESCALATION_TOOL" setfont -C /dev/tty1 ter-v32b
|
||||
fi
|
||||
printf "%b\n" "${GREEN}Terminus font set for TTY.${RC}"
|
||||
;;
|
||||
debian)
|
||||
|
||||
printf "%b\n" "${YELLOW}Updating console-setup configuration...${RC}"
|
||||
"$ESCALATION_TOOL" sed -i 's/^CODESET=.*/CODESET="guess"/' /etc/default/console-setup
|
||||
"$ESCALATION_TOOL" sed -i 's/^FONTFACE=.*/FONTFACE="TerminusBold"/' /etc/default/console-setup
|
||||
"$ESCALATION_TOOL" sed -i 's/^FONTSIZE=.*/FONTSIZE="16x32"/' /etc/default/console-setup
|
||||
printf "%b\n" "${GREEN}Console-setup configuration updated for Terminus font.${RC}"
|
||||
# Editing console-setup requires initramfs to be regenerated
|
||||
"$ESCALATION_TOOL" update-initramfs -u
|
||||
if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
|
||||
"$ESCALATION_TOOL" setfont -C /dev/tty1 /usr/share/consolefonts/Uni3-TerminusBold32x16.psf.gz
|
||||
fi
|
||||
printf "%b\n" "${GREEN}Terminus font has been set for TTY.${RC}"
|
||||
;;
|
||||
fedora)
|
||||
printf "%b\n" "${YELLOW}Updating FONT= line in /etc/vconsole.conf...${RC}"
|
||||
"$ESCALATION_TOOL" sed -i 's/^FONT=.*/FONT=ter-v32b/' /etc/vconsole.conf
|
||||
if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
|
||||
"$ESCALATION_TOOL" setfont -C /dev/tty1 ter-v32b
|
||||
fi
|
||||
printf "%b\n" "${GREEN}Terminus font has been set for TTY.${RC}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
checkEnv
|
||||
InstallTermiusFonts
|
||||
SetTermiusFonts
|
|
@ -8,6 +8,7 @@
|
|||
- **Gaming Setup**: Configures Steam, Lutris, etc.
|
||||
- **Global Theming**: Sets up and manages global themes.
|
||||
- **Remove Snaps**: Removes snap packages.
|
||||
- **TTY Fonts**: This Script will set the default TTY font to Terminus size 32 Bold
|
||||
|
||||
### Arch Setup
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user