Compare commits
No commits in common. "19cc257a21898365734302d5d8169727cc084f25" and "3d30f7a4ca7b35184f5c9f036adb395f4e6b1011" have entirely different histories.
19cc257a21
...
3d30f7a4ca
@ -1,35 +0,0 @@
|
|||||||
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# ~/.local/bin/hypr‑auto‑internal.sh
|
|
||||||
# Disable the laptop panel (eDP‑1) when any other monitor is connected,
|
|
||||||
# otherwise enable it.
|
|
||||||
|
|
||||||
set -u
|
|
||||||
|
|
||||||
INT="eDP-1" # internal monitor name – change if yours differs
|
|
||||||
|
|
||||||
log() {
|
|
||||||
notify-send "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
|
||||||
# 1️⃣ Get current monitor list
|
|
||||||
# -------------------------------------------------
|
|
||||||
MONS=$(hyprctl monitors 2>/dev/null || true)
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
|
||||||
# 2️⃣ Decide whether an external monitor is present
|
|
||||||
# -------------------------------------------------
|
|
||||||
# Any line that is *not* the internal monitor counts as external.
|
|
||||||
if echo "$MONS" | grep -qv "$INT"; then
|
|
||||||
# At least one external monitor is connected
|
|
||||||
log "External monitor detected → disabling $INT"
|
|
||||||
hyprctl keyword monitor $INT, disable 2>/dev/null
|
|
||||||
hyprctl keyword workspace r[1-5] m[DP-4]
|
|
||||||
hyprctl keyword workspace r[6-0] m[DP-5]
|
|
||||||
else
|
|
||||||
# No external monitor → make sure the internal one is on
|
|
||||||
log "No external monitor → enabling $INT"
|
|
||||||
hyprctl keyword monitor $INT, preferred,auto,1.5 2>/dev/null
|
|
||||||
hyprctl reload 2>/dev/null
|
|
||||||
fi
|
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K.
|
# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K.
|
||||||
env = GDK_SCALE,2
|
env = GDK_SCALE,2
|
||||||
monitor=,preferred,auto-right,auto
|
monitor=,preferred,auto-left,auto
|
||||||
|
|
||||||
# Good compromise for 27" or 32" 4K monitors (but fractional!)
|
# Good compromise for 27" or 32" 4K monitors (but fractional!)
|
||||||
# env = GDK_SCALE,1.75
|
# env = GDK_SCALE,1.75
|
||||||
|
@ -38,6 +38,3 @@ bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord o
|
|||||||
|
|
||||||
# Color picker
|
# Color picker
|
||||||
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
|
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
|
||||||
|
|
||||||
# Disable internal monitor
|
|
||||||
bindd = SUPER CTRL, F12, Disable Internal Monitor, exec, comarchy-disable-internal-monitor
|
|
||||||
|
@ -16,5 +16,3 @@ fi
|
|||||||
if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
|
if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
|
||||||
git config --global user.email "$OMARCHY_USER_EMAIL"
|
git config --global user.email "$OMARCHY_USER_EMAIL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git config --global credential.helper /usr/lib/git-core/git-credential-libsecret
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user