SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#7326 2014-04-09 21:22:37

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

this works

${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

should identify the current running adapter and pring the desired output, in this case downspeed  big_smile

edit the bit at the end for different outputs

now need dk75 to make it a one commander  big_smile

sad  Doesn't work - sudo required with 'ifconfig' command   8.(


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Help fund CrunchBang, donate to the project!

#7327 2014-04-09 21:28:40

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

bah! mad
mine doesnt require sudo, but i did see a workaround for that, be back in a bit  smile

this might get around the password, although it doesnt sound like the cheapest route now

${execp echo sudopassword | sudo -S ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

swap sudopassword for your sudo password

Last edited by mrpeachy (2014-04-09 21:31:26)

Offline

#7328 2014-04-09 21:46:38

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

bah! mad
mine doesnt require sudo, but i did see a workaround for that, be back in a bit  smile

this might get around the password, although it doesnt sound like the cheapest route now

${execp echo sudopassword | sudo -S ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

swap sudopassword for your sudo password

Since you use "wlan" and I use "eth" What do you get with this line in a conky:

Connection: ${gw_iface}

I get:

Connection: eth0

I'll try the password, but that's not a good solution at all in an plain text file ... brb

EDIT:  OK that works ... but and extra ${execp ...} and a LONG line to write every time an ethX or a wlanX is needed?

Last edited by Sector11 (2014-04-09 21:50:55)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7329 2014-04-09 22:06:32

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

^ yes you are probably right sad

tested ${gw_iface} on my netbook and got wlan0

Offline

#7330 2014-04-09 22:19:03

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

should be able to get a solution with

ip addr show

Offline

#7331 2014-04-09 23:11:18

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

should be able to get a solution with

ip addr show

That works in a terminal great - no password required. Because it a "show" ... with ifconfig you can edit your connection - hence the password.  I'll remember this via an alias. (see below)  big_smile 

 09 Apr 14 | 19:56:52 ~
    $ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> {snip}
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> {snip}

 09 Apr 14 | 19:58:16 ~
    $ 

... works too!

However it adds a : in there (some stuff snipped)

 09 Apr 14 | 19:25:04 ~
    $ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default  

 09 Apr 14 | 19:25:07 ~
    $ sudo ifconfig
[sudo] password for sector11: 
eth0      Link encap:Ethernet 
lo        Link encap:Local Loopback 

so getting the ethX or wlanX out would require eliminating the : and getting it into every conky command that uses ethX, wlanX or the pppX etc. etc.

So for this I think ${gw_iface} might be better to work with.
=========

As mentioned above

### CHECK NETWORK ###
### CHECK NETWORK ###
##alias sif='sudo ifconfig'
alias sif='ip addr show'
alias sift='sudo iftop -i eth0'
alias eth='sudo ethtool eth0'
alias ipl='ip link'
alias all='ip addr show && echo && sudo ethtool eth0'
### CHECK NETWORK ###
### CHECK NETWORK ###

Try 'sift' with wlan0 ... if it works it's a good one.

Oops ... sidetracked ... back to conky now  big_smile

Last edited by Sector11 (2014-04-09 23:12:30)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7332 2014-04-09 23:15:37

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

^ problem is that i cant get ${gw_iface} to work with ${downspeed}
i only get 0B unchanging

Offline

#7333 2014-04-09 23:38:38

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

^ problem is that i cant get ${gw_iface} to work with ${downspeed}
i only get 0B unchanging

Same here.  sad

I've been scouring the net looking for a way ....  the results are too 8.( for.

Somehow I would thing there would be a in conky ... maybe because NOW we want it. lol lol lol

Let's face it, if:

${downspeedgraph 'echo gw_iface' 40,106 76FF00 FF0000 -t}

worked ... it would be just this side of Supercalifragilisticexpialidocious

Especially if it worked with all related commands:

  • downspeed

  • upspeed

  • downspeedf

  • upspeedf

  • downspeedgraph - see example above

  • upspeedgraph

  • totaldown

  • totalup

  • wireless_ap

  • wireless_bitrate

  • wireless_essid

  • wireless_link_bar

  • wireless_link_qual

  • wireless_link_qual_max

  • wireless_link_qual_perc

  • wireless_mode


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7334 2014-04-10 01:14:55

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

^ problem is that i cant get ${gw_iface} to work with ${downspeed}
i only get 0B unchanging

How about this ... if you can get rid of the nasty :

 09 Apr 14 | 20:53:02 ~
    $ ip addr show | grep "state UP" | grep -v "lo" | awk '{print $2}'
eth0:
 
 09 Apr 14 | 20:53:36 ~
    $ 

to replace this:

${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

... Oops ... not that 'you' noticed the the reply box has been open a long time ...

I'm beginning to think that the best solution is to use what is under the horizontal line with a start of 3 eth and 3 wlan for a total of 6 ${if_up} statements. eth0, eth1, eth2 wlan0, wlan1 wlan2 ... if he plugs into a computer that uses something higher the:

Connection: ${gw_iface}

should display it and extra ${if_up XXX} statements can be added at that time.

mrpeachy could you check and see if this works with your wlan0  big_smile

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

# OS: ${pre_exec lsb_release -sd}

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Marenbraga test conky

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

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes # Options: yes or no

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 255

minimum_size 0 0  # w|h
#maximum_width 1900

gap_x 20	# l|r
gap_y 20	# u|d

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=12
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1.0

#font monofur:size=9

# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes ##yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #220 220 220	Gainsboro
#default_color C0C0C0 #192 192 192 Silver
#default_color B0E0E6 #176 224 230 PowderBlue
#default_color D8BFD8 #216 191 216 Thistle
color0 8FBC8F #DarkSeaGreen
#color1 C0C0C0 # Silver
#color1 D3D3D3 #LightGrey
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
#color3 87CEFA #E0FFFF #LightCyan
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
#color7 5F9EA0 #CadetBlue
#color8 FFFFE0 #LightYellow
color8 FFD700 #Gold
#color8 F0E68C #Khaki
color9 FFA07A #LightSalmon
#color9 CD5C5C #IndianRed
#color9 FF0000 #Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 05
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  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

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 6144

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

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable th0e image cache.
imlib_cache_size 0

default_bar_size 590 13

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit
##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0xffffff 0.05
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5

#lua_draw_hook_post draw_bg 10 0 0 0 0 0xffffff 0.5
#lua_draw_hook_post draw_bg 10 0 0 0 0 0x000000 0.5
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
############### V9000 ########################################################
#starts the lua weather data gathering function, call once at top of conkyrc
#lua_load ~/v9000/v9000.lua
#lua_draw_hook_post weather
#lua_load /media/5/Conky/templates/cF-2013.template.lua
#lua_load /media/5/Conky/LUA/4clocks.lua
#lua_draw_hook_pre main
#######################################################  End LUA Settings  ###

##OS: ${pre_exec lsb_release -sd}
##OS: ${pre_exec lsb_release -si} ${pre_exec lsb_release -sr} ${pre_exec lsb_release -sc}

##############################################################################

#This does not work here - needs sudo - works for mrpeachy:
#${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

#mrp's new line: ${execp echo PASSWORD | sudo -S ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}
# works but really - the root password  :D)))))

update_interval 1

template1 ${pre_exec ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print $1}'}
template2 eth0
template3 ${gw_iface}
template4 ${if_up eth1}eth1${else}eth0${endif}
template5 ${execp ip addr show | grep "state UP" | grep -v "lo" | awk '{print $2}'}

if_up_strictness link ## up link or address

TEXT
${alignc}Marenbraga test

mrp:
down speed ${execp ip addr show | grep "state UP" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

s11 mrp ${execp ip addr show | grep "state UP" | grep -v "lo" | awk '{print $2}'}
   ${execp ip addr show | grep "state UP" | grep -v "lo" | awk '{print "${downspeed " $2 "}"}'}

T1: ${template1} - ${downspeed ${template1}}${goto 150}${upspeed ${template1}}
T2: ${template2} - ${downspeed ${template2}}${goto 150}${upspeed ${template2}}
T3: ${template3} - ${downspeed ${template3}}${goto 150}${upspeed ${template3}}
T4: ${template4} - ${downspeed ${template4}}${goto 150}${upspeed ${template4}}
T5: ${template5} - ${downspeed ${template5}}${goto 150}${upspeed ${template5}}
${hr}

Connection: ${gw_iface}
${if_up eth1}eth1 info\
eth1 info
eth1 info${else}\
${if_up eth2}eth2 info\
eth2 info
eth2 info${else}\
${if_up eth0}${upspeedgraph eth0 40,106 76FF00 FF0000 -t}\
${goto 115}${color4}${downspeedgraph eth0 40,106 76FF00 FF0000 -t}${color}
${voffset -11}${color5}${wireless_link_bar 15,215}${voffset 11}${goto 113}${voffset -56}${wireless_link_bar 53,1}${color}
${voffset -23}${goto 10}↑ ${upspeed eth0}${goto 123}↓ if_up_strictness${downspeed eth0}
${goto 10}${color2}TOT: ${color4}${totalup eth0}${goto 1if_up_strictness23}${color2}TOT: ${color4}${totaldown eth0}${else}\
${if_up eth3}eth3 info\
eth3 info
eth3 info${else}\
${if_up eth4}eth4 info\
eth4 info
eth4 info${else}\
${if_up wlan1}wlan1 info\
wlan1 info
wlan1 info${else}\
${if_up wlan2}wlan2 info\
wlan2 info
wlan2 info${else}\
${if_up wlan0}${upspeedgraph wlan0 40,106 76FF00 FF0000 -t}\
${goto 115}${color4}${downspeedgraph wlan0 40,106 76FF00 FF0000 -t}${color}
${voffset -11}${color5}${wireless_link_bar 15,215}${voffset 11}${goto 113}${voffset -56}${wireless_link_bar 53,1}${color}
${voffset -23}${goto 10}↑ ${upspeed wlan0}${goto 123}↓ ${downspeed wlan0}
${goto 10}${color2}TOT: ${color4}${totalup wlan0}${goto 123}${color2}TOT: ${color4}${totaldown wlan0}${else}\
${if_up wlan3}wlan3 info\
wlan3 info
wlan3 info${else}\
${if_up wlan4}wlan4 info\
wlan4 info
wlan4 info\
${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${color}

Play with the if_up_strictness just above TEXT.
If you have monofur font it should work out of the box for you ... I hope

2014_04_09_22_12_54_229x402_Sector11.jpg
======================

Request for help

To anyone using anything other than eth0 or wlan0 I would appreciate if you tested this as well.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7335 2014-04-10 01:33:19

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

copying the code straight over i get this

Screenshot_from_2014_04_09_20_30_27.jpg

the bottom part seems to be working but the templates are not, just 0B constant

Offline

#7336 2014-04-10 01:53:19

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

this line gets rid of the :
matches current running interface and outputs the command in conky

${execp ip addr show | grep "BROADCAST,MULTICAST,UP,LOWER_UP" | gawk 'match($0, /: (.*): /, a) {print "${downspeed " a[1] "}"}'}

should work with all the outputs
this one gets a downspeed graph, very picky with the spacing!!

${execp ip addr show | grep "BROADCAST,MULTICAST,UP,LOWER_UP" | gawk 'match($0, /: (.*): /, a) {print "${downspeedgraph " a[1] " 40,106 76FF00 FF0000 -t}"}'}

for some reason it has to send a red bar all the way across the graph before displaying live data hmm

it may not be pretty but i think it will be easier to navigate than multiple if-matches
should also take into account any network adapter name i think

Last edited by mrpeachy (2014-04-10 02:09:38)

Offline

#7337 2014-04-10 05:06:38

Marenbraga
Member
Registered: 2013-11-14
Posts: 40

Re: Conky v1.9 Thread

Hi Sector11 ... I thought the same thing about gw_iface. sniffff: (
The idea of the vertical bar was mine, yes. Its horizontal bar is very cool, works better than the "HR" .. great idea.
The last code you sent was constantly at 0 for me too, but I feel that this is the right way.


Hi Mrpeachy ... the code you sent worked without "sudo". But how I would deal with two interfaces connected? I usually use Wifi/3G connection and share the connection via network card, and it would appear that both the layout.


You both impressed me! One day be able to know as much as you two .... I'm still very noob .. hehe

Offline

#7338 2014-04-10 10:04:06

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

is it better (faster) to  use 'cairo-method' or the 'imlib-version'? what do you think?

Offline

#7339 2014-04-10 12:42:23

ragamatrix
#! Junkie
From: Earth
Registered: 2012-12-05
Posts: 286

Re: Conky v1.9 Thread

-S I M P L E-
screenconkyhtoplike.jpg
But the code is "boring" you'll need Computerfont font and White-Rabbit and change the path for your second hard drive...
-conkyhtoplike-

######################################################
# Ragamatrix modified circlethings2 conky 10/04/2014 #
######################################################
background no
use_xft yes
#xftfont font Mono:style=Bold:size=7
xftfont font Andale Mono:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1920 90
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
color1 FF4500#1E90FF(bleu)00FF00(vert)
color2 666666
color3 00FF00
color4 gold
color5 DarkOrchid
color6 DeepPink2
color7 fff00d
default_color FFFFFF
default_shade_color 282828
alignment tr
gap_x 0
gap_y 3
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# -- Lua Load -- #
# SET THE PATH TO THE SCRIPT HERE
#lua_load ~/.conky/lanceur.lua
#lua_draw_hook_pre main


TEXT
${color2}${font Computerfont:size=17}${goto 30}CPU:[${if_match ${cpu cpu1} >0}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >5}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >10}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >15}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >20}${color4}${else}${color2}${endif}|${if_match ${cpu cpu1} >25}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >30}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >35}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >40}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >45}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >50}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >55}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >60}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >65}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >70}${color4}${else}${color2}${endif}|${if_match ${cpu cpu1} >75}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >80}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >85}${color1}${else}${color2}${endif}|${if_match ${cpu cpu1} >90}${color7}${else}${color2}${endif}|${if_match ${cpu cpu1} >95}${color1}${else}${color2}${endif}|]\
#CPU1
${color2}${font Computerfont:size=17}${goto 300}CPU-AVG:[${if_match ${cpu cpu0} >0}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >5}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >10}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >15}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >20}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >25}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >30}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >35}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >40}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >45}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >50}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >55}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >60}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >65}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >70}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >75}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >80}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >85}${color1}${else}${color2}${endif}|${if_match ${cpu cpu0} >90}${color7}${else}${color2}${endif}|${if_match ${cpu cpu0} >95}${color1}${else}${color2}${endif}|]\
#MEM
${color2}${font Computerfont:size=17}${goto 630}MEM:[${if_match ${memperc} >0}${color7}${else}${color2}${endif}|${if_match ${memperc} >5}${color1}${else}${color2}${endif}|${if_match ${memperc} >10}${color7}${else}${color2}${endif}|${if_match ${memperc} >15}${color1}${else}${color2}${endif}|${if_match ${memperc} >20}${color7}${else}${color2}${endif}|${if_match ${memperc} >25}${color1}${else}${color2}${endif}|${if_match ${memperc} >30}${color7}${else}${color2}${endif}|${if_match ${memperc} >35}${color1}${else}${color2}${endif}|${if_match ${memperc} >40}${color7}${else}${color2}${endif}|${if_match ${memperc} >45}${color1}${else}${color2}${endif}|${if_match ${memperc} >50}${color7}${else}${color2}${endif}|${if_match ${memperc} >55}${color1}${else}${color2}${endif}|${if_match ${memperc} >60}${color7}${else}${color2}${endif}|${if_match ${memperc} >65}${color1}${else}${color2}${endif}|${if_match ${memperc} >70}${color7}${else}${color2}${endif}|${if_match ${memperc} >75}${color1}${else}${color2}${endif}|${if_match ${memperc} >80}${color7}${else}${color2}${endif}|${if_match ${memperc} >85}${color1}${else}${color2}${endif}|${if_match ${memperc} >90}${color7}${else}${color2}${endif}|${if_match ${memperc} >95}${color1}${else}${color2}${endif}|]\
#HD
${color2}${font Computerfont:size=17}${goto 910}HDD1:[${if_match ${fs_used_perc /} >0}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >5}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >10}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >15}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >20}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >25}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >30}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >35}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >40}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >45}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >50}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >55}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >60}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >65}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >70}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >75}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >80}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >85}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /} >90}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /} >95}${color3}${else}${color2}${endif}|]\
#hdd2
${color2}${font Computerfont:size=17}${goto 1190}HDD2:[${if_match ${fs_used_perc /media/SALON/} >0}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >5}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >10}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >15}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >20}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >25}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >30}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >35}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >40}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >45}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >50}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >55}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >60}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >65}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >70}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >75}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >80}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >85}${color3}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >90}${color1}${else}${color2}${endif}|${if_match ${fs_used_perc /media/SALON/} >95}${color3}${else}${color2}${endif}|]\
#DL
${color2}${font Computerfont:size=17}${goto 1470}DL:[${if_match ${downspeedf eth0} >0}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >5}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >10}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >15}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >20}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >25}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >30}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >35}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >40}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >45}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >50}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >55}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >60}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >65}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >70}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >75}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >80}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >85}${color3}${else}${color2}${endif}|${if_match ${downspeedf eth0} >90}${color1}${else}${color2}${endif}|${if_match ${downspeedf eth0} >95}${color3}${else}${color2}${endif}|]\
#UL${color}${time %A %d|%m}
${color2}${font Computerfont:size=17}${goto 1730}UL:[${if_match ${upspeedf eth0} >0}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >5}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >10}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >15}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >20}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >25}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >30}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >35}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >40}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >45}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >50}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >55}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >60}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >65}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >70}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >75}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >80}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >85}${color3}${else}${color2}${endif}|${if_match ${upspeedf eth0} >90}${color1}${else}${color2}${endif}|${if_match ${upspeedf eth0} >95}${color3}${else}${color2}${endif}|]
${voffset 20}${alignc}${font White Rabbit:size=45}${color2}${time %H:%M}
#${voffset 15}${goto 730}${font Andale Mono:size=10}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq}

