Skip to content

feat(hyprland): add window resize, split toggle, and macOS-style screenshot keybindings - #760

Merged
shunkakinoki merged 2 commits into
mainfrom
feat/hyprland-keybindings
Feb 7, 2026
Merged

feat(hyprland): add window resize, split toggle, and macOS-style screenshot keybindings#760
shunkakinoki merged 2 commits into
mainfrom
feat/hyprland-keybindings

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Feb 7, 2026

Copy link
Copy Markdown
Owner

Changes

  • Add SUPER + ; / SUPER + ' for horizontal window resize
  • Add SUPER + CTRL + ; / SUPER + CTRL + ' for vertical window resize
  • Add SUPER + V for toggling split orientation (vertical/horizontal)
  • Add macOS-style screenshot/recording via Framework key:
    • Framework + Shift + 3 → full output screenshot
    • Framework + Shift + 4 → region select screenshot
    • Framework + Shift + 5 → screen recording
  • Remove SUPER + V VS Code launch binding

Testing

  • Verify keybindings work on matic (Framework 13 AI 300)

Generated with Claude Code


Summary by cubic

Add ergonomic Hyprland keybindings for window resize, split toggle, and macOS‑style screenshots/recording. Also cleans up old bindings and removes the Waybar restart helper.

  • New Features

    • Window resize: SUPER+;/' (horizontal), SUPER+CTRL+;/' (vertical)
    • Split orientation toggle: SUPER+V
    • Screenshots/recording: Framework+Shift+3/4/5 (output, region, record)
  • Refactors

    • Removed SUPER+V VS Code launch binding
    • Dropped Waybar restart from Makefile systemctl helpers

Written for commit 3664b26. Summary will update on new commits.

…enshot keybindings

- Add SUPER+;/' for horizontal resize and SUPER+CTRL+;/' for vertical resize
- Add SUPER+V for toggling split orientation (vertical/horizontal)
- Add Framework+Shift+3/4/5 for screenshot and screen recording (macOS-style)
- Remove SUPER+V VS Code launch binding
Copilot AI review requested due to automatic review settings February 7, 2026 19:44
@mesa-dot-dev

mesa-dot-dev Bot commented Feb 7, 2026

Copy link
Copy Markdown

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

@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 significantly enhances the Hyprland configuration by introducing a suite of new keybindings for more flexible window management, including precise resizing controls and a convenient split orientation toggle. It also integrates a user-friendly macOS-style screenshot and screen recording workflow. These changes aim to improve the overall desktop experience by providing more intuitive and efficient ways to interact with the window manager, alongside a minor cleanup in the build system.

Highlights

  • New Window Resize Keybindings: Introduced SUPER + ; and SUPER + ' for horizontal window resizing, and SUPER + CTRL + ; and SUPER + CTRL + ' for vertical window resizing in Hyprland.
  • Split Orientation Toggle: Added SUPER + V to toggle the split orientation (vertical/horizontal) of windows in Hyprland.
  • macOS-style Screenshot Keybindings: Implemented new keybindings for screenshots and screen recording: Framework + Shift + 3 for full output, Framework + Shift + 4 for region select, and Framework + Shift + 5 for screen recording.
  • Keybinding Reassignment: Removed the SUPER + V keybinding that previously launched VS Code, freeing it up for the split orientation toggle.
  • Makefile Cleanup: Removed the systemctl-waybar target and its inclusion from the main systemctl phony target in the Makefile.
Changelog
  • Makefile
    • Removed the systemctl-waybar target from the systemctl phony target.
    • Deleted the systemctl-waybar target definition and its associated commands.
  • config/hyprland/hyprland.conf
    • Removed the bind = $mod, V, exec, code keybinding.
    • Added binde = $mod, semicolon, resizeactive, -20 0 for horizontal left resize.
    • Added binde = $mod, apostrophe, resizeactive, 20 0 for horizontal right resize.
    • Added binde = $mod CTRL, semicolon, resizeactive, 0 -20 for vertical up resize.
    • Added binde = $mod CTRL, apostrophe, resizeactive, 0 20 for vertical down resize.
    • Added bind = $mod, V, layoutmsg, togglesplit to toggle split orientation.
    • Added bind = CTRL SHIFT, 3, exec, hyprshot -m output for full output screenshot.
    • Added bind = CTRL SHIFT, 4, exec, hyprshot -m region for region select screenshot.
    • Added bind = CTRL SHIFT, 5, exec, ~/.config/hypr/scripts/record-screen.sh for screen recording.
Activity
  • The changes were generated with Claude Code.
  • Testing was performed to verify keybindings on a Framework 13 AI 300 machine.
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.

@coderabbitai

coderabbitai Bot commented Feb 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Removed Waybar from the system service restart sequence
    • Updated keyboard shortcuts: Mod+V now toggles window layout instead of opening code editor
    • Restructured window resize keybindings
    • Added macOS-style screenshot capture shortcuts

