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
|
# Autostart applications
|
||||||
exec-once = waybar &
|
exec-once = waybar &
|
||||||
exec-once = mako &
|
exec-once = mako &
|
||||||
exec-once = wl-clipboard-history -t &
|
|
||||||
exec-once = wlogout &
|
exec-once = wlogout &
|
||||||
exec-once = rofi-wayland &
|
exec-once = rofi-wayland &
|
||||||
# exec-once = hyprpaper &
|
# exec-once = hyprpaper &
|
||||||
|
|||||||
@ -37,11 +37,28 @@ if [ -d "$CONFIG_DIR" ]; then
|
|||||||
echo "Linked .config/$baseitem"
|
echo "Linked .config/$baseitem"
|
||||||
done
|
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)
|
HOSTNAME=$(hostname)
|
||||||
PROFILE=""
|
# Hyprland monitors
|
||||||
if [ -f "$DOTFILES_DIR/host-profiles.conf" ]; then
|
if [ -f "$CONFIG_DIR/hypr/includes/monitors-$HOSTNAME.conf" ]; then
|
||||||
PROFILE=$(awk -F= -v h="$HOSTNAME" '$1==h{print $2}' "$DOTFILES_DIR/host-profiles.conf")
|
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
|
fi
|
||||||
if [ -z "$PROFILE" ]; then
|
if [ -z "$PROFILE" ]; then
|
||||||
echo "ERROR: No profile mapping found for hostname '$HOSTNAME' in $DOTFILES_DIR/host-profiles.conf"
|
echo "ERROR: No profile mapping found for hostname '$HOSTNAME' in $DOTFILES_DIR/host-profiles.conf"
|
||||||
|
|||||||
@ -11,11 +11,14 @@ HYPR_PACKAGES=(
|
|||||||
mako
|
mako
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wlogout
|
wlogout
|
||||||
|
network-manager-applet
|
||||||
brightnessctl
|
brightnessctl
|
||||||
alacritty
|
alacritty
|
||||||
|
ttf-jetbrains-mono-nerd
|
||||||
ttf-jetbrains-mono
|
ttf-jetbrains-mono
|
||||||
ttf-nerd-fonts-symbols
|
ttf-nerd-fonts-symbols
|
||||||
noto-fonts
|
noto-fonts
|
||||||
|
noto-fonts-emoji
|
||||||
)
|
)
|
||||||
|
|
||||||
paru -S --needed --noconfirm "${HYPR_PACKAGES[@]}"
|
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
|
# Dotfiles setup script for Arch Linux using paru
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Device profile detection
|
# Device profile detection (unified via host-profiles.conf)
|
||||||
if [ -z "$DOTFILES_DEVICE" ]; then
|
HOSTNAME=$(hostname)
|
||||||
echo "Select device profile:"
|
PROFILE=""
|
||||||
select profile in "laptop" "desktop"; do
|
DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
DOTFILES_DEVICE="$profile"
|
if [ -f "$DOTFILES_DIR/host-profiles.conf" ]; then
|
||||||
export DOTFILES_DEVICE
|
PROFILE=$(awk -F= -v h="$HOSTNAME" '$1==h{print $2}' "$DOTFILES_DIR/host-profiles.conf")
|
||||||
echo "Using device profile: $DOTFILES_DEVICE"
|
|
||||||
break
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "Using device profile from environment: $DOTFILES_DEVICE"
|
|
||||||
fi
|
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
|
# Find, sort, and run all modules in the modules directory
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user