Offline

#7340 2014-04-10 13:30:30

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

ragamatrix wrote:

-S I M P L E-

Yes, you are right ... -S I M P L E- ... but oh so beautiful!

The bars on the bottom add an elegance ...

I borrowed the wall paper and moved the CrunchBang a little to clear a bottom, and a right side conky on another desktop. conky.
2014_04_10_10_26_13_1920x1080_Sector11.jpg
You rock!

ps: now to try that conky  big_smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7341 2014-04-10 14:27:54

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

lionhead wrote:

is it better (faster) to  use 'cairo-method' or the 'imlib-version'? what do you think?

they both have their advantages and disadvantages

with cairo the images appear to remain solid no matter what window settings are used BUT you can only use png images

with imlib you can use any image type but you get washed out images when using argb visual settings for real transparency

Offline

#7342 2014-04-10 14:39:03

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

Marenbraga wrote:

Hi Mrpeachy ... the code you sent worked without "sudo". But how I would deal with two interfaces connected? I usually use Wifi/3G connection and share the connection via network card, and it would appear that both the layout.


You both impressed me! One day be able to know as much as you two .... I'm still very noob .. hehe

actually something interesting happened when i plugged my ethernet cable into my netbook
i got both connections displayed with only the one command

Screenshot_from_2014_04_10_09_34_02.jpg

