2016-01-07 15:01:56 +00:00
|
|
|
#ifndef ROFI_SETTINGS_H
|
|
|
|
#define ROFI_SETTINGS_H
|
|
|
|
|
2016-10-24 19:46:39 +00:00
|
|
|
#include <glib.h>
|
|
|
|
|
2016-08-25 06:43:40 +00: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;
|
|
|
|
|
2016-01-07 15:01:56 +00:00
|
|
|
/**
|
|
|
|
* Enumeration indicating location or gravity of window.
|
|
|
|
*
|
|
|
|
* \verbatim WL_NORTH_WEST WL_NORTH WL_NORTH_EAST \endverbatim
|
|
|
|
* \verbatim WL_EAST WL_CENTER WL_EAST \endverbatim
|
|
|
|
* \verbatim WL_SOUTH_WEST WL_SOUTH WL_SOUTH_EAST\endverbatim
|
|
|
|
*
|
|
|
|
* @ingroup CONFIGURATION
|
|
|
|
*/
|
2016-03-24 21:13:19 +00:00
|
|
|
typedef enum
|
2016-01-07 15:01:56 +00:00
|
|
|
{
|
|
|
|
/** Center */
|
|
|
|
WL_CENTER = 0,
|
|
|
|
/** Left top corner. */
|
|
|
|
WL_NORTH_WEST = 1,
|
|
|
|
/** Top middle */
|
|
|
|
WL_NORTH = 2,
|
|
|
|
/** Top right */
|
|
|
|
WL_NORTH_EAST = 3,
|
|
|
|
/** Middle right */
|
|
|
|
WL_EAST = 4,
|
|
|
|
/** Bottom right */
|
2017-01-06 18:04:25 +00:00
|
|
|
WL_SOUTH_EAST = 5,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Bottom middle */
|
|
|
|
WL_SOUTH = 6,
|
|
|
|
/** Bottom left */
|
|
|
|
WL_SOUTH_WEST = 7,
|
|
|
|
/** Middle left */
|
|
|
|
WL_WEST = 8
|
|
|
|
} WindowLocation;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Settings structure holding all (static) configurable options.
|
|
|
|
* @ingroup CONFIGURATION
|
|
|
|
*/
|
2016-03-24 21:13:19 +00:00
|
|
|
typedef struct
|
2016-01-07 15:01:56 +00:00
|
|
|
{
|
|
|
|
/** List of enabled modi */
|
|
|
|
char *modi;
|
|
|
|
/** Border width */
|
|
|
|
unsigned int menu_bw;
|
|
|
|
/** 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;
|
|
|
|
|
|
|
|
/** New row colors */
|
|
|
|
char * color_normal;
|
|
|
|
char * color_active;
|
|
|
|
char * color_urgent;
|
|
|
|
char * color_window;
|
|
|
|
/** 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 09:31:06 +00:00
|
|
|
/** Command for window */
|
|
|
|
char * window_command;
|
2016-01-07 15:01:56 +00:00
|
|
|
|
|
|
|
/** Windows location/gravity */
|
|
|
|
WindowLocation location;
|
|
|
|
/** Padding between elements */
|
|
|
|
unsigned int padding;
|
|
|
|
/** 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;
|
2017-01-11 08:42:37 +00:00
|
|
|
/** Toggle to enable sorting. */
|
|
|
|
unsigned int sort;
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Use levenshtein sorting when matching */
|
|
|
|
unsigned int levenshtein_sort;
|
|
|
|
/** Search case sensitivity */
|
|
|
|
unsigned int case_sensitive;
|
2016-05-25 18:40:23 +00:00
|
|
|
/** Cycle through in the element list */
|
|
|
|
unsigned int cycle;
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Height of an element in number of rows */
|
|
|
|
int element_height;
|
|
|
|
/** Sidebar mode, show the modi */
|
|
|
|
unsigned int sidebar_mode;
|
|
|
|
/** 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 06:43:40 +00:00
|
|
|
char *matching;
|
|
|
|
MatchingMethod matching_method;
|
2016-01-07 15:01:56 +00:00
|
|
|
unsigned int tokenize;
|
|
|
|
/** Monitors */
|
2016-08-19 08:46:38 +00:00
|
|
|
char *monitor;
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Line margin */
|
|
|
|
unsigned int line_margin;
|
2016-08-30 16:07:34 +00:00
|
|
|
unsigned int line_padding;
|
2016-01-07 15:01:56 +00:00
|
|
|
/** filter */
|
|
|
|
char *filter;
|
|
|
|
/** style */
|
|
|
|
char *separator_style;
|
|
|
|
/** hide scrollbar */
|
|
|
|
unsigned int hide_scrollbar;
|
|
|
|
/** fullscreen */
|
|
|
|
unsigned int fullscreen;
|
|
|
|
/** bg image */
|
|
|
|
unsigned int fake_transparency;
|
|
|
|
/** dpi */
|
|
|
|
int dpi;
|
|
|
|
/** Number threads (1 to disable) */
|
|
|
|
unsigned int threads;
|
|
|
|
unsigned int scrollbar_width;
|
2016-02-17 19:29:23 +00:00
|
|
|
unsigned int scroll_method;
|
2016-05-06 10:40:28 +00:00
|
|
|
/** Background type */
|
|
|
|
char *fake_background;
|
2016-06-28 21:07:48 +00:00
|
|
|
|
|
|
|
char *window_format;
|
2016-09-08 20:42:41 +00:00
|
|
|
/** Click outside the window to exit */
|
|
|
|
int click_to_exit;
|
2016-10-24 19:46:39 +00:00
|
|
|
gboolean show_match;
|
2016-12-11 17:06:35 +00:00
|
|
|
|
|
|
|
char *theme;
|
2016-01-07 15:01:56 +00:00
|
|
|
} Settings;
|
|
|
|
/** Global Settings structure. */
|
|
|
|
extern Settings config;
|
|
|
|
#endif // ROFI_SETTINGS_H
|