Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
LemonBoy | 35183ab81d | |
Dmitri Goutnik | 09b5a9b8ba | |
LemonBoy | 2f255b1756 | |
LemonBoy | 8cd84e8edf | |
Felix Kiss | b721a37ab0 | |
LemonBoy | 1411d260a4 | |
LemonBoy | 50fe7d2083 | |
Bastien Dejean | 84be3d8dbf | |
LemonBoy | d680ea4256 | |
LemonBoy | 44a708b7a4 |
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
|||
# This snippet has been shmelessly stol^Hborrowed from thestinger's repose Makefile
|
||||
VERSION = 1.1
|
||||
VERSION = 1.3
|
||||
GIT_DESC=$(shell test -d .git && git describe --always 2>/dev/null)
|
||||
|
||||
ifneq "$(GIT_DESC)" ""
|
||||
|
|
|
@ -69,7 +69,7 @@ Set the underline color of the bar. Accepts the same color formats as B<-B>.
|
|||
|
||||
=head1 FORMATTING
|
||||
|
||||
lemonbar provides a screenrc-inspired formatting syntax to allow full customization at runtime. Every formatting block is opened with C<%{> and closed by C<}> and accepts the following commands, the parser tries it's best to handle malformed input. Use C<%%> to get a literal percent sign (C<%>).
|
||||
lemonbar provides a screenrc-inspired formatting syntax to allow full customization at runtime. Every formatting block is opened with C<%{> and closed by C<}> and accepts the following commands, the parser tries its best to handle malformed input. Use C<%%> to get a literal percent sign (C<%>).
|
||||
|
||||
=over
|
||||
|
||||
|
@ -185,7 +185,7 @@ L<git repository|https://github.com/LemonBoy/bar>
|
|||
|
||||
=head1 AUTHOR
|
||||
|
||||
2012-2015 (C) The Lemon Man
|
||||
2012-2017 (C) The Lemon Man
|
||||
|
||||
Xinerama support was kindly contributed by Stebalien
|
||||
|
||||
|
|
15
lemonbar.c
15
lemonbar.c
|
@ -1,4 +1,5 @@
|
|||
// vim:sw=4:ts=4:et:
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -601,6 +602,10 @@ parse (char *text)
|
|||
// Eat the trailing }
|
||||
p++;
|
||||
} else { // utf-8 -> ucs-2
|
||||
// Escaped % symbol, eat the first one
|
||||
if (p[0] == '%' && p[1] == '%')
|
||||
p++;
|
||||
|
||||
uint8_t *utf = (uint8_t *)p;
|
||||
uint16_t ucs;
|
||||
|
||||
|
@ -751,11 +756,11 @@ set_ewmh_atoms (void)
|
|||
if (topbar) {
|
||||
strut[2] = bh;
|
||||
strut[8] = mon->x;
|
||||
strut[9] = mon->x + mon->width;
|
||||
strut[9] = mon->x + mon->width - 1;
|
||||
} else {
|
||||
strut[3] = bh;
|
||||
strut[10] = mon->x;
|
||||
strut[11] = mon->x + mon->width;
|
||||
strut[11] = mon->x + mon->width - 1;
|
||||
}
|
||||
|
||||
xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, atom_list[NET_WM_WINDOW_TYPE], XCB_ATOM_ATOM, 32, 1, &atom_list[NET_WM_WINDOW_TYPE_DOCK]);
|
||||
|
@ -1207,7 +1212,7 @@ init (char *wm_name)
|
|||
|
||||
// Set the WM_NAME atom to the user specified value
|
||||
if (wm_name)
|
||||
xcb_change_property(c, XCB_PROP_MODE_REPLACE, monhead->window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8 ,strlen(wm_name), wm_name);
|
||||
xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8 ,strlen(wm_name), wm_name);
|
||||
}
|
||||
|
||||
xcb_flush(c);
|
||||
|
@ -1303,7 +1308,7 @@ main (int argc, char **argv)
|
|||
exit (EXIT_SUCCESS);
|
||||
case 'g': (void)parse_geometry_string(optarg, geom_v); break;
|
||||
case 'p': permanent = true; break;
|
||||
case 'n': wm_name = optarg; break;
|
||||
case 'n': wm_name = strdup(optarg); break;
|
||||
case 'b': topbar = false; break;
|
||||
case 'd': dock = true; break;
|
||||
case 'f': font_load(optarg); break;
|
||||
|
@ -1338,6 +1343,8 @@ main (int argc, char **argv)
|
|||
|
||||
// Do the heavy lifting
|
||||
init(wm_name);
|
||||
// The string is strdup'd when the command line arguments are parsed
|
||||
free(wm_name);
|
||||
// Get the fd to Xserver
|
||||
pollin[1].fd = xcb_get_file_descriptor(c);
|
||||
|
||||
|
|
Loading…
Reference in New Issue