2013-10-08 21:05:56 +02:00
|
|
|
/* * Copyright (c) 2012-2013 Bastien Dejean
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
|
|
* are permitted provided that the following conditions are met:
|
|
|
|
*
|
|
|
|
* * Redistributions of source code must retain the above copyright notice, this
|
|
|
|
* list of conditions and the following disclaimer.
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer in the documentation and/or
|
|
|
|
* other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
|
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
|
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2012-09-11 13:12:53 +02:00
|
|
|
#include <unistd.h>
|
|
|
|
#include "bspwm.h"
|
2012-08-20 22:38:29 +02:00
|
|
|
#include "settings.h"
|
2012-07-30 14:54:20 +02:00
|
|
|
|
2013-07-29 10:27:04 +02:00
|
|
|
void run_config(void)
|
2012-09-11 13:12:53 +02:00
|
|
|
{
|
2012-11-05 10:27:40 +01:00
|
|
|
if (fork() == 0) {
|
|
|
|
if (dpy != NULL)
|
|
|
|
close(xcb_get_file_descriptor(dpy));
|
2013-11-09 11:08:36 +01:00
|
|
|
setsid();
|
|
|
|
execl(config_path, config_path, NULL);
|
|
|
|
err("Couldn't execute the configuration file.\n");
|
2012-11-05 10:27:40 +01:00
|
|
|
}
|
2012-09-11 13:12:53 +02:00
|
|
|
}
|
|
|
|
|
2012-09-27 10:46:04 +02:00
|
|
|
void load_settings(void)
|
2012-07-30 19:43:54 +02:00
|
|
|
{
|
2013-11-05 20:09:24 +01:00
|
|
|
snprintf(rule_command, sizeof(rule_command), "%s", RULE_COMMAND);
|
2013-11-07 14:28:39 +01:00
|
|
|
snprintf(status_prefix, sizeof(status_prefix), "%s", STATUS_PREFIX);
|
2013-11-05 20:09:24 +01:00
|
|
|
|
2013-09-21 12:39:59 +02:00
|
|
|
snprintf(normal_border_color, sizeof(normal_border_color), "%s", NORMAL_BORDER_COLOR);
|
|
|
|
snprintf(focused_border_color, sizeof(focused_border_color), "%s", FOCUSED_BORDER_COLOR);
|
|
|
|
snprintf(active_border_color, sizeof(active_border_color), "%s", ACTIVE_BORDER_COLOR);
|
|
|
|
snprintf(presel_border_color, sizeof(presel_border_color), "%s", PRESEL_BORDER_COLOR);
|
|
|
|
snprintf(focused_locked_border_color, sizeof(focused_locked_border_color), "%s", FOCUSED_LOCKED_BORDER_COLOR);
|
|
|
|
snprintf(active_locked_border_color, sizeof(active_locked_border_color), "%s", ACTIVE_LOCKED_BORDER_COLOR);
|
|
|
|
snprintf(normal_locked_border_color, sizeof(normal_locked_border_color), "%s", NORMAL_LOCKED_BORDER_COLOR);
|
2013-10-01 18:04:18 +02:00
|
|
|
snprintf(focused_sticky_border_color, sizeof(focused_sticky_border_color), "%s", FOCUSED_STICKY_BORDER_COLOR);
|
2013-10-06 16:58:02 +02:00
|
|
|
snprintf(active_sticky_border_color, sizeof(active_sticky_border_color), "%s", ACTIVE_STICKY_BORDER_COLOR);
|
2013-10-01 18:04:18 +02:00
|
|
|
snprintf(normal_sticky_border_color, sizeof(normal_sticky_border_color), "%s", NORMAL_STICKY_BORDER_COLOR);
|
2013-10-12 21:16:51 +02:00
|
|
|
snprintf(focused_private_border_color, sizeof(focused_private_border_color), "%s", FOCUSED_PRIVATE_BORDER_COLOR);
|
|
|
|
snprintf(active_private_border_color, sizeof(active_private_border_color), "%s", ACTIVE_PRIVATE_BORDER_COLOR);
|
|
|
|
snprintf(normal_private_border_color, sizeof(normal_private_border_color), "%s", NORMAL_PRIVATE_BORDER_COLOR);
|
2013-09-21 12:39:59 +02:00
|
|
|
snprintf(urgent_border_color, sizeof(urgent_border_color), "%s", URGENT_BORDER_COLOR);
|
2012-08-07 12:17:47 +02:00
|
|
|
|
2013-10-10 18:24:21 +02:00
|
|
|
focused_frame_opacity = FOCUSED_FRAME_OPACITY;
|
|
|
|
active_frame_opacity = ACTIVE_FRAME_OPACITY;
|
|
|
|
normal_frame_opacity = NORMAL_FRAME_OPACITY;
|
|
|
|
|
2013-04-03 12:19:01 +02:00
|
|
|
split_ratio = SPLIT_RATIO;
|
2013-09-23 10:53:21 +02:00
|
|
|
growth_factor = GROWTH_FACTOR;
|
2012-09-29 10:10:58 +02:00
|
|
|
|
|
|
|
borderless_monocle = BORDERLESS_MONOCLE;
|
2012-11-04 14:10:08 +01:00
|
|
|
gapless_monocle = GAPLESS_MONOCLE;
|
2013-03-04 11:25:12 +01:00
|
|
|
focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
|
2013-06-05 21:21:12 +02:00
|
|
|
pointer_follows_monitor = POINTER_FOLLOWS_MONITOR;
|
2013-09-05 15:37:54 +02:00
|
|
|
apply_floating_atom = APPLY_FLOATING_ATOM;
|
2013-03-22 19:17:03 +01:00
|
|
|
auto_alternate = AUTO_ALTERNATE;
|
2013-07-04 12:14:47 +02:00
|
|
|
auto_cancel = AUTO_CANCEL;
|
2013-06-24 16:25:50 +02:00
|
|
|
history_aware_focus = HISTORY_AWARE_FOCUS;
|
2013-10-26 17:54:44 +02:00
|
|
|
ignore_ewmh_focus = IGNORE_EWMH_FOCUS;
|
2012-08-01 12:25:18 +02:00
|
|
|
}
|