You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am often frustrated when trying to install Nerd Fonts on multiple Linux distributions because it requires manual downloading, unpacking, and moving fonts to the appropriate directories. This process can vary across systems due to different package managers and configurations. Additionally, users who want to install multiple fonts must repeat these steps manually for each one.
I would like to see a Nerd Fonts installer integrated into linutil that automates the installation of multiple Nerd Fonts on any Linux distribution. The feature should:
Automatically detect the user's operating system and use the appropriate package manager to install necessary dependencies like wget and tar.
Provide a user-friendly prompt for selecting which Nerd Fonts to install from a comprehensive list.
Download the selected fonts, extract them to the user's local fonts directory, and refresh the system font cache.
Be compatible with the existing linutil structure, using helper functions from common-script.sh for dependency checking and environmental setup.
Alternatives to this automated approach include:
Manually downloading and installing fonts from the official Nerd Fonts GitHub repository, which can be tedious and error-prone.
Using external font management tools, but these often do not integrate well with existing systems or are overly complex for users who just want to install a few fonts.
Neither of these alternatives provides the convenience and integration that a dedicated feature within linutil would offer.
The script should work seamlessly with different Linux distributions and package managers, leveraging linutil’s modular design to ensure compatibility across systems. It should also provide feedback to the user at each step, ensuring transparency during the installation process.
Example output for selecting and installing fonts:
Select fonts to install (separate with spaces):
---------------------------------------------
0 - 0xProto Nerd Font
1 - 3270 Nerd Font
2 - Agave Nerd Font
3 - AnonymicePro Nerd Font
4 - Arimo Nerd Font
...
---------------------------------------------
Enter the numbers of the fonts to install (e.g., '0 1 2'): 1 3 4
Downloading and installing 3270 Nerd Font...
Downloading and installing AnonymicePro Nerd Font...
Downloading and installing Arimo Nerd Font...
Fonts installed and cache updated.
Script:
```sh#!/bin/sh -e# Import common utilities. ./common-script.sh# Function to prompt user for font selectionprompt_font_selection() { fonts=("0xProto Nerd Font""3270 Nerd Font""Agave Nerd Font""AnonymicePro Nerd Font""Arimo Nerd Font""AurulentSansMono Nerd Font""BigBlueTerminal Nerd Font""BitstromWera Nerd Font""BlexMono Nerd Font""CaskaydiaCove Nerd Font""CaskaydiaMono Nerd Font""CodeNewRoman Nerd Font""ComicShannsMono Nerd Font""CommitMono Nerd Font""Cousine Nerd Font""D2Coding Nerd Font""DaddyTimeMono Nerd Font""DejaVuSansMono Nerd Font""DroidSansMono Nerd Font""EnvyCodeR Nerd Font""FantasqueSansMono Nerd Font""FiraCode Nerd Font""FiraMono Nerd Font""GeistMono Nerd Font""GoMono Nerd Font""Gohu Nerd Font""Hack Nerd Font""Hasklug Nerd Font""HeavyDataMono Nerd Font""Hurmit Nerd Font""iM-Writing Nerd Font""Inconsolata Nerd Font""InconsolataGo Nerd Font""Inconsolata LGC Nerd Font""IntoneMono Nerd Font""Iosevka Nerd Font""IosevkaTerm Nerd Font""IosevkaTermSlab Nerd Font""JetBrainsMono Nerd Font""Lekton Nerd Font""Literation Nerd Font""Lilex Nerd Font""MartianMono Nerd Font""Meslo Nerd Font""Monaspice Nerd Font""Monofur Nerd Font""Monoid Nerd Font""Mononoki Nerd Font""M+ Nerd Font""Noto Nerd Font""OpenDyslexic Nerd Font""Overpass Nerd Font""ProFont Nerd Font""ProggyClean Nerd Font""RecMono Nerd Font""RobotoMono Nerd Font""SauceCodePro Nerd Font""ShureTechMono Nerd Font""SpaceMono Nerd Font""Terminess Nerd Font""Tinos Nerd Font""Ubuntu Nerd Font""UbuntuMono Nerd Font""VictorMono Nerd Font""ZedMono Nerd Font" )echo"Select fonts to install (separate with spaces):"echo"---------------------------------------------"foriin"${!fonts[@]}";doecho"$i - ${fonts[i]}"doneecho"---------------------------------------------"read -rp "Enter the numbers of the fonts to install (e.g., '0 1 2'): " font_selectionecho"Fonts selected: $font_selection"}# Function to download and install the selected fontsdownload_and_install_fonts() {forselectionin$font_selection;do font=${fonts[$selection]} font_name=$(echo "$font"| awk '{print $1}')echo"Downloading and installing $font..."# Check if wget and tar are installed, using common-script.sh helper checkCommandRequirements "wget" checkCommandRequirements "tar"# Download the font wget -q --show-progress "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/$font_name.tar.xz" -P "$HOME/tmp"# Extract and install the font mkdir -p ~/.local/share/fonts tar -xf "$HOME/tmp/$font_name.tar.xz" -C "$HOME/.local/share/fonts" rm "$HOME/tmp/$font_name.tar.xz"done# Update the font cache fc-cache -vfecho"Fonts installed and cache updated."}# Function to check environment and dependenciescheck_environment() {echo"Checking environment..." checkEnv # Assuming this is a function from common-script.sh}# Main script executioncheck_environmentprompt_font_selectiondownload_and_install_fonts
This feature would greatly simplify font management and installation, providing a more streamlined experience for users of linutil.
The text was updated successfully, but these errors were encountered:
fam007e
changed the title
Nerd Fonts Installer Feature Request
Nerd Fonts Installer Feature Request #160
Sep 8, 2024
I am often frustrated when trying to install Nerd Fonts on multiple Linux distributions because it requires manual downloading, unpacking, and moving fonts to the appropriate directories. This process can vary across systems due to different package managers and configurations. Additionally, users who want to install multiple fonts must repeat these steps manually for each one.
I would like to see a Nerd Fonts installer integrated into linutil that automates the installation of multiple Nerd Fonts on any Linux distribution. The feature should:
wget
andtar
.common-script.sh
for dependency checking and environmental setup.Alternatives to this automated approach include:
Neither of these alternatives provides the convenience and integration that a dedicated feature within linutil would offer.
The script should work seamlessly with different Linux distributions and package managers, leveraging linutil’s modular design to ensure compatibility across systems. It should also provide feedback to the user at each step, ensuring transparency during the installation process.
Example output for selecting and installing fonts:
This feature would greatly simplify font management and installation, providing a more streamlined experience for users of linutil.
The text was updated successfully, but these errors were encountered: