mirror of
https://github.com/hyprwm/contrib.git
synced 2025-05-13 05:40:41 +01:00
grimblast: use '--batch' for 'hyprctl' to limit the number of control calls (#145)
This commit is contained in:
parent
7f846cee96
commit
bd81329944
2 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
### 2025-03-16
|
||||||
|
|
||||||
|
grimblast: use '--batch' for 'hyprctl' to limit the number of control calls
|
||||||
|
|
||||||
### 2025-03-15
|
### 2025-03-15
|
||||||
|
|
||||||
grimblast: remove moveCursorPosition and restoreCursorPosition for OUTPUT and duplicate jq command
|
grimblast: remove moveCursorPosition and restoreCursorPosition for OUTPUT and duplicate jq command
|
||||||
|
|
|
@ -194,15 +194,12 @@ moveCursorPosition() {
|
||||||
virtualDisplayName="grimblastVD"
|
virtualDisplayName="grimblastVD"
|
||||||
focusedMonitorName=$(hyprctl -j monitors | jq -r '.[] | select( .focused == true ) | .name')
|
focusedMonitorName=$(hyprctl -j monitors | jq -r '.[] | select( .focused == true ) | .name')
|
||||||
|
|
||||||
hyprctl output create headless "$virtualDisplayName" >/dev/null
|
hyprctl --batch "output create headless $virtualDisplayName; dispatch focusmonitor $virtualDisplayName" >/dev/null
|
||||||
hyprctl dispatch focusmonitor "$virtualDisplayName" >/dev/null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
restoreCursorPosition() {
|
restoreCursorPosition() {
|
||||||
[ "$GRIMBLAST_HIDE_CURSOR" ] && return 0
|
[ "$GRIMBLAST_HIDE_CURSOR" ] && return 0
|
||||||
hyprctl dispatch focusmonitor "$focusedMonitorName" >/dev/null
|
hyprctl --batch "dispatch focusmonitor $focusedMonitorName; output remove $virtualDisplayName; dispatch movecursor ${initialCursorPosition//,/}" >/dev/null
|
||||||
hyprctl output remove "$virtualDisplayName" >/dev/null
|
|
||||||
hyprctl dispatch movecursor "${initialCursorPosition//,/}" >/dev/null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
takeScreenshot() {
|
takeScreenshot() {
|
||||||
|
|
Loading…
Reference in a new issue