Compare commits

...

2 Commits

Author SHA1 Message Date
19cc257a21 feat: add git cred helper 2025-08-26 21:09:58 +02:00
6fc1fb122d feat: monitors n stuff 2025-08-26 20:55:40 +02:00
4 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
# ~/.local/bin/hyprautointernal.sh
# Disable the laptop panel (eDP1) 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

View File

@ -5,7 +5,7 @@
# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K.
env = GDK_SCALE,2
monitor=,preferred,auto-left,auto
monitor=,preferred,auto-right,auto
# Good compromise for 27" or 32" 4K monitors (but fractional!)
# env = GDK_SCALE,1.75

View File

@ -38,3 +38,6 @@ bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord o
# Color picker
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

View File

@ -16,3 +16,5 @@ fi
if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
git config --global user.email "$OMARCHY_USER_EMAIL"
fi
git config --global credential.helper /usr/lib/git-core/git-credential-libsecret