- C 94.3%
- Shell 3.8%
- Meson 1.6%
- Python 0.3%
|
Daniel Eklöf
28c5a05fad
We always strdup() saved_action_name. strdup():ing it again when filling out the application entry leads to a memory leak: $ valgrind --leak-check=full ./fuzzel ==18079== Memcheck, a memory error detector ==18079== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==18079== Using Valgrind-3.25.1 and LibVEX; rerun with -h for copyright info ==18079== Command: ./fuzzel ==18079== warn: wayland.c:2946: gamma-correct-blending: disabling; not supported in cairo-enabled builds ==18079== ==18079== HEAP SUMMARY: ==18079== in use at exit: 21,052 bytes in 90 blocks ==18079== total heap usage: 86,076 allocs, 85,986 frees, 21,097,049 bytes allocated ==18079=わ=わ =わ=わ18079=わ=わ 4,284 bytes in 83 blocks are definitely lost in loss record 7 of 8 ==18079== at 0x48CC8A8: malloc (vg_replace_malloc.c:446) ==18079== by 0x5048423: wcsdup (wcsdup.c:28) ==18079== by 0x4010D26: c32dup (char32.c:78) ==18079== by 0x4047026: xc32dup (xmalloc.c:61) ==18079== by 0x4044766: parse_desktop_file (xdg.c:461) ==18079== by 0x404602F: scan_dir (xdg.c:694) ==18079== by 0x4046296: xdg_find_programs (xdg.c:736) ==18079== by 0x40215FB: populate_apps (main.c:612) ==18079== by 0x501C31C: start_thread (pthread_create.c:451) ==18079== by 0x509C653: clone (clone.S:100) ==18079== ==18079== LEAK SUMMARY: ==18079== definitely lost: 4,284 bytes in 83 blocks ==18079== indirectly lost: 0 bytes in 0 blocks ==18079== possibly lost: 0 bytes in 0 blocks ==18079== still reachable: 16,768 bytes in 7 blocks ==18079== suppressed: 0 bytes in 0 blocks ==18079== Reachable blocks (those to which a pointer was found) are not shown. ==18079== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==18079== ==18079== For lists of detected and suppressed errors, rerun with: -s ==18079== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Note, saved_action_name _is_ used in multiple places in the application struct. This patch uses the original copy in the *first* place, while still strdup():ing it in the rest of the places it's used. |
||
|---|---|---|
| .builds | ci: freebsd: 'wlroots' is not a package | |
| .forgejo/issue_template | docs: typo fix in issue template | |
| 3rd-party/nanosvg | nanosvg: update to ea6a6aca009422bba0dbad4c80df6e6ba0c82183 | |
| completions | config: add --mesg, --mesg-mode and --message-color command line options | |
| doc | render: handle non-sensical image-size-ratio=0 case | |
| external | wayland: narrow use of transparent-first-frame hack | |
| nanosvg | ||
| subprojects | ||
| test | 🐛 Fix sort order regression from 1.14.0 | |
| .editorconfig | internal: Add .editorconfig for shared cross-editor settings | |
| .gitignore | ||
| .gitmodules | ||
| .woodpecker.yaml | ||
| application.c | launch-prefix: Pass more environment variables | |
| application.h | launch-prefix: Pass more environment variables | |
| CHANGELOG.md | render: handle non-sensical image-size-ratio=0 case | |
| char32.c | OpenBSD has UTF-32 | |
| char32.h | macros: replace direct use of __attribute__ with portable wrapper macros | |
| clipboard.c | clipboard: disable debug logging | |
| clipboard.h | ||
| column.c | column: fix off-by-one when splitting input into columns | |
| column.h | config: --nth-delimiter=CHR | |
| config.c | config: add --mesg, --mesg-mode and --message-color command line options | |
| config.h | config: add --mesg, --mesg-mode and --message-color command line options | |
| debug.c | ||
| debug.h | ||
| dmenu.c | dmenu: add support for --match-nth | |
| dmenu.h | dmenu: add support for --match-nth | |
| event.c | ||
| event.h | ||
| fdm.c | Add xmalloc.h and xsnprintf.h and use to improve/simplify error handling | |
| fdm.h | ||
| fuzzel.ini | docs: fuzzel.ini add auto-select default | |
| generate-version.sh | ||
| icon.c | parse_theme: ignore whitespace around KV pairs and skip malformed lines | |
| icon.h | icon: in application mode (not dmenu), filter out non-application icon theme dirs | |
| key-binding.c | key-binding: fix crash in debug builds, if exiting early | |
| key-binding.h |
Add delete-line binding
|
|
| LICENSE | ||
| log.c | macros: replace direct use of __attribute__ with portable wrapper macros | |
| log.h | macros: replace direct use of __attribute__ with portable wrapper macros | |
| macros.h | macros: replace direct use of __attribute__ with portable wrapper macros | |
| main.c | config: add --mesg, --mesg-mode and --message-color command line options | |
| match.c | 🐛 Fix sort order regression from 1.14.0 | |
| match.h | match: fzf: prioritize matches at word boundary, like fzf | |
| meson.build | meson+pkgbuild: bump version to 1.14.1 | |
| meson_options.txt | ✨ Add resvg as SVG render option. | |
| nanosvg.c | ||
| nanosvgrast.c | ||
| path.c | path/xdg/main: include errno(3) description in more LOG_WARN() messages | |
| path.h | ||
| PKGBUILD | meson+pkgbuild: bump version to 1.14.1 | |
| png-fuzzel.h | Implement gamma-correct blending | |
| png.c | Implement gamma-correct blending | |
| prompt.c | render: scroll input to ensure cursor is always visible | |
| prompt.h | Add xmalloc.h and xsnprintf.h and use to improve/simplify error handling | |
| README.md | docs(readme): cairo no longer required for rounded corners | |
| render.c | render: fix pixman_filter_create_separable_convolution call | |
| render.h | config: add --mesg, --mesg-mode and --message-color command line options | |
| shm.c | Implement gamma-correct blending | |
| shm.h | Implement gamma-correct blending | |
| srgb.py | Implement gamma-correct blending | |
| stride.h | ||
| timing.c | timing: finish: use time_stamp() when stop == NULL | |
| timing.h | timing: rename time_end() -> time_finish() | |
| uri.c | Add xmalloc.h and xsnprintf.h and use to improve/simplify error handling | |
| uri.h | ||
| wayland.c | wayland: xdg-output-manager global may arrive after output globals | |
| wayland.h | wayland: improve scrolling with mouse wheel and touchpad | |
| xdg.c | xdg: plug memory leak; saved_action_name is already strdup:ed once | |
| xdg.h | ||
| xmalloc.c | Add xmalloc.h and xsnprintf.h and use to improve/simplify error handling | |
| xmalloc.h | Add xmalloc.h and xsnprintf.h and use to improve/simplify error handling | |
| xsnprintf.c | Add xmalloc.h and xsnprintf.h and use to improve/simplify error handling | |
| xsnprintf.h | Add xmalloc.h and xsnprintf.h and use to improve/simplify error handling | |
Fuzzel
Fuzzel is a Wayland-native application launcher and fuzzy finder, inspired by rofi and dmenu.
Screenshot
Fuzzel, with transparency, on top of a browser window showing a diff of a fuzzel commit
Features
For app launching
- Fuzzy-find applications from a list and launch them
- Icon support
- Remembers frequently launched applications
- Customize which
.desktopfiles are searched - Option to filter apps based on
OnlyShowInandNotShowIn - Startup notification support
- Launch prefix option to customize how apps are launched
- Display a large icon of current selection if there are only a few matches
- Option to display executables in $PATH
- Option to execute the input rather than return an app
- Support for localized strings
For dmenu mode
- dmenu mode where newline separated entries are read from STDIN
- Support for Rofi's protocol to support icons
- Optional cache with custom path
- Password mode
- Prompt-only mode
- Exact-match option to support multi-stage menus
- Option to return index of what's selected rather than what's selected
- Some dmenu option compatibility. Invoking it as
dmenuenables dmenu mode - Option for null-separated input
For all modes
- Numerous customizable key bindings, based on Emacs
- Mouse & touchscreen support
- Paste support
- Emoji support
- A number of theming options, which can be set in a separate
includefile - fzf-style matching with ability to filter huge lists
- Optimized for performance
- Zsh and Fish completions
- Support for true fractional scaling
- Wayland native
For details, see man fuzzel and man fuzzel.ini
Requirements
Runtime
- pixman
- wayland (client and cursor libraries)
- xkbcommon
- cairo (optional, required by librsvg)
- libpng (optional)
- librsvg (optional, for enhanced SVG icon support)
- fcft 1
Fuzzel uses the builtin nanosvg backend to render SVG icons by default. Since nanosvg is somewhat limited, we also offer a librsvg backend for SVG icons. Note that librsvg also requires cairo.
Building
Installation
To build, first, create a build directory, and switch to it:
mkdir -p bld/release && cd bld/release
Second, configure the build (if you intend to install it globally, you
might also want --prefix=/usr):
meson --buildtype=release \
-Denable-cairo=disabled|enabled|auto \
-Dpng-backend=none|libpng \
-Dsvg-backend=none|librsvg|nanosvg \
../..
-D{png,svg}-backend can be used to force-enable or force-disable a
specific png and/or svg backend. Note that nanosvg is builtin
(i.e. it needs to external dependencies).
-Denable-cairo can be used to force-enable or force-disable cairo support.
When disabled, fuzzel will not support SVGs using the librsvg backend.
Three, build it:
ninja
You can now run it directly from the build directory:
./fuzzel
Use command line arguments to configure the look-and-feel:
./fuzzel --help
Optionally, install it:
ninja install
For more detailed configuration information, see the man pages:
man fuzzel
man fuzzel.ini
Testing
Fuzzel has some automated tests in test/. To run them, Fish shell and wtype are required.
The test runner can be installed within Fish shell with:
fisher install jorgebucaran/fishtape
Once installed, the tests can be run with:
fishtape test/*.fish
License
Fuzzel is released under the MIT license.
Fuzzel uses nanosvg, released under the Zlib license.
Sponsoring/donations
- Liberapay: https://liberapay.com/dnkl
- GitHub Sponsors: https://github.com/sponsors/dnkl
-
can also be built as subprojects, in which case they are statically linked. ↩︎