Walkthrough

The Makefile removes the systemctl-waybar target and updates the systemctl phony target to exclude it from prerequisites. The Hyprland config replaces the VS Code launch binding with a layout toggle, expands window resize bindings with arrow key and directional controls, and adds macOS-style screenshot bindings.

Changes

Cohort / File(s) Summary
Build Configuration
Makefile
Removed systemctl-waybar target and updated systemctl phony target to exclude it from prerequisites.
Window Manager Keybindings
config/hyprland/hyprland.conf
Replaced $mod+V VS Code binding with layout toggle; expanded window resize bindings with arrow key and directional controls (CTRL+MOD combinations); added macOS-style screenshot bindings (CTRL SHIFT 3/4/5) in multiple sections.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A hop through the keys, so swift and so bright,
Waybar's rest, no restarts tonight,
Windows resize with arrows to guide,
Screenshots snap with macOS pride,
Keybinds dance as we toggle our way!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding window resize, split toggle, and macOS-style screenshot keybindings to Hyprland configuration.
Description check ✅ Passed The description is directly related to the changeset, detailing the specific keybindings added, removed, and providing testing information aligned with the file modifications.
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/hyprland-keybindings

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.

@mesa-dot-dev

mesa-dot-dev Bot commented Feb 7, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Added new Hyprland keybindings for window resizing, split orientation toggling, and macOS-style screenshot/recording functionality.

What changed?

  • Add SUPER + ; / SUPER + ' for horizontal window resize
  • Add SUPER + CTRL + ; / SUPER + CTRL + ' for vertical window resize
  • Add SUPER + V for toggling split orientation (vertical/horizontal)
  • Add macOS-style screenshot/recording via Framework key:
    • Framework + Shift + 3 → full output screenshot
    • Framework + Shift + 4 → region select screenshot
    • Framework + Shift + 5 → screen recording
  • Remove SUPER + V VS Code launch binding

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 2 files

@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 introduces several useful keybindings for Hyprland, including window resizing, toggling layout splits, and new screenshot/recording shortcuts inspired by macOS. However, the new screen recording binding triggers a script that uses an insecure temporary file for PID management, increasing the attack surface for local symlink and arbitrary process termination attacks. Additionally, the screen recording script has a potential issue with signal handling that could lead to corrupted video files, which has been detailed in a specific comment.

# macOS-style screenshot & recording (Framework+Shift+3/5 via keyd → Ctrl+Shift+3/5)
bind = CTRL SHIFT, 3, exec, hyprshot -m output
bind = CTRL SHIFT, 4, exec, hyprshot -m region
bind = CTRL SHIFT, 5, exec, ~/.config/hypr/scripts/record-screen.sh

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.

security-medium medium

The record-screen.sh script, executed by the new keybinding, uses a predictable PID file location at /tmp/wf-recorder.pid. This is vulnerable to a symlink attack, allowing a local attacker to overwrite sensitive files or terminate arbitrary processes. To remediate this, use a more secure location for the PID file, such as $XDG_RUNTIME_DIR/wf-recorder.pid or a user-specific directory with restricted permissions. Additionally, the script uses kill (defaulting to SIGTERM) to stop wf-recorder, which may cause wf-recorder to terminate without properly finalizing the video file, potentially leading to corruption. According to wf-recorder documentation, it expects a SIGINT signal for a graceful shutdown. Please consider updating the script to use kill -INT to ensure recordings are saved correctly.

