Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_HOME_MANAGER_SWITCH: "true"
- name: Create Pull Request
if: github.action != 'pull_request'
if: github.event_name != 'pull_request'
id: cpr
uses: peter-evans/create-pull-request@v8
with:
Expand Down
2 changes: 1 addition & 1 deletion config/hyprland/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ bind = $mod, E, exec, sh -c 'rofimoji --action copy --skin-tone neutral && sleep
# Window Management
# =============================================================================
bind = $mod, W, movetoworkspacesilent, special:minimized
bind = $mod SHIFT, W, togglespecialworkspace, minimized
bind = $mod SHIFT, W, exec, hyprctl -j clients | jq -r '.[] | select(.workspace.name == "special:minimized") | .address' | xargs -I{} hyprctl dispatch movetoworkspacesilent e+0,address:{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better performance, you can use hyprctl --batch to execute all dispatch commands in a single process. The current implementation with xargs -I{} spawns a new hyprctl process for each minimized window, which can be inefficient if many windows are minimized.

By generating all the dispatch commands with jq and piping them to a single hyprctl --batch call, you can achieve the same result more efficiently. hyprctl --batch is designed for this purpose and will read the commands from standard input.

bind = $mod SHIFT, W, exec, hyprctl -j clients | jq -r '.[] | select(.workspace.name == "special:minimized") | "dispatch movetoworkspacesilent e+0,address:" + .address' | hyprctl --batch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add --no-run-if-empty to avoid a spurious hyprctl call when nothing is minimized.

When no windows are in special:minimized, jq produces no output, but GNU xargs (without -r) still invokes the command once with an empty {}, resulting in an invalid hyprctl dispatch movetoworkspacesilent e+0,address: call. It's harmless (just a stderr error), but easy to avoid.

Proposed fix
-bind = $mod SHIFT, W, exec, hyprctl -j clients | jq -r '.[] | select(.workspace.name == "special:minimized") | .address' | xargs -I{} hyprctl dispatch movetoworkspacesilent e+0,address:{}
+bind = $mod SHIFT, W, exec, hyprctl -j clients | jq -r '.[] | select(.workspace.name == "special:minimized") | .address' | xargs -r -I{} hyprctl dispatch movetoworkspacesilent e+0,address:{}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
bind = $mod SHIFT, W, exec, hyprctl -j clients | jq -r '.[] | select(.workspace.name == "special:minimized") | .address' | xargs -I{} hyprctl dispatch movetoworkspacesilent e+0,address:{}
bind = $mod SHIFT, W, exec, hyprctl -j clients | jq -r '.[] | select(.workspace.name == "special:minimized") | .address' | xargs -r -I{} hyprctl dispatch movetoworkspacesilent e+0,address:{}
🤖 Prompt for AI Agents
In `@config/hyprland/hyprland.conf` at line 264, The bind line invoking
hyprctl/jq/xargs can call hyprctl with an empty address when nothing matches
"special:minimized"; update the command that uses xargs (the line starting with
bind = $mod SHIFT, W, exec, hyprctl ...) to pass the GNU xargs option
--no-run-if-empty (or -r) so hyprctl dispatch movetoworkspacesilent
e+0,address:{} is not executed when jq produces no output.

bind = $mod, Q, killactive,
bind = $mod SHIFT, F, togglefloating,
bind = CTRL ALT SHIFT SUPER, F, exec, hyprctl --batch "dispatch movetoworkspace empty; dispatch fullscreen 0"
Expand Down
Loading