GoFinder — a fast, lightweight application launcher written in Go using the Fyne GUI toolkit. It focuses on quick keyboard-driven discovery and launch of installed applications, system tray presence, and a global hotkey to toggle visibility.
-
-
Windows is partially supported (extraction of icons from executables and shortcuts, global hotkey, tray integration).
-
Linux implements discovery via
.desktopfiles and returnsApplicationobjects but lacks some integrations (tray behavior and advanced icon extraction).
-
cmd/ # main entry & build resources
core/ # cross-cutting core modules (hotkey, resource, ui, logger)
logic/ # platform-specific discovery, execution and icon logic
models/ # data models (Application, AppState, ...)
- Discover installed applications per-platform (
.lnkon Windows,.desktopon Linux). - Present a small keyboard-focused UI to search and launch apps.
- Show application icons when available (no reserved space if icon is missing).
- Register a global hotkey to toggle the launcher (native implementation for Windows via
cgobridge). - Keep a system tray icon while the launcher runs in the background.
- Pluggable AppFinders:
logic.AppFinderis an interface implemented per OS (windowsAppFinder,linuxAppFinder).FindApplications()picks the correct implementation at runtime. - Separation of concerns:
coreholds UI and platform-agnostic code,logiccontains OS-specific implementations (discovery, icon extraction, runner). - Icon pipeline (Windows): try image files (
.png,.ico),ExtractIconExwith index,SHGetFileInfo, or as a last resort the executable icon.HICONobjects are converted to Goimage.Image, encoded as PNG and wrapped infyne.Resource. - Caching: icons are cached in-memory (
map[string]fyne.Resource) protected bysync.RWMutexto avoid repeated extraction. - Hotkey: a native (C) bridge registers a global hotkey on Windows; the Go side receives toggle/exit events.
- UI:
core/uiexposes aLauncherand aThemeConfigto centralize visual metrics and behavior (search entry, styled list, selection handling).
Requirements:
- Go 1.20+ (or compatible)
- A C toolchain for building code that uses
cgo(Windows native hotkey registration) when compiling on or for Windows.
Build is handled via a Makefile. Common commands:
make run # Run GoFinder locally
make build # Build for the current platform (binary in ./build)
make build-windows # Build for Windows
make build-linux # Build for Linux
make clean # Clean build artifactsAdd or verify the following in go.mod:
fyne.io/fyne/v2— GUI toolkit.github.com/lxn/win— Win32 wrappers used for icon extraction and GDI.golang.org/x/sys/windows— low-level Windows syscalls.github.com/parsiya/golnk— parse Windows.lnkshortcuts.github.com/fyne-io/image/ico— decode.icofiles.
- Build with
make build(or the appropriate target). - Run the executable from
./build(e.g.,./build/goFinder.exeon Windows). - The app will place an icon in the system tray and remain running.
- Use the configured global hotkey to toggle the launcher UI. Type to filter results, navigate with the arrow keys, and press Enter to launch.
.lnkparsing may yield paths containing environment variables — the code expands and normalizes them and warns if targets are missing or inaccessible.- Icon extraction uses Win32 APIs and may fail on restricted accounts; the code falls back gracefully to other icon sources.
- If the hotkey registration fails, verify that another application does not already hold the same combination and that the process has permission to register global hotkeys on the platform.
- Entry point:
cmd/main.go→logic.FindApplications()→ui.RunLauncher(apps). - Platform-specific files use build tags (e.g.
//go:build windows) — they will be excluded on unsupported platforms. - To inspect icon extraction behavior, review
logic/windows_icon.goand the conversion functionIconHandleToImage.
- [~] Linux —
.desktopdiscovery implemented; add tray and enhanced icon resolution. - [~] Tests
- [~] Logging
- [~] Themes
- [~] Configuration for keybinding/themes ...
GoFinder is licensed under the MIT License - see the LICENSE file for details.