add option to toggle _NET_WM_WINDOW_TYPE_DOCK property

This commit is contained in:
speedie 2023-04-02 19:44:30 +02:00
parent caa2248774
commit 02db2c7cea
4 changed files with 123 additions and 117 deletions

View file

@ -83,6 +83,9 @@ spmenu.menupaddingv: 0
spmenu.menupaddingh: 0
spmenu.minwidth: 1000
!! Properties
spmenu.dockproperty: 1
!! General
spmenu.class: spmenu
spmenu.fast: 0
@ -98,7 +101,6 @@ spmenu.imageposition: 0
spmenu.generatecache: 1
spmenu.maxcache: 512
!! Mode options
spmenu.mode: 0

View file

@ -46,8 +46,7 @@ set_window(void)
void
set_prop(void)
{
// TODO: add toggle for this
XChangeProperty(dpy, win, types, XA_ATOM, 32, PropModeReplace, (unsigned char *) &dock, 1); // set dock property
if (dockproperty) XChangeProperty(dpy, win, types, XA_ATOM, 32, PropModeReplace, (unsigned char *) &dock, 1); // set dock property
return;
}

View file

@ -47,6 +47,8 @@ ResourcePref resources[] = {
{ "col_sgrcolor14", STRING, &col_sgrcolor14 },
{ "col_sgrcolor15", STRING, &col_sgrcolor15 },
// General options
{ "dockproperty", INTEGER, &dockproperty },
{ "globalcolors", INTEGER, &globalcolors },
{ "coloritems", INTEGER, &coloritems },
{ "menuposition", INTEGER, &menuposition },

View file

@ -19,6 +19,9 @@ static int menupaddingh = 0; /* Horizontal padding of bar (in pixels) */
static int minwidth = 1000; /* Minimum width */
static int managed = 0; /* Let your window manager manage spmenu? */
/* Window properties */
static int dockproperty = 1; /* Set _NET_WM_WINDOW_TYPE_DOCK */
/* Image options */
static int imagewidth = 86; /* Default image width */
static int imageheight = 86; /* Default image height */