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
;
43 GravityPoint position
;
62 /*! Should new windows be focused */
63 extern gboolean config_focus_new
;
64 /*! Focus windows when the mouse enters them */
65 extern gboolean config_focus_follow
;
66 /*! Timeout for focusing windows on focus follows mouse, in milliseconds */
67 extern guint config_focus_delay
;
68 /*! If windows should automatically be raised when they are focused in
69 focus follows mouse */
70 extern gboolean config_focus_raise
;
71 /*! Focus the last focused window, not under the mouse, in follow mouse mode */
72 extern gboolean config_focus_last
;
73 /*! Try keep focus on the window under the mouse when the mouse is not moving
75 extern gboolean config_focus_under_mouse
;
76 /*! Remove focus from windows when the mouse leaves them
78 extern gboolean config_unfocus_leave
;
80 /*! The algorithm to use for placing new windows */
81 extern ObPlacePolicy config_place_policy
;
82 /*! Place windows in the center of the free area */
83 extern gboolean config_place_center
;
84 /*! Place windows on the active monitor (unless they are part of an application
85 already on another monitor) */
86 extern ObPlaceMonitor config_place_monitor
;
88 /*! Place dialogs and stuff on this monitor. Index starts at 1. If this is
89 0, then use the config_primary_monitor instead. */
90 extern guint config_primary_monitor_index
;
91 /*! Where to place dialogs and stuff if it is not specified by index. */
92 extern ObPlaceMonitor config_primary_monitor
;
94 /*! User-specified margins around the edge of the screen(s) */
95 extern StrutPartial config_margins
;
97 /*! When true windows' contents are refreshed while they are resized; otherwise
98 they are not updated until the resize is complete */
99 extern gboolean config_resize_redraw
;
100 /*! show move/resize popups? 0 = no, 1 = always, 2 = only
101 resizing !1 increments */
102 extern gint config_resize_popup_show
;
103 /*! where to show the resize popup */
104 extern ObResizePopupPos config_resize_popup_pos
;
105 /*! where to place the popup if it's in a fixed position */
106 extern GravityPoint config_resize_popup_fixed
;
108 /*! The stacking layer the dock will reside in */
109 extern ObStackingLayer config_dock_layer
;
110 /*! Is the dock floating */
111 extern gboolean config_dock_floating
;
112 /*! Don't use a strut for the dock */
113 extern gboolean config_dock_nostrut
;
114 /*! Where to place the dock if not floating */
115 extern ObDirection config_dock_pos
;
116 /*! If config_dock_floating, this is the top-left corner's
118 extern gint config_dock_x
;
119 /*! If config_dock_floating, this is the top-left corner's
121 extern gint config_dock_y
;
122 /*! Whether the dock places the dockapps in it horizontally or vertically */
123 extern ObOrientation config_dock_orient
;
124 /*! Whether to auto-hide the dock when the pointer is not over it */
125 extern gboolean config_dock_hide
;
126 /*! The number of milliseconds to wait before hiding the dock */
127 extern guint config_dock_hide_delay
;
128 /*! The number of milliseconds to wait before showing the dock */
129 extern guint config_dock_show_delay
;
130 /*! The mouse button to be used to move dock apps */
131 extern guint config_dock_app_move_button
;
132 /*! The modifiers to be used with the button to move dock apps */
133 extern guint config_dock_app_move_modifiers
;
135 /*! The name of the theme */
136 extern gchar
*config_theme
;
138 /*! Show the one-pixel border after toggleDecor */
139 extern gboolean config_theme_keepborder
;
140 /*! Titlebar button layout */
141 extern gchar
*config_title_layout
;
142 /*! Animate windows iconifying and restoring */
143 extern gboolean config_animate_iconify
;
144 /*! Size of icons in focus switching dialogs */
145 extern guint config_theme_window_list_icon_size
;
147 /*! The font for the active window's title */
148 extern RrFont
*config_font_activewindow
;
149 /*! The font for inactive windows' titles */
150 extern RrFont
*config_font_inactivewindow
;
151 /*! The font for menu titles */
152 extern RrFont
*config_font_menutitle
;
153 /*! The font for menu items */
154 extern RrFont
*config_font_menuitem
;
155 /*! The font for on-screen-displays/popups' active text */
156 extern RrFont
*config_font_activeosd
;
157 /*! The font for on-screen-displays/popups' inactive text */
158 extern RrFont
*config_font_inactiveosd
;
160 /*! The number of desktops */
161 extern guint config_desktops_num
;
162 /*! Desktop to start on, put 5 to start in the center of a 3x3 grid */
163 extern guint config_screen_firstdesk
;
164 /*! Names for the desktops */
165 extern GSList
*config_desktops_names
;
166 /*! Amount of time to show the desktop switch dialog */
167 extern guint config_desktop_popup_time
;
169 /*! The keycode of the key combo which resets the keybaord chains */
170 extern guint config_keyboard_reset_keycode
;
171 /*! The modifiers of the key combo which resets the keybaord chains */
172 extern guint config_keyboard_reset_state
;
174 /*! Number of pixels a drag must go before being considered a drag */
175 extern gint config_mouse_threshold
;
176 /*! Number of milliseconds within which 2 clicks must occur to be a
178 extern gint config_mouse_dclicktime
;
179 /*! Number of milliseconds that the mouse has to be on the screen edge before
180 a screen edge event is triggered */
181 extern gint config_mouse_screenedgetime
;
183 /*! Number of pixels to resist while crossing another window's edge */
184 extern gint config_resist_win
;
185 /*! Number of pixels to resist while crossing a screen's edge */
186 extern gint config_resist_edge
;
188 /*! Delay for hiding menu when opening in milliseconds */
189 extern guint config_menu_hide_delay
;
190 /*! Center menus vertically about the parent entry */
191 extern gboolean config_menu_middle
;
192 /*! Delay before opening a submenu in milliseconds */
193 extern guint config_submenu_show_delay
;
194 /*! Show icons in client_list_menu */
195 extern gboolean config_menu_client_list_icons
;
196 /*! Show manage desktops in client_list_menu */
197 extern gboolean config_menu_manage_desktops
;
198 /*! User-specified menu files */
199 extern GSList
*config_menu_files
;
200 /*! Per app settings */
201 extern GSList
*config_per_app_settings
;
203 void config_startup(ObtXmlInst
*i
);
204 void config_shutdown(void);
206 /*! Create an ObAppSettings structure with the default values */
207 ObAppSettings
* config_create_app_settings(void);
208 /*! Copies any settings in src to dest, if they are their default value in
210 void config_app_settings_copy_non_defaults(const ObAppSettings
*src
,
211 ObAppSettings
*dest
);