this is the conky below text

TEXT
${execp ip addr show | grep "BROADCAST,MULTICAST,UP,LOWER_UP" | gawk 'match($0, /: (.*): /, a) {print a[1]}'}
${execp ip addr show | grep "BROADCAST,MULTICAST,UP,LOWER_UP" | gawk 'match($0, /: (.*): /, a) {print "${downspeed " a[1] "}"}'}

so this wouldnt work with a graph
youve hit on an interesting problem, and not one easily solved i think  smile

Offline

#7343 2014-04-10 14:46:39

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

copying the code straight over i get this

http://s4.postimg.org/xh2o4z7qx/Screenshot_from_2014_04_09_20_30_27.jpg

the bottom part seems to be working but the templates are not, just 0B constant

OK, the templates are out.  big_smile

The bottom part in your example, like Marenbraga's, seems to have the graph for wlan0 (that red line) - but no border ...

And I made sure that:

# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40

was in there as well.

So for this test I changed that to:

# graph borders
draw_graph_borders no #yes
#default_graph_size 15 40

2014_04_10_10_52_15_331x506_Sector11.jpg .. so how come that bottom downspeed graph has a border and the upspeed doesn't?

That would be another trick just picked up from Marenbraga - wireless_link_bar - since I don't wireless it's a freebee box ...  and should be for you as well if you don't use the (net) option like this (change eth0 to something working):

