Giter Site home page Giter Site logo

Colorful tag patch about dwm HOT 45 CLOSED

fitrh avatar fitrh commented on June 25, 2024
Colorful tag patch

from dwm.

Comments (45)

engjpacheco avatar engjpacheco commented on June 25, 2024 2

@fitrh I made it, I kinda make a hybrid mode with rainbow tags and some of your knowledge. Here are the result of the tags :)

IMG_20211013_220737808.jpg

from dwm.

fitrh avatar fitrh commented on June 25, 2024 1

Maybe occ & 1 << i is what you mean, so replace the m->sel

drw_setscheme(drw, scheme[occ & 1 << i ? (m->colorfultag ? tagschemes[i] : SchemeSel) : SchemeTag]);

from dwm.

yogeshdcool avatar yogeshdcool commented on June 25, 2024 1

@fitrh I made it, I kinda make a hybrid mode with rainbow tags and some of your knowledge. Here are the result of the tags :)

IMG_20211013_220737808.jpg

Hey @engjpacheco can you help me to get bar like yours (pacman)

from dwm.

sivaplaysmC avatar sivaplaysmC commented on June 25, 2024 1

@fitrh thanks a lot for creating this very useful patch it is soo awesome ^_^ ... I Heavily appreciate your work .... works like a complete charm

from dwm.

fitrh avatar fitrh commented on June 25, 2024

The main implementation is here d139433 and later update is here 4e8cc1d, sorry for the dirty diff, i have a plan to release all my personal patch but i think i have to clear the diff first.

BTW, what you look at that screenshot is not only the colorful tag, there are colorful title, bar line indicator, and vacant tag patch

from dwm.

siduck avatar siduck commented on June 25, 2024

The main implementation is here d139433 and later update is here 4e8cc1d, sorry for the dirty diff, i have a plan to release all my personal patch but i think i have to clear the diff first.

BTW, what you look at that screenshot is not only the colorful tag, there are colorful title, bar line indicator, and vacant tag patch

Yeah I've seen your commits , however I want only colorful tags tho :)

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Just use those 2 commits

from dwm.

siduck avatar siduck commented on June 25, 2024

Just use those 2 commits
I did but i dont have alttag patch added :c

where do I add this?

