Vendor the command set the menu and shell depend on
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# blob:summary=Print monitor panel state for the shell
|
||||
# blob:group=monitor
|
||||
|
||||
monitors_json=$(hyprctl monitors all -j)
|
||||
focused_monitor=$(printf '%s\n' "$monitors_json" | jq -r '[.[] | select(.focused == true)][0].name // ""')
|
||||
|
||||
{ blob-brightness-display --monitor "$focused_monitor" 2>/dev/null; echo; } | head -n 1
|
||||
|
||||
printf '%s\n' "$monitors_json" | jq -r '
|
||||
def internal: test("^(eDP|LVDS|DSI)-");
|
||||
([.[] | select(.name | internal)][0].name // ""),
|
||||
([.[] | select((.name | internal) | not)][0].name // ""),
|
||||
([.[] | select((.name | internal) and .disabled != true)][0].name // ""),
|
||||
([.[] | select(.mirrorOf != "none") | if (.name | internal) then .mirrorOf else .name end][0] // "")
|
||||
'
|
||||
|
||||
printf '%s\n' "$focused_monitor"
|
||||
blob-hypr-monitor-scaling 2>/dev/null || echo
|
||||
|
||||
printf '%s\n' "$monitors_json" | jq -c \
|
||||
'[.[] | {name, enabled:(.disabled != true), focused:(.focused == true), width, height}]'
|
||||
Reference in New Issue
Block a user