Skip to content

Commit

Permalink
grimblast: fix window area selection on fullscreen workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckShiba authored and fufexan committed Dec 1, 2024
1 parent 792f6b8 commit d7c5514
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 2024-12-01

grimblast: fix window selection on fullscreen

### 2024-11-04

grimblast: use layerrules instead of modifying animations
Expand Down
3 changes: 2 additions & 1 deletion grimblast/grimblast
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ elif [ "$SUBJECT" = "area" ]; then
# this removes the black border seen around screenshots
hyprctl keyword layerrule "noanim,selection" >/dev/null

FULLSCREEN_WORKSPACES="$(hyprctl workspaces -j | jq -r 'map(select(.hasfullscreen) | .id)')"
WORKSPACES="$(hyprctl monitors -j | jq -r '[(foreach .[] as $monitor (0; if $monitor.specialWorkspace.name == "" then $monitor.activeWorkspace else $monitor.specialWorkspace end)).id]')"
WINDOWS="$(hyprctl clients -j | jq -r --argjson workspaces "$WORKSPACES" 'map(select([.workspace.id] | inside($workspaces)))')"
WINDOWS="$(hyprctl clients -j | jq -r --argjson workspaces "$WORKSPACES" --argjson fullscreenWorkspaces "$FULLSCREEN_WORKSPACES" 'map((select(([.workspace.id] | inside($workspaces)) and ([.workspace.id] | inside($fullscreenWorkspaces) | not) or .fullscreen > 0)))')"
# shellcheck disable=2086 # if we don't split, spaces mess up slurp
GEOM=$(echo "$WINDOWS" | jq -r '.[] | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | slurp $SLURP_ARGS)

Expand Down

0 comments on commit d7c5514

Please sign in to comment.