Commit Graph

265 Commits

Author SHA1 Message Date
Scoopta
8796993fb6 Modes are no longer loaded on their own thread. It's not really needed, breaks drun mode with images, and is probably confusing for 3rd-party mode developers. 2020-03-07 19:55:30 -08:00
Scoopta
a167dcc42e Replaced 1 with TRUE when setting gtk-application-prefer-dark-theme 2020-03-05 19:51:49 -08:00
Scoopta
1b299e658f Removed debug print 2020-03-05 19:07:25 -08:00
Gigadoc2
dc58ddbfb8 add switch to use the dark gtk theme
Since some time now, GTK3 themes can ship an optional "dark" variant
and applications like picture viewers can make use of such a variant to
appear dark (to not distract from the picture) without overwriting the
current theme (and risking optical breakage). While wofi is not a
picture viewer it may still be desirable to use a dark theme, for
example to contrast the (light) application displaying in the
background.

Of course, wofi can already be fully customized through CSS and/or the
colors file, but using the existing dark variant may be easier than
fully restyling it, if all you want is a darker appearance. The only
way to set an arbitrary GTK application to use the dark theme seems to
be setting an environment variable, but that bears two problems:
For one, one needs to specify the full theme + dark modifier in the
variable, so one would have to keep the global GTK theme and the one
used by wofi manually in sync.
More critical though, the environment variable would be propagated to
the programs wofi launches (for now at least). That would lead to all
GTK applications launched through wofi to use the dark theme, which may
not be desirable. Wofi could also unset that variable before launching
a program, but at this point adding a simple switch is probably easier.

