Add setting "bar_on_top_by_default"
This commit is contained in:
parent
208d28f636
commit
1cdf2bc180
4 changed files with 15 additions and 2 deletions
|
@ -4,7 +4,6 @@ static const char wm_name[] = "PolytreeWM";
|
|||
|
||||
/* appearance */
|
||||
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "monospace:size=10" };
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
|
|
|
@ -637,7 +637,7 @@ createmon(void)
|
|||
|
||||
m->tagset[0] = m->tagset[1] = 1;
|
||||
m->nmaster = settings_get_default_clients_in_master();
|
||||
m->topbar = topbar;
|
||||
m->topbar = settings_get_bar_on_top_by_default();
|
||||
m->lt[0] = &layouts[0];
|
||||
m->lt[1] = &layouts[1 % LENGTH(layouts)];
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "constraints.h"
|
||||
|
||||
static bool bar_on_top_by_default = true;
|
||||
static SettingsForSingleWindow border_for_single_window = SETTINGS_FOR_SINGLE_WINDOW_NOBODY_IS_FULLSCREEN;
|
||||
static int border_width = 2;
|
||||
static int default_clients_in_master = 1;
|
||||
|
@ -18,6 +19,16 @@ static UnitKind show_bar_per_unit = UNIT_MONITOR;
|
|||
static unsigned int snap_distance = 32;
|
||||
static bool swallow_floating = false;
|
||||
|
||||
bool settings_get_bar_on_top_by_default()
|
||||
{
|
||||
return bar_on_top_by_default;
|
||||
}
|
||||
|
||||
void settings_set_bar_on_top_by_default(bool new_bar_on_top_by_default)
|
||||
{
|
||||
bar_on_top_by_default = new_bar_on_top_by_default;
|
||||
}
|
||||
|
||||
SettingsForSingleWindow settings_get_border_for_single_window()
|
||||
{
|
||||
return border_for_single_window;
|
||||
|
|
|
@ -12,6 +12,9 @@ typedef enum {
|
|||
SETTINGS_FOR_SINGLE_WINDOW_NOBODY_IS_FULLSCREEN,
|
||||
} SettingsForSingleWindow;
|
||||
|
||||
bool settings_get_bar_on_top_by_default();
|
||||
void settings_set_bar_on_top_by_default(bool new_bar_on_top_by_default);
|
||||
|
||||
SettingsForSingleWindow settings_get_border_for_single_window();
|
||||
void settings_set_border_for_single_window(SettingsForSingleWindow new_border_for_single_window);
|
||||
|
||||
|
|
Loading…
Reference in a new issue