dkeg

scrots sorted by users. create your own thread if you wish so ;)
machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: dkeg

Unread post by machinebacon » Thu Oct 13, 2016 1:34 am

^ thanks for the link to windowchef. This sounds very BBQ-ish, so it must be good :)
..gnutella..

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

Re: dkeg

Unread post by dkeg » Wed Oct 19, 2016 11:01 pm

^ Yeah, its alright. I use it sometimes.
  • wm: 2bwm
    colors: brownstone
    font: dash
    wall: hsetroot -solid "$(xrdb -query | awk '/\*background/ {print $2}')" -tile /data/walls/patternweb.png -contrast 0.95
    tmux, 2bwmColor, vimb
Thanks pidsley for the advice with awk. I've since updated most of my stuff.
brownstone.png

Work hard; Complain less

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

Re: dkeg

Unread post by machinebacon » Thu Oct 20, 2016 4:04 am

^ clever trick with hsetroot there. looks great.
..gnutella..

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: dkeg

Unread post by pidsley » Thu Oct 20, 2016 2:09 pm

^^ very nice dkeg.

Thanks for posting part of your script in the scrot. I am always looking for excuses to learn more awk, so whenever I see something like "cat | awk | cut | awk" I wonder if it can be done with one awk. After some experimenting, I think it can; try this:

Code: Select all

arr=( $(awk -F# '/\*colors/ gsub("\",\""," ") gsub("\"};","") {for (i=2; i<9; ++i) print $i}' $file) )
Note that this sets the array directly, without the intermediate step, and it does not include the # at the beginning of each color. If you need that you can put it back when you use sed to set the colors.

Note also that I am not saying this is better than what you are doing -- I am a big fan of using what works. It's just different, and helped me learn a little more awk, so I thought it might be a useful share.

If it doesn't work, please let me know how it breaks and I will tweak it (or you can, and share how you fixed it please.) (-:

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

Re: dkeg

Unread post by wuxmedia » Thu Oct 20, 2016 9:09 pm

if they can write Some Game in AWK, then well...
"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: dkeg

Unread post by dkeg » Sat Oct 22, 2016 2:56 pm

Thanks pidsely. As is, it did not work. It replaced several delimiters and text throught the entire file. When I get extra time I may look at your solotion and adjust to ensure only replacing the border color definition line. The line looks like this:

Code: Select all

static const char *colors[] = {"#403836","#302724","#734948","#7d8486","#6f5a56","#302724","#2b2320"};
The snippet

Code: Select all

cat ~/git/2bwm/config.h|awk '/\*colors/ {print $6}'|cut -d '}' -f1|awk '{gsub(/"/," ");print $2,$4,$6,$8,$10,$12,$14}'
Returns

Code: Select all

#403836 #302724 #734948 #7d8486 #6f5a56 #302724 #2b2320
And now easily replaceable

2bwmColor

Absolutely appreciate the input. There is much I don't know. Typically solving a problem (generally mine only) piecing together things I do know.
show me the file
find this information
give me only these pieces

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: dkeg

Unread post by pidsley » Sat Oct 22, 2016 3:16 pm

I am sure there is a way to do what you want with only awk. But I do these things only to learn. If what you are doing works, use that.

Typically I do it one step at a time, checking the output and adding gsubs as necessary or tweaking the F delimiter. What I posted sets the array to just the color values without the #, so that might be part of the problem. I did not test the seds, only the array contents.

At the very least you don't need to cat to awk, this should work just as well:

Code: Select all

awk '/\*colors/ {print $6}' ~/git/2bwm/config.h | cut -d '}' -f1 | awk '{gsub(/"/," ");print $2,$4,$6,$8,$10,$12,$14}'
If I have time later I might play with this a bit, or I might not.

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

Re: dkeg

Unread post by dkeg » Sat Oct 22, 2016 4:35 pm

Haha, good stuff. Yes, would be interesting to have an alternative solution. I'll try above, then we'll go from there

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: dkeg

Unread post by pidsley » Sat Oct 22, 2016 6:18 pm

The line from config.h:

Code: Select all

static const char *colors[] = {"#35586c","#333333","#7a8c5c","#ff6666","#cc9933","#0d131a","#000000"};
The awk:

Code: Select all

arr=( $(awk -F\" '/\*colors/ {for (i=2; i<16; i=i+2) print $i}' $file) )
echo arr[0]=${arr[0]}
echo arr[1]=${arr[1]}
echo arr[6]=${arr[6]}
The output:

Code: Select all

arr[0]=#35586c
arr[1]=#7a8c5c
arr[6]=#000000
Does this do what you want?

User avatar
Snap
Sperminator
Posts: 189
Joined: Sun Oct 05, 2014 8:11 pm

Re: dkeg

Unread post by Snap » Wed Nov 09, 2016 1:23 pm

What's the color scheme you are using in this scrot?

http://linuxbbq.org/bbs/viewtopic.php?f ... ing#p37147

Thanks.

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

Re: dkeg

Unread post by dkeg » Sat Nov 12, 2016 10:18 pm

^ Snap, looks like sncp blumune. There's a full scrot here somewhere. found it

Using windowchef atm. Also updated one of my bar configurations. Using the fork which includes borders, and have it linked so when battery below 10, border turns red
shaded.png

Work hard; Complain less

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

Re: dkeg

Unread post by ChefIronBelly » Sun Nov 13, 2016 3:13 pm

Looks good how are you liking windowchef?

It's been on my list but just haven't got around to trying it.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

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

Re: dkeg

Unread post by wuxmedia » Sun Nov 13, 2016 6:57 pm

loverly dkeg, everything is just so right
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
ivanovnegro
Minister of Truth
Posts: 5448
Joined: Wed Oct 17, 2012 11:12 pm

Re: dkeg

Unread post by ivanovnegro » Sun Nov 13, 2016 8:42 pm

^ Exactly. Oh man, I cannot even begin to mod my desktops slightly to be worth posting here. :D

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

Re: dkeg

Unread post by dkeg » Sun Nov 13, 2016 10:32 pm

thank you wux, ivan

chef, windowchef is nice. some oddities, but easy to work with. Some of the keybindings that came with the default sxhkdrc were a bit wierd, but easily configurable.

Its easy to set up, and get going. I think working with wmutils made it an easy transition. Its like a hybrid of wmutils and bspwm.

To note, the name makes me think its your wm.

Work hard; Complain less

User avatar
Snap
Sperminator
Posts: 189
Joined: Sun Oct 05, 2014 8:11 pm

Re: dkeg

Unread post by Snap » Mon Nov 14, 2016 8:10 am

@ dkeg. Thanks so much

User avatar
Snap
Sperminator
Posts: 189
Joined: Sun Oct 05, 2014 8:11 pm

Re: dkeg

Unread post by Snap » Mon Nov 14, 2016 11:55 am

That's what I've got.

Code: Select all

! blumune
! dkeg

#define bg   #0d0f13
#define fg   #4a4a4b
#define blk  #12151a
!#define bblk #
#define red  #294852
#define grn  #e2e3e4
#define ylw  #6c7d85
#define blu  #294852
#define mag  #345b67
#define cyn  #547b91
#define wht  #a8a9aa
Into Xresources

Code: Select all

*background:#0d0f13
*foreground:#4a4a4b
*color0: #12151a
*color1: #294852
*color2: #e2e3e4
*color3: #6c7d85
*color4: #294852
*color5: #345b67
*color6: #547b91
*color7: #a8a9aa
For dmenu matching

Code: Select all

-nb #0d0f13
-nf #4a4a4b
-sb #0d0f13
-sf #547b91
Any suggestion for boldblack? I'm really crap at matching good well balanced color sets. The ones I'm currently trying suck.

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

Re: dkeg

Unread post by dkeg » Mon Nov 14, 2016 3:08 pm

I'll share tonight. Had to pull it out of the ashes. Minor refinements.

Work hard; Complain less

User avatar
Nili
Haxxor
Posts: 131
Joined: Sat Aug 22, 2015 5:40 pm
Location: $HOME/♫♪
Contact:

Re: dkeg

Unread post by Nili » Mon Nov 14, 2016 7:15 pm

^The Boss with sweets :)
Devuan/XFCE

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

Re: dkeg

Unread post by ChefIronBelly » Fri Nov 18, 2016 1:43 am

dkeg wrote: chef, windowchef is nice. some oddities, but easy to work with. Some of the keybindings that came with the default sxhkdrc were a bit wierd, but easily configurable.

Its easy to set up, and get going. I think working with wmutils made it an easy transition. Its like a hybrid of wmutils and bspwm.

To note, the name makes me think its your wm.
Sounds good thanks for the report. I'm sure as soon as the snow fly s I will get some things going.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

Post Reply