You are not logged in.

#1 2016-01-21 15:18:36

k1blz
Member
Registered: 2016-01-21
Posts: 5

conky config text format

conky.config = {
--========================================================================
-- syntax-fix:
-- chmod 755 /usr/share/doc/conky-1.10.0/convert.lua
-- convert: ./convert.lua ~/.conkyrc
--=========================================================================

	background = false,
	use_xft = true,
        font = 'DejaVu Sans Mono:size=12',
        xftalpha = 0.5,
	update_interval = 1,
	total_run_times = 0,
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_argb_visual = true,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	double_buffer = true,
-- default_bar_size 0 6

	maximum_width = 285,
        minimum_width = 285,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_shade_color = '2E2E2D',
	alignment = 'top_right',
	gap_x = 10,
	gap_y = 20,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	net_avg_samples = 2,
	override_utf8_locale = true,
	use_spacer = 'none',
       	
-- default=Custom
    default_color = '#375254',
-- color0=Custom
    color0 = '#375254',

};
conky.text = [[
${font :BOLD:size=9}${color0}S3RV1C3z ${hr 2}${font :size=9}
${color0}${top name 1}$alignr${top cpu 1} ${top mem 1}
${color0}${top name 2}$alignr${top cpu 2} ${top mem 2}
${color0}${top name 3}$alignr${top cpu 3} ${top mem 3}
${color0}${top name 4}$alignr${top cpu 4} ${top mem 4}
${color0}${top name 5}$alignr${top cpu 5} ${top mem 5}

${color0}${font :BOLD:size=9}N3TW0RX ${hr 2}${font :size=9}
${color0}ip ${alignr}${color0}${execi 60 curl http://ident.me/ | tail}
${color0}enp2s2${alignr}${color0}${addr enp2s2}
${color0}tun0${alignr}${color0}${addr tun0}
${color0}▲ speed $alignr ${upspeedf enp2s2} k/s
${voffset -14} $alignc ${color0} ${upspeedgraph enp2s2 10,80}
${color0}▼ speed $alignr ${downspeedf enp2s2} k/s
${voffset -14} $alignc ${color0} ${downspeedgraph enp2s2 10,80}

${color0}${font :BOLD:size=9}P0RTz ${hr 2}${color0}${font :size=9}
${color0}${tcp_portmon 1 65535 rip 1}${alignr}${color0}${tcp_portmon 1 65535 lport 1}
${color0}${tcp_portmon 1 65535 rip 2}${alignr}${color0}${tcp_portmon 1 65535 lport 2}
${color0}${tcp_portmon 1 65535 rip 3}${alignr}${color0}${tcp_portmon 1 65535 lport 3}
${color0}${tcp_portmon 1 65535 rip 4}${alignr}${color0}${tcp_portmon 1 65535 lport 4}
${color0}${tcp_portmon 1 65535 rip 5}${alignr}${color0}${tcp_portmon 1 65535 lport 5}

${color0}${font :BOLD:size=9}NMAP ${hr 2}
${color0}${font :size=9}${execi 100 nmap -sP 192.168.1.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print " "$3;}' | column -t}

${color0}${font :BOLD:size=9}KERNL ${hr 2}
${color0}${font :size=9}${exec dmesg -t -k| tail -f -n 9 }

${color0}${font :BOLD:size=9}SS -s ${hr 2}
${color0}${font :size=9}${exec ss -s | column -t}

${color0}${hr 2}
]];

Question is on the nmap, ss and kernl section of the conky, the text looks ok but i'd like to 'align' it better
been looking at 'awk' format just need some help with it, been tweaking this config for couple days already
thanx for any help


my apology to the community

Offline

#2 2016-01-21 18:04:27

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,777

Re: conky config text format

I don't mix well with awk etc ... others here are well versed in that stuff, but I can clean up your code a tad...

Check "man Conky" I think you will find this is wrong (I use v1.9.0)

	maximum_width = 285,
        minimum_width = 285,

it should be:

	maximum_width = 285,
        minimum_size = 285,
-- or
--        minimum_size = 285 0,

where minimum_size is: minimum_size = width height,

The ${font} and ${colour} commands below TEXT that are universal - once set; they stay set until youchange them or turn them off which reactivates the "defaults" set above TEXT

1.  you only use one font DejaVu Sans Mono and as a default set the size to 12 and then never use it.  All you ever use is size 9 or bold:9
2.  you have use_xft set to true and the xftalpha set to 0.5 but don't use your font with xtf at all.  Set your default font like this:

	use_xft = true,
        xftfont = 'DejaVu Sans Mono:size=9',
        xftalpha = 0.5,

so:

${font DejaVu Sans Mono:bold:size=9}S3RV1C3z ${hr 2}${font}

sets the font bold and then turns it off setting the 'font' back to the default defined above TEXT.

3. you have set a default colour and a color0 as the same colour:

-- default=Custom
    default_color = '#375254',
-- color0=Custom
    color0 = '#375254',

and then below TEXT ( conky.text = [[ ) you call ${color0} 35 times without turning it off or changing it.  You can eliminate those 35 calls and your conky will still use the same colour - because it is also your default colour.

This code works well:

};
conky.text = [[
${font DejaVu Sans Mono:bold:size=9}S3RV1C3z ${hr 2}${font}
${top name 1}${alignr}${top cpu 1} ${top mem 1}
${top name 2}${alignr}${top cpu 2} ${top mem 2}
${top name 3}${alignr}${top cpu 3} ${top mem 3}
${top name 4}${alignr}${top cpu 4} ${top mem 4}
${top name 5}${alignr}${top cpu 5} ${top mem 5}

${font DejaVu Sans Mono:bold:size=9}N3TW0RX ${hr 2}${font}
ip${alignr}${execi 60 curl http://ident.me/ | tail}
enp2s2${alignr}${addr enp2s2}
tun0${alignr}${addr tun0}
▲ speed${alignr} ${upspeedf enp2s2} k/s
${voffset -14}${alignc}${upspeedgraph enp2s2 10,80}
▼ speed${alignr}${downspeedf enp2s2} k/s
${voffset -14}${alignc}${downspeedgraph enp2s2 10,80}

${font DejaVu Sans Mono:bold:size=9}P0RTz ${hr 2}${font}
${tcp_portmon 1 65535 rip 1}${alignr}${tcp_portmon 1 65535 lport 1}
${tcp_portmon 1 65535 rip 2}${alignr}${tcp_portmon 1 65535 lport 2}
${tcp_portmon 1 65535 rip 3}${alignr}${tcp_portmon 1 65535 lport 3}
${tcp_portmon 1 65535 rip 4}${alignr}${tcp_portmon 1 65535 lport 4}
${tcp_portmon 1 65535 rip 5}${alignr}${tcp_portmon 1 65535 lport 5}

${font DejaVu Sans Mono:bold:size=9}NMAP ${hr 2}${font}
${font}${execi 100 nmap -sP 192.168.1.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print " "$3;}' | column -t}

${font DejaVu Sans Mono:bold:size=9}KERNL ${hr 2}${font}
${font}${exec dmesg -t -k| tail -f -n 9 }

${font DejaVu Sans Mono:bold:size=9}SS -s ${hr 2}${font}
${font}${exec ss -s | column -t}

${hr 2}]];

2016_01_21_14_50_04_Scrot11.jpg


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3 2016-01-21 19:51:38

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: conky config text format

Sector11 wrote:

Check "man Conky" I think you will find this is wrong (I use v1.9.0)

	maximum_width = 285,
        minimum_width = 285,

it should be:

	maximum_width = 285,
        minimum_size = 285,
-- or
--        minimum_size = 285 0,

where minimum_size is: minimum_size = width height

dear op, expect to find more inconsistencies of this sort when using conky!


Give to COVAX! Here or here. (explanation)

Offline

#4 2016-01-22 13:21:57

k1blz
Member
Registered: 2016-01-21
Posts: 5

Re: conky config text format

cleaned up the code thank you
anyone know of the fix for the aligning
of mac addyz on nmap out
and the column alignment for the ss -s out?


my apology to the community

Offline

#5 2016-01-22 15:52:15

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: conky config text format

k1blz wrote:

anyone know of the fix for the aligning
of mac addyz on nmap out
and the column alignment for the ss -s out?

wot?


Give to COVAX! Here or here. (explanation)

Offline

#6 2016-01-22 18:13:23

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: conky config text format

k1blz wrote:

cleaned up the code thank you
anyone know of the fix for the aligning
of mac addyz on nmap out
and the column alignment for the ss -s out?

Taking the time to form cogent sentences and clearly explaining your problem shows respect for the community and greatly increases your chances of receiving meaningful assistance wink


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#7 2016-01-22 23:02:01

k1blz
Member
Registered: 2016-01-21
Posts: 5

Re: conky config text format

Head_on_a_Stick wrote:
k1blz wrote:

cleaned up the code thank you
anyone know of the fix for the aligning
of mac addyz on nmap out
and the column alignment for the ss -s out?

Taking the time to form cogent sentences and clearly explaining your problem shows respect for the community and greatly increases your chances of receiving meaningful assistance wink


i got respect for the community and some self respect to add to that so calling me out on being disrespectful when i'm asking a question twice is kinda not cool. the original question had nothing to do with color options to be fair. the original question was about how to align the output of the nmap command so the ip addresses show on the left and the mac addresses 'mac addyz' align to the right.
same thing for the ss -s output at the bottom of the config. i think the respect goes both ways, i took the time to create a profile and posted the actual config
which is better than a screenshot. you jumping in and suggesting i'm being disrespectful on that principle alone you just disrespected your own forum.
now there's three replies to an unanswered simple question, i noted on the first question 'awk' so what would be the awk commands to align the outputs of the nmap and ss command.
thanks for taking the time to insult a new member moderator.
just delete the account man. why i hate forums. should have know better....


my apology to the community

Offline

#8 2016-01-22 23:08:12

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: conky config text format

k1blz wrote:

thanks for taking the time to insult a new member moderator

I think you're being a little over-sensitive here.

I didn't say that you were being disrespectful, I just noted that taking the time to explain your problem clearly without resorting to text-speak would indicate respect for those forum members who may decide to help you.

If you feel that I have treated you unfairly, feel free to use the "Report" button and raise the issue with the rest of the moderation team.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#9 2016-01-22 23:23:59

damo
....moderator....
Registered: 2015-08-20
Posts: 6,701

Re: conky config text format

k1blz wrote:

..i got respect for the community...

OK, but you might help yourself and follow the Forum Rules (top of the page)

Forum Rules wrote:
Posting style guide

....
Try to use good grammar and spelling, and make your contributions as concise as possible. Remember that English is not the first language of many members.
....

You will get answers much quicker if everyone can read your posts more easily wink


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#10 2016-01-23 11:22:33

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: conky config text format

k1blz wrote:

the original question was about how to align the output of the nmap command so the ip addresses show on the left and the mac addresses 'mac addyz' align to the right.
same thing for the ss -s output at the bottom of the config.

conky does not have an nmap, mac or ss command.
i can see now that these are some scripts that you added with ${exec..., but i find it a little self-centered of you to expect us to go through your conky config to find that out, instead of explaining it better.


i think the respect goes both ways, i took the time to create a profile and posted the actual config
which is better than a screenshot.

yes, and i deserve some bloody respect because i took the time to switch on my computer today...
kiss

just delete the account man. why i hate forums. should have know better....

oh, i didn't notice this when i started typing.
that solves it then, i guess...

anyhow, for the future:
http://conky.sourceforge.net/variables.html


Give to COVAX! Here or here. (explanation)

Offline

#11 2016-01-23 20:43:15

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,777

Re: conky config text format

Just in case ...

I'm going to leave this here, took me almost all day searching and tweaking:  "ss -s"
2016_01_23_17_42_13_Scrot11.jpg

## pkill -xf "conky -q -c /media/5/conky/test.conky" &

## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent no
#own_window_hints skip_taskbar,skip_pager ## ,sticky,undecorated
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title Test conky
## ARGB can be used for real transparency
  own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
  own_window_argb_value 70

#minimum_size 600 0
#maximum_width 600

gap_x 120	## l|r
gap_y 120	## u|d
alignment tl
## ---------- End Window Settings

## ---------- Font Settings
## Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Liberation Mono:bold:size=11
#xftfont Fantasque Sans Mono:bold:size=10
xftfont DejaVu Sans Mono:bold:size=10

## Alpha of Xft font. Must be a value at or between 1 and 0
xftalpha 1.0

## Force UTF8? requires XFT
override_utf8_locale yes
## --------- End Font Settings

## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC ## Gainsboro
color0 8FBC8F ## DarkSeaGreen
color1 778899 ## LightSlateGray
color2 FFA07A ## LightSalmon
color3 87CEFA ## LightSkyBlue
color4 48D1CC ## MediumTurquoise
color5 FFDEAD ## NavajoWhite
color6 00BFFF ## DeepSkyBlue
color7 B0E0E6 ## PowderBlue
color8 FFD700 ## Gold
color9 FFA07A ## LightSalmon
## ---------- End Color Settings

## ---------- Begin Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 5
border_outer_margin 0
## border width
border_width 2
## graph borders
draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton

## ---------- Begin Miscellaneous Section
## Boolean value, if true, Conky will be forked to background when started.
background yes

## Adds spaces around certain objects to stop them from moving other things
## around, this only helps if you are using a mono font
## Options: right, left or none
use_spacer none

## Subtract (file slystem) buffers from used memory?
no_buffers yes

## Use the Xdbe extension? (eliminates flicker)
## It is highly reco${color}mmended to use own window with this one
## so double buffer won't be so big.
double_buffer yes

## ---------- End Miscellaneous Section
update_interval 1

TEXT
${time %T}${alignr}${utime %T}
${uptime}${alignr}${time %x}
${alignc}CPU Avg ${if_match ${cpu cpu0}<10}${color1}00${color5}${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100}${color1}0${color5}${cpu cpu0}\
${else}${color9}${cpu cpu0}${endif}${endif}${color5}%${color}
${alignc}Conky v${conky_version}

${alignc}${color9}${membar 0,25}${color} ↓ test code ↓ ${color9}${membar 0,25}${color}
${color9}${membar 0}${color}

${execp ss -s | fold -sw41}

### ss command
---↓↓↓↓↓↓↓↓↓↓↓↓---
${execpi 60 ss -s | column -t | cut -c-31 | awk '{print $1"${goto 85}${color8}"$2"${goto 145}${color5}"$3"${color9}${goto 210}"$4"${color}"}'}
${membar 0}
Transport${goto 100}Total${goto 165}IP${goto 225}IPv6
 ${execpi 60 ss -s | grep 'RAW' | awk '{print $1"${goto 110}"$2"${goto 165}"$3"${goto 225}"$4}'}
 ${execpi 60 ss -s | grep 'UDP' | awk '{print $1"${goto 110}"$2"${goto 165}"$3"${goto 225}"$4}'}
 ${execpi 60 ss -s | grep -m2 "TCP" | tail -n1 | awk '{print $1"${goto 110}"$2"${goto 165}"$3"${goto 225}"$4}'}
 ${execpi 60 ss -s | grep 'INET' | awk '{print $1"${goto 110}"$2"${goto 165}"$3"${goto 225}"$4}'}
 ${execpi 60 ss -s | grep 'FRAG' | awk '{print $1"${goto 110}"$2"${goto 165}"$3"${goto 225}"$4}'}

##---------------
##${execp ss -s | sed s/Transport/Trans/ | sed s/Total/Ttl/ |cut -c-31}
##===============
##${execp ss -s | cut -c-31}

${color9}${membar 0}${color}
${alignc}${color9}${membar 0,25}${color} ↑ between lines ↑ ${color9}${membar 0,25}${color}

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#12 2016-01-25 05:12:30

k1blz
Member
Registered: 2016-01-21
Posts: 5

Re: conky config text format

ohnonot: i don't expect anyone to do anything i was just posting a simple conky config up to see if anyone knew how to align the columns
yeah i know nmap and ss are added to it, that's the whole idea of conky, do with it what ya want to view the data you want
lemme ask a sincere question, and i've been on a lot of forums, never had a moderator jump in on a thread where all that was asked by another
member was "WOT" and that alone would call your moderators to say the same thing to that post correct? what does WOT mean?
english isn't the first language correct? show some respect to the community correct?
what was so bad about another member asking me to clarify a post that you did not even give me a chance to reply
instead of helping out me or another member who previously posted they too had trouble understanding the 'awk' commands
you more or less insulted a new member, disregarded another member wanting to know about 'awk' and so forth
see that's the difference, i have not insulted anyone here, yet you have me, you talked down to me also,
'turned my computer on today' that's really friendly and professional
and by the way, there are a lot of conky config posts on here correct?
maybe the community posts them up so they can share ideas and talk with each other help each other work out problems
and just so you know, i got an email from another member here thinking you were too harsh on your reply
that's why i decided to repost, someone showed some empathy conerning a sincere desire to not only share an idea but improve it
how to inegrate the ss command and nmap command to display network information, most conkys just show services, what music
is playing and the usual, another member even sent a couple attempts at aligning the conky's output columns,
mabye you should follow your community's lead
like i said, not sure where it was called for for an admin or a moderator to step in when all another member did was ask another
member to clarify something, let alone suggest they are disrespectful, then make a statement 'you expect us to go through your config'
when the whole thread is about conky configs, holy cow man, i just asked about 'awk' on a conky config


my apology to the community

Offline

#13 2016-01-25 05:39:33

damo
....moderator....
Registered: 2015-08-20
Posts: 6,701

Re: conky config text format

Personally, if I see a big wall of unformatted text like the post above, I don't usually make the effort to decipher it. And English is my first language, so it must be very hard for some others.

k1blz wrote:

i don't expect anyone to do anything i was just posting a simple conky config up to see if anyone knew how to align the columns

...and the response from at least one member was  "What is the meaning of that cryptic post?"

Repeat:

damo wrote:
Forum Rules wrote:
Posting style guide

....
Try to use good grammar and spelling, and make your contributions as concise as possible. Remember that English is not the first language of many members.
....

You will get answers much quicker if everyone can read your posts more easily


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#14 2016-01-25 06:42:43

k1blz
Member
Registered: 2016-01-21
Posts: 5

Re: conky config text format

ya know WOT? 'mac addyz' isn't too cryptic especially if you read the first post, the one with the config and seems to me it was understood by others
this thread was supposed to be about 'awk' and how to not only help myself learn and maybe help others learn about integrating conky better
with linux commands, something that shows something other than the usual stuff, which is awesome, don't get me wrong, not putting that down at
all, heck, that's how i got this far with conky in the first place
what is troubling is how the staff keeps at the second post, and using that as a reason to keep going on with this which doesn't help me, wastes your time
and frankly others, so yeah, at this point, it is kinda getting disrespectful
and for that i am sorry to the community for letting this go, i should have just 'ate crow' maybe and stuck with the topic i started
you got darn near a thousand posts and instead of helping this forum, basically your forum, you keep at defending another mod when they were out of line
go through this forum with a crawler ok, and post up how many slang terms there are, you wouldn't have a forum
and the original post was clear, just as another member stated via email, so your first reply about me being 'cryptic' wasn't even accurate
the first post was clear and understood, hence i felt it was safe enough to shorten the question again instead of hogging the thread with a duplicate long form
question of the original


my apology to the community

Offline

#15 2016-01-25 07:05:30

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,282
Website

Re: conky config text format

damo wrote:

You will get answers much quicker if everyone can read your posts more easily

Your posts are very difficult to read.

If you want people to help you, please:

  • Make your posts shorter.

  • Start sentences with a capital letter and end with a full stop.

  • Avoid expressions like 'addyz' when you mean 'addresses'.

  • Leave out the complaints. Just explain your problem.

Nobody has been disrespectful to you in my opinion.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#16 2016-01-25 13:25:58

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,777

Re: conky config text format

johnraff wrote:

Make your posts shorter.

Other then the conky code the first post consists of:

k1blz wrote:

Question is on the nmap, ss and kernl section of the conky, the text looks ok but i'd like to 'align' it better
been looking at 'awk' format just need some help with it, been tweaking this config for couple days already
thanx for any help

That is NOT long and 100% understandable and can't get much shorter... But after the WOT! comment, these:

Start sentences with a capital letter and end with a full stop.
Avoid expressions like 'addyz' when you mean 'addresses'.

should be addressed to another.

I had to look that up: Top Definition

wot
Retards way of saying 'What'.
Guy: whats 2+3?
Retard: WOT?
by Wounded December 22, 2004

Back to short:  the second time he mentioned what he wanted:

k1blz wrote:

cleaned up the code thank you
anyone know of the fix for the aligning
of mac addyz on nmap out
and the column alignment for the ss -s out?

is perfectly clear.  OK, not the correct grammar but come on if we are grammar police now we had better edit a whole bunch of posts here.

There is NO misunderstanding of what k1blz wanted from the very first post and his second statement.  All these other posts happened while I was offline trying to figure out something to help him with from old conkys:

ftxt awk /media/5/Conky > k1blz.txt

gets me a 1.8MB text file of "lines" with awk in them looking for help.
a sample from the 2500 range:

/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/Numix/Fahrenheit/Mini/.conkyrc:59:${color1}${voffset -17}${alignc}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}${color}
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/Numix/Fahrenheit/Mini/.conkyrc:60:${color1}${voffset -17}${alignc -77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}${color}
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/Numix/Fahrenheit/Mini/.conkyrc:65:${voffset -17}${color2}${alignc}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°${color}
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/Numix/Fahrenheit/Mini/.conkyrc:66:${voffset -17}${color2}${alignc -77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°${color}
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/Numix/Fahrenheit/Mini/.conkyrc:71:${execi 300 cp -f ~/.harmattan-assets/icons/small-#dcdcdc/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2').png ~/.cache/weather-2.png}${image ~/.cache/weather-2.png -p 118,65 -s 32x32}\
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/Numix/Fahrenheit/Mini/.conkyrc:72:${execi 300 cp -f ~/.harmattan-assets/icons/small-#dcdcdc/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3').png ~/.cache/weather-3.png}${image ~/.cache/weather-3.png -p 196,65 -s 32x32}${font}\
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/OMG-Ubuntu!/Celsius/God-Mode/normal-mode/.conkyrc:69:${color1}${voffset 172}${alignc 77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1' | tr '[a-z]' '[A-Z]'}${color}
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/OMG-Ubuntu!/Celsius/God-Mode/normal-mode/.conkyrc:70:${color1}${voffset -13}${alignc}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}${color}
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/OMG-Ubuntu!/Celsius/God-Mode/normal-mode/.conkyrc:71:${color1}${voffset -13}${alignc -77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}${color}
/media/5/Conky/Nili-wx/stuff/Harmattan/.harmattan-themes/OMG-Ubuntu!/Celsius/God-Mode/normal-mode/.conkyrc:75:${color1}${voffset 51}${alignc 77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°${color}

it ends at line #4534

ohnonot wrote:
k1blz wrote:

the original question was about how to align the output of the nmap command so the ip addresses show on the left and the mac addresses 'mac addyz' align to the right.
same thing for the ss -s output at the bottom of the config.

conky does not have an nmap, mac or ss command.
i can see now that these are some scripts that you added with ${exec..., but i find it a little self-centered of you to expect us to go through your conky config to find that out, instead of explaining it better.

What k1blz posted was perfect!  The complete conky!  What a treat, too many times something above TEXT affects something below TEXT ... and a lot of times people don't even supply the command they used, it has to be asked for.

From the original question in the OP, it was OBVIOUS that he was calling these in with an ${exec(pi)...} command.

How many times do we see: post the code, And for people interested in helping with conky the code used is essential.  How many times I've seen posts with "show me the results of (command)" sometimes the request has to be repeated more than once, or posts about a bash problem - showing the code is a necessity.

johnraff wrote:

Nobody has been disrespectful to you in my opinion.

I disagree with you.  I think there has been a lot of disrespect here, 1kblz came asking for help, the only help he has received is from yours truly, the rest of the posts have not been helpful in anyway and distracted to the original Opening Question:

k1blz wrote:

Question is on the nmap, ss and kernl section of the conky, the text looks ok but i'd like to 'align' it better
been looking at 'awk' format just need some help with it, been tweaking this config for couple days already
thanx for any help


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#17 2016-01-25 15:30:46

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,777

Re: conky config text format

@ k1blz

Sorry I couldn't be more helpful.

Of the three commands you showed, the nmap one does nothing here in a terminal
except wait for a keypress ...

${execi 100 nmap -sP 192.168.1.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print " "$3;}' | column -t}

nmap -sP 192.168.1.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print " "$3;}' | column -t

as for this:

${exec dmesg -t -k| tail -f -n 9 }

The only thing I can think of to help there is: add a " | fold -sw32" to the ending.  32 being an arbitrary number of your choice to help control the width of your conky.

fold - wrap each input line to fit in specified width: -w
     -s or --spaces: break at spaces
     -b, --bytes: count bytes rather than columns
${execpi 90 dmesg -t -k| tail -f -n 9 | fold -w32}
${execpi 90 dmesg -t -k| tail -f -n 9 | fold -sw32}

A working example: http://postimg.org/image/srnzhft1l/


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#18 2016-01-25 19:48:49

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: conky config text format

I apologise unreservedly to @k1blz for any offence I may have caused.

It was not my intention to accuse @k1blz of disrespect, I am very sorry if that is how it came across.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#19 2016-01-26 06:24:21

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,282
Website

Re: conky config text format

@k1blz I would still like my advice about posting style to be considered.

@Sector11 I agree with you that @k1blz's first two posts were quite understandable, and we're not grammar police here or anything, but punctuation really helps to make a bit of English more understandable. I still think my comments were perfectly reasonable with respect to posts #7, #12 and #14.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB