1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 config.h for the Openbox window manager
4 Copyright (c) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
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.
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.
17 See the COPYING file for a copy of the GNU General Public License.
28 #include "moveresize.h"
29 #include "obrender/render.h"
34 typedef struct _ObAppSettings ObAppSettings
;
41 GPatternSpec
*group_class
;
42 GPatternSpec
*group_name
;
46 GravityPoint position
;
60 ObPlaceMonitor monitor_type
;
73 /*! Should new windows be focused */
74 extern gboolean config_focus_new
;
75 /*! Focus windows when the mouse enters them */
76 extern gboolean config_focus_follow
;
77 /*! Timeout for focusing windows on focus follows mouse, in milliseconds */
78 extern guint config_focus_delay
;
79 /*! If windows should automatically be raised when they are focused in
80 focus follows mouse */
81 extern gboolean config_focus_raise
;
82 /*! Focus the last focused window, not under the mouse, in follow mouse mode */
83 extern gboolean config_focus_last
;
84 /*! Try keep focus on the window under the mouse when the mouse is not moving
86 extern gboolean config_focus_under_mouse
;
87 /*! Remove focus from windows when the mouse leaves them
89 extern gboolean config_unfocus_leave
;
91 /*! The algorithm to use for placing new windows */
92 extern ObPlacePolicy config_place_policy
;
93 /*! Place windows on the active monitor (unless they are part of an application
94 already on another monitor) */
95 extern ObPlaceMonitor config_place_monitor
;
97 /*! Place dialogs and stuff on this monitor. Index starts at 1. If this is
98 0, then use the config_primary_monitor instead. */
99 extern guint config_primary_monitor_index
;
100 /*! Where to place dialogs and stuff if it is not specified by index. */
101 extern ObPlaceMonitor config_primary_monitor
;
103 /*! User-specified margins around the edge of the screen(s) */
104 extern StrutPartial config_margins
;
106 /*! When true windows' contents are refreshed while they are resized; otherwise
107 they are not updated until the resize is complete */
108 extern gboolean config_resize_redraw
;
109 /*! show move/resize popups? 0 = no, 1 = always, 2 = only
110 resizing !1 increments */
111 extern gint config_resize_popup_show
;
112 /*! where to show the resize popup */
113 extern ObResizePopupPos config_resize_popup_pos
;
114 /*! where to place the popup if it's in a fixed position */
115 extern GravityPoint config_resize_popup_fixed
;
117 /*! The stacking layer the dock will reside in */
118 extern ObStackingLayer config_dock_layer
;
119 /*! Is the dock floating */
120 extern gboolean config_dock_floating
;
121 /*! Don't use a strut for the dock */
122 extern gboolean config_dock_nostrut
;
123 /*! Where to place the dock if not floating */
124 extern ObDirection config_dock_pos
;
125 /*! If config_dock_floating, this is the top-left corner's
127 extern gint config_dock_x
;
128 /*! If config_dock_floating, this is the top-left corner's
130 extern gint config_dock_y
;
131 /*! Whether the dock places the dockapps in it horizontally or vertically */
132 extern ObOrientation config_dock_orient
;
133 /*! Whether to auto-hide the dock when the pointer is not over it */
134 extern gboolean config_dock_hide
;
135 /*! The number of milliseconds to wait before hiding the dock */
136 extern guint config_dock_hide_delay
;
137 /*! The number of milliseconds to wait before showing the dock */
138 extern guint config_dock_show_delay
;
139 /*! The mouse button to be used to move dock apps */
140 extern guint config_dock_app_move_button
;
141 /*! The modifiers to be used with the button to move dock apps */
142 extern guint config_dock_app_move_modifiers
;
144 /*! The name of the theme */
145 extern gchar
*config_theme
;
147 /*! Show the one-pixel border after toggleDecor */
148 extern gboolean config_theme_keepborder
;
149 /*! Titlebar button layout */
150 extern gchar
*config_title_layout
;
151 /*! Animate windows iconifying and restoring */
152 extern gboolean config_animate_iconify
;
153 /*! Size of icons in focus switching dialogs */
154 extern guint config_theme_window_list_icon_size
;
155 /*! Amount of time between flashes (0 to disable flashing) */
156 extern guint config_frame_flash_delay
;
157 /*! How long (ms) to flash the window's frame (0 to flash forever) */
158 extern guint config_frame_flash_duration
;
160 /*! The font for the active window's title */
161 extern RrFont
*config_font_activewindow
;
162 /*! The font for inactive windows' titles */
163 extern RrFont
*config_font_inactivewindow
;
164 /*! The font for menu titles */
165 extern RrFont
*config_font_menutitle
;
166 /*! The font for menu items */
167 extern RrFont
*config_font_menuitem
;
168 /*! The font for on-screen-displays/popups' active text */
169 extern RrFont
*config_font_activeosd
;
170 /*! The font for on-screen-displays/popups' inactive text */
171 extern RrFont
*config_font_inactiveosd
;
173 /*! The number of desktops */
174 extern guint config_desktops_num
;
175 /*! Desktop to start on, put 5 to start in the center of a 3x3 grid */
176 extern guint config_screen_firstdesk
;
177 /*! Names for the desktops */
178 extern GSList
*config_desktops_names
;
179 /*! Amount of time to show the desktop switch dialog */
180 extern guint config_desktop_popup_time
;
182 /*! The keycode of the key combo which resets the keybaord chains */
183 extern guint config_keyboard_reset_keycode
;
184 /*! The modifiers of the key combo which resets the keybaord chains */
185 extern guint config_keyboard_reset_state
;
187 /*! Number of pixels a drag must go before being considered a drag */
188 extern gint config_mouse_threshold
;
189 /*! Number of milliseconds within which 2 clicks must occur to be a
191 extern gint config_mouse_dclicktime
;
192 /*! Number of milliseconds that the mouse has to be on the screen edge before
193 a screen edge event is triggered */
194 extern gint config_mouse_screenedgetime
;
195 /*! When TRUE, the mouse is warped to the other side of the desktop after
196 switching desktops from bumping the screen edge */
197 extern gboolean config_mouse_screenedgewarp
;
199 /*! Number of pixels to resist while crossing another window's edge */
200 extern gint config_resist_win
;
201 /*! Number of pixels to resist while crossing a screen's edge */
202 extern gint config_resist_edge
;
204 /*! Delay for hiding menu when opening in milliseconds */
205 extern guint config_menu_hide_delay
;
206 /*! Center menus vertically about the parent entry */
207 extern gboolean config_menu_middle
;
208 /*! Delay before opening a submenu in milliseconds */
209 extern guint config_submenu_show_delay
;
210 /*! Delay before closing a submenu in milliseconds */
211 extern guint config_submenu_hide_delay
;
212 /*! Show manage desktops in client_list_menu */
213 extern gboolean config_menu_manage_desktops
;
214 /*! Load & show icons in user-defined menus */
215 extern gboolean config_menu_show_icons
;
216 /*! User-specified menu files */
217 extern GSList
*config_menu_files
;
218 /*! Per app settings */
219 extern GSList
*config_per_app_settings
;
221 void config_startup(ObtXmlInst
*i
);
222 void config_shutdown(void);
224 /*! Create an ObAppSettings structure with the default values */
225 ObAppSettings
* config_create_app_settings(void);
226 /*! Copies any settings in src to dest, if they are their default value in
228 void config_app_settings_copy_non_defaults(const ObAppSettings
*src
,
229 ObAppSettings
*dest
);
230 /*! Parses an x geometry style position, with some extensions like ratios
232 void config_parse_gravity_coord(xmlNodePtr node
, GravityCoord
*c
);
233 /*! Parses a rational number or percentage into num and denom */
234 void config_parse_relative_number(gchar
*s
, gint
*num
, gint
*denom
);