From b3b6605af9aa665d7b0da27d8eeb38081c3b7be1 Mon Sep 17 00:00:00 2001 From: 28allday Date: Mon, 8 Jun 2026 19:20:59 +0100 Subject: [PATCH] install: auto-add the SUPER+SHIFT+V clipboard keybind too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The installer now writes both the keybind (bindings.conf) and the float rule (windows.conf) — idempotent, backed up, reloads Hyprland. It skips the keybind (with a printed fallback) if SUPER+SHIFT+V is already bound elsewhere, so it never stomps an existing shortcut. README updated: no manual keybind step. Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 32 ++++++++++++++------------------ install.sh | 33 +++++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 86b3efe..5421c34 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ cd omagrab ./install.sh ``` -Make sure `~/.local/bin` is on your `PATH`. The installer also prints an optional -`SUPER+SHIFT+V` clipboard keybind for you to add (see below). +Make sure `~/.local/bin` is on your `PATH`. On Omarchy it also wires up the +`SUPER+SHIFT+V` clipboard keybind (see below). ## Usage @@ -87,25 +87,21 @@ In the config view: `↑↓` move, `←→` change a value, `Esc` saves and retu > Single-letter commands (`c`, `d`, `q`) only act when the URL box is empty — so > they never get swallowed while you're typing or pasting a link. -## Clipboard keybind (optional) +## Clipboard keybind -The smoothest flow on Omarchy: copy a link in your browser, then summon omagrab as -a floating window with the URL already filled in. +The smoothest flow on Omarchy: **copy a link → `SUPER+SHIFT+V` → omagrab floats +with the URL ready → `Tab` to pick mode → `Enter`.** -The installer already added the floating window rule (`omagrab` floats small and -centered however it's launched), so all you need is the keybind. Add to -`~/.config/hypr/bindings.conf`: +The installer sets this up for you — it adds the `SUPER+SHIFT+V` keybind to +`~/.config/hypr/bindings.conf` and the floating window rule to +`~/.config/hypr/windows.conf`, then reloads Hyprland. Both are written between +clearly marked `omagrab` blocks (backed up first, never duplicated on re-run), so +they're easy to find, tweak or remove. -```ini -bindd = SUPER SHIFT, V, omagrab, exec, xdg-terminal-exec --app-id=omagrab -e omagrab --clip -``` - -Reload Hyprland (`hyprctl reload`). Now: **copy a link → `SUPER+SHIFT+V` → -omagrab floats with the URL ready → `Tab` to pick mode → `Enter`.** - -> Both the Walker entry and this keybind use the `omagrab` app-id, so the single -> window rule the installer wrote to `~/.config/hypr/windows.conf` covers them -> both. If you ever want to tweak the size, edit the `windowrule` block there. +> If `SUPER+SHIFT+V` is already bound to something else, the installer leaves your +> shortcut alone and prints the line for you to add under a different key. Both the +> Walker entry and the keybind use the `omagrab` app-id, so the one window rule +> covers every launch path — edit its `size` line in `windows.conf` to resize. ## Configuration diff --git a/install.sh b/install.sh index 18a5f00..8622774 100755 --- a/install.sh +++ b/install.sh @@ -164,14 +164,31 @@ EOF command -v hyprctl >/dev/null 2>&1 && hyprctl reload >/dev/null 2>&1 || true fi - cat <> "$bindings_conf" + echo " Added clipboard keybind: SUPER+SHIFT+V opens omagrab with the copied URL." + command -v hyprctl >/dev/null 2>&1 && hyprctl reload >/dev/null 2>&1 || true + fi fi case ":$PATH:" in