wm border color

Submitted scripts and programs
Forum rules
Your own work only.
User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

wm border color

Unread post by dkeg » Mon Jun 08, 2015 2:00 am

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

Work hard; Complain less

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: wm border color

Unread post by dkeg » Tue Jun 09, 2015 1:26 am

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

Work hard; Complain less

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: wm border color

Unread post by machinebacon » Tue Jun 09, 2015 8:03 am

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 :/
..gnutella..

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: wm border color

Unread post by dkeg » Thu Jun 11, 2015 2:41 am

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

Work hard; Complain less

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: wm border color

Unread post by wuxmedia » Thu Jun 11, 2015 8:02 am

* 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.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: wm border color

Unread post by dkeg » Thu Jun 11, 2015 11:09 am

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.

Work hard; Complain less

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: wm border color

Unread post by wuxmedia » Thu Jun 11, 2015 11:26 am

fuck yeah, you've seen my scripts...
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: wm border color

Unread post by dkeg » Sat Jun 13, 2015 6:16 pm

webm of it in action
https://u.teknik.io/P7sHYg.webm

Work hard; Complain less

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: wm border color

Unread post by ChefIronBelly » Mon Jun 15, 2015 2:54 pm

Cool dkeg I need to find a way to make use :)
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: wm border color

Unread post by dkeg » Tue Jun 16, 2015 1:33 am

right on, thanks chef

Work hard; Complain less

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: wm border color

Unread post by dkeg » Sun Jul 05, 2015 3:02 pm

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.

Work hard; Complain less

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: wm border color

Unread post by dkeg » Sat Jul 18, 2015 9:05 pm

Found a flaw. I've fixed it and updated the OP. I am now just linking to my GH to keep in simpler.

Work hard; Complain less

Post Reply