spmenu/options.h

235 lines
15 KiB
C
Raw Normal View History

2023-04-03 00:53:42 +02:00
/* spmenu - fancy dynamic menu
*
2023-01-20 23:17:30 +01:00
* Below is a configuration file which is technically C source code.
2023-04-03 00:53:42 +02:00
* See the included LICENSE file for license details.
2023-01-20 23:17:30 +01:00
*/
/* spmenu options */
static char *class = "spmenu"; /* Class for spmenu */
2023-03-02 14:53:48 +01:00
static int fast = 0; /* Grab keyboard first */
2023-01-20 23:17:30 +01:00
static int xresources = 1; /* Enable .Xresources support */
2023-03-30 19:06:04 +02:00
static int globalcolors = 1; /* Recognize global colors (such as colors generated by Pywal) */
2023-05-01 17:07:35 +02:00
static int loadconfig = 1; /* Load configuration (~/.spmenu.conf or ~/.config/spmenu/spmenu.conf) on runtime */
static int loadtheme = 1; /* Load theme (~/.theme.conf or ~/.config/spmenu/theme.conf) on runtime */
2023-03-06 16:23:03 +01:00
static int mon = -1; /* Monitor to run spmenu on */
2023-01-20 23:17:30 +01:00
/* Window options */
static int alpha = 1; /* Enable alpha */
static int menuposition = 2; /* Position of the menu (0: Bottom, 1: Top, 2: Center */
static int menupaddingv = 0; /* Vertical padding inside the menu (in pixels) */
static int menupaddingh = 0; /* Horizontal padding inside the menu (in pixels) */
static int menuwidth = 0; /* spmenu width when setting X/Y position */
static int menumarginv = 0; /* Vertical padding around the menu */
static int menumarginh = 0; /* Horizontal padding around the menu */
static int minwidth = 1000; /* Minimum width when centered */
static int xpos = 0; /* X position to offset spmenu */
static int ypos = 0; /* Y position to offset spmenu */
2023-03-13 21:31:13 +01:00
static int managed = 0; /* Let your window manager manage spmenu? */
2023-01-20 23:17:30 +01:00
/* Powerline options */
static int powerlineprompt = 1; /* Enable powerline for the prompt */
static int powerlinecount = 1; /* Enable powerline for the match count */
static int powerlinemode = 1; /* Enable powerline for the mode indicator */
static int powerlinecaps = 1; /* Enable powerline for the caps lock indicator */
static int promptpwlstyle = 0; /* Prompt powerline style (0: >, 1: \) */
static int matchcountpwlstyle = 0; /* Match count powerline style (0: <, 1: /) */
static int modepwlstyle = 0; /* Mode indicator powerline style (0: <, 1: /) */
static int capspwlstyle = 0; /* Caps lock indicator powerline style (0: <, 1: /) */
/* Window properties */
static int dockproperty = 1; /* Set _NET_WM_WINDOW_TYPE_DOCK */
2023-02-25 03:46:26 +01:00
/* Image options */
static int imagewidth = 200; /* Default image width */
static int imageheight = 200; /* Default image height */
2023-02-25 05:48:38 +01:00
static int imagegaps = 0; /* Image gaps */
static int imageposition = 0; /* Image position (0: Top, 1: Bottom, 2: Center, 3: Top center) */
static int generatecache = 1; /* Generate image cache by default */
2023-03-21 21:52:14 +01:00
static int maxcache = 512; /* Max image size to cache */
2023-02-25 03:46:26 +01:00
/* Mode options */
static int mode = 0; /* Mode to start speedwm in (0: Normal mode, 1: Insert mode) */
static char *normtext = "Normal"; /* Text to display for normal mode */
static char *instext = "Insert"; /* Text to display for insert mode */
static char *capslockontext = "Caps Lock"; /* Text to display for the caps lock indicator when caps lock is on */
static char *capslockofftext = ""; /* Text to display for the caps lock indicator when caps lock is off */
2023-01-20 23:17:30 +01:00
/* Window border options */
2023-04-07 15:00:07 +02:00
static int borderwidth = 0; /* Width of the border */
2023-01-20 23:17:30 +01:00
/* Font options */
static char font[] = "Noto Sans Mono 8"; /* Font to draw text and Pango markup with. */
static int textpadding = 0; /* Global text padding */
static int normitempadding = 0; /* Text padding for normal items */
static int selitempadding = 0; /* Text padding for the selected item */
static int priitempadding = 0; /* Text padding for the high priority items */
2023-01-20 23:17:30 +01:00
/* Text options */
2023-01-20 23:17:30 +01:00
static char *leftarrow = "<"; /* Left arrow, used to indicate you can move to the left */
static char *rightarrow = ">"; /* Right arrow, used to indicate you can move to the right */
static char *password = "*"; /* Password character, when the -P argument is active this will replace all characters typed */
static char *prompt = NULL; /* Default prompt */
static char *input = NULL; /* Default input text */
2023-01-20 23:17:30 +01:00
/* Match options */
static int type = 1; /* Allow typing into spmenu or only allow keybinds. */
static int passwd = 0; /* Replace input with another character and don't read stdin */
2023-03-04 15:51:26 +01:00
static int sortmatches = 1; /* Sort matches (0/1) */
2023-01-20 23:17:30 +01:00
static int casesensitive = 0; /* Case-sensitive by default? (0/1) */
static int preselected = 0; /* Which line should spmenu preselect? */
2023-05-06 14:59:47 +02:00
static int accuratewidth = 0; /* Enable accurate width. May have a performance hit if you are matching a lot of items at once */
2023-01-20 23:17:30 +01:00
static int fuzzy = 1; /* Whether or not to enable fuzzy matching by default */
static char *listfile = NULL; /* File to read entries from instead of stdin. NULL means read from stdin instead. */
2023-01-20 23:17:30 +01:00
/* Line options */
static int lineheight = 1; /* Line height (0: Calculate automatically) */
2023-01-20 23:17:30 +01:00
static int lines = 0; /* Default number of lines */
static int columns = 10; /* Default number of columns */
/* History options */
static int maxhist = 64; /* Max number of history entries */
static int histdup = 0; /* If 1, record repeated histories */
2023-01-20 23:17:30 +01:00
/* Prompt options */
2023-03-12 16:28:04 +01:00
static int indentitems = 1; /* Indent items to prompt width? (0/1) */
2023-01-20 23:17:30 +01:00
/* Hide options */
static int hideinput = 0; /* Hide input (0/1) */
static int hidelarrow = 0; /* Hide left arrow (0/1) */
static int hiderarrow = 0; /* Hide right arrow (0/1) */
2023-04-07 17:58:42 +02:00
static int hideitem = 0; /* Hide item (0/1) */
static int hideprompt = 0; /* Hide prompt (0/1) */
static int hidecaps = 0; /* Hide caps lock indicator (0/1) */
static int hidepowerline = 0; /* Hide powerline (0/1) */
static int hidecaret = 0; /* Hide caret (0/1) */
2023-02-10 17:21:04 +01:00
static int hidehighlight = 0; /* Hide highlight (0/1) */
static int hidematchcount = 0; /* Hide match count (0/1) */
static int hidemode = 0; /* Hide mode (0/1) */
2023-03-02 14:53:48 +01:00
static int hideimage = 0; /* Hide image (0/1) */
2023-01-20 23:17:30 +01:00
/* Color options
*
* Item colors */
static char col_itemnormfg[] = "#bbbbbb"; /* Normal foreground item color */
static char col_itemnormbg[] = "#222222"; /* Normal background item color */
static char col_itemselfg[] = "#eeeeee"; /* Selected foreground item color */
2023-01-23 17:51:09 +01:00
static char col_itemselbg[] = "#35638A"; /* Selected background item color */
2023-03-09 10:10:29 +01:00
static char col_itemnormprifg[] = "#bbbbbb"; /* Normal foreground item (high priority) color */
static char col_itemnormpribg[] = "#222222"; /* Normal background item (high priority) color */
static char col_itemselprifg[] = "#eeeeee"; /* Selected foreground item (high priority) color */
static char col_itemselpribg[] = "#35638A"; /* Selected background item (high priority) color */
2023-01-23 17:08:27 +01:00
/* Input colors */
static char col_inputbg[] = "#222222"; /* Input field background color */
static char col_inputfg[] = "#eeeeee"; /* Input field foreground color */
/* Menu colors */
static char col_menu[] = "#222222"; /* Menu background color */
/* Prompt colors */
static char col_promptfg[] = "#eeeeee"; /* Prompt foreground color */
2023-01-23 17:51:09 +01:00
static char col_promptbg[] = "#35526b"; /* Prompt background color */
2023-01-20 23:17:30 +01:00
/* Arrow colors */
static char col_larrowfg[] = "#bbbbbb"; /* Left arrow color */
static char col_rarrowfg[] = "#bbbbbb"; /* Right arrow color */
static char col_larrowbg[] = "#222222"; /* Left arrow color */
static char col_rarrowbg[] = "#222222"; /* Right arrow color */
2023-01-20 23:17:30 +01:00
/* Normal highlight colors */
static char col_hlnormfg[] = "#ffffff"; /* Normal text highlight color */
static char col_hlnormbg[] = "#000000"; /* Normal background highlight color */
2023-01-20 23:17:30 +01:00
/* Selected highlight colors */
static char col_hlselfg[] = "#ffffff"; /* Selected text highlight color */
static char col_hlselbg[] = "#000000"; /* Selected background highlight color */
2023-01-20 23:17:30 +01:00
/* Match count colors */
static char col_numfg[] = "#ffffff"; /* Match count text color */
static char col_numbg[] = "#2d3856"; /* Match count background color */
2023-01-22 22:12:37 +01:00
/* Border color */
static char col_border[] = "#35638A"; /* Border color */
2023-01-20 23:17:30 +01:00
/* Caret colors */
static char col_caretfg[] = "#ffffff"; /* Foreground caret color */
static char col_caretbg[] = "#222222"; /* Background caret color */
2023-01-20 23:17:30 +01:00
2023-02-25 17:44:52 +01:00
/* Mode colors */
static char col_modefg[] = "#ffffff"; /* Mode text color */
static char col_modebg[] = "#35638A"; /* Mode background color */
2023-02-25 17:44:52 +01:00
/* Caps lock colors */
static char col_capsfg[] = "#ffffff"; /* Caps lock text color */
static char col_capsbg[] = "#45638A"; /* Caps lock background color */
2023-01-20 23:17:30 +01:00
/* SGR colors */
static char col_sgr0[] = "#000000"; /* SGR color #0 */
static char col_sgr1[] = "#7f0000"; /* SGR color #1 */
static char col_sgr2[] = "#007f00"; /* SGR color #2 */
static char col_sgr3[] = "#7f7f00"; /* SGR color #3 */
static char col_sgr4[] = "#00007f"; /* SGR color #4 */
static char col_sgr5[] = "#7f007f"; /* SGR color #5 */
static char col_sgr6[] = "#007f7f"; /* SGR color #6 */
static char col_sgr7[] = "#cccccc"; /* SGR color #7 */
static char col_sgr8[] = "#333333"; /* SGR color #8 */
static char col_sgr9[] = "#ff0000"; /* SGR color #9 */
static char col_sgr10[] = "#00ff00"; /* SGR color #10 */
static char col_sgr11[] = "#ffff00"; /* SGR color #11 */
static char col_sgr12[] = "#0000ff"; /* SGR color #12 */
static char col_sgr13[] = "#ff00ff"; /* SGR color #13 */
static char col_sgr14[] = "#00ffff"; /* SGR color #14 */
static char col_sgr15[] = "#ffffff"; /* SGR color #15 */
2023-01-20 23:17:30 +01:00
/* Alpha options */
2023-04-17 16:57:09 +02:00
static int alpha_itemnormfg = 255; /* Alpha for normal item foreground (0-255) */
static int alpha_itemnormbg = 200; /* Alpha for normal item background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_itemselfg = 255; /* Alpha for selected item foreground (0-255) */
static int alpha_itemselbg = 200; /* Alpha for selected item background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_itemnormprifg = 255; /* alpha for normal priority item foreground (0-255) */
static int alpha_itemnormpribg = 200; /* Alpha for normal priority item background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_itemselprifg = 255; /* Alpha for selected priority item foreground (0-255) */
static int alpha_itemselpribg = 200; /* Alpha for selected priority item background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_inputfg = 255; /* Alpha for input foreground (0-255) */
static int alpha_inputbg = 200; /* Alpha for input background (0-255) */
static int alpha_menu = 200; /* Alpha for menu background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_promptfg = 255; /* Alpha for prompt foreground (0-255) */
static int alpha_promptbg = 200; /* Alpha for prompt background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_larrowfg = 255; /* Alpha for left arrow foreground (0-255) */
static int alpha_larrowbg = 200; /* Alpha for left arrow background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_rarrowfg = 255; /* Alpha for right arrow foreground (0-255) */
static int alpha_rarrowbg = 200; /* Alpha for right arrow background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_hlnormfg = 255; /* Alpha for normal highlight foreground (0-255) */
static int alpha_hlnormbg = 200; /* Alpha for normal highlight background (0-255) */
static int alpha_hlselfg = 255; /* Alpha for selected highlight foreground (0-255) */
static int alpha_hlselbg = 200; /* Alpha for selected highlight background (0-255) */
static int alpha_numfg = 255; /* Alpha for match count foreground (0-255) */
static int alpha_numbg = 200; /* Alpha for the match count background (0-255) */
static int alpha_border = 255; /* Alpha for the border (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_caretfg = 255; /* Alpha for the caret foreground (0-255) */
static int alpha_caretbg = 200; /* Alpha for the caret background (0-255) */
2023-04-17 16:57:09 +02:00
static int alpha_modefg = 255; /* Alpha for the mode indicator foreground (0-255) */
static int alpha_modebg = 200; /* Alpha for the mode indicator background (0-255) */
static int alpha_capsfg = 255; /* Alpha for the caps lock indicator foreground (0-255) */
static int alpha_capsbg = 200; /* Alpha for the caps lock indicator background (0-255) */
2023-03-02 18:25:28 +01:00
/* Pango options */
static int pango_item = 1; /* Enable support for pango markup for the items */
2023-03-02 11:40:52 +01:00
static int pango_highlight = 1; /* Enable support for pango markup for the highlighting */
2023-02-28 15:51:32 +01:00
static int pango_prompt = 1; /* Enable support for pango markup for the prompt */
static int pango_caps = 1; /* Enable support for pango markup for the caps lock indicator */
2023-02-28 15:51:32 +01:00
static int pango_input = 1; /* Enable support for pango markup for user input */
static int pango_leftarrow = 0; /* Enable support for pango markup for the left arrow */
static int pango_rightarrow = 0; /* Enable support for pango markup for the right arrow */
static int pango_numbers = 0; /* Enable support for pango markup for the match count */
static int pango_mode = 0; /* Enable support for pango markup for the mode indicator */
static int pango_password = 0; /* Enable support for pango markup for the password text */
2023-02-28 15:51:32 +01:00
2023-01-20 23:17:30 +01:00
/* Misc */
static int printindex = 0; /* Print index instead of the text itself (0/1) */
static int requirematch = 0; /* Require input text to match an item (0/1) */
static int incremental = 0; /* Print text every time a key is pressed (0/1) */
static int coloritems = 1; /* Color items (0/1) */
static int sgr = 1; /* Support SGR sequences (0/1) */
static char *worddelimiters = " "; /* Word delimiters used for keybinds that change words, Space is default. */