Add a primaryMonitor config option, where the focus-cycle and keychain popups will...
[dana/openbox.git] / openbox / config.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3    config.h for the Openbox window manager
4    Copyright (c) 2006        Mikael Magnusson
5    Copyright (c) 2003-2007   Dana Jansens
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    See the COPYING file for a copy of the GNU General Public License.
18 */
19
20 #ifndef __config_h
21 #define __config_h
22
23 #include "misc.h"
24 #include "stacking.h"
25 #include "place.h"
26 #include "client.h"
27 #include "geom.h"
28 #include "moveresize.h"
29 #include "render/render.h"
30
31 #include <glib.h>
32
33 struct _ObParseInst;
34
35 typedef struct _ObAppSettings ObAppSettings;
36
37 struct _ObAppSettings
38 {
39     GPatternSpec *class;
40     GPatternSpec *name;
41     GPatternSpec *role;
42     ObClientType  type;
43
44     GravityPoint position;
45     gboolean pos_given;
46     gboolean pos_force;
47
48     guint desktop;
49     gint shade;
50     gint decor;
51     gint focus;
52     gint monitor;
53     gint iconic;
54     gint skip_pager;
55     gint skip_taskbar;
56     gint max_horz;
57     gint max_vert;
58     gint fullscreen;
59
60     gint layer;
61 };
62
63 /*! Should new windows be focused */
64 extern gboolean config_focus_new;
65 /*! Focus windows when the mouse enters them */
66 extern gboolean config_focus_follow;
67 /*! Timeout for focusing windows on focus follows mouse, in milliseconds */
68 extern guint    config_focus_delay;
69 /*! If windows should automatically be raised when they are focused in
70  focus follows mouse */
71 extern gboolean config_focus_raise;
72 /*! Focus the last focused window, not under the mouse, in follow mouse mode */
73 extern gboolean config_focus_last;
74 /*! Try keep focus on the window under the mouse when the mouse is not moving
75  */
76 extern gboolean config_focus_under_mouse;
77
78 /*! The algorithm to use for placing new windows */
79 extern ObPlacePolicy config_place_policy;
80 /*! Place windows in the center of the free area */
81 extern gboolean config_place_center;
82 /*! Place windows on the active monitor (unless they are part of an application
83   already on another monitor) */
84 extern ObPlaceMonitor config_place_monitor;
85
86 /*! Place dialogs and stuff on this monitor.  Index starts at 1.  If this is
87   0, then use the config_primary_monitor instead. */
88 extern guint config_primary_monitor_index;
89 /*! Where to place dialogs and stuff if it is not specified by index. */
90 extern ObPlaceMonitor config_primary_monitor;
91
92 /*! User-specified margins around the edge of the screen(s) */
93 extern StrutPartial config_margins;
94
95 /*! When true windows' contents are refreshed while they are resized; otherwise
96   they are not updated until the resize is complete */
97 extern gboolean config_resize_redraw;
98 /*! show move/resize popups? 0 = no, 1 = always, 2 = only
99   resizing !1 increments */
100 extern gint config_resize_popup_show;
101 /*! where to show the resize popup */
102 extern ObResizePopupPos config_resize_popup_pos;
103 /*! where to place the popup if it's in a fixed position */
104 extern GravityPoint config_resize_popup_fixed;
105
106 /*! The stacking layer the dock will reside in */
107 extern ObStackingLayer config_dock_layer;
108 /*! Is the dock floating */
109 extern gboolean config_dock_floating;
110 /*! Don't use a strut for the dock */
111 extern gboolean config_dock_nostrut;
112 /*! Where to place the dock if not floating */
113 extern ObDirection config_dock_pos;
114 /*! If config_dock_floating, this is the top-left corner's
115   position */
116 extern gint config_dock_x;
117 /*! If config_dock_floating, this is the top-left corner's
118   position */
119 extern gint config_dock_y;
120 /*! Whether the dock places the dockapps in it horizontally or vertically */
121 extern ObOrientation config_dock_orient;
122 /*! Whether to auto-hide the dock when the pointer is not over it */
123 extern gboolean config_dock_hide;
124 /*! The number of milliseconds to wait before hiding the dock */
125 extern guint config_dock_hide_delay;
126 /*! The number of milliseconds to wait before showing the dock */
127 extern guint config_dock_show_delay;
128 /*! The mouse button to be used to move dock apps */
129 extern guint config_dock_app_move_button;
130 /*! The modifiers to be used with the button to move dock apps */
131 extern guint config_dock_app_move_modifiers;
132
133 /*! The name of the theme */
134 extern gchar *config_theme;
135
136 /*! Show the one-pixel border after toggleDecor */
137 extern gboolean config_theme_keepborder;
138 /*! Titlebar button layout */
139 extern gchar *config_title_layout;
140 /*! Animate windows iconifying and restoring */
141 extern gboolean config_animate_iconify;
142
143 /*! The font for the active window's title */
144 extern RrFont *config_font_activewindow;
145 /*! The font for inactive windows' titles */
146 extern RrFont *config_font_inactivewindow;
147 /*! The font for menu titles */
148 extern RrFont *config_font_menutitle;
149 /*! The font for menu items */
150 extern RrFont *config_font_menuitem;
151 /*! The font for on-screen-displays/popups */
152 extern RrFont *config_font_osd;
153
154 /*! The number of desktops */
155 extern guint config_desktops_num;
156 /*! Desktop to start on, put 5 to start in the center of a 3x3 grid */
157 extern guint config_screen_firstdesk;
158 /*! Names for the desktops */
159 extern GSList *config_desktops_names;
160 /*! Amount of time to show the desktop switch dialog */
161 extern guint config_desktop_popup_time;
162
163 /*! The keycode of the key combo which resets the keybaord chains */
164 extern guint config_keyboard_reset_keycode;
165 /*! The modifiers of the key combo which resets the keybaord chains */
166 extern guint config_keyboard_reset_state;
167
168 /*! Number of pixels a drag must go before being considered a drag */
169 extern gint config_mouse_threshold;
170 /*! Number of milliseconds within which 2 clicks must occur to be a
171   double-click */
172 extern gint config_mouse_dclicktime;
173 /*! Number of milliseconds that the mouse has to be on the screen edge before
174   a screen edge event is triggered */
175 extern gint config_mouse_screenedgetime;
176
177 /*! Number of pixels to resist while crossing another window's edge */
178 extern gint config_resist_win;
179 /*! Number of pixels to resist while crossing a screen's edge */
180 extern gint config_resist_edge;
181
182 /*! Delay for hiding menu when opening in milliseconds */
183 extern guint    config_menu_hide_delay;
184 /*! Center menus vertically about the parent entry */
185 extern gboolean config_menu_middle;
186 /*! Delay before opening a submenu in milliseconds */
187 extern guint    config_submenu_show_delay;
188 /*! Show icons in client_list_menu */
189 extern gboolean config_menu_client_list_icons;
190 /*! Show manage desktops in client_list_menu */
191 extern gboolean config_menu_manage_desktops;
192 /*! User-specified menu files */
193 extern GSList *config_menu_files;
194 /*! Per app settings */
195 extern GSList *config_per_app_settings;
196
197 void config_startup(struct _ObParseInst *i);
198 void config_shutdown();
199
200 /*! Create an ObAppSettings structure with the default values */
201 ObAppSettings* config_create_app_settings();
202 /*! Copies any settings in src to dest, if they are their default value in
203   src. */
204 void config_app_settings_copy_non_defaults(const ObAppSettings *src,
205                                            ObAppSettings *dest);
206
207 #endif