1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00
rofi/include/settings.h

204 lines
5.4 KiB
C
Raw Normal View History

/*
* rofi
*
* MIT/X11 License
2023-01-14 07:02:35 -05:00
* Copyright © 2013-2023 Qball Cow <qball@gmpclient.org>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
2016-01-07 10:01:56 -05:00
#ifndef ROFI_SETTINGS_H
#define ROFI_SETTINGS_H
#include <glib.h>
/**
* Enumeration indicating the matching method to use.
*
* @ingroup CONFIGURATION
*/
typedef enum {
MM_NORMAL = 0,
MM_REGEX = 1,
MM_GLOB = 2,
MM_FUZZY = 3,
MM_PREFIX = 4
} MatchingMethod;
2019-09-30 04:35:12 -04:00
/**
* Possible sorting methods for listview.
*/
typedef enum { SORT_NORMAL = 0, SORT_FZF = 1 } SortingMethod;
2016-01-07 10:01:56 -05:00
/**
* Settings structure holding all (static) configurable options.
* @ingroup CONFIGURATION
*/
typedef struct {
2022-02-23 16:42:56 -05:00
/** List of enabled modes */
char *modes;
/** Font string (pango format) */
char *menu_font;
/** Whether to load and show icons */
gboolean show_icons;
[WIP] xdg thumbnails fetching with fallback on mimetype icons (#1939) * implemented xdg thumbnails fetching with fallback on mimetype icons for menu entries in filebrowser mode * included original license text * added md5 header and source file * implemented xdg compatible thumbnail's creation * added -preview-cmd string option to program settings * support custom command to create images for entries with thumbnail:// prefix * fix custom thumbnailer command crash caused by null uri when entry is not a valid filename * check entry_name is not NULL or empty when generating thumbnails; use snprintf to avoid static analyzer complains * avoid using gstrvbuilder to build thumbnailer command args * fixed static analyzer complain about always wrong condition * use g_spawn_check_exit_status to avoid bump to glib 2.70 * removed md5-c dependency and use glib checksum implementation * fixed meson build after md5-c library removal * support thumbnail generation in recursivebrowser mode * restored check rofi_icon_fetcher_file_is_image * create thumbnail directories if not existing * use g_malloc0, g_strdup and g_strdup_printf * fixed formatting with clang-format * don't wait for jobs in execution when finalizing the icon fetcher worker threadpool * destroy and rebuild the icon fetcher worker threadpool when the current page is changed * added query_started boolean member to IconFetcherEntry; check if an icon fetcher query was started on an IconFetcherEntry and submit the query again otherwise * force icon cache lookup even if the item has a valid icon_fetch_uid (the fetching job could have been discarded before starting) * search binaries in PATH when executing thumbnailer command * mark icon query as not started in threadpool item free_func * added listview page_changed_callback; rebuild icon fetcher threadpool in page_changed_callback * [listview] Add missing code documentation param * Create rofi-thumbnails.5.markdown * Updated documentation with apparmor issues and workaround * [Doc] Ship rofi-thumbnails.5 With some formatting fixes * use a more compact thumbnailer example --------- Co-authored-by: giomatfois62 <giomatfois62@yahoo.it> Co-authored-by: Dave Davenport <DaveDavenport@users.noreply.github.com> Co-authored-by: lbonn <github@lbonnans.net>
2024-06-21 12:47:38 -04:00
/** Custom command to generate preview icons */
char *preview_cmd;
/** Terminal to use */
char *terminal_emulator;
/** SSH client to use */
char *ssh_client;
/** Command to execute when ssh session is selected */
char *ssh_command;
/** Command for executing an application */
char *run_command;
/** Command for executing an application in a terminal */
char *run_shell_command;
/** Command for listing executables */
char *run_list_command;
/** Command for window */
char *window_command;
/** Window fields to match in window mode */
char *window_match_fields;
/** Theme for icons */
char *icon_theme;
/** Windows location/gravity */
WindowLocation location;
/** Y offset */
int y_offset;
/** X offset */
int x_offset;
/** Always should config.menu_lines lines, even if less lines are available */
unsigned int fixed_num_lines;
/** Do not use history */
unsigned int disable_history;
/** Programs ignored for history */
char *ignored_prefixes;
/** Toggle to enable sorting. */
unsigned int sort;
/** Sorting method. */
SortingMethod sorting_method_enum;
/** Sorting method. */
char *sorting_method;
/** Desktop entries to match in drun */
char *drun_match_fields;
/** Only show entries in this category */
char *drun_categories;
/** Desktop entry show actions */
unsigned int drun_show_actions;
/** Desktop format display */
char *drun_display_format;
/** Desktop Link launch command */
char *drun_url_launcher;
/** Search case sensitivity */
unsigned int case_sensitive;
/** Cycle through in the element list */
unsigned int cycle;
/** Height of an element in number of rows */
int element_height;
2022-02-23 16:42:56 -05:00
/** Sidebar mode, show the modes */
unsigned int sidebar_mode;
/** Mouse hover automatically selects */
gboolean hover_select;
/** Lazy filter limit. */
unsigned int lazy_filter_limit;
/** Auto select. */
unsigned int auto_select;
/** Hosts file parsing */
unsigned int parse_hosts;
/** Knonw_hosts file parsing */
unsigned int parse_known_hosts;
/** Combi Modes */
2022-02-23 16:42:56 -05:00
char *combi_modes;
char *matching;
MatchingMethod matching_method;
unsigned int tokenize;
/** Monitors */
char *monitor;
/** filter */
char *filter;
/** dpi */
int dpi;
/** Number threads (1 to disable) */
unsigned int threads;
unsigned int scroll_method;
char *window_format;
/** Click outside the window to exit */
int click_to_exit;
char *theme;
/** Path where plugins can be found. */
char *plugin_path;
/** Maximum history length per mode. */
unsigned int max_history_size;
gboolean combi_hide_mode_prefix;
/** Combi format display */
char *combi_display_format;
char matching_negate_char;
/** Cache directory. */
char *cache_dir;
/** Window Thumbnails */
gboolean window_thumbnail;
/** drun cache */
gboolean drun_use_desktop_cache;
gboolean drun_reload_desktop_cache;
/** Benchmark */
gboolean benchmark_ui;
gboolean normalize_match;
/** Steal focus */
gboolean steal_focus;
/** fallback icon */
char *application_fallback_icon;
/** refilter timeout limit, when more then these entries,go into timeout mode.
*/
unsigned int refilter_timeout_limit;
/** workaround for broken xserver (#300 on xserver, #611) */
gboolean xserver_i300_workaround;
Merging in the Recursive file browser. Squashed commit of the following: commit 92e730076d461622dc81e44e87ec456317514904 Author: Dave Davenport <qball@gmpclient.org> Date: Sun Jun 11 18:17:12 2023 +0200 [Doc] Add regex filtering to recursivebrowser. commit ee80c8487f9765b1e6e8ab8219a6baea089cf5af Author: Dave Davenport <qball@gmpclient.org> Date: Sun Jun 11 17:49:29 2023 +0200 [recursivebrowser] Update manpage. commit a24b68f52362aaf1461935c2340e3bf5e31da59d Author: Dave Davenport <qball@gmpclient.org> Date: Sun Jun 11 17:37:56 2023 +0200 [Mode] Add some extra validating of the mode selected to complete. commit cf497e8685e806521c0f61922827687adce268c9 Author: Dave Davenport <qball@gmpclient.org> Date: Sun Jun 4 15:12:31 2023 +0200 [Recursive browser] Make completer selectable. commit 722f07a803c28a406d8a610f31a24b3f7247b9ba Author: Dave Davenport <qball@gmpclient.org> Date: Sun Jun 4 14:36:14 2023 +0200 Add methods for completer to modes. commit 7972420c30275514751802d1ed517a45bbd83da1 Author: Qball Cow <qball@blame.services> Date: Thu Jun 1 21:56:06 2023 +0200 Prepare updates for new APIs. commit dd3035a1a61f8196d394f6867701a0e1b3af30ac Author: Dave Davenport <qball@gmpclient.org> Date: Wed May 10 19:24:48 2023 +0200 [RB] Fix regex and cleanups commit 4d2941caf32dfb946aee54c467c1319c7a89804a Author: Dave Davenport <qball@blame.services> Date: Wed May 10 18:09:54 2023 +0200 [RB] Add (unfinished regex test) commit 848277001fc8cf9afc538067f2afa24a174f8c7f Author: Dave Davenport <qball@blame.services> Date: Wed May 10 17:49:16 2023 +0200 [RB] Pull the scanning into a separate thread. commit f369a7f63f618bbcad10c18e73f7e2b117c515f1 Author: Dave Davenport <qball@gmpclient.org> Date: Wed May 3 18:35:15 2023 +0200 [Recursive File Browser] First test version.
2023-06-12 13:07:00 -04:00
/** completer mode */
char *completer_mode;
2016-01-07 10:01:56 -05:00
} Settings;
/** Default number of lines in the list view */
#define DEFAULT_MENU_LINES 15
/** Default number of columns in the list view */
#define DEFAULT_MENU_COLUMNS 1
/** Default window width */
#define DEFAULT_MENU_WIDTH 50.0f
2016-01-07 10:01:56 -05:00
/** Global Settings structure. */
extern Settings config;
#endif // ROFI_SETTINGS_H