Add command/option to reset CopyQ window to default state on show
- Dominant language
- C++
- Stars
- 12.3k
- Forks
- 593
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 9
Description
**Is your feature request related to a problem? Please describe.**
When CopyQ tray icon or global shortcut shows the main window, if the previous session left it in a non-default UI state — e.g. an item being inline-edited (F2), a search/filter active, a non-first tab selected, or focus on a deep-list item — the window reappears in that same state. There is currently no scripting API to query or cancel inline-edit mode, nor a built-in way to "reset" the UI. Users must manually press `Esc`, clear the filter, switch tabs, and re-select the first item, which is inconvenient especially for power users who want a clean "show clipboard history" experience every time.
**Describe the solution you'd like**
Add either:
- A new command such as `copyq resetView()`
- An option in Preferences → *Show/Hide* like *"Reset window to default state on show"*
The reset behavior should:
1. Cancel any active inline-edit (F2) mode
2. Clear the search/filter box
3. Switch to the default / first tab
4. Select and scroll to the first (most recent) clipboard item
**Describe alternatives you've considered**
- Using `copyq: filter(''); selectItems(0); setCurrentTab('clipboard'); show()` — this does **not** exit inline-edit mode.
- Sending `Esc` via external tools (`xdotool`, AutoHotkey, etc.) — works as a workaround but is fragile across Wayland/macOS and requires extra tooling outside CopyQ.
**Additional context**
- CopyQ version: 15.0.0
- OS: Linux (X11/Wayland) — also relevant on Windows & macOS
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.