no bar_graph borders:

${goto 10}${downspeedgraph eth0 40,106 76FF00 FF0000 -t}\
${goto 10}${wireless_link_bar 40,106}\
${upspeedgraph eth0 40,106 76FF00 FF0000 -t}

Does that work for you?  And you too Marenbraga?

Learning new things all around on this little quest thanks to Marenbraga  big_smile

Marenbraga wrote:

Hi Sector11 ... I thought the same thing about gw_iface. sniffff: (
The idea of the vertical bar was mine, yes. Its horizontal bar is very cool, works better than the "HR" .. great idea.
The last code you sent was constantly at 0 for me too, but I feel that this is the right way.

Try this in that test conky:

At the bottom add a line:

${gw_iface}

and run it, then just below that add  a direct command using whatever (net) you get:

${gw_iface}
${goto 10}${downspeedgraph (net) 40,106 76FF00 FF0000 -t}

If it says wlan2 change (net) to wlan2 ... Does that work?

Marenbraga wrote:

Hi Mrpeachy ... the code you sent worked without "sudo". But how I would deal with two interfaces connected? I usually use Wifi/3G connection and share the connection via network card, and it would appear that both the layout.

Yea that's a kicker, and needing an ${execp ...} for every call isn't very CPU friendly ... you'd drain a battery in no time I think.

Marenbraga wrote:

You both impressed me! One day be able to know as much as you two .... I'm still very noob .. hehe

I remember days where I said the same thing.  People bent over backwards to help me ... I made a promise to myself to repay their kindness and generosity by helping others.  And almost 6 and a half years later ... here I am, still helping.

Stick around ... we'll get you addicted ... Right mrpeachy.    BTW: mrpeachy is my lua mentor.

{click} - - - Idea Alert! 8)

please add something to that test, just below it ... bear with me on this please:

${membar 0,100}
I am using: ${if_match "${gw_iface}"=="wlan0"}wlan0${else}\
${if_match "${gw_iface}"=="wlan1"}wlan0${else}\
${if_match "${gw_iface}"=="wlan2"}wlan0${else}\
${if_match "${gw_iface}"=="wlan3"}wlan0${else}\
${if_match "${gw_iface}"=="eth0"}eth0${else}\
${if_match "${gw_iface}"=="eth1"}eth1${else}\
${if_match "${gw_iface}"=="eth2"}eth2${else}\
${if_match "${gw_iface}"=="eth3"}eth3\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}

and post the results.

2014_04_10_11_34_22_262x346_Sector11.jpg
The code as it now stands, since template seems to be out:

update_interval 1
if_up_strictness link ## up link or address # for wireless only I think
TEXT
The Marenbraga Test

Connection: ${gw_iface}
${if_up eth1}eth1 info\
eth1 info
eth1 info${else}\
${if_up eth2}eth2 info\
eth2 info
eth2 info${else}\
${if_up eth0}${upspeedgraph eth0 40,106 76FF00 FF0000 -t}\
${goto 115}${color4}${downspeedgraph eth0 40,106 76FF00 FF0000 -t}${color}
${voffset -11}${color5}${wireless_link_bar 15,215}${voffset 11}${goto 113}${voffset -56}${wireless_link_bar 53,1}${color}
${voffset -23}${goto 10}↑ ${upspeed eth0}${goto 123}↓ ${downspeed eth0}
${goto 10}${color2}TOT: ${color4}${totalup eth0}${goto 123}${color2}TOT: ${color4}${totaldown eth0}${else}\
${if_up eth3}eth3 info\
eth3 info
eth3 info${else}\
${if_up eth4}eth4 info\
eth4 info
eth4 info${else}\
${if_up wlan1}wlan1 info\
wlan1 info
wlan1 info${else}\
${if_up wlan2}wlan2 info\
wlan2 info
wlan2 info${else}\
${if_up wlan0}${upspeedgraph wlan0 40,106 76FF00 FF0000 -t}\
${goto 115}${color4}${downspeedgraph wlan0 40,106 76FF00 FF0000 -t}${color}
${voffset -11}${color5}${wireless_link_bar 15,215}${voffset 11}${goto 113}${voffset -56}${wireless_link_bar 53,1}${color}
${voffset -23}${goto 10}↑ ${upspeed wlan0}${goto 123}↓ ${downspeed wlan0}
${goto 10}${color2}TOT: ${color4}${totalup wlan0}${goto 123}${color2}TOT: ${color4}${totaldown wlan0}${else}\
${if_up wlan3}wlan3 info\
wlan3 info
wlan3 info${else}\
${if_up wlan4}wlan4 info\
wlan4 info
wlan4 info\
${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${color}

no bar_graph borders:

${goto 10}${downspeedgraph eth0 40,106 76FF00 FF0000 -t}\
${goto 10}${wireless_link_bar 40,106}\
${upspeedgraph eth0 40,106 76FF00 FF0000 -t}

${membar 0,100}
I am using: ${if_match "${gw_iface}"=="wlan0"}wlan0${else}\
${if_match "${gw_iface}"=="wlan1"}wlan0${else}\
${if_match "${gw_iface}"=="wlan2"}wlan0${else}\
${if_match "${gw_iface}"=="wlan3"}wlan0${else}\
${if_match "${gw_iface}"=="eth0"}eth0${else}\
${if_match "${gw_iface}"=="eth1"}eth1${else}\
${if_match "${gw_iface}"=="eth2"}eth2${else}\
${if_match "${gw_iface}"=="eth3"}eth3\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}

Last edited by Sector11 (2014-04-10 15:01:17)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7344 2014-04-10 14:50:39

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

this line would list the interface name, downspeed and upspeed of all running connections

${execp ip addr show | grep "BROADCAST,MULTICAST,UP,LOWER_UP" | gawk 'match($0, /: (.*): /, a) {print a[1] " - downspeed: ${downspeed " a[1] "} - upspeed: ${upspeed " a[1] "}"}'}

Screenshot_from_2014_04_10_09_49_17.jpg

Offline

#7345 2014-04-10 14:56:45

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ mrpeachy & Marenbraga

actually something interesting happened when i plugged my ethernet cable into my netbook
i got both connections displayed with only the one command

so this wouldnt work with a graph
youve hit on an interesting problem, and not one easily solved i think  smile

Well doesn't that just toss a loose nut into the gears!  sad


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7346 2014-04-10 15:14:00

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

this line would list the interface name, downspeed and upspeed of all running connections

${execp ip addr show | grep "BROADCAST,MULTICAST,UP,LOWER_UP" | gawk 'match($0, /: (.*): /, a) {print a[1] " - downspeed: ${downspeed " a[1] "} - upspeed: ${upspeed " a[1] "}"}'}

http://s12.postimg.org/7au6vfwbt/Screenshot_from_2014_04_10_09_49_17.jpg