image

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Inside the drawbar function, before you draw the tag, tag drawing look like this (i'm using alttag patch)

drw_text(drw, x, y,
        w + y, h, wdelta + lrpad / 2,
        (m->alttag ? tagsalt[i] : tags[i]),
        urg & 1 << i);

from dwm.

siduck avatar siduck commented on June 25, 2024

Inside the drawbar function, before you draw the tag, tag drawing look like this (i'm using alttag patch)

drw_text(drw, x, y,
        w + y, h, wdelta + lrpad / 2,
        (m->alttag ? tagsalt[i] : tags[i]),
        urg & 1 << i);

idk C ,you mean this function?

https://github.com/siduck76/chadwm/blob/main/chadwm/dwm.c#L1272

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Is you trying to apply the patch for this build ? if so, addit before this line

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Inside the drawbar function, before you draw the tag, tag drawing look like this (i'm using alttag patch)

drw_text(drw, x, y,
        w + y, h, wdelta + lrpad / 2,
        (m->alttag ? tagsalt[i] : tags[i]),
        urg & 1 << i);

idk C ,you mean this function?

https://github.com/siduck76/chadwm/blob/main/chadwm/dwm.c#L1272

Yes, replace that line

from dwm.

siduck avatar siduck commented on June 25, 2024

@fitrh i tried adding it but i get colored icons only if the tag is active :/ or it just uses SchemeTag for the rest of that tags

from dwm.

siduck avatar siduck commented on June 25, 2024

I added the colorful patch only : siduck/chadwm@d1223ea

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Ah, that's how it is work, only the selected tag is colored, what you see in my screenshot is when using all tag view mode (Mod-0 by default) a.k.a all the tags get selected.

Ff you want the tags colored all the time, remove the conditional checking and make it something like this

drw_setscheme(drw, tagschemes[i]);

from dwm.

siduck avatar siduck commented on June 25, 2024
```c
drw_setscheme(drw, tagschemes[i]);

wouldnt it be better to color them only if they're occupied? :D

from dwm.

siduck avatar siduck commented on June 25, 2024

Ah, that's how it is work, only the selected tag is colored, what you see in my screenshot is when using all tag view mode (Mod-0 by default) a.k.a all the tags get selected.

Ff you want the tags colored all the time, remove the conditional checking and make it something like this

drw_setscheme(drw, tagschemes[i]);

I did that and my whole dwm crashed :( ,keybinds werent working too
image

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Sorry, you should use it as an index to scheme like this

drw_setscheme(drw, scheme[tagschemes[i]]);

and if you use colorfultag configuration, dont forget to add it

drw_setscheme(drw, scheme[m->colorfultag ? tagschemes[i] : SchemeSel]);

from dwm.

fitrh avatar fitrh commented on June 25, 2024

wouldnt it be better to color them only if they're occupied? :D

Yes, you could do that, just change the condition, use m->sel instead, like this

drw_setscheme(drw, scheme[m->sel ? (m->colorfultag ? tagschemes[i] : SchemeSel) : SchemeTag]);

from dwm.

siduck avatar siduck commented on June 25, 2024

wouldnt it be better to color them only if they're occupied? :D

Yes, you could do that, just change the condition, use m->sel instead, like this

drw_setscheme(drw, scheme[m->sel ? (m->colorfultag ? tagschemes[i] : SchemeSel) : SchemeTag]);

I added only this and it removes the colors if current workspace has no windows :c

simplescreenrecorder-2021-07-24_22.34.50.mp4

from dwm.

siduck avatar siduck commented on June 25, 2024

I want tags ( having 0 windows ) to have normal color and occupied have their (tagsel colors) too , is this possible?

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Can you tell me what behavior you want ? like what happen if the tag is selected/unselected or what happen if there are a client or not, actually it is very customizable

from dwm.

fitrh avatar fitrh commented on June 25, 2024

wouldnt it be better to color them only if they're occupied? :D

'occupied' means there are a client ?

from dwm.

siduck avatar siduck commented on June 25, 2024

Can you tell me what behavior you want ? like what happen if the tag is selected/unselected or what happen if there are a client or not, actually it is very customizable

( tags = workspace)
suppose 1,2 tags are occupied

I go to 3rd tag and its empty by default so all tags reset to normal colors which I dont want!

from dwm.

siduck avatar siduck commented on June 25, 2024
```c
drw_setscheme(drw, tagschemes[i]);

wouldnt it be better to color them only if they're occupied? :D

'occupied' means there are a client ?

yes

from dwm.

siduck avatar siduck commented on June 25, 2024

thanks for the help @fitrh! seems like you're writing your own nvim config in lua too , you could check and use my config (nvchad) https://github.com/siduck76/NvChad , I cant thank you enough!

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Thank you, nice config btw, but i always prefer to write config by my self because it always give the best of understanding

from dwm.

engjpacheco avatar engjpacheco commented on June 25, 2024

Hi, I path my dwm with your code, and it doesnt crash jeje, but. How can I put the colors on every tag name, I mean, have the colors even if the tags are empty. Hope you can help me with thath. Regards from mexico.

from dwm.

fitrh avatar fitrh commented on June 25, 2024

Hi @engjpacheco, inside the loop for drawing tags, just put something like this drw_setscheme(drw, tagschemes[i])

from dwm.

fitrh avatar fitrh commented on June 25, 2024

In my recent build, remove these lines and replace this line with above code

from dwm.

engjpacheco avatar engjpacheco commented on June 25, 2024

ok, i´ll try, remove the if statent and replace this drw_setscheme(drw, scheme[tagscheme]); with this: drw_setscheme(drw, tagschemes[i])

Thank u so much, you definetly need to do the patch and post it to suckless page, ASAP, jeje.

Thank you again, regards from Mexico.

from dwm.

siduck avatar siduck commented on June 25, 2024

ok, i´ll try, remove the if statent and replace this drw_setscheme(drw, scheme[tagscheme]); with this: drw_setscheme(drw, tagschemes[i])

Thank u so much, you definetly need to do the patch and post it to suckless page, ASAP, jeje.

Thank you again, regards from Mexico.

agreed! @fitrh you gotta submit this awesome patch to suckless page :D

from dwm.

fitrh avatar fitrh commented on June 25, 2024

@engjpacheco cool, I suggest you to combined it with vacant tags, or even bar border, gap, and indictor and make it toggleable

simplescreenrecorder-2021-10-14_11.11.24.mp4

from dwm.

engjpacheco avatar engjpacheco commented on June 25, 2024

Yeah I patched with hide vacant tag, but I think I'm gonna unpatch it, because I was thinking on put the bar that you mentioned, but I don't know this kind of C source blow my mind I thin k Im not to prepare for that jajaja, but definitely I gonna make that. Thanks for share your knowledge.

from dwm.

engjpacheco avatar engjpacheco commented on June 25, 2024

What is the name of the vacanttag patch you mentioned, now I want to make the line follow only the active window,

from dwm.

fitrh avatar fitrh commented on June 25, 2024

It is hide vacant tags with some modification

from dwm.

engjpacheco avatar engjpacheco commented on June 25, 2024

IMG_20211017_162256_491.jpg

This is the result of your help, thank you for your time !. @fitrh

from dwm.

engjpacheco avatar engjpacheco commented on June 25, 2024

@yogeshdcool sure, what can I do for you?, The pacman icons are in the Material font. I only put them in my Xmenu icon (pacman), and the ghost is the icon of the stack style. The dots are the tags.

from dwm.

yogeshdcool avatar yogeshdcool commented on June 25, 2024

@engjpacheco I need the colorfultags patch do you have it or did you applied it manually

from dwm.

engjpacheco avatar engjpacheco commented on June 25, 2024

@yogeshdcool look, this is what I done:
1.-patch with the colorfultag patch.
2.-and add this to the dwm.c file:
in the drawbar(Monitor) function.

	w = TEXTW(tagtext);
	**drw_setscheme(drw, tagscheme[i]);**

from dwm.

940319082 avatar 940319082 commented on June 25, 2024

@engjpacheco cool, I suggest you to combined it with vacant tags, or even bar border, gap, and indictor and make it toggleable

simplescreenrecorder-2021-10-14_11.11.24.mp4

where can i find this bar border patch? it looks great

from dwm.

fitrh avatar fitrh commented on June 25, 2024

@superstefan420 you can find the initial implementation in this commit

from dwm.

Spaxly avatar Spaxly commented on June 25, 2024

Is this in a .diff file?

from dwm.

fitrh avatar fitrh commented on June 25, 2024

@Spaxly not yet, but you can use the relevant commits as reference

from dwm.

Spaxly avatar Spaxly commented on June 25, 2024

@fitrh Thanks.

from dwm.

Related Issues (1)

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.