Commit graph

1915 commits

Author SHA1 Message Date
Dave Davenport
75e361ecab Reduce scope of variables. 2021-01-17 16:15:04 +01:00
Dave Davenport
519b2a22eb Add check for input == NULL. 2021-01-17 16:09:58 +01:00
Dave Davenport
9313d7a8a0 [Textbox] Allow theme to force markup enabled on textbox.
rofi -theme-str 'prompt { markup: true; }' -show drun -display-drun '<i>d</i>ru<b>n</b>'

fixes: #1220
2020-12-28 22:45:58 +01:00
Dave Davenport
af6752c35d [Textbox] When estimating height, set correct font first.
fixes: #1247
2020-12-27 21:25:06 +01:00
Quentin Glidic
2e18133667
xcb: Restore focus in more places
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-12-20 14:11:56 +01:00
Quentin Glidic
11b677b521
xcb: Nicer focus stealing in O-R mode
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-12-13 15:56:37 +01:00
Dave Davenport
ec858dd305 Revert "xcb: Steal focus in O-R mode"
This reverts commit 1c9d975dd2.

Fixes: #1228
2020-12-09 16:04:04 +01:00
Quentin Glidic
1c9d975dd2
xcb: Steal focus in O-R mode
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-11-27 07:26:17 +01:00
Quentin Glidic
627bd43510
xcb: Ask for focus where possible
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-11-27 07:26:16 +01:00
Tim Gates
d27d7eb669
docs: fix simple typo, prefered -> preferred (#1224)
There is a small typo in source/xcb.c.

Should read `preferred` rather than `prefered`.
2020-11-15 00:14:02 +01:00
Dave Davenport
7061eb21ae Indent round. 2020-11-03 23:57:02 +01:00
Dave Davenport
4878c5bd13 [RofiIconFetcher] Add missing free 2020-10-20 20:40:47 +02:00
Dave Davenport
deb1e6a208 [RofiIconFetcher] Switch to gdk-pixbuf. 2020-10-20 20:38:13 +02:00
Dave Davenport
6e98290335 [RofiIconFetcher] Do image checking in icon fetcher, use nkutils-enum 2020-10-18 22:01:49 +02:00
Dave Davenport
5994df7f04 [IconLoader] add optional gif loader. 2020-10-18 21:37:05 +02:00
Dave Davenport
d8a420c952 [FileBrowser] Small restructure. 2020-10-18 20:54:03 +02:00
Dave Davenport
08a40d13ce [Icons] Check both small and big caps for extention. 2020-10-17 22:05:17 +02:00
Dave Davenport
cc5a1989d8 [RofiIconFetcher] Don't exit out on libjpeg error, but don't load image. 2020-10-17 21:59:12 +02:00
Dave Davenport
e00ef7d993 [FileBrowser] Save last directory. 2020-10-16 21:33:02 +02:00
Dave Davenport
10678e55d8 [FileBrowser] Prepend '@' before filename if link. 2020-10-16 21:10:04 +02:00
Dave Davenport
9a21040d0e [FileBrowser] Add SVG as file type. 2020-10-16 20:22:27 +02:00
Dave Davenport
0d45686914 [FileBrowser] If link, use stat to check out type.
Fixes: #1214
2020-10-15 19:19:51 +02:00
Dave Davenport
eea8897501 Fix some of the documentation 2020-10-12 21:39:36 +02:00
Dave Davenport
585538b428 Try fixing build on meson of readdir dirent args. 2020-10-12 20:32:25 +02:00
Dave Davenport
519d4d2818 [FileBrowser] Add file browser modi. 2020-10-12 20:17:21 +02:00
Dave Davenport
b4bbce4af5 [Helper] Add -normalize-match option.
Decomposes string and remove accent characters before matching.
This makes o match ö, é match e and more.
It is not a perfect implementation but works.
Currently disables the match highlighting.

Fixes: #1119
2020-09-30 21:56:37 +02:00
Hpl4r
30fb1bd4e8
[HELP] Fix typo in help msgs (#1198) 2020-09-17 12:29:06 +02:00
Dave Davenport
7c331b130b [Calc] Add min/max operator support to calc()
Fixes: #1172
2020-09-14 20:34:39 +02:00
Dave Davenport
011908e1ff
issue 1187: If error on launching application, show error message and return to list` (#1193)
* Show error message, then possibly pop back to main window.

Fix drun/run dialog to use this for command execution.

Issue #1187

* [Combi] When no line selected, handle using the first entry.

* [Window] Add execute on invalid input to window dialog.

* Update view.h doxygen docu

* Update manpage with running application changes.
2020-09-13 21:56:25 +02:00
Dave Davenport
3499e1dad0 [Theme] First attempt at more cleanups and nested media support.
First throw at nested media support.

Issue: #1189
2020-09-13 15:11:12 +02:00
Dave Davenport
0a3734dce4 [Theme] Fix @media printing in -dump-theme. 2020-09-13 13:48:48 +02:00
Dave Davenport
31fc5c9d35 [Textbox] Try to fix estimated font height.
This was on newer pango 1 pixel off with actual font height.
This casues drawing issues.

Fixes: #1190
2020-09-13 10:24:59 +02:00
Dave Davenport
bff8948116 [DRun] Fix broken cache after URL type was added. 2020-09-09 22:46:18 +02:00
Dave Davenport
6a38f88e98 Split MENU_QUICK_SWITCH into MENU_CUSTOM_COMMAND/QUICK_SWITCH 2020-09-08 18:24:36 +02:00
nick87720z
96cd34d24f
Fix and optimize 20200908 (#1184)
* combi: Reuse own get_num_entries in self-init

* combi_mode_parse_switchers: Remove duplicated mode pointer

* combi_mode_parse_switchers: Regroup mode search lines

* combi_mode_result: Simplify switcher search quit

* mode_result: Check for mode switch actions before hook

These are over-mode actions, which should not be handled
in mode hooks at all.
2020-09-08 17:30:03 +02:00
Dave Davenport
88ac249d36 [Window] Try to clarify help.
Issue: #1183
2020-09-08 14:42:17 +02:00
Dave Davenport
f5bb9d2cbf [Widget] Fix border drawing code.
Fixes: #1177
2020-09-05 11:12:54 +02:00
lbonn
e4e59b99ea
Fix an unsafe use of strchr in dmenu mode (#1176)
Found with valgrind
2020-09-02 15:46:44 +02:00
Dave Davenport
30735791b4 Run indenter. 2020-08-28 16:41:59 +02:00
Mike Dalessio
5bec191d2e
Follow Type=Link standard desktop entries with drun (#1168)
* [DRun] Introduce data structure changes for Link desktop entries

From the [freedesktop spec][1]:

> This specification defines 3 types of desktop entries:
> Application (type 1), Link (type 2) and Directory (type 3). To allow
> the addition of new types in the future, implementations should
> ignore desktop entries with an unknown type.

This commit adds an enum to capture these types, and adds `type` to
DRunModeEntry.

  [1]: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

part of #1166

* [DRun] Sanity check Link entries and capture the URL

Note that we're introducing some logic that will differ depending on
the Desktop entry type (Application or Link). The logic is:

- if entry is Application type,
  - then Exec is required
  - and the value is saved in .exec
  - and drun_mode_result calls exec_cmd_entry
- if entry is Link type,
  - then URL is required (but is not saved in the DRunModeEntry)
  - and drun_mode_result calls new function launch_link_entry

part of #1166

* [DRun] Launch desktop links via xdg-open

Note that this introduces a new dependency on xdg-open, which may not
be installed. In that case, rofi will display an error dialog
with something like:

  "Failed to execute child process xdg-open (No such file or directory)"

which hopefully is explanatory enough for folks.

part of #1166

* Make drun options comments consistent and add a bit of whitespace

* [DRun] new config option drun-url-launcher for opening links

In previous commit, this was a hard-coded string.

part of #1166
2020-08-26 21:10:04 +02:00
Dave Davenport
97ac7c9348 [Matching] Make fuzzy matching non-greedy 2020-08-25 20:23:26 +02:00
Dave Davenport
4f1169e326 Add extra timing debug.
Issue: #1162
2020-08-19 22:44:55 +02:00
nick87720z
57ee69367d
micro-refactoring: widget.c (#1148)
* widget.c: microrefactoring

* widget.c: join enable/disable functions
2020-07-11 14:48:58 +02:00
Dave Davenport
641cd4ef46 [Widget] Fix inconsistency in argument checking. 2020-07-09 17:47:32 +02:00
Dave Davenport
fc0ea0b22e Update changelog a bit. 2020-07-05 11:41:04 +02:00
nick87720z
e52094ee7a
Widget bg draw (#1147)
* Improved background draw code

- Better to read (precalculated coordinates)
- Unnecessary line_to in the end
- Don't use radius in calculations if zero

* Background draw - separate rounded rect function

* Limit background & border overlap size

Overlap is too good against artifacts when stiching antialiased areas to
be avoided, unless intermediate image is used for additive stiching. But
it doesn't look good with transparent borders, when overlaping background
is visible. It seems, that 1px overlap is right enough to completely
prevent artifacts. Though things may differ if one if side is 1px or
even 0px, while adjacent is still enough thick.

* Style: alignment, less noise, limit var scope
2020-06-17 14:10:48 +02:00
Dave Davenport
bf17e1c65e When no dpi set (-1) set the default one for fonts handling. 2020-06-09 22:51:44 +02:00
nick87720z
fb2ba8ada3
Millimeter support for distance (#1144) 2020-06-09 22:19:43 +02:00
nick87720z
e275ed2283
Again final workaround for #303 (#1142) 2020-06-09 17:17:50 +02:00
Quentin Glidic
3d5f0f086c
script: Fix parsing of extras (#1141)
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-06-06 18:32:14 +02:00