Update hyprlock.sh
This commit is contained in:
parent
fdf8b0bcec
commit
8309d9529a
12
hyprlock.sh
12
hyprlock.sh
@ -17,7 +17,7 @@ if [ "$1" == "" ]; then
|
|||||||
|
|
||||||
if [ $(echo "$monitor" | jq -j ".y") -eq $unlockedMonitorYPosition ]; then continue; fi
|
if [ $(echo "$monitor" | jq -j ".y") -eq $unlockedMonitorYPosition ]; then continue; fi
|
||||||
|
|
||||||
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x$unlockedMonitorYPosition,$(echo "$monitor" | jq -j ".scale")
|
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x$unlockedMonitorYPosition,$(echo "$monitor" | jq -j ".scale") > /dev/null
|
||||||
|
|
||||||
monitorUnlocked=1
|
monitorUnlocked=1
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ if [ "$1" == "" ]; then
|
|||||||
|
|
||||||
if [ $(echo "$monitor" | jq -j ".focused") == "false" ]; then continue; fi
|
if [ $(echo "$monitor" | jq -j ".focused") == "false" ]; then continue; fi
|
||||||
|
|
||||||
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x${lockedMonitorYPositions[$monitorIndex]},$(echo "$monitor" | jq -j ".scale")
|
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x${lockedMonitorYPositions[$monitorIndex]},$(echo "$monitor" | jq -j ".scale") > /dev/null
|
||||||
|
|
||||||
echo Locked monitor $monitorIndex
|
echo Locked monitor $monitorIndex
|
||||||
exit
|
exit
|
||||||
@ -68,12 +68,12 @@ monitor=$(echo "$monitors" | jq -c ".[$1]")
|
|||||||
unlockedMonitorYPosition=${unlockedMonitorYPositions[$1]}
|
unlockedMonitorYPosition=${unlockedMonitorYPositions[$1]}
|
||||||
|
|
||||||
if [ $(echo "$monitor" | jq -j ".y") -eq $unlockedMonitorYPosition ]; then
|
if [ $(echo "$monitor" | jq -j ".y") -eq $unlockedMonitorYPosition ]; then
|
||||||
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x${lockedMonitorYPositions[$monitorIndex]},$(echo "$monitor" | jq -j ".scale")
|
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x${lockedMonitorYPositions[$monitorIndex]},$(echo "$monitor" | jq -j ".scale") > /dev/null
|
||||||
|
|
||||||
echo Locked monitor $monitorIndex
|
echo Locked monitor $1
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x$unlockedMonitorYPosition,$(echo "$monitor" | jq -j ".scale")
|
hyprctl keyword monitor $(echo "$monitor" | jq -j ".name"),$(echo "$monitor" | jq -j ".width")x$(echo "$monitor" | jq -j ".height")@$(echo "$monitor" | jq -j ".refreshRate"),$(echo "$monitor" | jq -j ".x")x$unlockedMonitorYPosition,$(echo "$monitor" | jq -j ".scale") > /dev/null
|
||||||
|
|
||||||
echo Unlocked monitor $monitorIndex
|
echo Unlocked monitor $1
|
Loading…
Reference in New Issue
Block a user