~kris/suckless

st

535af11c2d36a31478558c2eb5b675d011b55a5d — siduck 2 years ago bddc8b0
add swapmouse patch
2 files changed, 10 insertions(+), 3 deletions(-)

M README.md
M x.c
M README.md => README.md +1 -1
@@ 72,7 72,7 @@ Add `st.url = "github:siduck/st";` to your inputs and install `inputs.st.package
- xresources
- sync patch ( Better draw timing to reduce flicker/tearing and improve animation smoothness )
- live reload ( change colors/fonts on the fly )
  and more...
- st-swapmouse
  <br>

## Xresources live-reload

M x.c => x.c +9 -2
@@ 269,6 269,9 @@ static char *opt_title = NULL;
static int oldbutton = 3; /* button event on startup: 3 = release */
static int cursorblinks = 0;

static Cursor cursor;
static XColor xmousefg, xmousebg;

void
clipcopy(const Arg *dummy)
{


@@ 1216,10 1219,8 @@ void
xinit(int cols, int rows)
{
	XGCValues gcvalues;
	Cursor cursor;
	Window parent;
	pid_t thispid = getpid();
	XColor xmousefg, xmousebg;
	XWindowAttributes attr;
	XVisualInfo vis;



@@ 1875,6 1876,12 @@ xsetmode(int set, unsigned int flags)
{
	int mode = win.mode;
	MODBIT(win.mode, set, flags);
        if (flags & MODE_MOUSE) {
                if (win.mode & MODE_MOUSE)
                        XUndefineCursor(xw.dpy, xw.win);
                else
                        XDefineCursor(xw.dpy, xw.win, cursor);
        }
	if ((win.mode & MODE_REVERSE) != (mode & MODE_REVERSE))
		redraw();
}