add option
This commit is contained in:
parent
88f1fcd601
commit
6e170d60fa
|
@ -107,6 +107,7 @@
|
|||
- speedwm.swallowfloating: 1
|
||||
- speedwm.movefullscreenmon: 0
|
||||
- speedwm.lockfullscreen: 1
|
||||
- speedwm.fullscreenhidebar: 1
|
||||
- speedwm.underline: 0
|
||||
- speedwm.underlineall: 0
|
||||
- speedwm.underlinepad: 5
|
||||
|
|
|
@ -181,13 +181,16 @@ static char *alttrayname = "tray"; /* Polybar tray instance
|
|||
/* Misc */
|
||||
static char shell[] = "/bin/sh"; /* Shell to use */
|
||||
static char *scratchpadcmd[] = {"s", TERMINAL, "-t", "scratchpad", NULL};
|
||||
static int movefullscreenmon = 1; /* Move fullscreen windows to another monitor */
|
||||
static int lockfullscreen = 1;
|
||||
static int warpcursor = 1; /* Warp cursor when switching client/monitor */
|
||||
static int pertag = 1; /* Use different mfact and layout for each layout */
|
||||
static int wmclass = 1; /* Enable (1) workaround for when a class cannot be grabbed */
|
||||
static int clicktofocus = 0; /* Click to focus a window, instead of focusing when touched. (1/0) */
|
||||
|
||||
/* Full screen options */
|
||||
static int movefullscreenmon = 1; /* Move fullscreen windows to another monitor */
|
||||
static int fullscreenhidebar = 1; /* Hide the bar when full screen */
|
||||
static int lockfullscreen = 1;
|
||||
|
||||
/* Icon options */
|
||||
static int sizeicon = 10; /* size of the icon */
|
||||
static int spacingicon = 5; /* spacing between the title and icon */
|
||||
|
|
36
speedwm.c
36
speedwm.c
|
@ -453,7 +453,9 @@ static Clr **tagscheme;
|
|||
static Display *dpy;
|
||||
static Drw *drw;
|
||||
static Monitor *mons, *selmon;
|
||||
|
||||
static Window root, wmcheckwin;
|
||||
|
||||
static KeySym keychain = -1;
|
||||
|
||||
/* scratchpad */
|
||||
|
@ -1041,7 +1043,10 @@ cleanup(void)
|
|||
for (i = 0; i < LENGTH(colors) + 1; i++)
|
||||
free(scheme[i]);
|
||||
free(scheme);
|
||||
XDestroyWindow(dpy, wmcheckwin);
|
||||
|
||||
if (fullscreenhidebar)
|
||||
XDestroyWindow(dpy, wmcheckwin);
|
||||
|
||||
drw_free(drw);
|
||||
XSync(dpy, False);
|
||||
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||
|
@ -3789,7 +3794,7 @@ void
|
|||
setup(void)
|
||||
{
|
||||
XSetWindowAttributes wa;
|
||||
Atom utf8string;
|
||||
Atom utf8string;
|
||||
|
||||
/* clean up any zombies immediately */
|
||||
sigchld(0);
|
||||
|
@ -3815,7 +3820,7 @@ setup(void)
|
|||
int i = 0;
|
||||
|
||||
/* init atoms */
|
||||
utf8string = XInternAtom(dpy, "UTF8_STRING", False);
|
||||
utf8string = XInternAtom(dpy, "UTF8_STRING", False);
|
||||
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
|
||||
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
|
||||
wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
|
||||
|
@ -3825,7 +3830,10 @@ setup(void)
|
|||
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
|
||||
netatom[NetWMIcon] = XInternAtom(dpy, "_NET_WM_ICON", False);
|
||||
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
|
||||
netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
|
||||
|
||||
if (fullscreenhidebar)
|
||||
netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
|
||||
|
||||
netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
|
||||
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
|
||||
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
|
||||
|
@ -3858,14 +3866,18 @@ setup(void)
|
|||
updatebars();
|
||||
updatestatus();
|
||||
updatepreview();
|
||||
|
||||
/* supporting window for NetWMCheck */
|
||||
wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0);
|
||||
XChangeProperty(dpy, wmcheckwin, netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
XChangeProperty(dpy, wmcheckwin, netatom[NetWMName], utf8string, 8,
|
||||
PropModeReplace, (unsigned char *) "speedwm", 7);
|
||||
XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
if (fullscreenhidebar) {
|
||||
wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0);
|
||||
XChangeProperty(dpy, wmcheckwin, netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
XChangeProperty(dpy, wmcheckwin, netatom[NetWMName], utf8string, 8,
|
||||
PropModeReplace, (unsigned char *) "speedwm", 7);
|
||||
XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
}
|
||||
|
||||
/* EWMH support per view */
|
||||
XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
|
||||
PropModeReplace, (unsigned char *) netatom, NetLast);
|
||||
|
@ -3990,7 +4002,7 @@ getpreview(void)
|
|||
|
||||
selmon->tagmap[i] = XCreatePixmap(dpy, selmon->tagwin, selmon->mw + tagpreviewpaddingh / scalepreview, selmon->mh + 1 * sp + tagpreviewpaddingv / scalepreview, depth);
|
||||
imlib_context_set_drawable(selmon->tagmap[i]);
|
||||
imlib_render_image_part_on_drawable_at_size(0, 0, selmon->mw + tagpreviewpaddingh, selmon->mh, 0, 0 + tagpreviewpaddingv + 1 * sp, selmon->mw / scalepreview, selmon->mh / scalepreview);
|
||||
imlib_render_image_part_on_drawable_at_size(0, 0, selmon->mw + tagpreviewpaddingh, selmon->mh + 1 * sp, 0, 0 + tagpreviewpaddingv + 1 * sp, selmon->mw / scalepreview, selmon->mh / scalepreview);
|
||||
imlib_free_image();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,6 +108,7 @@ ResourcePref resources[] = {
|
|||
{ "alttrayname", STRING, &alttrayname },
|
||||
{ "lockfullscreen", INTEGER, &lockfullscreen },
|
||||
{ "movefullscreenmon", INTEGER, &movefullscreenmon },
|
||||
{ "fullscreenhidebar", INTEGER, &fullscreenhidebar },
|
||||
{ "refreshrules", INTEGER, &refreshrules },
|
||||
{ "borderpx", INTEGER, &borderpx },
|
||||
{ "snap", INTEGER, &snap },
|
||||
|
|
Loading…
Reference in a new issue