2017-04-15 06:32:05 -04:00
|
|
|
/*
|
|
|
|
* rofi
|
|
|
|
*
|
|
|
|
* MIT/X11 License
|
2020-01-01 06:23:12 -05:00
|
|
|
* Copyright © 2013-2020 Qball Cow <qball@gmpclient.org>
|
2017-04-15 06:32:05 -04:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
|
2016-10-24 15:46:39 -04:00
|
|
|
#include <glib.h>
|
|
|
|
|
2016-08-25 02:43:40 -04:00
|
|
|
/**
|
|
|
|
* Enumeration indicating the matching method to use.
|
|
|
|
*
|
|
|
|
* @ingroup CONFIGURATION
|
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
MM_NORMAL = 0,
|
|
|
|
MM_REGEX = 1,
|
|
|
|
MM_GLOB = 2,
|
|
|
|
MM_FUZZY = 3
|
|
|
|
} MatchingMethod;
|
|
|
|
|
2019-09-30 04:35:12 -04:00
|
|
|
/**
|
|
|
|
* Possible sorting methods for listview.
|
|
|
|
*/
|
2018-06-13 05:57:23 -04:00
|
|
|
typedef enum
|
|
|
|
{
|
2018-08-08 09:55:13 -04:00
|
|
|
SORT_NORMAL = 0,
|
|
|
|
SORT_FZF = 1
|
2018-06-13 05:57:23 -04:00
|
|
|
} SortingMethod;
|
|
|
|
|
2016-01-07 10:01:56 -05:00
|
|
|
/**
|
|
|
|
* Settings structure holding all (static) configurable options.
|
|
|
|
* @ingroup CONFIGURATION
|
|
|
|
*/
|
2016-03-24 17:13:19 -04:00
|
|
|
typedef struct
|
2016-01-07 10:01:56 -05:00
|
|
|
{
|
|
|
|
/** List of enabled modi */
|
|
|
|
char *modi;
|
2017-07-03 03:23:03 -04:00
|
|
|
/** Border width */
|
|
|
|
unsigned int menu_bw;
|
2016-01-07 10:01:56 -05:00
|
|
|
/** Width (0-100 in %, > 100 in pixels, < 0 in char width.) */
|
|
|
|
int menu_width;
|
|
|
|
/** # lines */
|
|
|
|
unsigned int menu_lines;
|
|
|
|
/** # Columns */
|
|
|
|
unsigned int menu_columns;
|
|
|
|
/** Font string (pango format) */
|
|
|
|
char * menu_font;
|
|
|
|
|
2017-04-02 06:32:11 -04:00
|
|
|
/** New row colors */
|
|
|
|
char * color_normal;
|
|
|
|
char * color_active;
|
|
|
|
char * color_urgent;
|
|
|
|
char * color_window;
|
|
|
|
|
2017-05-30 13:07:33 -04:00
|
|
|
/** Whether to load and show icons */
|
|
|
|
gboolean show_icons;
|
|
|
|
|
2016-01-07 10:01:56 -05:00
|
|
|
/** 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;
|
2016-05-12 05:31:06 -04:00
|
|
|
/** Command for window */
|
|
|
|
char * window_command;
|
2017-10-21 05:18:52 -04:00
|
|
|
/** Window fields to match in window mode */
|
|
|
|
char * window_match_fields;
|
2017-04-12 12:08:57 -04:00
|
|
|
/** Theme for icons */
|
2018-06-09 16:17:32 -04:00
|
|
|
char * icon_theme;
|
2016-01-07 10:01:56 -05:00
|
|
|
|
|
|
|
/** Windows location/gravity */
|
|
|
|
WindowLocation location;
|
2017-07-03 03:23:03 -04:00
|
|
|
/** Padding between elements */
|
|
|
|
unsigned int padding;
|
2016-01-07 10:01:56 -05:00
|
|
|
/** 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;
|
2018-12-30 18:35:00 -05:00
|
|
|
/** Programs ignored for history */
|
|
|
|
char * ignored_prefixes;
|
2017-01-11 03:42:37 -05:00
|
|
|
/** Toggle to enable sorting. */
|
|
|
|
unsigned int sort;
|
2018-06-13 05:57:23 -04:00
|
|
|
/** Sorting method. */
|
|
|
|
SortingMethod sorting_method_enum;
|
|
|
|
/** Sorting method. */
|
|
|
|
char * sorting_method;
|
2020-08-26 15:10:04 -04:00
|
|
|
|
2017-10-21 05:18:52 -04:00
|
|
|
/** Desktop entries to match in drun */
|
|
|
|
char * drun_match_fields;
|
2019-08-09 13:33:23 -04:00
|
|
|
/** Only show entries in this category */
|
|
|
|
char * drun_categories;
|
2018-07-28 05:12:11 -04:00
|
|
|
/** Desktop entry show actions */
|
|
|
|
unsigned int drun_show_actions;
|
2020-08-26 15:10:04 -04:00
|
|
|
/** Desktop format display */
|
2018-10-17 17:02:50 -04:00
|
|
|
char * drun_display_format;
|
2020-08-26 15:10:04 -04:00
|
|
|
/** Desktop Link launch command */
|
|
|
|
char * drun_url_launcher;
|
|
|
|
|
2016-01-07 10:01:56 -05:00
|
|
|
/** Search case sensitivity */
|
|
|
|
unsigned int case_sensitive;
|
2016-05-25 14:40:23 -04:00
|
|
|
/** Cycle through in the element list */
|
|
|
|
unsigned int cycle;
|
2016-01-07 10:01:56 -05:00
|
|
|
/** Height of an element in number of rows */
|
|
|
|
int element_height;
|
|
|
|
/** Sidebar mode, show the modi */
|
|
|
|
unsigned int sidebar_mode;
|
2021-04-13 05:45:20 -04:00
|
|
|
/** Mouse hover automatically selects */
|
2021-04-13 05:49:42 -04:00
|
|
|
gboolean hover_select;
|
2016-01-07 10:01:56 -05:00
|
|
|
/** 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 */
|
|
|
|
char *combi_modi;
|
2016-08-25 02:43:40 -04:00
|
|
|
char *matching;
|
|
|
|
MatchingMethod matching_method;
|
2016-01-07 10:01:56 -05:00
|
|
|
unsigned int tokenize;
|
|
|
|
/** Monitors */
|
2016-08-19 04:46:38 -04:00
|
|
|
char *monitor;
|
2017-07-06 12:09:25 -04:00
|
|
|
/** Line margin */
|
|
|
|
unsigned int line_margin;
|
|
|
|
unsigned int line_padding;
|
2016-01-07 10:01:56 -05:00
|
|
|
/** filter */
|
|
|
|
char *filter;
|
2017-07-06 12:09:25 -04:00
|
|
|
/** style */
|
|
|
|
char *separator_style;
|
|
|
|
/** hide scrollbar */
|
|
|
|
unsigned int hide_scrollbar;
|
|
|
|
/** bg image */
|
|
|
|
unsigned int fake_transparency;
|
2016-01-07 10:01:56 -05:00
|
|
|
/** dpi */
|
|
|
|
int dpi;
|
|
|
|
/** Number threads (1 to disable) */
|
|
|
|
unsigned int threads;
|
2016-02-17 14:29:23 -05:00
|
|
|
unsigned int scroll_method;
|
2017-07-06 12:09:25 -04:00
|
|
|
unsigned int scrollbar_width;
|
|
|
|
/** Background type */
|
|
|
|
char *fake_background;
|
2016-06-28 17:07:48 -04:00
|
|
|
|
|
|
|
char *window_format;
|
2016-09-08 16:42:41 -04:00
|
|
|
/** Click outside the window to exit */
|
|
|
|
int click_to_exit;
|
2016-12-11 12:06:35 -05:00
|
|
|
|
|
|
|
char *theme;
|
2017-04-21 03:48:03 -04:00
|
|
|
/** Path where plugins can be found. */
|
2017-04-27 16:59:14 -04:00
|
|
|
char * plugin_path;
|
2017-10-03 13:59:35 -04:00
|
|
|
|
|
|
|
/** Maximum history length per mode. */
|
|
|
|
unsigned int max_history_size;
|
2017-11-07 14:03:42 -05:00
|
|
|
gboolean combi_hide_mode_prefix;
|
2018-12-14 10:58:26 -05:00
|
|
|
|
|
|
|
char matching_negate_char;
|
2019-02-08 14:43:53 -05:00
|
|
|
|
|
|
|
/** Cache directory. */
|
|
|
|
char *cache_dir;
|
2019-10-17 15:19:19 -04:00
|
|
|
|
|
|
|
/** Window Thumbnails */
|
|
|
|
gboolean window_thumbnail;
|
2020-01-26 06:47:04 -05:00
|
|
|
|
|
|
|
/** drun cache */
|
|
|
|
gboolean drun_use_desktop_cache;
|
|
|
|
gboolean drun_reload_desktop_cache;
|
2020-05-12 04:34:04 -04:00
|
|
|
|
|
|
|
/** Benchmark */
|
|
|
|
gboolean benchmark_ui;
|
2020-09-30 15:56:37 -04:00
|
|
|
|
|
|
|
gboolean normalize_match;
|
2021-04-13 05:35:34 -04:00
|
|
|
/** Steal focus */
|
|
|
|
gboolean steal_focus;
|
2016-01-07 10:01:56 -05:00
|
|
|
} Settings;
|
|
|
|
/** Global Settings structure. */
|
|
|
|
extern Settings config;
|
|
|
|
#endif // ROFI_SETTINGS_H
|