chore(hyprland): remove wl-clipboard-history and autostart usage; add network-manager-applet; ensure both JetBrains Mono font variants are installed
chore(setup): unify device profile detection and symlink logic via PROFILE env var
🤖 Generated with opencode.ai
Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
parent
a9e5ace080
commit
f20f7179ef
@ -1,7 +1,6 @@
|
||||
# Autostart applications
|
||||
exec-once = waybar &
|
||||
exec-once = mako &
|
||||
exec-once = wl-clipboard-history -t &
|
||||
exec-once = wlogout &
|
||||
exec-once = rofi-wayland &
|
||||
# exec-once = hyprpaper &
|
||||
|
||||
@ -37,11 +37,28 @@ if [ -d "$CONFIG_DIR" ]; then
|
||||
echo "Linked .config/$baseitem"
|
||||
done
|
||||
|
||||
# Device-specific symlinks for Hyprland and Waybar using host-profiles.conf
|
||||
# Device-specific symlinks for Hyprland and Waybar using $PROFILE from setup.sh
|
||||
if [ -z "$PROFILE" ]; then
|
||||
echo "ERROR: PROFILE environment variable not set. Run setup.sh to detect profile."
|
||||
exit 1
|
||||
fi
|
||||
HOSTNAME=$(hostname)
|
||||
PROFILE=""
|
||||
if [ -f "$DOTFILES_DIR/host-profiles.conf" ]; then
|
||||
PROFILE=$(awk -F= -v h="$HOSTNAME" '$1==h{print $2}' "$DOTFILES_DIR/host-profiles.conf")
|
||||
# Hyprland monitors
|
||||
if [ -f "$CONFIG_DIR/hypr/includes/monitors-$HOSTNAME.conf" ]; then
|
||||
ln -sf "$CONFIG_DIR/hypr/includes/monitors-$HOSTNAME.conf" "$CONFIG_DIR/hypr/includes/monitors.conf"
|
||||
echo "Linked monitors-$HOSTNAME.conf as monitors.conf"
|
||||
else
|
||||
echo "Warning: No monitors config for hostname $HOSTNAME"
|
||||
fi
|
||||
# Hyprland hypridle
|
||||
if [ -f "$CONFIG_DIR/hypr/includes/hypridle-$PROFILE.conf" ]; then
|
||||
ln -sf "$CONFIG_DIR/hypr/includes/hypridle-$PROFILE.conf" "$CONFIG_DIR/hypr/hypridle.conf"
|
||||
echo "Linked hypridle-$PROFILE.conf as hypridle.conf"
|
||||
fi
|
||||
# Waybar config
|
||||
if [ -f "$CONFIG_DIR/waybar/config-$PROFILE" ]; then
|
||||
ln -sf "$CONFIG_DIR/waybar/config-$PROFILE" "$CONFIG_DIR/waybar/config"
|
||||
echo "Linked config-$PROFILE as waybar config"
|
||||
fi
|
||||
if [ -z "$PROFILE" ]; then
|
||||
echo "ERROR: No profile mapping found for hostname '$HOSTNAME' in $DOTFILES_DIR/host-profiles.conf"
|
||||
|
||||
@ -11,11 +11,14 @@ HYPR_PACKAGES=(
|
||||
mako
|
||||
wl-clipboard
|
||||
wlogout
|
||||
network-manager-applet
|
||||
brightnessctl
|
||||
alacritty
|
||||
ttf-jetbrains-mono-nerd
|
||||
ttf-jetbrains-mono
|
||||
ttf-nerd-fonts-symbols
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
)
|
||||
|
||||
paru -S --needed --noconfirm "${HYPR_PACKAGES[@]}"
|
||||
|
||||
23
setup.sh
23
setup.sh
@ -6,18 +6,19 @@ set -e
|
||||
# Dotfiles setup script for Arch Linux using paru
|
||||
set -e
|
||||
|
||||
# Device profile detection
|
||||
if [ -z "$DOTFILES_DEVICE" ]; then
|
||||
echo "Select device profile:"
|
||||
select profile in "laptop" "desktop"; do
|
||||
DOTFILES_DEVICE="$profile"
|
||||
export DOTFILES_DEVICE
|
||||
echo "Using device profile: $DOTFILES_DEVICE"
|
||||
break
|
||||
done
|
||||
else
|
||||
echo "Using device profile from environment: $DOTFILES_DEVICE"
|
||||
# Device profile detection (unified via host-profiles.conf)
|
||||
HOSTNAME=$(hostname)
|
||||
PROFILE=""
|
||||
DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
if [ -f "$DOTFILES_DIR/host-profiles.conf" ]; then
|
||||
PROFILE=$(awk -F= -v h="$HOSTNAME" '$1==h{print $2}' "$DOTFILES_DIR/host-profiles.conf")
|
||||
fi
|
||||
if [ -z "$PROFILE" ]; then
|
||||
echo "ERROR: No profile mapping found for hostname '$HOSTNAME' in $DOTFILES_DIR/host-profiles.conf"
|
||||
exit 1
|
||||
fi
|
||||
export PROFILE
|
||||
echo "Using device profile: $PROFILE"
|
||||
|
||||
# Find, sort, and run all modules in the modules directory
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user