Giter Club home page Giter Club logo

Comments (4)

bakkeby avatar bakkeby commented on September 6, 2024

Thanks for bringing this to my attention, it must be a patch file which I have somehow forgotten to add to git. I'll get it added first thing in the morning.

In the meantime here is the content of that file.

static int
issel(size_t id)
{
	for (int i = 0;i < selidsize;i++)
		if (selid[i] == id)
			return 1;
	return 0;
}

static void
printsel(unsigned int state)
{
	for (int i = 0;i < selidsize;i++)
		if (selid[i] != -1 && (!sel || sel->id != selid[i]))
			puts(items[selid[i]].text);
	if (sel && !(state & ShiftMask))
		puts(sel->text);
	else
		puts(text);
}

static void
selsel()
{
	if (!sel)
		return;
	if (issel(sel->id)) {
		for (int i = 0; i < selidsize; i++)
			if (selid[i] == sel->id)
				selid[i] = -1;
	} else {
		for (int i = 0; i < selidsize; i++)
			if (selid[i] == -1) {
				selid[i] = sel->id;
				return;
			}
		selidsize++;
		selid = realloc(selid, (selidsize + 1) * sizeof(int));
		selid[selidsize - 1] = sel->id;
	}
}

from dmenu-flexipatch.

fov95 avatar fov95 commented on September 6, 2024

Nice, thank you. Do you happen to know how to change the color of the multiselect selection? It doesn't obey the select colors I set in Xresources and Couldn't find anything in the files... I'm not a programmer, just a hobbyist... =)
multiselect
That's not the actual Xresources. I picked the wrong one, that's just the template for "wpgtk" but the colors work as one can tell so it's nothing wrong with it.

from dmenu-flexipatch.

bakkeby avatar bakkeby commented on September 6, 2024

Hi @der-Zonk,

I added that missing file now.

I had a look and it is the SchemeOut colors that are used when selecting multiple items (also in a bare dmenu). The multi select patch just avoids outputting the item as soon as you do ctrl+enter and instead waits until you just press enter and then prints them all out at the end - that way you can unselect options as well.

To set these colors via Xresources you need to set the outforeground and outbackground resources.

dmenu.outforeground: {color#}
dmenu.outbackground: {color#}


Thanks,

-Stein

from dmenu-flexipatch.

fov95 avatar fov95 commented on September 6, 2024

I'm a dummy. Thanks a lot. =)

from dmenu-flexipatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.