config.h, main.c, menu.c: fix SHOWSTICK configuration, add FONTLIST configuration, add AUTOSTICK and bump version to 0.2
This commit is contained in:
parent
f144036b01
commit
738217b9cd
3 changed files with 36 additions and 14 deletions
19
config.h
19
config.h
|
@ -12,8 +12,8 @@
|
||||||
#define SMENUFGCOL 0x000000
|
#define SMENUFGCOL 0x000000
|
||||||
#define SMENUBGCOL 0x1f9b92
|
#define SMENUBGCOL 0x1f9b92
|
||||||
|
|
||||||
// #define SHOWSTICK
|
//#define SHOWSTICK
|
||||||
// #define VIRTNOTIFY
|
#define VIRTNOTIFY
|
||||||
|
|
||||||
#define SHORTCUTMOD Mod4Mask
|
#define SHORTCUTMOD Mod4Mask
|
||||||
#define MODBITS (1<<6)
|
#define MODBITS (1<<6)
|
||||||
|
@ -43,3 +43,18 @@
|
||||||
|
|
||||||
#define LAUNCH_KEY XK_slash
|
#define LAUNCH_KEY XK_slash
|
||||||
|
|
||||||
|
#define AUTOSTICK {\
|
||||||
|
"XOsview",\
|
||||||
|
0\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define FONTLIST {\
|
||||||
|
"*-lucidatypewriter-medium-*-12-*-75-*",\
|
||||||
|
"lucm.latin1.9",\
|
||||||
|
"blit",\
|
||||||
|
"*-lucidatypewriter-bold-*-14-*-75-*",\
|
||||||
|
"9x15bold",\
|
||||||
|
"fixed",\
|
||||||
|
"*",\
|
||||||
|
0\
|
||||||
|
}
|
||||||
|
|
13
main.c
13
main.c
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
char *version[] =
|
char *version[] =
|
||||||
{
|
{
|
||||||
"ryudo version 0.1, Copyright (c) 1994-1996 David Hogan, (c) 2004 Russ Cox, (c) 2019 Derek Stevens", 0
|
"ryudo version 0.2\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ Cox,\n(c) 2019-2021 Derek Stevens", 0
|
||||||
};
|
};
|
||||||
|
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
|
@ -58,16 +58,7 @@ Atom _rio_hold_mode;
|
||||||
Atom wm_state_fullscreen;
|
Atom wm_state_fullscreen;
|
||||||
Atom wm_state;
|
Atom wm_state;
|
||||||
|
|
||||||
char *fontlist[] = {
|
char *fontlist[] = FONTLIST;
|
||||||
"*-lucidatypewriter-medium-*-12-*-75-*",
|
|
||||||
"lucm.latin1.9",
|
|
||||||
"blit",
|
|
||||||
"*-lucidatypewriter-bold-*-14-*-75-*",
|
|
||||||
"9x15bold",
|
|
||||||
"fixed",
|
|
||||||
"*",
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
|
|
18
menu.c
18
menu.c
|
@ -16,6 +16,7 @@
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include "dat.h"
|
#include "dat.h"
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
Client *hiddenc[MAXHIDDEN];
|
Client *hiddenc[MAXHIDDEN];
|
||||||
|
|
||||||
|
@ -395,7 +396,12 @@ button2(int n)
|
||||||
void
|
void
|
||||||
switch_to_c(int n, Client *c)
|
switch_to_c(int n, Client *c)
|
||||||
{
|
{
|
||||||
if(c == 0)
|
#ifdef AUTOSTICK
|
||||||
|
static char *autostick[] = AUTOSTICK;
|
||||||
|
char **a = autostick;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if(c == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(c->next)
|
if(c->next)
|
||||||
|
@ -404,6 +410,15 @@ switch_to_c(int n, Client *c)
|
||||||
if(c->parent == DefaultRootWindow(dpy))
|
if(c->parent == DefaultRootWindow(dpy))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef AUTOSTICK
|
||||||
|
while(*a){
|
||||||
|
if (strstr(c->class, *a) && c->virt >= 0) {
|
||||||
|
stick(c);
|
||||||
|
}
|
||||||
|
++a;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(c->virt != virt && c->state == NormalState && c->virt >= 0){
|
if(c->virt != virt && c->state == NormalState && c->virt >= 0){
|
||||||
XUnmapWindow(dpy, c->parent);
|
XUnmapWindow(dpy, c->parent);
|
||||||
XUnmapWindow(dpy, c->window);
|
XUnmapWindow(dpy, c->window);
|
||||||
|
@ -423,6 +438,7 @@ switch_to_c(int n, Client *c)
|
||||||
setstate(c, NormalState);
|
setstate(c, NormalState);
|
||||||
if(currents[virt] == c)
|
if(currents[virt] == c)
|
||||||
active(c);
|
active(c);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue