Files
Panama/config/local/share/vicinae/scripts/search-web
T
Gabriel Brown 9092a80f66 Search from the launcher, and give the touchpad something to do
Four things a Hyprland desktop can do that this one was not.

Searching from the launcher needed no launcher work at all: Vicinae already
models it, so this is a script command with one percent-encoded argument. Make
it the fallback command and anything typed that matches nothing else offers to
search it. Bangs come free -- they are a property of where the query is sent,
not of the launcher -- so !yt reaches YouTube without a line of bang parsing.

Suggestions could not be a script command. They need a view that reacts as you
type, which is an extension: TypeScript, compiled, querying the same endpoint
Firefox's address bar uses. It debounces, and aborts the request in flight on
every keystroke -- typing is faster than the network, and an older answer
landing after a newer one leaves the list describing a query that is no longer
on screen. A bang skips suggestions entirely, because Google has no useful
guesses about "!yt".

The engine is now written down twice, once in each. The contract pins that they
agree, since searching from the fallback and searching from the suggestions
reaching different places is the kind of wrong that looks fine.

Gestures mirror GNOME: three fingers sideways for workspaces, up for the
overview, down to dismiss it. Open and close rather than toggle both ways --
toggling means swiping up from an open overview closes it, which is not what the
fingers meant. Hyprland reads gesture registrations at startup so they cannot be
a setting, but distance and direction can be, and are.

Window swallowing is off by default and a preference like every other misc
setting here. A terminal that vanishes when you did not ask for it is confusing
rather than broken, which is worse.

Claude-Session: https://claude.ai/code/session_01Q84axqUE5inJhf5Jz9CFy1
2026-08-21 01:49:29 -04:00

30 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# @vicinae.schemaVersion 1
# @vicinae.title Search the web
# @vicinae.mode silent
# @vicinae.icon ../../icons/hicolor/scalable/apps/panama-settings.svg
# @vicinae.description Search from the launcher, with bang syntax, in the default browser.
# @vicinae.keywords ["search", "web", "google", "bang", "find"]
# @vicinae.argument1 { "type": "text", "placeholder": "search, or !bang to jump", "percentEncoded": true }
# Search without leaving the launcher.
#
# Make this the fallback command -- "Manage fallback commands" in Vicinae -- and
# anything typed that matches nothing else offers this at the bottom of the
# results. That designation is per-machine state Vicinae keeps in its own
# database, so it is one click rather than something Panama ships.
#
# The engine is a client-side bang redirector: it resolves DuckDuckGo-style
# bangs in the browser rather than round-tripping through a search engine to be
# redirected, and falls through to a normal search when there is no bang. So
# `!yt tiling` reaches YouTube directly, and bang support costs nothing here --
# it is a property of where this points, not of the launcher.
#
# percentEncoded on the argument means Vicinae URL-encodes the query before it
# arrives, which is what keeps `&`, `#` and spaces from truncating the search.
#
# xdg-open rather than a named browser: the default browser is already a setting
# this desktop owns, on the Applications page, and naming one here would quietly
# outrank it.
exec xdg-open "https://bang.gibbyb.com/?q=$1"