Side note: It may be that there is some way to configure the CSS file
to include the CSS of the dark variant of the current theme, but I have
not been able to find out how. Gnome-terminal uses a switch like this
too (just with dconf), so this may just be the way to go.
2020-03-03 12:09:55 +01:00
Scoopta
a672361d65 --lines should play nicer with % dimensions 2020-03-03 11:13:11 -08:00
Scoopta
36048841bb Changed the default wofi size to be 50%x40% instead of 1000x400 2020-03-03 00:10:12 -08:00
Scoopta
512c1cf7b5 Fixed percent sizing 2020-03-03 00:04:53 -08:00
Scoopta
459de542dc Added support for percentage based window sizing 2020-03-02 12:06:14 -08:00
Scoopta
f1a0e735f1 Changed the error if you have too many colors. You can have up to 100 not 99 2020-02-29 03:16:23 -08:00
Scoopta
a55c0421b2 gdk_threads_add_timeout() is now used instead of g_timeout_add() 2020-02-29 02:27:59 -08:00
Scoopta
b88c6727ea Added hide_search 2020-02-29 01:04:00 -08:00
Scoopta
0a0ba35075 The cache directory will now be created if it doesn't already exist 2020-02-28 22:36:48 -08:00
Scoopta
0dec3c883d Initial focus is now set on the top result not the scrolled window 2020-02-28 22:15:53 -08:00
Scoopta
973a454799 Added global_coords 2020-02-25 17:13:32 -08:00
Scoopta
6961672701 Tweaked --lines code. Hopefully it's more reliable now 2020-02-25 00:30:35 -08:00
Scoopta
f7b599fe6f Added utils_max(). utils_min() is now a one liner. 2020-02-25 00:13:12 -08:00
Scoopta
a1beb82635 line_wrap now takes the wrapping mode instead of a boolean 2020-02-21 00:43:44 -08:00
Scoopta
33a69e713a Added line_wrap config option 2020-02-21 00:17:59 -08:00
Scoopta
81a34c3374 Wofi can now be named wofi-askpass. This is for easy use as a sudo askpass program 2020-02-20 23:51:54 -08:00
Scoopta
91ad565ecc Removed the need to use gtk_widget_get_child_visible() 2020-02-17 00:15:57 -08:00
Scoopta
4d089df33d Fixed arg passing although I used gtk_widget_get_child_visible(). Compared to the alternative I think this is less hacky although maybe a tad not good 2020-02-16 20:34:55 -08:00
Scoopta
d96ddcce4f Added support for modifier keys to be bound 2020-02-16 14:43:14 -08:00
Scoopta
459639cd7e Added support for custom key binding 2020-02-15 21:53:02 -08:00
Scoopta
f4c4abfb02 Forgot I had a min function 2020-02-08 18:13:05 -08:00
Scoopta
400ca061b5 Fixed --lines 2020-02-08 18:04:38 -08:00
Scoopta
779678d1e2 Added null check to fix gtk-critical message 2020-02-07 22:04:15 -08:00
Scoopta
bafdea787f Fixed content_halign not working correctly with multi-action entries 2020-02-07 21:06:30 -08:00
Scoopta
6f2e4616ab That's not a very effective null check 2020-02-07 18:10:06 -08:00
Scoopta
28be2d8234 Fixed a null check that itself would cause a segfault 2020-02-07 18:07:46 -08:00
Scoopta
1e131bdce6 Added --sort-order 2020-02-07 18:04:37 -08:00
Scoopta
12dd2fbd4d filter_rate doesn't need to be global anymore 2020-02-07 12:23:57 -08:00
Scoopta
2f00ef2bd6 Replaced the double searching that was used to allow variable filter_rates and replaced it with something that actually makes sense. 2020-02-07 11:51:46 -08:00
Scoopta
b7de8057da That only needs to be uint16 2020-02-06 21:50:22 -08:00
Scoopta
0abad1f1c8 Fixed ordering when no search is input 2020-02-06 21:47:59 -08:00
Scoopta
afcc0c23f7 The first element is now always highlighted when searching 2020-02-06 21:20:08 -08:00
Scoopta
df75b649a5 Added --columns 2020-02-06 18:22:50 -08:00
Scoopta
7534181a8f Added --lines 2020-02-02 22:29:44 -08:00
Scoopta
b266a82b4b Added sorting to contains mode based on whether or not the result starts with your search 2020-02-02 13:54:34 -08:00
Scoopta
a648f2139f Renamed the arguments for utils_distance() 2020-02-01 23:24:04 -08:00
Scoopta
5538191317 Changed the signature of wofi_create_widget() to use arrays instead of pointers 2020-02-01 17:44:00 -08:00
Scoopta
7494cb1c7c Removed the utils.h include from config.h as it's not used by config 2020-02-01 17:06:41 -08:00
Scoopta
4fac0ee652 Fixed bug where mode order wasn't being taken into account when loading entries 2020-01-31 23:15:13 -08:00
Scoopta
7c44d9ec4b Added support for the :focus CSS selector 2020-01-31 22:04:07 -08:00
Scoopta
6e472afe6e Added infrastructure for external custom modes, the actual mode code will be committed later 2020-01-31 21:55:28 -08:00
Scoopta
3a80153e17 Added wofi_insert_widgets()
This allows modes to ask for wofi to query them for new entries
2020-01-31 13:25:04 -08:00
Scoopta
786718602b Actually fixed cache entries that contain a lf 2020-01-29 22:01:29 -08:00
Scoopta
3d39f7aa5f Fixed memory leak 2020-01-29 21:51:25 -08:00
Scoopta
c971d19fa0 Fixed caching entries that contain a lf 2020-01-29 21:49:16 -08:00
Scoopta
61fb0e38f1 Improved the distance algorithm to take into account whether or not the result contains the search 2020-01-26 12:18:32 -08:00
Scoopta
755d7b37f6 Removed the if statement in the sort code, it's not needed 2020-01-26 12:03:08 -08:00
Scoopta
b41b85a70b Added support for case insensitive fuzzy search 2020-01-26 11:45:56 -08:00
Scoopta
b43739921c Pressing escape now exits with error code 1 2020-01-26 11:22:29 -08:00
Scoopta
684a5adf95 Fixed up config parsing 2020-01-26 00:44:24 -08:00
Scoopta
fadbfd4c13 Backslashes are no longer removed from the config completely but can now be escaped with \\ 2020-01-26 00:21:29 -08:00
Scoopta
6fb839a903 --no-actions doesn't take an argument 2020-01-24 23:44:55 -08:00
Scoopta
5ec88a365e Added --define 2020-01-24 23:36:56 -08:00
Scoopta
84262b19f4 Modes must explicitly declare support for execution without a matching entry 2020-01-23 20:26:33 -08:00
Scoopta
05490241a9 Modes no longer have to pass a name that matches the name they were loaded with, this was just absurdly bad design and I don't know how I came up with it in the first place 2020-01-20 20:09:40 -08:00
Scoopta
5b41ab2ca6 Moved the wofi api to wofi_api.h 2020-01-20 16:22:14 -08:00
Scoopta
c47f7acdcd Don't need calloc 2020-01-19 22:16:15 -08:00
Scoopta
868710726e Switched out my map impl for a GTree 2020-01-19 22:09:04 -08:00
Scoopta
54654f20bb Added #entry and deprecated .entry, #selected, and #unselected 2020-01-18 14:54:52 -08:00
Scoopta
b560f77969 Fixed memory leak 2020-01-16 16:56:08 -08:00
Scoopta
f60cdc0167 Fixed cache files not being auto-created 2020-01-16 16:49:57 -08:00
Scoopta
e5300b2995 Changed the widget insertion system, this should hopefully increase performance and be an all around better system 2020-01-16 16:35:51 -08:00
Scoopta
e7be007842 The color and style config options now have the same semantics as the command line options 2020-01-12 22:20:37 -08:00
Scoopta
d6bac0e7bb Added --no-actions 2020-01-10 14:34:49 -08:00
Scoopta
f00b615f11 Replaced uint8_t with the correct enum types for variables from config_get_mnemonic() 2020-01-07 18:56:57 -08:00
Scoopta
753db64755 And that config_get too 2020-01-07 18:30:34 -08:00
Scoopta
d07622de3e Copyright update 2020-01-06 16:42:52 -08:00
Scoopta
af3188db67 Initialized anchor 2020-01-06 00:40:56 -08:00
Scoopta
a85c516926 Good C practices 2020-01-06 00:39:47 -08:00
Scoopta
8bcdfc0f13 Added --location and made -x and -y behave as proper offsets as they do in rofi 2020-01-06 00:28:57 -08:00
Scoopta
ff8572fc0d Shift+Tab now goes backwards 2020-01-03 19:54:29 -08:00
Scoopta
2c034d5d09 Write access is now checked for when working with cache files 2020-01-02 15:24:30 -08:00
Scoopta
e037fa7b4e Added cache invalidation 2020-01-02 14:36:54 -08:00
Scoopta
a40a8be7f5 Added content_halign option 2019-12-23 01:27:49 -08:00
Scoopta
427e08ecec One too many tabs 2019-12-17 00:19:08 -08:00
Scoopta
75d33f4ef9 Fixed all colon entries 2019-12-17 00:15:28 -08:00
Scoopta
d699827c65 Added --version 2019-12-16 23:55:48 -08:00
Scoopta
0458f06afe Caching now checks for an exact match, this prevents some weird edge cases when using search parsing 2019-12-16 23:38:25 -08:00
Scoopta
8594fc52a3 Parsing image escapes and markup will only occur if their respective options are enabled 2019-12-16 19:38:12 -08:00
Scoopta
c248461260 Added parse_action option to dmenu 2019-12-16 19:15:16 -08:00
Scoopta
62861d3686 Added --parse-search to strip pango markup and image escapes from search text 2019-12-16 18:36:21 -08:00
Scoopta
f6fef341fb Fixed string display issues when strings contain colons in image mode 2019-12-16 17:30:29 -08:00
Scoopta
ac0cd06e13 Added support for mode specific config options 2019-12-01 22:58:30 -08:00
Scoopta
db59ec9d13 OPTION CHANGE: -i and -I have been swapped to improve compatibility with other *nix tools 2019-11-28 22:27:06 -08:00
Scoopta
3c03f89918 Added case insensitive searching 2019-11-25 14:56:46 -08:00
Scoopta
50838d3d98 Added support for fuzzy searching 2019-11-21 01:01:27 -08:00
Scoopta
5d271d5d31 Entries without a mode when images are enabled are now displayed as text 2019-11-20 22:05:28 -08:00
Scoopta
43bc6eb5ed Fixed tab selecting expander children when the expander is closed 2019-11-19 19:14:30 -08:00
Scoopta
a15390c685 Renamed the flag when holding shift from run_in_term to mod_shift. This makes more sense as not all modes have a need for a run in term option 2019-11-18 22:16:06 -08:00
Scoopta
750cdd0167 Holding ctrl when pressing enter will now parse args in run mode 2019-11-18 22:13:14 -08:00
Scoopta
c85f6a7209 The scroll bars can now be hidden 2019-11-18 13:42:40 -08:00
Scoopta
7573eecb02 Cache write is now controlled by the mode, this allows for greater flexibility with caching 2019-11-16 14:52:20 -08:00
Scoopta
0f78b557b5 Alternative actions now require a double click 2019-11-13 01:42:27 -08:00
Scoopta
b710a3aee5 Added support for alternative desktop actions 2019-11-13 01:17:45 -08:00
Scoopta
eeb8a8a324 When running as dmenu the cache file will be set to /dev/null 2019-11-06 00:17:22 -08:00
Scoopta
c31327b279 If images are allowed and no display mode is given by the entry then text is used, this allows run to work correctly when images are shown 2019-11-05 09:41:47 -08:00
Scoopta
07cb2a65a7 Removed utils_split(), strtok_r() is now used instead 2019-11-04 22:41:53 -08:00
Scoopta
2ab1c53b4d Added support for combi style functionality 2019-11-04 20:56:40 -08:00
Scoopta
0eb03b7adc Added --prompt as a long opt for -p 2019-11-04 17:49:34 -08:00
Scoopta
436c1ad0cd dmenu mode no longer uses the search bar contents when enter is pressed, this can be overridden for all modes with -e. Additionally all modes now get the search contents if no results are found. 2019-11-04 17:46:39 -08:00
Scoopta
a459a29ca1 Fixed weird behavior when only one option is present 2019-11-04 13:55:35 -08:00
Scoopta
9d5e8e2e5a External modes are now loaded with RTLD_LOCAL 2019-11-04 13:29:53 -08:00
Scoopta
5bb351d450 Internal plugin initalizers must now be prefixed with wofi_. This prevents using map, wl_list, wofi, and other mode strings to segfault wofi 2019-11-04 13:25:44 -08:00
Scoopta
97dd534c97 Fixed some portability issues with wofi 2019-11-03 20:20:00 -08:00
Scoopta
2d08672f86 There are now secondary config options that match the command line flags if the original options didn't 2019-11-01 16:57:24 -07:00
Scoopta
da56f43d57 The text used for searches is no longer the same as the text displayed, this allows for a lot more powerful searching especially in drun mode 2019-10-28 14:17:06 -07:00
Scoopta
4bdd94a90e Added password mode 2019-10-22 21:19:57 -07:00
Scoopta
44a8e79fd7 Fixed #inner-box having weird behavior when margins are set 2019-10-13 12:42:05 -07:00
Scoopta
64348d4fb1 Fixed the persistent black border when in horizontal mode 2019-10-12 23:56:27 -07:00
Scoopta
dde5b2376f The horizontal orientation now behaves more like classic dmenu 2019-10-12 22:24:35 -07:00
Scoopta
496e075b0e Tab can now be used to cycle between search results 2019-10-07 02:50:26 -07:00
Scoopta
c6cf131a94 Shift will no longer cause the search box to pull focus 2019-09-30 21:38:56 -07:00
Scoopta
dcdca16a38 Added support for running software in a terminal from run mode 2019-09-26 23:24:48 -07:00
Scoopta
734dd6d6b6 Fixed some of the bugs introduced by the recent change to not focus the entry by default 2019-09-19 00:45:57 -07:00
Scoopta
f1fb568d5c The entry box no longer gets focus at launch, this allows the user to see the prompt without manually changing focus 2019-09-18 23:35:51 -07:00
Scoopta
0cee332f2e When images are not allowed the labels now get the name text 2019-09-15 16:29:15 -07:00
Scoopta
8a493917c2 config_get_mnemonic() is now used when getting the orientation option 2019-09-13 00:39:41 -07:00
Scoopta
117868a033 Modularized modes and separated them into their own source files 2019-09-13 00:25:25 -07:00
Scoopta
323af30d68 Replaced execlp() with execl() as a path search is not required 2019-09-12 14:27:39 -07:00
Scoopta
ab32b4b513 The entires are no longer named entry when inserted but they now have an entry class applied to them 2019-09-12 12:38:24 -07:00
Scoopta
55da236d4e Fixed a use after free when getting the cache path 2019-09-12 11:06:57 -07:00
Scoopta
13f67facfb g_app_info_launch_uris_async() is now used for drun mode 2019-09-11 21:00:26 -07:00
Scoopta
26107c8ee5 Fixed entries not showing for apps without icons 2019-09-04 16:01:58 -07:00
Scoopta
52c3c220ba Added a null check for the icon info 2019-09-04 16:01:10 -07:00
Scoopta
de5da5dd98 Changed that check to a NULL check seeing as it'll always be a GDesktopAppInfo 2019-09-04 15:45:49 -07:00
Scoopta
9e12533317 The image and label widgets now have names 2019-09-01 20:07:15 -07:00
Scoopta
4e145de42d Set the name for the entry boxes 2019-09-01 20:04:36 -07:00
Scoopta
5afa0de598 Fixed dmenu caching 2019-08-28 22:21:43 -07:00
Scoopta
389cb8e299 Flipped the orientation option, it just makes more sense this way 2019-08-28 22:05:51 -07:00
Scoopta
281ae02639 Forgot a linefeed on the --cache-file option 2019-08-28 22:02:29 -07:00
Scoopta
c814c813c5 Fixed the down arrow key skipping the first entry when inside of the search bar 2019-08-28 21:55:30 -07:00
Incin
e84ebfc943 Refactor to use FlowBox instead of ListBox to allow setting the box orientation 2019-08-28 20:33:08 -06:00
Scoopta
76d77a43ec If the filter property on the entry is NULL the entry is now hidden instead of causing a crash 2019-08-28 21:15:29 -07:00
Scoopta
a499c1cacd Reduced code duplication when inserting widgets 2019-08-28 20:43:47 -07:00
Scoopta
5cbc889868 Added caching support do dmenu 2019-08-28 20:26:41 -07:00
Scoopta
0a110def8f Added the ability to specify the cache file to use 2019-08-28 20:14:38 -07:00
Scoopta
cb2241574d Fixed situations where text may be uninitialized 2019-08-28 17:37:09 -07:00
Scoopta
e4fa39ed8c Added an image_size config option 2019-08-28 17:36:20 -07:00
Scoopta
f80d5b422f Added support for desktop icons in drun mode 2019-08-28 17:33:11 -07:00
Scoopta
abd571485f Added support for pango markup 2019-08-28 00:58:45 -07:00
Scoopta
e3c79c3bd4 Added support for inline images, this currently only works in dmenu mode 2019-08-27 23:15:18 -07:00
Scoopta
34681ca8f9 We no longer use tooltips for metadata YAY! 2019-08-27 21:36:44 -07:00
Scoopta
19aaa18391 Search response time is now configurable and should now be much more responsive by default 2019-08-26 21:19:59 -07:00
Scoopta
aab2a72264 Moved label creation to insert_widget(gpointer) hopefully this fixes the rare, weird crash 2019-08-23 00:51:18 -07:00
Scoopta
372cbfbbd4 Searches are no longer case sensitive 2019-08-19 17:48:18 -07:00
Scoopta
0631d72e3b Executing the search bar will now execute the first result instead of the contents of the bar unless in dmenu mode 2019-08-19 17:34:12 -07:00
Scoopta
133fcdd1e9 Added caching support 2019-08-18 20:49:12 -07:00