1 /* ------------------------------- 2 * vim:tabstop=4:shiftwidth=4 3 * settings.h 4 * Sun, 12 Sep 2004 18:06:08 +0700 5 * ------------------------------- 6 * settings parser\container 7 * -------------------------------*/ 8 9 #ifndef _SETTINGS_H_ 10 #define _SETTINGS_H_ 11 12 #include <X11/X.h> 13 #include <X11/Xlib.h> 14 15 #include "config.h" 16 #include "layout.h" 17 18 /* Default name of configuration file */ 19 #define STALONETRAY_RC ".stalonetrayrc" 20 21 struct Settings { 22 /* Flags */ 23 int parent_bg; /* Enable pseudo-transparency using parents' background*/ 24 int deco_flags; /* Decoration flags */ 25 int transparent; /* Enable root-transparency */ 26 int skip_taskbar; /* Remove tray from wm`s taskbar */ 27 int sticky; /* Make tray sticky across desktops/pages */ 28 int xsync; /* Operate on X server syncronously */ 29 int pixmap_bg; /* Is pixmap used for background */ 30 int min_space_policy; /* Use placement that cause minimal grow */ 31 int full_pmt_search; /* Use non-first-match search algorithm */ 32 int vertical; /* Use vertical icon layout */ 33 int shrink_back_mode; /* Keep tray's window size minimal */ 34 int dockapp_mode; /* Activate dockapp mode */ 35 int kludge_flags; /* What kludges to activate */ 36 37 int need_help; /* Print usage and exit */ 38 39 /* Strings */ 40 char *display_str; /* Name of the display */ 41 char *bg_color_str; /* Background color name */ 42 char *scrollbars_highlight_color_str; /* Name of color to highlight scrollbars with. NULL means highlighting is disabled */ 43 char *geometry_str; /* Geometry spec */ 44 char *max_geometry_str; /* Geometry spec */ 45 char *config_fname; /* Path to the configuration file */ 46 char *wnd_type; /* Window type */ 47 char *wnd_layer; /* Window layer */ 48 char *wnd_name; /* Window name (WM_NAME) */ 49 char *bg_pmap_path; /* Background pixmap path */ 50 char *tint_color_str; /* Color used for tinting */ 51 char *remote_click_name; /* Icon name to execute remote click on */ 52 53 /* Values */ 54 int icon_size; /* Icon size */ 55 int slot_size; /* Grid slot size */ 56 int grow_gravity; /* Icon gravity (interpretation of icon_gravity_str) */ 57 int icon_gravity; /* Grow gravity (interpretation of grow_gravity_str) */ 58 int win_gravity; /* Tray window gravity (computed using grow gravity) */ 59 int bit_gravity; /* Tray window bit gravity (computed using icon_gravity) */ 60 int geom_gravity; /* Tray window gravity when mapping the window (computed using geometry_str) */ 61 int fuzzy_edges; /* Level of edges fuzziness (0 = disabled) */ 62 int tint_level; /* Tinting level (0 = disabled) */ 63 int scrollbars_mode; /* SB_MODE_NONE | SB_MODE_VERT | SB_MODE_HORZ */ 64 int scrollbars_size; /* Size of scrollbar windows in pixels */ 65 int scrollbars_inc; /* Step of scrollbar */ 66 int wm_strut_mode; /* WM strut mode */ 67 struct Point max_tray_dims;/* Maximal tray dimensions */ 68 struct Point max_layout_dims; /* Maximal layout dimensions */ 69 struct Point orig_tray_dims; /* Original tray dimensions */ 70 struct Point remote_click_pos; /* Remote click position */ 71 int remote_click_btn; /* Remote click button */ 72 int remote_click_cnt; /* Remote click count */ 73 74 XColor tint_color; /* Color used for tinting */ 75 76 #ifdef DELAY_EMBEDDING_CONFIRMATION 77 int confirmation_delay; 78 #endif 79 80 XColor bg_color; /* Tray background color */ 81 XColor scrollbars_highlight_color; /* Color to highlight scrollbars with */ 82 int log_level; /* Debug level */ 83 }; 84 85 extern struct Settings settings; 86 87 /* Read settings from cmd line and configuration file */ 88 int read_settings(int argc, char **argv); 89 /* Interpret all settings that either need an 90 * open display or are interpreted from other 91 * settings */ 92 void interpret_settings(); 93 94 #endif 95