@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`:
- Around line 357-360: Update the comment that currently says
"Framework+Shift+3/5" to correctly reflect all three bindings (3, 4, and 5);
locate the comment above the bind lines for the hyprshot and record-screen
commands (the lines binding CTRL SHIFT, 3 → "hyprshot -m output", CTRL SHIFT, 4
→ "hyprshot -m region", and CTRL SHIFT, 5 → "
~/.config/hypr/scripts/record-screen.sh") and change the text to include 4
(e.g., "Framework+Shift+3/4/5" or "Framework+Shift+3-5").

Comment on lines +357 to +360
# macOS-style screenshot & recording (Framework+Shift+3/5 via keyd → Ctrl+Shift+3/5)
bind = CTRL SHIFT, 3, exec, hyprshot -m output
bind = CTRL SHIFT, 4, exec, hyprshot -m region
bind = CTRL SHIFT, 5, exec, ~/.config/hypr/scripts/record-screen.sh

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

Comment mentions "3/5" but bindings cover 3, 4, and 5.

The comment on line 357 reads Framework+Shift+3/5 but there are three bindings: 3 (output), 4 (region), and 5 (recording). Update the comment to include 4.

📝 Proposed fix
-# macOS-style screenshot & recording (Framework+Shift+3/5 via keyd → Ctrl+Shift+3/5)
+# macOS-style screenshot & recording (Framework+Shift+3/4/5 via keyd → Ctrl+Shift+3/4/5)
📝 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
# macOS-style screenshot & recording (Framework+Shift+3/5 via keyd → Ctrl+Shift+3/5)
bind = CTRL SHIFT, 3, exec, hyprshot -m output
bind = CTRL SHIFT, 4, exec, hyprshot -m region
bind = CTRL SHIFT, 5, exec, ~/.config/hypr/scripts/record-screen.sh
# macOS-style screenshot & recording (Framework+Shift+3/4/5 via keyd → Ctrl+Shift+3/4/5)
bind = CTRL SHIFT, 3, exec, hyprshot -m output
bind = CTRL SHIFT, 4, exec, hyprshot -m region
bind = CTRL SHIFT, 5, exec, ~/.config/hypr/scripts/record-screen.sh
🤖 Prompt for AI Agents
In `@config/hyprland/hyprland.conf` around lines 357 - 360, Update the comment
that currently says "Framework+Shift+3/5" to correctly reflect all three
bindings (3, 4, and 5); locate the comment above the bind lines for the hyprshot
and record-screen commands (the lines binding CTRL SHIFT, 3 → "hyprshot -m
output", CTRL SHIFT, 4 → "hyprshot -m region", and CTRL SHIFT, 5 → "
~/.config/hypr/scripts/record-screen.sh") and change the text to include 4
(e.g., "Framework+Shift+3/4/5" or "Framework+Shift+3-5").

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

Adds additional Hyprland window-management and screenshot/recording keybindings to better match macOS-style shortcuts, and removes a Waybar restart helper from the Makefile.

Changes:

  • Add new Hyprland resize bindings (;/') and a split-orientation toggle ($mod+V).
  • Add macOS-style screenshot/recording bindings mapped via keyd to Ctrl+Shift+3/4/5.
  • Remove the systemctl-waybar Makefile target and drop it from the systemctl aggregate target.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
config/hyprland/hyprland.conf Adds new resize, split toggle, and screenshot/recording keybindings; removes $mod+V VS Code launch binding.
Makefile Removes systemctl-waybar target and updates systemctl dependencies accordingly.

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

bind = SHIFT, PRINT, exec, hyprshot -m window
bind = CTRL, PRINT, exec, hyprshot -m output

# macOS-style screenshot & recording (Framework+Shift+3/5 via keyd → Ctrl+Shift+3/5)

Copilot AI Feb 7, 2026

Copy link

Choose a reason for hiding this comment

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

The comment says “Framework+Shift+3/5 … → Ctrl+Shift+3/5”, but this block also defines a Ctrl+Shift+4 binding. Update the comment to reflect 3/4/5 so the documentation matches the actual keybindings.

Suggested change
# macOS-style screenshot & recording (Framework+Shift+3/5 via keyd → Ctrl+Shift+3/5)
# macOS-style screenshot & recording (Framework+Shift+3/4/5 via keyd → Ctrl+Shift+3/4/5)

Copilot uses AI. Check for mistakes.
Comment thread Makefile

.PHONY: systemctl
systemctl: systemctl-cliproxyapi systemctl-code-syncer systemctl-docker-postgres systemctl-dotfiles-updater systemctl-ollama systemctl-openclaw systemctl-waybar ## Restart all systemd user services.
systemctl: systemctl-cliproxyapi systemctl-code-syncer systemctl-docker-postgres systemctl-dotfiles-updater systemctl-ollama systemctl-openclaw ## Restart all systemd user services.

Copilot AI Feb 7, 2026

Copy link

Choose a reason for hiding this comment

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

This PR is described as Hyprland keybinding changes, but this Makefile change removes the systemctl-waybar target and changes the behavior of make systemctl. Either include this in the PR description (and rationale), or move it to a separate PR to keep scope focused.

Copilot uses AI. Check for mistakes.
Comment thread Makefile
@@ -787,15 +787,6 @@ systemctl-openclaw: ## Restart OpenClaw gateway systemd user service.
@systemctl --user restart openclaw-gateway.service || true
@echo "✅ openclaw restarted"

Copilot AI Feb 7, 2026

Copy link

Choose a reason for hiding this comment

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

After removing the systemctl-waybar target, the git-submodule-sync target now immediately follows the “Systemd Services (Linux)” section. Consider re-adding a ##@ Git Submodule section header here to keep the Makefile sections accurate and easy to scan.

Suggested change
##@ Git Submodule

Copilot uses AI. Check for mistakes.
@shunkakinoki
shunkakinoki merged commit a05f964 into main Feb 7, 2026
33 checks passed
@shunkakinoki
shunkakinoki deleted the feat/hyprland-keybindings branch February 7, 2026 19:47
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