From c568fce36ad898f6bc0b74ed597a86faa96ace97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C3=BCchler?= Date: Fri, 8 Aug 2025 11:19:12 +0200 Subject: [PATCH] chore: improve device-aware setup and symlinking - Add inetutils to package list for hostname support - Use hostname-based monitor config selection in symlinks script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with opencode Co-Authored-By: opencode --- modules/01-packages.sh | 1 + modules/02-symlinks.sh | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/01-packages.sh b/modules/01-packages.sh index 99eb989..6f92736 100755 --- a/modules/01-packages.sh +++ b/modules/01-packages.sh @@ -22,6 +22,7 @@ PACKAGES=( zsh-completions btop pkgfile + inetutils # Add more packages here ) diff --git a/modules/02-symlinks.sh b/modules/02-symlinks.sh index f48d4b0..4455589 100755 --- a/modules/02-symlinks.sh +++ b/modules/02-symlinks.sh @@ -39,12 +39,17 @@ if [ -d "$CONFIG_DIR" ]; then # Device-specific symlinks for Hyprland and Waybar if [ -n "$DOTFILES_DEVICE" ]; then - # Hyprland monitors - ln -sf "$CONFIG_DIR/hypr/includes/monitors-$DOTFILES_DEVICE.conf" "$CONFIG_DIR/hypr/includes/monitors.conf" - echo "Linked monitors-$DOTFILES_DEVICE.conf as monitors.conf" - # Hyprland input - ln -sf "$CONFIG_DIR/hypr/includes/input-$DOTFILES_DEVICE.conf" "$CONFIG_DIR/hypr/includes/input.conf" - echo "Linked input-$DOTFILES_DEVICE.conf as input.conf" + # Hyprland monitors (hostname-based) + HOSTNAME=$(hostname) + 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 + 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 ln -sf "$CONFIG_DIR/waybar/config-$DOTFILES_DEVICE" "$CONFIG_DIR/waybar/config" echo "Linked config-$DOTFILES_DEVICE as waybar config"