Page 1 of 1

wm border color

Posted: Mon Jun 08, 2015 2:00 am
by dkeg
I wanted to a script to take my current xcolor bg and apply to my wm border colors without having to go in and manually update.

This script was written specifically for 2bwm since that is my main wm, but I'm posting, one, for the idea and possible motivation,and two, b/c I thought it could easily be used for other wms with just a little adjusting.

I have the all 6 border color options placed into an array from which I use sed to replace an element in the array with a specific xcolor value. Whenever you change your xcolor you can run this and your wm (2bwm) borders will keep with you chosen color scheme!

In action
https://u.teknik.io/P7sHYg.webm

Interested? Find it here

Re: wm border color

Posted: Tue Jun 09, 2015 1:26 am
by dkeg
Don't you guys love the useless scripts I write. I updated the OP with a little xdotool magic to reload the config. One stop shop. I got my own little theming utils going on here; scrotup, bitly, schemr (haven't fixed that fucker yet though), wm color, bar conf.

I added this line to the end

Code: Select all

xdotool key "alt+ctrl+r"  
automatically reloads the config

Re: wm border color

Posted: Tue Jun 09, 2015 8:03 am
by machinebacon
I'd love it if I used it :D I'll test bspwm 2bwm again some day, just can't get my fat ass up :/

Re: wm border color

Posted: Thu Jun 11, 2015 2:41 am
by dkeg
Alright, here we go. I have updated the original post. It still only works with 2bwm, but much improved. I updated both the code and verbiage. Check it out! Of course, I think I'm the only 2bwm user here

Re: wm border color

Posted: Thu Jun 11, 2015 8:02 am
by wuxmedia
* puts on JohnRaff hat
Hrm yeas but you could probably do all of that catting and grepping in one awk statement
* takes off hat.

Nice script, I hate using awk to do everything in one line, starts getting silly.

Re: wm border color

Posted: Thu Jun 11, 2015 11:09 am
by dkeg
Ha. I could also get a 40oz, but a six pack is more fun! .... No doubt there are better ways. The problem is, I don't know those ways. Necessity is motivation. Now I can rice with the swiftness. Run a couple scripts and wuala.

But I will tell you that it does work! I can also say that it was a use case that has been on my list for some time. Now it is not. I'm happy.

Re: wm border color

Posted: Thu Jun 11, 2015 11:26 am
by wuxmedia
fuck yeah, you've seen my scripts...

Re: wm border color

Posted: Sat Jun 13, 2015 6:16 pm
by dkeg
webm of it in action
https://u.teknik.io/P7sHYg.webm

Re: wm border color

Posted: Mon Jun 15, 2015 2:54 pm
by ChefIronBelly
Cool dkeg I need to find a way to make use :)

Re: wm border color

Posted: Tue Jun 16, 2015 1:33 am
by dkeg
right on, thanks chef

Re: wm border color

Posted: Sun Jul 05, 2015 3:02 pm
by dkeg
The OP has been updated. Nothing major changed, it is just cleaner code. The original sed work was rough, but it worked.

The update has taken the sed work and placed into one sed statement; cleaning the redundancy.

Re: wm border color

Posted: Sat Jul 18, 2015 9:05 pm
by dkeg
Found a flaw. I've fixed it and updated the OP. I am now just linking to my GH to keep in simpler.