chore: improve device-aware setup and symlinking

- Add inetutils to package list for hostname support
- Use hostname-based monitor config selection in symlinks script

🤖 Generated with opencode
Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
Martin Büchler 2025-08-08 11:19:12 +02:00
parent 6828cd8090
commit c568fce36a
2 changed files with 12 additions and 6 deletions

View File

@ -22,6 +22,7 @@ PACKAGES=(
zsh-completions zsh-completions
btop btop
pkgfile pkgfile
inetutils
# Add more packages here # Add more packages here
) )

View File

@ -39,12 +39,17 @@ if [ -d "$CONFIG_DIR" ]; then
# Device-specific symlinks for Hyprland and Waybar # Device-specific symlinks for Hyprland and Waybar
if [ -n "$DOTFILES_DEVICE" ]; then if [ -n "$DOTFILES_DEVICE" ]; then
# Hyprland monitors # Hyprland monitors (hostname-based)
ln -sf "$CONFIG_DIR/hypr/includes/monitors-$DOTFILES_DEVICE.conf" "$CONFIG_DIR/hypr/includes/monitors.conf" HOSTNAME=$(hostname)
echo "Linked monitors-$DOTFILES_DEVICE.conf as monitors.conf" if [ -f "$CONFIG_DIR/hypr/includes/monitors-$HOSTNAME.conf" ]; then
# Hyprland input ln -sf "$CONFIG_DIR/hypr/includes/monitors-$HOSTNAME.conf" "$CONFIG_DIR/hypr/includes/monitors.conf"
ln -sf "$CONFIG_DIR/hypr/includes/input-$DOTFILES_DEVICE.conf" "$CONFIG_DIR/hypr/includes/input.conf" echo "Linked monitors-$HOSTNAME.conf as monitors.conf"
echo "Linked input-$DOTFILES_DEVICE.conf as input.conf" else
echo "Warning: No monitors config for hostname $HOSTNAME"
fi
# Hyprland hypridle
ln -sf "$CONFIG_DIR/hypr/includes/hypridle-$DOTFILES_DEVICE.conf" "$CONFIG_DIR/hypr/hypridle.conf"
echo "Linked hypridle-$DOTFILES_DEVICE.conf as hypridle.conf"
# Waybar config # Waybar config
ln -sf "$CONFIG_DIR/waybar/config-$DOTFILES_DEVICE" "$CONFIG_DIR/waybar/config" ln -sf "$CONFIG_DIR/waybar/config-$DOTFILES_DEVICE" "$CONFIG_DIR/waybar/config"
echo "Linked config-$DOTFILES_DEVICE as waybar config" echo "Linked config-$DOTFILES_DEVICE as waybar config"