bspwm/settings.c
Bastien Dejean a0b9199df5 Stack in terms of relative actions
This rewrite is based on a TODO comment for the *stack_refresh*
function of *awesome*:
    It might be worth stopping to restack everyone and only stack `c'
    relatively to the first matching in the list.

And on the concept of relative stacking (via XDG_CONFIG_WINDOW_SIBLING).

Additionally the `adaptative_raise` setting was removed because it
became obsolete when the choice was made of not raising windows when
focusing via `focus_follows_pointer`.

Windows of type *desktop* are now supported (but not managed).
2013-09-12 16:26:01 +02:00

51 lines
1.7 KiB
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include "bspwm.h"
#include "helpers.h"
#include "common.h"
#include "settings.h"
void run_config(void)
{
if (fork() == 0) {
if (dpy != NULL)
close(xcb_get_file_descriptor(dpy));
if (fork() == 0) {
setsid();
execl(config_path, config_path, NULL);
err("Couldn't execute the configuration file.\n");
}
exit(EXIT_SUCCESS);
}
wait(NULL);
}
void load_settings(void)
{
strncpy(normal_border_color, NORMAL_BORDER_COLOR, sizeof(normal_border_color));
strncpy(focused_border_color, FOCUSED_BORDER_COLOR, sizeof(focused_border_color));
strncpy(active_border_color, ACTIVE_BORDER_COLOR, sizeof(active_border_color));
strncpy(presel_border_color, PRESEL_BORDER_COLOR, sizeof(presel_border_color));
strncpy(focused_locked_border_color, FOCUSED_LOCKED_BORDER_COLOR, sizeof(focused_locked_border_color));
strncpy(active_locked_border_color, ACTIVE_LOCKED_BORDER_COLOR, sizeof(active_locked_border_color));
strncpy(normal_locked_border_color, NORMAL_LOCKED_BORDER_COLOR, sizeof(normal_locked_border_color));
strncpy(urgent_border_color, URGENT_BORDER_COLOR, sizeof(urgent_border_color));
border_width = BORDER_WIDTH;
split_ratio = SPLIT_RATIO;
borderless_monocle = BORDERLESS_MONOCLE;
gapless_monocle = GAPLESS_MONOCLE;
focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
pointer_follows_monitor = POINTER_FOLLOWS_MONITOR;
apply_floating_atom = APPLY_FLOATING_ATOM;
auto_alternate = AUTO_ALTERNATE;
auto_cancel = AUTO_CANCEL;
history_aware_focus = HISTORY_AWARE_FOCUS;
}