Add omarchy-hyprland-monitor-laptop for internal display lookup
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
fe036a82fa
commit
528a4343a9
@@ -8,7 +8,7 @@ CLAMSHELL_FLAG="$TOGGLES_DIR/internal-monitor-clamshell.lua"
|
||||
MANUAL_DISABLE_FLAG="$TOGGLES_DIR/internal-monitor-disable.lua"
|
||||
SCALE_STATE="$TOGGLES_DIR/internal-monitor-scale"
|
||||
|
||||
INTERNAL=$(hyprctl monitors all -j | jq -r '.[] | select(.name | test("^(eDP|LVDS|DSI)-")).name' | head -n 1)
|
||||
INTERNAL=$(omarchy-hyprland-monitor-laptop)
|
||||
|
||||
valid_scale() {
|
||||
[[ $1 =~ ^[0-9]+([.][0-9]+)?$ ]]
|
||||
|
||||
@@ -7,8 +7,7 @@ TOGGLE="internal-monitor-disable"
|
||||
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.lua"
|
||||
MIRROR_TOGGLE="internal-monitor-mirror"
|
||||
|
||||
# Get internal monitor name dynamically, including disabled outputs.
|
||||
INTERNAL=$(hyprctl monitors all -j | jq -r '.[] | select(.name | test("^(eDP|LVDS|DSI)-")).name' | head -n 1)
|
||||
INTERNAL=$(omarchy-hyprland-monitor-laptop)
|
||||
|
||||
wake() {
|
||||
hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' >/dev/null 2>&1 || true
|
||||
|
||||
@@ -7,9 +7,8 @@ TOGGLE="internal-monitor-mirror"
|
||||
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.lua"
|
||||
DISABLE_TOGGLE="internal-monitor-disable"
|
||||
|
||||
# Get names dynamically
|
||||
INTERNAL=$(hyprctl monitors -j | jq -r '.[] | select(.name | test("^(eDP|LVDS|DSI)-")).name' | head -n 1)
|
||||
# Get the first available external monitor
|
||||
INTERNAL=$(omarchy-hyprland-monitor-laptop)
|
||||
# The first active external monitor
|
||||
EXTERNAL=$(hyprctl monitors -j | jq -r '.[] | select(.name | test("^(eDP|LVDS|DSI)-") | not).name' | head -n 1)
|
||||
|
||||
on() {
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Print the name of the built-in laptop display, including disabled outputs.
|
||||
|
||||
hyprctl monitors all -j | jq -r '.[] | select(.name | test("^(eDP|LVDS|DSI)-")).name' | head -n 1
|
||||
Reference in New Issue
Block a user