fix: type image path when pasting clipboard images into terminals - #11998
Open
HIMANSHU11827 wants to merge 1 commit into
Open
HIMANSHU11827 wants to merge 1 commit into
HIMANSHU11827 wants to merge 1 commit into
Conversation
Terminals only accept text, so picking an image from clipboard history while a terminal is focused silently pasted nothing. Detect terminal focus via hyprctl and type the file path instead; GUI targets keep the shift-insert image paste.
HIMANSHU11827
force-pushed
the
fix/clipboard-image-paste-terminal-path
branch
from
September 15, 2026 19:16
b46c339 to
0f8191e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Picking an image (e.g. a screenshot) from clipboard history (
Super + Ctrl + V) while a terminal is focused silently pastes nothing:omarchy-clipboard-paste-fileputsimage/pngon the clipboard and sends Shift+Insert, but terminals only accept text.Fix
In
bin/omarchy-clipboard-paste-file, when the mime isimage/*and the Hyprland focused window is a terminal (foot/kitty/ghostty/alacritty/wezterm/konsole/tilix or any*term*class), type the file path withwtypeinstead of sending Shift+Insert. GUI targets and non-image files behave exactly as before, as does everything when focus can't be determined. No QML changes needed — the history picker calls the same command.Verification
commandcode --version-> 1.54.0,qwenaudio --help(full gateway/tui/webui tree), colibri engine built from source with gcc+OpenMP (make -C c colibri, engine +colilauncher run).test/shell.d/clipboard-test.shgreen, including 4 new cases: path typed into terminals, shift-insert preserved for GUI apps / non-images / undetectable focus../test/cligreen.manual/08-unified-clipboard-history.md.