Skip to content

fix: restore minimized windows to current workspace - #773

Merged
shunkakinoki merged 2 commits into
mainfrom
feat/macos-window-keybinds
Feb 9, 2026
Merged

fix: restore minimized windows to current workspace#773
shunkakinoki merged 2 commits into
mainfrom
feat/macos-window-keybinds

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Feb 9, 2026

Copy link
Copy Markdown
Owner

Changes

Keybind summary

  • Super+W — minimize (hide to special:minimized)
  • Super+Shift+W — restore all minimized windows to current workspace
  • Super+Q — kill active window

Testing

  • Minimize windows with Super+W, restore with Super+Shift+W — windows return to current workspace without overlay

Generated with Claude Code by claude-opus-4-6


Summary by cubic

Super+Shift+W now restores all minimized windows to the current workspace instead of toggling the special:minimized overlay. Super+W still minimizes to special:minimized, Super+Q still kills the active window, and the upgrade workflow now only creates PRs when the event is not pull_request.

Written for commit 94b8096. Summary will update on new commits.

Copilot AI review requested due to automatic review settings February 9, 2026 14:51
@shunkakinoki
shunkakinoki enabled auto-merge (squash) February 9, 2026 14:51
@mesa-dot-dev

mesa-dot-dev Bot commented Feb 9, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@coderabbitai

coderabbitai Bot commented Feb 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Updated workflow automation conditions for pull request handling.
  • Improvements

    • Enhanced keyboard shortcut for managing minimized windows with improved workspace addressing.

Walkthrough

The pull request updates a GitHub Actions workflow condition and modifies a Hyprland window manager key binding. The workflow change alters when pull request creation occurs, while the key binding change replaces simple workspace toggling with dynamic workspace address resolution using command chaining.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/upgrade.yml
Updated the "Create Pull Request" step condition from github.action to github.event_name for more accurate PR event detection.
Hyprland Configuration
config/hyprland/hyprland.conf
Replaced mod+Shift+W key binding from a simple workspace toggle to a dynamic operation that resolves workspace address via hyprctl/jq and moves the active window using movetoworkspacesilent.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A workflow evolves, conditions refined,
Window bindings now dance with workspace aligned,
From toggle to query, the keys find their way,
Configuration whispers, a smarter display!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: rebinding Super+Shift+W to restore minimized windows to the current workspace, which is the primary focus of the hyprland.conf modification.
Description check ✅ Passed The description is directly related to the changeset, providing context about the keybind changes, their purpose, testing approach, and connection to prior work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/macos-window-keybinds

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the window management keybinds within the Hyprland configuration. The primary goal is to provide a more intuitive and functional way to minimize and restore windows, separating these actions from the 'kill window' command. It introduces a dedicated 'minimize' action that moves windows to a special workspace and a corresponding 'restore' action to bring them back, enhancing the user's control over their workspace layout.

Highlights

  • Window Minimization: The Super+W keybind has been reconfigured to minimize the active window by moving it to a dedicated special:minimized workspace, rather than killing it.
  • Window Restoration: A new Super+Shift+W keybind has been introduced. This keybind executes a command to identify all windows currently in the special:minimized workspace and moves them back to the current active workspace, effectively restoring them.
  • Kill Active Window: The functionality to kill the active window, previously bound to Super+W, has been moved to a new Super+Q keybind.
Changelog
  • config/hyprland/hyprland.conf
    • Modified bind = $mod, W to movetoworkspacesilent, special:minimized to minimize windows.
    • Added bind = $mod SHIFT, W to execute a command that restores all windows from special:minimized to the current workspace.
    • Added bind = $mod, Q to killactive for terminating the active window.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Feb 9, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Super+Shift+W now restores all minimized windows to the current workspace, fixing an issue where it previously toggled a special workspace overlay.

What changed?

  • config/hyprland/hyprland.conf: The keybinding $mod SHIFT, W was updated to un-minimize all clients from the special:minimized workspace by moving them to an empty workspace.

Description generated by Mesa. Update settings

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 1 file

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates window management keybindings to implement a minimize/restore feature using a special workspace. The Super+W keybind is changed from killing a window to moving it to a 'minimized' workspace, while Super+Shift+W is introduced to restore all minimized windows. The killactive command is moved to Super+Q. The implementation is sound, but I have one suggestion to improve the efficiency of the command that restores windows by using hyprctl --batch.

# =============================================================================
bind = $mod, W, killactive,
bind = $mod, W, movetoworkspacesilent, special: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

Super+Shift+W now moves all minimized windows back to the current
workspace instead of toggling a special workspace overlay.
@shunkakinoki
shunkakinoki force-pushed the feat/macos-window-keybinds branch from 42804a3 to 6441e91 Compare February 9, 2026 14:55

Copilot AI left a comment

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.

Pull request overview

Updates Hyprland window-management keybinds to support a “minimize to special workspace” flow and restore minimized windows back onto the currently active workspace (follow-up to #772’s macOS-style binds).

Changes:

  • Change Super+W to minimize by moving the focused window to special:minimized.
  • Add Super+Shift+W to restore all windows from special:minimized to the current workspace (without toggling an overlay).
  • Ensure Super+Q is the kill-active-window binding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shunkakinoki
shunkakinoki disabled auto-merge February 9, 2026 14:59

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@config/hyprland/hyprland.conf`:
- 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, 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

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.

@shunkakinoki
shunkakinoki merged commit 5f9af59 into main Feb 9, 2026
11 of 33 checks passed
@shunkakinoki
shunkakinoki deleted the feat/macos-window-keybinds branch February 9, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants