Compare commits

..
2 Commits
4 changed files with 111 additions and 15 deletions
+5
View File
@@ -19,5 +19,10 @@ source = ~/.config/hypr/bindings.conf
source = ~/.config/hypr/looknfeel.conf
source = ~/.config/hypr/autostart.conf
# Toggle config flags dynamically (e.g. the lid-close "disable internal display"
# flag written by omarchy-hyprland-monitor-internal). Without this the lid
# handler's disable never applies and the laptop workspace stays stranded.
source = ~/.local/state/omarchy/toggles/hypr/*.conf
# Add any other personal Hyprland configuration below
# windowrule = workspace 5, match:class qemu
+19 -15
View File
@@ -2,22 +2,26 @@
# List current monitors and resolutions possible: hyprctl monitors
# Format: monitor = [port], resolution, position, scale
# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K.
env = GDK_SCALE,2
monitor=,preferred,auto,auto,vrr,1
# --- Dual external monitor setup (laptop lid closed) ---
# Layout, left -> right: [ 1: C24 / DP-1 ] [ 2: F24 / HDMI-A-1 ]
# eDP-1 sits to the right of the externals and Hyprland automatically
# disables it when the lid is closed (since an external is connected).
# Good compromise for 27" or 32" 4K monitors (but fractional!)
# env = GDK_SCALE,1.75
# monitor=,preferred,auto,1.6
# Monitor 1 - C24 curved, DisplayPort via DP->HDMI adapter.
# NOTE: the DP2HDMI adapter caps this panel at 1920x1080@60 (no 75Hz mode).
monitor = DP-1, 1920x1080@60, 0x0, 1
# Straight 1x setup for low-resolution displays like 1080p or 1440p
# Or for ultrawide monitors like 34" 3440x1440 or 49" 5120x1440
# env = GDK_SCALE,1
# monitor=,preferred,auto,1
# Monitor 2 - Sceptre F24, HDMI, native 75Hz.
monitor = HDMI-A-1, 1920x1080@75, 1920x0, 1
# Portrait/rotated secondary monitor (transform: 1 = 90°, 3 = 270°)
# monitor = DP-2, preferred, auto, 1, transform, 1
# Laptop panel - only mode is 1920x1200@60. Parked right of the externals;
# auto-off on lid close so no windows get stranded on a closed screen.
monitor = eDP-1, 1920x1200@60, 3840x0, 1.5
# Example for Framework 13 w/ 6K XDR Apple display
# monitor = DP-5, 6016x3384@60, auto, 2
# monitor = eDP-1, 2880x1920@120, auto, 2
# Catch-all fallback for any other/unknown display.
monitor = , preferred, auto, 1
# GDK_SCALE forced integer scaling is intentionally disabled: the external
# monitors run at 1x, so a global 2x would blow up GTK apps on them. The
# per-monitor scale factors above are enough.
# env = GDK_SCALE,2
+52
View File
@@ -130,12 +130,20 @@ check_status=0
check_file "$SCRIPT_DIR/waybar/config.jsonc" "$HOME_DIR/.config/waybar/config.jsonc" "waybar/config.jsonc" || check_status=1
check_file "$SCRIPT_DIR/hypr/hyprland.conf" "$HOME_DIR/.config/hypr/hyprland.conf" "hypr/hyprland.conf" || check_status=1
check_file "$SCRIPT_DIR/hypr/monitors.conf" "$HOME_DIR/.config/hypr/monitors.conf" "hypr/monitors.conf" || check_status=1
check_file "$SCRIPT_DIR/hypr/autostart.conf" "$HOME_DIR/.config/hypr/autostart.conf" "hypr/autostart.conf" || check_status=1
check_file "$SCRIPT_DIR/hypr/looknfeel.conf" "$HOME_DIR/.config/hypr/looknfeel.conf" "hypr/looknfeel.conf" || check_status=1
check_file "$SCRIPT_DIR/hypr/bindings.conf" "$HOME_DIR/.config/hypr/bindings.conf" "hypr/bindings.conf" || check_status=1
check_file "$SCRIPT_DIR/hypr/hypridle.conf" "$HOME_DIR/.config/hypr/hypridle.conf" "hypr/hypridle.conf" || check_status=1
check_file "$SCRIPT_DIR/omarchy/hooks/theme-set" "$HOME_DIR/.config/omarchy/hooks/theme-set" "omarchy/hooks/theme-set" || check_status=1
check_file "$SCRIPT_DIR/ags/app.ts" "$HOME_DIR/.config/ags/app.ts" "ags/app.ts" || check_status=1
check_file "$SCRIPT_DIR/ags/style.css" "$HOME_DIR/.config/ags/style.css" "ags/style.css" || check_status=1
check_file "$SCRIPT_DIR/ags/lib/utils.ts" "$HOME_DIR/.config/ags/lib/utils.ts" "ags/lib/utils.ts" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/Media.tsx" "$HOME_DIR/.config/ags/widget/Media.tsx" "ags/widget/Media.tsx" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/Notifications.tsx" "$HOME_DIR/.config/ags/widget/Notifications.tsx" "ags/widget/Notifications.tsx" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/QuickSettings.tsx" "$HOME_DIR/.config/ags/widget/QuickSettings.tsx" "ags/widget/QuickSettings.tsx" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/SysMonitor.tsx" "$HOME_DIR/.config/ags/widget/SysMonitor.tsx" "ags/widget/SysMonitor.tsx" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/WallPicker.tsx" "$HOME_DIR/.config/ags/widget/WallPicker.tsx" "ags/widget/WallPicker.tsx" || check_status=1
check_file "$SCRIPT_DIR/waybar/style.css" "$HOME_DIR/.config/waybar/style.css" "waybar/style.css" || check_status=1
check_file "$SCRIPT_DIR/elephant/menus/blob_background_selector.lua" "$HOME_DIR/.config/elephant/menus/blob_background_selector.lua" "elephant/menus/blob_background_selector.lua" || check_status=1
check_file "$SCRIPT_DIR/branding/about.txt" "$HOME_DIR/.config/omarchy/branding/about.txt" "branding/about.txt" || check_status=1
@@ -235,6 +243,33 @@ add_system_path() {
add_system_path
# Keep the laptop awake with the lid closed while docked / on AC, so the two
# external monitors stay usable. Paired with the lid-switch binds in
# hypr/bindings.conf, which disable eDP-1 on close so no workspace is stranded.
configure_lid_switch() {
local dropin="/etc/systemd/logind.conf.d/10-lid.conf"
local content="[Login]
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore"
if [ -f "$dropin" ] && [ "$(cat "$dropin" 2>/dev/null)" = "$content" ]; then
echo "Lid switch behavior already configured"
return
fi
if sudo mkdir -p "$(dirname "$dropin")" 2>/dev/null \
&& printf '%s\n' "$content" | sudo tee "$dropin" > /dev/null 2>&1; then
sudo chmod 644 "$dropin"
sudo systemctl restart systemd-logind 2>/dev/null || true
echo "Configured lid switch (suspend on battery, ignore when docked/on AC)"
else
echo "Skipped lid switch config (no sudo available)"
fi
}
configure_lid_switch
add_path_to_shell() {
local shell_rc="$1"
local path_line='export PATH="$HOME/scripts:$HOME/.local/bin:$PATH"'
@@ -273,6 +308,23 @@ else
echo "Warning: ags not found. Please start ags manually."
fi
echo ""
echo "=== Reloading Hyprland ==="
if command -v hyprctl &> /dev/null; then
hyprctl reload || true
else
echo "Warning: hyprctl not found. Please reload Hyprland manually."
fi
echo ""
echo "=== Restarting hypridle ==="
if command -v hypridle &> /dev/null; then
pkill -x hypridle 2>/dev/null || true
nohup hypridle >/dev/null 2>&1 &
else
echo "Warning: hypridle not found. Please restart hypridle manually."
fi
echo ""
echo "=== Installation Complete ==="
echo "Scripts are in: $HOME_DIR/scripts/"
+35
View File
@@ -69,6 +69,24 @@ if [ -n "$zen_profile" ]; then
revert_dir "$zen_profile/chrome" "Zen Browser config"
fi
# Undo the lid-switch override installed by install.sh (restores default
# logind behavior: suspend on lid close regardless of power/dock state).
remove_lid_switch() {
local dropin="/etc/systemd/logind.conf.d/10-lid.conf"
if [ ! -f "$dropin" ]; then
echo "[SKIP] No lid switch config to remove"
return
fi
if sudo rm -f "$dropin" 2>/dev/null; then
sudo systemctl restart systemd-logind 2>/dev/null || true
echo "✓ Removed lid switch config ($dropin)"
else
echo "[SKIP] Could not remove $dropin (no sudo available)"
fi
}
remove_lid_switch
echo ""
echo "=== Restarting Waybar ==="
if command -v omarchy-restart-waybar &> /dev/null; then
@@ -86,5 +104,22 @@ else
echo "Warning: ags not found. Please start ags manually."
fi
echo ""
echo "=== Reloading Hyprland ==="
if command -v hyprctl &> /dev/null; then
hyprctl reload || true
else
echo "Warning: hyprctl not found. Please reload Hyprland manually."
fi
echo ""
echo "=== Restarting hypridle ==="
if command -v hypridle &> /dev/null; then
pkill -x hypridle 2>/dev/null || true
nohup hypridle >/dev/null 2>&1 &
else
echo "Warning: hypridle not found. Please restart hypridle manually."
fi
echo ""
echo "=== Revert Complete ==="