Interesting ... would this work on only the one that is UP  ?

${execp ip addr show | grep "state UP" | gawk 'match($0, /: (.*): /, a) {print a[1] " - downspeed: ${downspeed " a[1] "} - upspeed: ${upspeed " a[1] "}"}'}

Since I only have one connection ... I can't test.  sad

But both lines work perfect here.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7347 2014-04-11 01:31:13

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

mrpeachy wrote:

this works

${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

should identify the current running adapter and pring the desired output, in this case downspeed  big_smile

edit the bit at the end for different outputs

now need dk75 to make it a one commander  big_smile

I've put routine for auto get working connection and pulling data from vnstat not so long ago, but here, again:

${font TeXGyreSchola:regular:size 16}${voffset 28}${goto 32}${color #008fff}${execpi 60 ip -oneline link |mawk '!/state DOWN/ && !/loopback/ {gsub(/:/,"",$2); print $2}' | xargs -I {} vnstat -i {} --oneline |mawk -F";" '{gsub(/ /,""); gsub(/\.[0-9][0-9]/,"${font TeXGyreSchola:regular:size 16}"); gsub(/iB/,"${font TeXGyreSchola:bold:size 16}"); print $2"${font TeXGyreSchola:bold:size 16}${alignr 255}"$6"/"$11}'}${color}${font}
]]

