Provide Fedora support

This commit is contained in:
Elysia
2025-11-07 20:40:12 +08:00
parent 0f867df271
commit 1a58f1258a
5 changed files with 236 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
/*/*.tar.*
/*/pkg/
/*/src/
+12
View File
@@ -0,0 +1,12 @@
# Install scripts for Fedora Linux
- Synchronize all dependencies in arch.
- I've tested it on Fedora 43 (KDE Plasma Desktop Edition) on the x86_64 platform.
- If you have any questions, please submit them to the discussions section.
# Usage
- `git clone --recurse-submodules https://github.com/end-4/dots-hyprland ~/.cache/dots-hyprland`
- `cd ~/.cache/dots-hyprland`
- `./setup install`
After installation, you may be prompted to delete some font files; ignore that.
+91
View File
@@ -0,0 +1,91 @@
# This script is meant to be sourced.
# It's not for directly running.
if ! command -v dnf >/dev/null 2>&1; then
printf "${STY_RED}[$0]: dnf not found, it seems that the system is not Fedora 42 or later distros. Aborting...${STY_RST}\n"
exit 1
fi
# Update System
case $SKIP_SYSUPDATE in
true) sleep 0;;
*) v sudo dnf upgrade --refresh -y;;
esac
# Group installation
v sudo dnf install @development-tools -y
# COPR repositories
v sudo dnf copr enable solopasha/hyprland -y
v sudo dnf copr enable errornointernet/quickshell -y
v sudo dnf copr enable errornointernet/packages -y
v sudo dnf copr enable deltacopy/darkly -y
v sudo dnf copr enable alternateved/eza -y
v sudo dnf copr enable atim/starship -y
# Audio
v sudo dnf install cava pavucontrol wireplumber libdbusmenu-gtk3-devel playerctl -y
# Backlight
v sudo dnf install geoclue2 brightnessctl ddcutil -y
# Basic
v sudo dnf install bc coreutils cliphist cmake curl wget2 ripgrep jq xdg-utils rsync yq -y
# Fonts & Themes
themes_deps=(
adw-gtk3-theme breeze-cursor-theme grub2-breeze-theme breeze-icon-theme{,-fedora}
kf6-breeze-icons sddm-breeze darkly eza fish fontconfig kitty matugen starship
jetbrains-mono-nl-fonts material-icons-fonts twitter-twemoji-fonts
)
v sudo dnf install ${themes_deps[@]} -y
# Hyprland
hyprland_deps=(
hypridle hyprland-qtutils hyprland hyprlock hyprpicker
hyprsunset xdg-desktop-portal-hyprland wl-clipboard
)
v dnf download hyprland-qt-support
v sudo rpm -ivh --nodeps hyprland-qt-support-*.fc$(rpm -E %fedora).$(uname -m).rpm
# hyprland-qtutils depends on hyprland-qt-support, but since it does not yet support Qt 6.10, this package has been temporarily removed.
v sudo dnf install --setopt="install_weak_deps=False" "${hyprland_deps[@]}" -y
# KDE
v sudo dnf install bluedevil gnome-keyring NetworkManager plasma-nm polkit-kde dolphin plasma-systemsettings -y
# Microtex-git
v sudo dnf install --setopt="install_weak_deps=False" tinyxml2-devel gtkmm3.0-devel gtksourceviewmm3-devel cairomm-devel -y
# Portal
v sudo dnf install xdg-desktop-portal{,-gtk,-kde,-hyprland} -y
# Python
v sudo dnf install --setopt="install_weak_deps=False" clang uv gtk4-devel libadwaita-devel \
libsoup3-devel libportal-gtk4 gobject-introspection-devel -y
v sudo dnf install python3{,.12}{,-devel} -y
# Quickshell-git
quickshell_deps=(
quickshell-git qt6-qtdeclarative qt6-qtbase jemalloc qt6-qtsvg pipewire-libs
libxcb wayland-devel qt6-qtwayland qt5-qtwayland libdrm breakpad
)
# NOTE: Below are custom dependencies of illogical-impulse
quickshell_custom_deps=(
qt6-qt5compat qt6-qtimageformats qt6-qtpositioning
qt6-qtquicktimeline qt6-qtsensors qt6-qttools qt6-qttranslations
qt6-qtvirtualkeyboard qt6-qtwayland kdialog kf6-syntax-highlighting
)
v sudo dnf install "${quickshell_deps[@]}" -y
v sudo dnf install "${quickshell_custom_deps[@]}" -y
# Screencapture
v sudo dnf install hyprshot slurp swappy tesseract tesseract-langpack-eng tesseract-langpack-chi_sim wf-recorder -y
# Toolkit
v sudo dnf install upower wtype ydotool -y
# Widgets
v sudo dnf install fuzzel glib2 ImageMagick hypridle hyprlock hyprpicker songrec translate-shell wlogout -y
# Extra
v sudo dnf install --setopt="install_weak_deps=False" mpvpaper plasma-systemmonitor unzip -y
+129
View File
@@ -0,0 +1,129 @@
# This script is meant to be sourced.
# It's not for directly running.
install_Font() {
local FONT_NAME="${FUNCNAME[2]#install_}"
local CACHE_DIR="$REPO_ROOT/cache/${FONT_NAME:-noname}/"
local LOCAL_FONT_DIR="/usr/local/share/fonts/${1^^}/${FONT_NAME:-noname}/"
local LOCAL_FONT_LICENSES_DIR="/usr/local/share/licenses/${FONT_NAME:-noname}/"
local DL_FILE
x mkdir -p "$CACHE_DIR"
x wget --content-disposition -q -N -P "$CACHE_DIR" "$2"
mapfile -t -d '' files < <(find "$CACHE_DIR" -maxdepth 1 -type f -print0)
DL_FILE="${files[0]}"
x wget -q -N -O "$CACHE_DIR/LICENSE" "$3"
x sudo mkdir -p "$LOCAL_FONT_DIR"
x sudo mkdir -p "$LOCAL_FONT_LICENSES_DIR"
x sudo cp "$CACHE_DIR/LICENSE" "$LOCAL_FONT_LICENSES_DIR"
x sudo cp "$CACHE_DIR"/*.$1 "$LOCAL_FONT_DIR"
x fc-cache -fv
}
install_ttf_material_symbols_variable() {
local ttf_material_symbols_variable="https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsRounded%5BFILL,GRAD,opsz,wght%5D.ttf"
local ttf_material_symbols_variable_license="https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/LICENSE"
showfun install_Font
x install_Font ttf "$ttf_material_symbols_variable" "$ttf_material_symbols_variable_license"
}
install_JetBrainsMonoNerdFont() {
local JetBrainsMonoNerdFont="https://github.com/Zhaopudark/JetBrainsMonoNerdFonts/releases/download/v1.2/JetBrainsMonoNerdFont-Regular-v1.2.ttf"
local JetBrainsMonoNerdFontLicense="https://raw.githubusercontent.com/JetBrains/JetBrainsMono/refs/heads/master/OFL.txt"
showfun install_Font
x install_Font ttf "$JetBrainsMonoNerdFont" "$JetBrainsMonoNerdFontLicense"
}
install_RobotoFlex() {
local RobotoFlexFont="https://github.com/googlefonts/roboto-flex/raw/refs/heads/main/fonts/RobotoFlex%5BGRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght%5D.ttf"
local RobotoFlexFontLicense="https://github.com/googlefonts/roboto-flex/raw/refs/heads/main/OFL.txt"
showfun install_Font
x install_Font ttf "$RobotoFlexFont" "$RobotoFlexFontLicense"
}
install_SpaceGroteskFont() {
local FONT_NAME="${FUNCNAME[0]#install_}"
local CACHE_DIR="$REPO_ROOT/cache/${FONT_NAME:-noname}/"
local LOCAL_FONT_DIR="/usr/local/share/fonts/OTF/${FONT_NAME:-noname}/"
local LOCAL_FONT_LICENSES_DIR="/usr/local/share/licenses/${FONT_NAME:-noname}/"
local SpaceGroteskFont="https://github.com/floriankarsten/space-grotesk/releases/download/2.0.0/SpaceGrotesk-2.0.0.zip"
x mkdir -p "$CACHE_DIR"
x wget -q -N -P "$CACHE_DIR" "$SpaceGroteskFont"
x unzip -j "$CACHE_DIR/$(basename "$SpaceGroteskFont")" -d "$CACHE_DIR"
x sudo mkdir -p "$LOCAL_FONT_DIR"
x sudo mkdir -p "$LOCAL_FONT_LICENSES_DIR"
x sudo cp "$CACHE_DIR"/SpaceGrotesk*.otf "$LOCAL_FONT_DIR"
x sudo cp "$CACHE_DIR"/OFL.txt "$LOCAL_FONT_LICENSES_DIR"
x fc-cache -fv
x cd "$REPO_ROOT"
}
install_breeze_plus(){
x mkdir -p $REPO_ROOT/cache/breeze-plus
x cd $REPO_ROOT/cache/breeze-plus
try git init -b main
try git remote add origin https://github.com/mjkim0727/breeze-plus.git
x git pull origin main
x sudo mkdir -p /usr/share/icons
x cd ./src
x sudo cp -r breeze-plus-dark /usr/share/icons
x sudo cp -r breeze-plus /usr/share/icons
x cd "$REPO_ROOT"
}
install_Bibata_Modern_Classic() {
local BibataModernClassic="https://github.com/ful1e5/Bibata_Cursor/releases/download/v2.0.7/Bibata-Modern-Classic.tar.xz"
x mkdir -p "$REPO_ROOT/cache/"
x wget -q -N -P "$REPO_ROOT/cache/" "$BibataModernClassic"
x tar -xf "$REPO_ROOT/cache/$(basename "$BibataModernClassic")" -C "$REPO_ROOT/cache/"
x sudo cp -r "$REPO_ROOT/cache/Bibata-Modern-Classic" /usr/share/icons/
}
#####################################################################################
showfun install-MicroTeX
v install-MicroTeX
showfun install_Bibata_Modern_Classic
v install_Bibata_Modern_Classic
showfun install_breeze_plus
v install_breeze_plus
showfun install-Rubik
v install-Rubik
showfun install-Gabarito
v install-Gabarito
showfun install_SpaceGroteskFont
v install_SpaceGroteskFont
showfun install_ttf_material_symbols_variable
v install_ttf_material_symbols_variable
showfun install_RobotoFlex
v install_RobotoFlex
showfun install_JetBrainsMonoNerdFont
v install_JetBrainsMonoNerdFont
v install-uv
# These python packages are installed using uv into the venv (virtual environment). Once the folder of the venv gets deleted, they are all gone cleanly. So it's considered as setups, not dependencies.
showfun install-python-packages
v install-python-packages
v sudo usermod -aG video,input "$(whoami)"
v mkdir -p "${XDG_CONFIG_HOME}/systemd/user"
v ln -s /usr/lib/systemd/system/ydotool.service "${XDG_CONFIG_HOME}/systemd/user/ydotool.service"
v bash -c "echo uinput | sudo tee /etc/modules-load.d/uinput.conf"
v bash -c 'echo SUBSYSTEM==\"misc\", KERNEL==\"uinput\", MODE=\"0660\", GROUP=\"input\" |
sudo tee /etc/udev/rules.d/99-uinput.rules'
v systemctl --user enable ydotool
v sudo systemctl enable bluetooth --now
v gsettings set org.gnome.desktop.interface font-name 'Rubik 11'
v gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
v kwriteconfig6 --file kdeglobals --group KDE --key widgetStyle Darkly
v bash -c "echo exec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1 |
sudo tee -a ${REPO_ROOT}/dots/.config/hypr/custom/execs.conf"
+1
View File
@@ -0,0 +1 @@
AUTO