diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2009-11-02 10:42:22 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2009-11-02 10:42:22 +0000 |
commit | 5faa803b75758e94c17b57e71a1ec82d9d951142 (patch) | |
tree | 20917f0546f01510577716e6863dc5b00ea4d3fd /x11-wm/spectrwm/files | |
parent | a750f9ae5bad52a41670a958701c97d9cfc1b338 (diff) |
Notes
Diffstat (limited to 'x11-wm/spectrwm/files')
-rw-r--r-- | x11-wm/spectrwm/files/clock_format.patch | 108 | ||||
-rw-r--r-- | x11-wm/spectrwm/files/spawn_menu_atbottom.patch | 21 | ||||
-rw-r--r-- | x11-wm/spectrwm/files/spawn_menu_colourfix.patch | 11 |
3 files changed, 79 insertions, 61 deletions
diff --git a/x11-wm/spectrwm/files/clock_format.patch b/x11-wm/spectrwm/files/clock_format.patch index b42c5c463061..6c74bf70cd59 100644 --- a/x11-wm/spectrwm/files/clock_format.patch +++ b/x11-wm/spectrwm/files/clock_format.patch @@ -1,51 +1,79 @@ ---- scrotwm.c.orig 2009-06-29 03:46:08.000000000 +0200 -+++ scrotwm.c 2009-06-28 10:07:24.000000000 +0200 -@@ -182,6 +182,7 @@ - int bar_verbose = 1; +--- scrotwm.c.orig 2009-10-24 16:21:19.000000000 +0200 ++++ scrotwm.c 2009-10-24 16:58:55.000000000 +0200 +@@ -193,6 +193,7 @@ int bar_height = 0; + int stack_enabled = 1; int clock_enabled = 1; -+char clock_format[31] = "%a %b %d %R %Z %Y"; ++char *clock_format = NULL; + int title_name_enabled = 0; + int title_class_enabled = 0; pid_t bar_pid; - GC bar_gc; - XGCValues bar_gcv; -@@ -557,6 +558,7 @@ - - /* conf file stuff */ - #define SWM_CONF_WS "\n= \t" -+#define SWM_CONF_VAL_WS "\n\t" - #define SWM_CONF_FILE "scrotwm.conf" - int - conf_load(char *filename) -@@ -594,7 +596,7 @@ - if ((var = strsep(&cp, SWM_CONF_WS)) == NULL || cp == NULL) - break; - cp += (long)strspn(cp, SWM_CONF_WS); -- if ((val = strsep(&cp, SWM_CONF_WS)) == NULL) -+ if ((val = strsep(&cp, SWM_CONF_VAL_WS)) == NULL) - break; - - DNPRINTF(SWM_D_MISC, "conf_load: %s=%s\n",var ,val); -@@ -624,6 +626,8 @@ - case 'c': - if (!strncmp(var, "clock_enabled", strlen("clock_enabled"))) - clock_enabled = atoi(val); -+ else if (!strncmp(var, "clock_format", strlen("clock_format"))) -+ strlcpy(clock_format, val, 31); - else if (!varmatch(var, "color_focus", &i)) - setscreencolor(val, i, SWM_S_COLOR_FOCUS); - else if (!varmatch(var, "color_unfocus", &i)) -@@ -779,12 +783,12 @@ +@@ -839,7 +840,7 @@ else { time(&tmt); localtime_r(&tmt, &tm); - strftime(s, sizeof s, "%a %b %d %R %Z %Y ", &tm); + strftime(s, sizeof s, clock_format, &tm); } + for (i = 0; i < ScreenCount(display); i++) { - x = 1; - TAILQ_FOREACH(r, &screens[i].rl, entry) { -- snprintf(loc, sizeof loc, "%d:%d %s%s %s", -+ snprintf(loc, sizeof loc, "%d:%d %s %s %s", - x++, r->ws->idx + 1, s, bar_ext, bar_vertext); +@@ -851,7 +852,7 @@ + if (stack_enabled) + stack = r->ws->cur_layout->name; + +- snprintf(loc, sizeof loc, "%d:%d %s %s %s %s", ++ snprintf(loc, sizeof loc, "%d:%d %s %s %s %s", + x++, r->ws->idx + 1, stack, s, bar_ext, + bar_vertext); bar_print(r, loc); - } +@@ -3293,10 +3294,11 @@ + #define SWM_CONF_FILE "scrotwm.conf" + + enum { SWM_S_BAR_DELAY, SWM_S_BAR_ENABLED, SWM_S_STACK_ENABLED, +- SWM_S_CLOCK_ENABLED, SWM_S_CYCLE_EMPTY, SWM_S_CYCLE_VISIBLE, +- SWM_S_SS_ENABLED, SWM_S_TERM_WIDTH, SWM_S_TITLE_CLASS_ENABLED, +- SWM_S_TITLE_NAME_ENABLED, SWM_S_BAR_FONT, SWM_S_BAR_ACTION, +- SWM_S_SPAWN_TERM, SWM_S_SS_APP, SWM_S_DIALOG_RATIO }; ++ SWM_S_CLOCK_ENABLED, SWM_S_CLOCK_FORMAT, SWM_S_CYCLE_EMPTY, ++ SWM_S_CYCLE_VISIBLE, SWM_S_SS_ENABLED, SWM_S_TERM_WIDTH, ++ SWM_S_TITLE_CLASS_ENABLED, SWM_S_TITLE_NAME_ENABLED, ++ SWM_S_BAR_FONT, SWM_S_BAR_ACTION, SWM_S_SPAWN_TERM, ++ SWM_S_SS_APP, SWM_S_DIALOG_RATIO }; + + int + setconfvalue(char *selector, char *value, int flags) +@@ -3314,6 +3316,12 @@ + case SWM_S_CLOCK_ENABLED: + clock_enabled = atoi(value); + break; ++ case SWM_S_CLOCK_FORMAT: ++ if (clock_format != NULL) ++ free(clock_format); ++ if ((clock_format = strdup(value)) == NULL) ++ err(1, "setconfvalue: clock_format"); ++ break; + case SWM_S_CYCLE_EMPTY: + cycle_empty = atoi(value); + break; +@@ -3407,6 +3415,7 @@ + { "bind", setconfbinding, 0 }, + { "stack_enabled", setconfvalue, SWM_S_STACK_ENABLED }, + { "clock_enabled", setconfvalue, SWM_S_CLOCK_ENABLED }, ++ { "clock_format", setconfvalue, SWM_S_CLOCK_FORMAT }, + { "color_focus", setconfcolor, SWM_S_COLOR_FOCUS }, + { "color_unfocus", setconfcolor, SWM_S_COLOR_UNFOCUS }, + { "cycle_empty", setconfvalue, SWM_S_CYCLE_EMPTY }, +@@ -4468,6 +4477,13 @@ + if (cfile) + conf_load(cfile); + ++ if (clock_format == NULL) { ++ if ((clock_format = strdup("%a %b %d %R %Z %Y")) ++ == NULL) { ++ errx(1, "strdup"); ++ } ++ } ++ + /* setup all bars */ + for (i = 0; i < ScreenCount(display); i++) + TAILQ_FOREACH(r, &screens[i].rl, entry) { diff --git a/x11-wm/spectrwm/files/spawn_menu_atbottom.patch b/x11-wm/spectrwm/files/spawn_menu_atbottom.patch index 0a0b3dba412b..1bd35a69603e 100644 --- a/x11-wm/spectrwm/files/spawn_menu_atbottom.patch +++ b/x11-wm/spectrwm/files/spawn_menu_atbottom.patch @@ -1,11 +1,12 @@ ---- scrotwm.c.orig 2009-06-29 03:46:08.000000000 +0200 -+++ scrotwm.c 2009-06-28 10:07:24.000000000 +0200 -@@ -199,7 +200,7 @@ - char *spawn_lock[] = { "xlock", NULL }; - char *spawn_initscr[] = { "initscreen.sh", NULL }; - char *spawn_menu[] = { "dmenu_run", "-fn", NULL, "-nb", NULL, -- "-nf", NULL, "-sb", NULL, "-sf", NULL, NULL }; -+ "-nf", NULL, "-sb", NULL, "-sf", NULL, "-b", NULL }; +--- scrotwm.c.orig 2009-10-24 07:10:36.000000000 +0200 ++++ scrotwm.c 2009-10-24 07:11:10.000000000 +0200 +@@ -2812,7 +2812,8 @@ + " -nb $bar_color" + " -nf $bar_font_color" + " -sb $bar_border" +- " -sf $bar_color", 0); ++ " -sf $bar_color" ++ " -b", 0); + } - #define SWM_MENU_FN (2) - #define SWM_MENU_NB (4) + /* key bindings */ diff --git a/x11-wm/spectrwm/files/spawn_menu_colourfix.patch b/x11-wm/spectrwm/files/spawn_menu_colourfix.patch deleted file mode 100644 index 88a8a2f2677d..000000000000 --- a/x11-wm/spectrwm/files/spawn_menu_colourfix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- scrotwm.c.orig 2009-06-29 03:46:08.000000000 +0200 -+++ scrotwm.c 2009-06-28 10:07:24.000000000 +0200 -@@ -1139,7 +1143,7 @@ - spawn_menu[SWM_MENU_FN] = bar_fonts[bar_fidx]; - spawn_menu[SWM_MENU_NB] = r->s->c[SWM_S_COLOR_BAR].name; - spawn_menu[SWM_MENU_NF] = r->s->c[SWM_S_COLOR_BAR_FONT].name; -- spawn_menu[SWM_MENU_SB] = r->s->c[SWM_S_COLOR_BAR_BORDER].name; -+ spawn_menu[SWM_MENU_SB] = r->s->c[SWM_S_COLOR_BAR_FONT].name; - spawn_menu[SWM_MENU_SF] = r->s->c[SWM_S_COLOR_BAR].name; - - spawn(r, args); |