Build the Panama Hyprland desktop
This commit is contained in:
Regular → Executable
+57
@@ -10,3 +10,60 @@ PANAMA_PATH="$HOME/.local/share/Panama"
|
||||
echo -e "\n--- Copying System & User files ---"
|
||||
log "Changing DNF Settings"
|
||||
sudo cp -r "$PANAMA_PATH/config/copy/." "/"
|
||||
|
||||
# The GPU symlink rules land via the copy above. Apply them without a reboot so
|
||||
# AQ_DRM_DEVICES resolves on the first Hyprland login rather than the second.
|
||||
if [[ -f /etc/udev/rules.d/99-panama-gpu.rules ]]; then
|
||||
log "Reloading udev rules for stable GPU symlinks"
|
||||
sudo udevadm control --reload
|
||||
sudo udevadm trigger --subsystem-match=drm
|
||||
fi
|
||||
|
||||
echo -e "\n--- Desktop appearance ---"
|
||||
# GTK and Qt apps read these directly from gsettings; there is no settings
|
||||
# daemon outside GNOME, so they must be correct rather than merely overridden.
|
||||
# These match config/dot/gtk-3.0/settings.ini and quickshell's Theme.qml.
|
||||
if exists gsettings; then
|
||||
log "Applying interface settings"
|
||||
gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3-dark'
|
||||
gsettings set org.gnome.desktop.interface icon-theme 'Adwaita'
|
||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
gsettings set org.gnome.desktop.interface font-name 'Adwaita Sans 11'
|
||||
gsettings set org.gnome.desktop.interface monospace-font-name 'VictorMono Nerd Font 10'
|
||||
gsettings set org.gnome.desktop.interface cursor-theme 'oreo_blue_cursors'
|
||||
# Deliberately NOT setting cursor-size. GNOME here is on 16 (smaller than
|
||||
# GNOME's own default of 24) and changing it would visibly alter the working
|
||||
# GNOME session. Hyprland uses XCURSOR_SIZE=24 from uwsm/env; if the cursor
|
||||
# feels too large there, change that one value rather than this one.
|
||||
fi
|
||||
|
||||
echo -e "\n--- Hyprland session services ---"
|
||||
# Deliberately NOT enabling these.
|
||||
#
|
||||
# hyprpaper / hypridle / hyprpolkitagent / vicinae all ship units that are
|
||||
# WantedBy=graphical-session.target -- and that target is active under GNOME
|
||||
# too. Enabling them would start hypridle alongside GNOME's own idle handling
|
||||
# (two daemons blanking and locking the screen on different timers) and start
|
||||
# hyprpaper where there is no layer shell for it to draw on.
|
||||
#
|
||||
# Instead hypr/autostart.lua runs `systemctl --user start ...` on
|
||||
# hyprland.start, which scopes them to the Hyprland session. They still get the
|
||||
# correct uwsm activation environment and still stop in order, because they are
|
||||
# PartOf=graphical-session.target.
|
||||
log "Hyprland services are started per-session by hypr/autostart.lua, not enabled globally"
|
||||
|
||||
# Notification daemons must NOT be installed: mako, dunst and swaync all
|
||||
# register Name=org.freedesktop.Notifications for D-Bus activation, which races
|
||||
# Quickshell's own notification server at login. Whoever wins keeps the name.
|
||||
for pkg in mako dunst SwayNotificationCenter; do
|
||||
if rpm -q "$pkg" >/dev/null 2>&1; then
|
||||
log "WARNING: $pkg is installed and will fight Quickshell for the notification D-Bus name."
|
||||
log " Fix with: systemctl --user mask ${pkg,,}.service"
|
||||
fi
|
||||
done
|
||||
|
||||
# Select the launcher theme once vicinae exists.
|
||||
if exists vicinae; then
|
||||
log "Setting vicinae theme"
|
||||
vicinae theme set tokyonight-moon >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
@@ -73,6 +73,22 @@ else
|
||||
log "Package list was not in specified path: $DEV_FILE"
|
||||
fi
|
||||
|
||||
# --- Install the Hyprland desktop ---
|
||||
# Most of these live in the lionheartp/Hyprland COPR rather than Fedora proper.
|
||||
HYPR_FILE="$PANAMA_PATH/setup/packages/hyprland-packages"
|
||||
if [[ -f "$HYPR_FILE" ]]; then
|
||||
log "Enabling Hyprland COPR"
|
||||
sudo dnf copr enable -y lionheartp/Hyprland > /dev/null 2>&1
|
||||
HYPR_PACKAGES=$(tr "\n" " " <"$HYPR_FILE")
|
||||
log "Installing Hyprland desktop packages"
|
||||
echo -e "Includes the following packages:"
|
||||
echo -e "$(<"$HYPR_FILE")"
|
||||
sudo dnf install -y --setopt=install_weak_deps=False $HYPR_PACKAGES > /dev/null 2>&1
|
||||
log "Hyprland packages installed!"
|
||||
else
|
||||
log "Package list was not in specified path: $HYPR_FILE"
|
||||
fi
|
||||
|
||||
# --- Install Bun ---
|
||||
if [[ -x "$HOME/.bun/bin/bun" ]]; then
|
||||
log "Bun already installed at \"$HOME/.bun/bin/bun\""
|
||||
|
||||
@@ -29,7 +29,12 @@ fi
|
||||
log "Symlinking Panama .bashrc file to ~/.bashrc"
|
||||
ln -s "$PANAMA_BASH/.bashrc" "$HOME/.bashrc"
|
||||
|
||||
dirs=("espanso" "forge" "ghostty" "kitty" "nvim" "tmux")
|
||||
# Each entry is symlinked as ~/.config/<name> -> $PANAMA_DOT/<name>.
|
||||
# "forge" is the GNOME tiling extension; "hypr"/"quickshell"/"wofi" are the
|
||||
# Hyprland desktop. They coexist deliberately — the GNOME session keeps working
|
||||
# while Hyprland is being used, so you can log back into either.
|
||||
dirs=("espanso" "forge" "ghostty" "gtk-3.0" "gtk-4.0" "hypr" "kitty" "nvim" \
|
||||
"quickshell" "tmux" "uwsm" "vicinae" "wofi" "xdg-desktop-portal")
|
||||
|
||||
# --- Vim vimrc ---
|
||||
echo -e "\n--- Setting up vim ---"
|
||||
@@ -64,3 +69,41 @@ for dir in "${dirs[@]}"; do
|
||||
ln -s "$PANAMA_DOT/$dir" "$CONFIG/$dir"
|
||||
log "Linked $PANAMA_DOT/$dir → $CONFIG/$dir"
|
||||
done
|
||||
|
||||
# Vicinae 0.26 discovers user themes from its XDG data directory rather than
|
||||
# from ~/.config/vicinae. Keep the authored theme in Panama with the rest of
|
||||
# the launcher config and expose only that file at Vicinae's runtime path.
|
||||
VICINAE_THEME_DIR="$HOME/.local/share/vicinae/themes"
|
||||
VICINAE_THEME="$VICINAE_THEME_DIR/tokyonight-moon.toml"
|
||||
mkdir -p "$VICINAE_THEME_DIR"
|
||||
|
||||
if [ -L "$VICINAE_THEME" ]; then
|
||||
rm "$VICINAE_THEME"
|
||||
fi
|
||||
|
||||
if [ -e "$VICINAE_THEME" ]; then
|
||||
log "Keeping existing Vicinae theme at $VICINAE_THEME"
|
||||
else
|
||||
ln -s "$PANAMA_DOT/vicinae/themes/tokyonight-moon.toml" "$VICINAE_THEME"
|
||||
log "Linked Tokyo Night Moon theme → $VICINAE_THEME"
|
||||
fi
|
||||
|
||||
# Panama-native applications live in the user data directory so launchers can
|
||||
# discover them alongside system desktop entries. Keep each authored file in
|
||||
# the repository and expose it with a narrow per-file symlink.
|
||||
PANAMA_APPLICATION_DIR="$PANAMA_PATH/config/local/share/applications"
|
||||
USER_APPLICATION_DIR="$HOME/.local/share/applications"
|
||||
mkdir -p "$USER_APPLICATION_DIR"
|
||||
for desktop_file in "$PANAMA_APPLICATION_DIR"/*.desktop; do
|
||||
[[ -e "$desktop_file" ]] || continue
|
||||
desktop_name="$(basename "$desktop_file")"
|
||||
desktop_target="$USER_APPLICATION_DIR/$desktop_name"
|
||||
if [[ -L "$desktop_target" ]]; then
|
||||
rm "$desktop_target"
|
||||
elif [[ -e "$desktop_target" ]]; then
|
||||
log "Keeping existing desktop entry at $desktop_target"
|
||||
continue
|
||||
fi
|
||||
ln -s "$desktop_file" "$desktop_target"
|
||||
log "Linked $desktop_name → $desktop_target"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user