That's my actual working line...

I've tested it with wlan1, eth0 and ppp0


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#7348 2014-04-11 13:34:51

Marenbraga
Member
Registered: 2013-11-14
Posts: 40

Re: Conky v1.9 Thread

Hi dk75, this function you created did not work in my conky.
This code is complete? There appeared no information.

Offline

#7349 2014-04-11 13:48:21

Marenbraga
Member
Registered: 2013-11-14
Posts: 40

Re: Conky v1.9 Thread

Sector11 wrote:

@ mrpeachy & Marenbraga

actually something interesting happened when i plugged my ethernet cable into my netbook
i got both connections displayed with only the one command

so this wouldnt work with a graph
youve hit on an interesting problem, and not one easily solved i think  smile

Well doesn't that just toss a loose nut into the gears!  sad


kkkkkkkkkkkkkkkkkkkkkkkkk... its a fact! LOL
lol

Offline

Help fund CrunchBang, donate to the project!

#7350 2014-04-11 14:33:34

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Marenbraga wrote:

Hi dk75, this function you created did not work in my conky.
This code is complete? There appeared no information.

Two things:

  1. don't include the ]] in the second line, just the first line of code.

  2. Do you have vnstat installed?

It works well here, dk75 doesn't write bad code - at least not that I have ever seen:

--
${font bauhaus:regular:size 16}${goto 32}${execpi 60 ip -oneline link |mawk '!/state DOWN/ && !/loopback/ {gsub(/:/,"",$2); print $2}' | xargs -I {} vnstat -i {} --oneline |mawk -F";" '{gsub(/ /,""); gsub(/\.[0-9][0-9]/,"${font bauhaus:regular:size 16}"); gsub(/iB/,"${font bauhaus:bold:size 16}"); print $2"${font bauhaus:bold:size 16}${alignr 55}"$6"/"$11}'}${font}

${execpi 60 ip -oneline link |mawk '!/state DOWN/ && !/loopback/ {gsub(/:/,"",$2); print $2}' | xargs -I {} vnstat -i {} --oneline |mawk -F";" '{gsub(/ /,""); gsub(/\.[0-9][0-9]/,""); gsub(/iB/,""); print $2"   "$6"/"$11}'}

I changed the font, I didn't have dk75's called font, and reformatted the second line just to test.  See the bottom two lines in the attached image.

Please - test this see if it works for you (see the "I am using" section in the image):

${membar 0,100}
I am using:${gw_iface}
${if_match "${gw_iface}"=="wlan0"}↑ ${upspeed wlan0}${goto 123}↓ ${downspeed wlan0}${else}\
${if_match "${gw_iface}"=="wlan1"}↑ ${upspeed wlan1}${goto 123}↓ ${downspeed wlan1}${else}\
${if_match "${gw_iface}"=="wlan2"}↑ ${upspeed wlan2}${goto 123}↓ ${downspeed wlan2}${else}\
${if_match "${gw_iface}"=="wlan3"}↑ ${upspeed wlan3}${goto 123}↓ ${downspeed wlan3}${else}\
${if_match "${gw_iface}"=="eth0"}↑ ${upspeed eth0}${goto 123}↓ ${downspeed eth0}${else}\
${if_match "${gw_iface}"=="eth1"}↑ ${upspeed eth1}${goto 123}↓ ${downspeed eth1}${else}\
${if_match "${gw_iface}"=="eth2"}↑ ${upspeed eth2}${goto 123}↓ ${downspeed eth2}${else}\
${if_match "${gw_iface}"=="eth3"}↑ ${upspeed eth3}${goto 123}↓ ${downspeed eth3}${else}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}

2014_04_11_11_27_35_301x570_Sector11.jpg


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo