Commit Graph

466 Commits

Author SHA1 Message Date
Jari Vetoniemi
81f10dfed7 ci: add symbol validation
checks for missing public symbols, leaked symbols and that plugins only
contains the register_plugin symbol.
2022-02-19 09:38:02 +09:00
Jari Vetoniemi
9817071f3a menu: make bm_menu_item_is_selected internal 2022-02-19 09:38:02 +09:00
Jari Vetoniemi
b427e0d35e internal: remove util.h include 2022-02-19 09:38:02 +09:00
Jari Vetoniemi
d201c48421 get rid of all the internal symbols 2022-02-19 08:00:26 +09:00
Jari Vetoniemi
f64abda7e0 bump version to 0.6.6 2022-02-19 07:42:23 +09:00
Jari Vetoniemi
9143f513c3 make: make scdoc optional (no manpage) 2022-02-19 07:41:23 +09:00
Jari Vetoniemi
7f39f19ae4 make: hide all symbols by default 2022-02-19 07:41:23 +09:00
Jari Vetoniemi
c13e28f4b5 menu: make all run functions part of public API
also remove the unused unicode arguments
2022-02-19 07:41:23 +09:00
Zach DeCook
2f416efd5e makefile: Add uninstall target 2022-02-10 04:24:22 +09:00
Jari Vetoniemi
710f675bdc ci: generate release notes on release 2022-02-09 00:39:45 +09:00
Jari Vetoniemi
ea43fb4293 bump version to 0.6.5 2022-02-09 00:35:08 +09:00
Stacy Harper
76b3c25014 Avoid by zero divisions 2022-02-08 22:23:02 +09:00
Stacy Harper
5a095705d2 Optimize redrawing
We add a dirty flag on the menu to track if the menu actually need a
redraw. With it, we will not redraw if the touch is hold on the same
entry by example.
2022-02-08 22:23:02 +09:00
Stacy Harper
9b8da12467 Add a feedback for touchscreen support
The idea is to write "Scroll up…", "Scroll down…" when the finger
touching bemenu will trigger a page scroll on release.
2022-02-08 22:23:02 +09:00
Stacy Harper
a111aa2afa mouse and touch support on wayland 2022-02-08 22:23:02 +09:00
Jari Vetoniemi
391bf16c85 flatpak: build the action branch 2022-02-08 21:41:16 +09:00
Jari Vetoniemi
7f6aff52ee makefile: add install-docs rule 2022-02-08 21:41:16 +09:00
Maxim Karasev
9cac33857d Update manpage to use scdoc, document margin and width-factor
This also adds scdoc as a dependency.

scdoc is almost as easy as markdown and therefore it's much nicer to
write and maintain manpages making use of it instead of plain roff.
2021-12-29 17:22:10 +09:00
Maxim Karasev
43255bbbe8 Add relative width option
It works on Wayland and X11 and acts as a complement to margin. Exact
behavior is as follows:
- If width factor is 0, width minus margin is used.
- If width multiplied by factor is greater than width minus margin,
  width minus is used. (so margin may be used to make sure that bemenu
  is at least N pixels away from the view border)
- Otherwise width multiplied by factor is used.

I think it's fine to disable warnings about floating point numbers
comparision. We don't do any arithmetics on them anyway, so we can't
suffer from inaccuracy.
2021-12-29 17:22:10 +09:00
Jari Vetoniemi
192736c554 bump version to 0.6.4 2021-12-03 17:04:37 +09:00
jjtt
a6f362eda7 Instruction for installing dependencies 2021-11-24 05:14:22 +09:00
Andrei E
d593ab27b6 Close clipboard file 2021-11-04 09:01:29 +09:00
Andrei E
e1a016b8a0 Adapt code style 2021-11-04 09:01:29 +09:00
Andrei E
d6c58f5ea7 Document clipboard dependencies 2021-11-04 09:01:29 +09:00
Andrei E
0c9cfd029c Document paste functionality 2021-11-04 09:01:29 +09:00
Andrei E
00efc974d7 Add paste functionality 2021-11-04 09:01:29 +09:00
lunacb
cd41b1b52c add missing newline 2021-11-03 17:57:18 +09:00
lunacb
21ff4e47da fixed indentation 2021-11-03 17:57:18 +09:00
lunacb
a96ed87472 redesigned vertical alignment
single enum determines if the menu is at the top, in the center,
or at the bottom. implemented in wayland and x11 renderers.
2021-11-03 17:57:18 +09:00
lunacb
bddeea05b6 created margin option
-M or --margin option sets the horizontal margin of the window
2021-11-03 17:57:18 +09:00
Sergei Trofimovich
d31164db75 lib/renderers/curses/curses.c: always use "%s"-style format for printf()-style functions
`ncuses-6.3` added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:

    lib/renderers/curses/curses.c:234:9:
      error: format not a string literal and no format arguments [-Werror=format-security]
      234 |         mvprintw(0, 0, menu->title);
          |         ^~~~~~~~

Let's wrap all the missing places with "%s" format.
2021-11-03 17:57:06 +09:00
rei de vries
b7f8db7128 revert to single padding variable
but with height instead of ascii_height used as the box height
2021-10-07 00:32:25 +09:00
rei de vries
2eea64ad24 convert tab to spaces 2021-10-07 00:32:25 +09:00
rei de vries
9fcc611082 fix incorrect line height due to padding quantization 2021-10-07 00:32:25 +09:00
Stacy Harper
9b2a2cabf2 Add -s to disable title spacing on entries 2021-10-07 00:25:20 +09:00
Ben Brown
0589962d1c Add option to configure cursor height
If set to 0 (the default), the height of the cursor is set to the
height of the line (as is the current behaviour).
2021-08-27 04:01:13 +09:00
Stacy Harper
a42fa97a49 add -c center mode on wayland 2021-08-16 17:46:57 +09:00
Stacy Harper
a84eeb770e fix scaling caused issue on window redimension on wayland
This caused issue when using the -b (bottom) and -l (line) arguments on
scaled outputs.

When using a scaled output, the set_size use a wrong value as height.
We generated a scalled buffer so we used a scale x too high size.

We just have to divide the scaling to use a good size.
2021-08-15 13:27:58 +09:00
Jari Vetoniemi
eb41286593 bump version to 0.6.3 2021-07-22 09:11:41 +09:00
Tuyen Pham
32aa05789e add contrl-c to exit 2021-07-22 09:05:41 +09:00
Bilal Elmoussaoui
cac68880c1 flatpak: the action already uploads artifacts 2021-07-09 11:25:08 +09:00
Jari Vetoniemi
377015193d flatpak: give bemenu-run ro access to host fs 2021-07-08 12:58:50 +09:00
Jari Vetoniemi
b36a617fae ci: flatpak building 2021-07-08 00:41:19 +09:00
Jari Vetoniemi
e0e85e3eac flatpak: add recipies
For people who like to use flatpak, or have hard time building the thing
otherwise.
2021-07-08 00:41:19 +09:00
Tuyen Pham
81195da11c wayland: respect sway's keyboard rate settings 2021-07-06 10:29:47 +09:00
Maximilian Bosch
702a04c374 Ignore hidden files in bemenu
On most systems it's fairly uncommon to have hidden files within
`$PATH`, but in case of NixOS this is fairly regularly the case as we
have the convention to add `foo` and `.foo-wrapped` to a `bin`-directory
if `foo` is supposed to be a wrapper which sets e.g. env-vars for the
program.

These `.foo-wrapped`-executables are almost never needed, but are shown
in `bemenu` right at the start, so I modified the selection code to skip
hidden files which is also what `dmenu` does for instance.
2021-06-11 01:29:17 +09:00
Jari Vetoniemi
6a7341683e bump version to 0.6.2 2021-06-09 09:20:23 +09:00
Jari Vetoniemi
752ab983d1 make: -fPIC static libs that link to shared libs 2021-06-09 09:12:57 +09:00
Jari Vetoniemi
ca6b903415 curses: revert alt detection
This seems to be broken at least on some terminals and the high bit
toggle corrupts input. In addition there was printf for the esc/alt key
detection that can break the UI.

Neovim seems to have noncompatible way of detecting alt, so I think
neovim should be looked for proper way for handling this.
2021-06-07 16:30:12 +09:00
Bill Doyle
69d030573c Handle multiple seats (more) correctly
Previously, any seat without a keyboard could destroy our selected
keyboard. Now, select by seat instead and only destroy the keyboard if
it vanishes from that seat. This isn't actually multi-seat support, but
at least it will allow bemenu to accept input.
2021-06-06 23:31:57 +09:00