SEARCH

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

You are not logged in.

#1 2012-02-24 01:36:15

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

New #! Install - Conky and Tint2 Code Optimization

New here (first post) but less new to #! (one month all together) and not entirely new to Linux. (four years)
I've switched from Mint to a more perfectionist friendly OS (#!)

I love it thus far, and am on my way to completely tweaking every setting to perfectionism since I plan and hope to learn how to somehow export my install to an ISO for CD or DVD install on other systems due to the heavy tweaking and the pain in the butt it would be to do it all over every time I install. If not, I'll have an awesome setup on the box it is on now. Back to the original purpose of this thread... I have taken some RC files for Conky and Tint2 and tweaked them ever so slightly, but still new to doing this, I would like to have them as close to "perfect" as I can get them for future use on other installs. This means, removing unneeded lines and characters, etc. If anyone could help me revise these two snippets, it would be much appreciated.

Thank you for your time.

CONKY

######################
# - Conky settings - #
######################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1

imlib_cache_size 0
double_buffer yes
no_buffers yes

#####################
# - Text settings - #
#####################
use_xft yes
xftfont Ubuntu:size=9
override_utf8_locale yes
text_buffer_size 2048

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_argb_visual yes
#own_window_argb_value 100

alignment tr
gap_x -2
gap_y 10
minimum_size 350 300


default_bar_size 60 8

#########################
# - Graphics settings - #
#########################
draw_shades no

default_color efefef
default_shade_color 1d1d1d
color0 ffffff
color1 ffffff
color2 ffffff


#lua_load ~/.conky/conkybg.lua
#lua_draw_hook_pre conky_draw_bg

TEXT
${voffset 5}
${goto 92}Core 1: ${font Ubuntu:style=Bold:size=9}${color1}${cpu cpu1}%${font}${color} ${alignr 15}

${goto 92}Core 2: ${font Ubuntu:style=Bold:size=9}${color1}${cpu cpu2}%${font}${color} ${alignr 15}


${goto 92}RAM:${color1} ${font Ubuntu:style=Bold:size=9}${memperc}%${font}${color}${font Ubuntu:style=Bold:size=9}${font} ${goto 230}Used: ${font Ubuntu:style=Bold:size=9}${color2}${mem}${color}${font}

${goto 92}HDD:${color1} ${font Ubuntu:style=Bold:size=9}${fs_used_perc /home}%${font}${color} ${goto 230}Used: ${font Ubuntu:style=Bold:size=9}${color2}${fs_used /home}${color}${font}

${if_up wlan0}
${voffset -4}${goto 92}${voffset -6}Upload: ${font Ubuntu:style=Bold:size=9}${color1}${upspeed wlan0}${color}${font} ${goto 230}Total: ${font Ubuntu:style=Bold:size=9}${color2}${totalup wlan0}${color}${font}

${voffset 4}${goto 92}Down:   ${font Ubuntu:style=Bold:size=9}${color1}${downspeed wlan0}${color}${font} ${goto 230}Total: ${font Ubuntu:style=Bold:size=9}${color2}${totaldown wlan0}${color}${font}



# |--ETH0
${else}${if_up eth0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 92}${voffset -6}Up: ${font Ubuntu:style=Bold:size=9}${color1}${upspeed eth0}${color}${font} ${alignr 15}${color2}${upspeedgraph eth0 8,60 92B6F1 CCDFFF}${color}
${goto 92}Insgesamt: ${color2}${totalup eth0}${color}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 92}${voffset -6}Down: ${font Ubuntu:style=Bold:size=9}${color1}${downspeed eth0}${color}${font} ${alignr 15}${color2}${downspeedgraph eth0 8,60 92B6F1 CCDFFF}${color}
${goto 92}Insgesamt: ${color2}${totaldown eth0}${color}
${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 92}${voffset -4}Lokale IP: ${alignr 15}${color2}${addr eth0}${color}
${goto 92}Öffentliche IP: ${alignr 15}${color2}${execi 10800 ~/.conkycolors/bin/conkyIp}${color}
# |--PPP0
${endif}${else}${if_up ppp0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 92}${voffset -6}Up: ${font Ubuntu:style=Bold:size=9}${color1}${upspeed ppp0}${color}${font} ${alignr 15}${color2}${upspeedgraph ppp0 8,60 92B6F1 CCDFFF}${color}
${goto 92}Insgesamt: ${color2}${totalup ppp0}${color}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 92}${voffset -6}Down: ${font Ubuntu:style=Bold:size=9}${color1}${downspeed ppp0}${color}${font} ${alignr 15}${color2}${downspeedgraph ppp0 8,60 92B6F1 CCDFFF}${color}
${goto 92}Insgesamt: ${color2}${totaldown ppp0}${color}
${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 92}${voffset -4}Lokale IP: ${alignr 15}${color2}${addr ppp0}${color}
${endif}${else}${voffset 4}${color0}${font PizzaDude Bullets:size=12}4${font}${color}${goto 92}Netzwerk nicht verfügbar${endif}${endif}

${image ~/.conky/base.png -p 10,0 -s 339x86}${image ~/.conky/base.png -p 10,146 -s 339x86}${image ~/.conky/base.png -p 10,73 -s 339x86}${image ~/.conky/Task_Manager.png -p 32,20 -s 45x45}${image ~/.conky/Memory.png -p 32,93 -s 45x45}${image ~/.conky/wlan100.png -p 32,166 -s 45x45}

TINT2

#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------

#---------------------------------------------
# BACKGROUND AND BORDER
#---------------------------------------------
rounded = 8
border_width = 1
background_color = #ffffff 50
border_color = #000000 100

rounded = 5
border_width = 1
background_color = #000000 50
border_color = #000000 100

rounded = 5
border_width = 1
background_color = #ffffff 50
border_color = #000000 100

#---------------------------------------------
# PANEL
#---------------------------------------------
panel_monitor = all
panel_position = bottom center
panel_size = 95% 25
panel_margin = 0 5
panel_padding = 5 0
font_shadow = 0
panel_background_id = 0
wm_menu = 0
panel_dock = 0
panel_layer = normal

#---------------------------------------------
# TASKBAR
#---------------------------------------------
#taskbar_mode = multi_desktop
taskbar_mode = single_desktop
taskbar_padding = 2 2 2
taskbar_background_id = 1
#taskbar_active_background_id = 0

#---------------------------------------------
# TASKS
#---------------------------------------------
task_icon = 0
task_text = 1
task_maximum_size = 140 40
task_centered = 1
task_padding = 2 2
task_font = Sawasdee Bold 10
task_font_color = #ffffff 100
task_background_id = 3
task_icon_asb = 100 0 0
# replace STATUS by 'urgent', 'active' or 'iconified'
#task_STATUS_background_id = 2
#task_STATUS_font_color = #ffffff 85
#task_STATUS_icon_asb = 100 0 0
# example:
task_active_background_id = 2
task_active_font_color = #ffffff 100
task_active_icon_asb = 100 0 0
urgent_nb_of_blink = 8

#---------------------------------------------
# SYSTRAYBAR
#---------------------------------------------
systray = 1
systray_padding = 6 3 5
systray_background_id = 1
systray_sort = left2right

#---------------------------------------------
# CLOCK
#---------------------------------------------
time1_format = %H:%M:%S
time1_font = Sawasdee Bold 11
clock_font_color = #ffffff 100
clock_padding = 5 0
clock_background_id = 1
#clock_lclick_command = xclock
#clock_rclick_command = orage
#clock_tooltip = %A %d %B
#time1_timezone = :US/Hawaii
#time2_timezone = :Europe/Berlin
#clock_tooltip_timezone = :/usr/share/zoneinfo/Europe/Paris

#---------------------------------------------
# BATTERY
#---------------------------------------------
battery = 0
battery_hide = 98
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #ffffff 76
battery_padding = 1 0
battery_background_id = 0

#---------------------------------------------
# TOOLTIP
#---------------------------------------------
tooltip = 0
tooltip_padding = 2 2
tooltip_show_timeout = 0.5
tooltip_hide_timeout = 0.2
tooltip_background_id = 1
tooltip_font_color = #OOOOOO 100
tooltip_font = sans 10

#---------------------------------------------
# MOUSE ACTION ON TASK
#---------------------------------------------
mouse_middle = close
mouse_right = none
mouse_scroll_up = toggle
mouse_scroll_down = iconify

#---------------------------------------------
# AUTOHIDE OPTIONS
#---------------------------------------------
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 2
autohide_height = 4
strut_policy = minimum

Last edited by SchpamGram (2012-02-24 01:43:39)

Offline

Be excellent to each other!

#2 2012-02-24 02:07:43

orionthehunter
#! Constellation
From: Japan
Registered: 2011-04-09
Posts: 912
Website

Re: New #! Install - Conky and Tint2 Code Optimization

Could you elaborate on your classification of perfect?  To what purpose are you trying to revise these?

Are you talking about coding style?  If so I would recommend adding not subtracting, by incorporating easily readable comments for the more opaque settings.  There are many approaches to formatting the wikipedia provides a good overview: http://en.wikipedia.org/wiki/Programming_style

Last edited by orionthehunter (2012-02-24 02:10:53)

Offline

#3 2012-02-24 02:14:26

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

Well, I found that I was stuck when I started to remove lines that weren't needed in the file... simply because I didn't know what was or wasn't exactly needed. Also, I have OCD tongue

Capitalization and spacing and 'properness' I guess would be the desired purpose.
I'm still trying and Googling away to see what I can do. Just trying to make a perfect OS and this one is pretty damn close.

No offense intended whatsoever, Corenominal, your OS is the closest and in terms of minimalistic, it is top notch.

Basically, just want to weed out redundancy.


Edit reply to your edit:

I tried to find a base RC file for both of these that I could just fill in the blanks to, but my search was of 10 percent effort... I shall search again and hope that method works, then I wouldn't have to worry about removing unneeded lines as all the lines would be there. It's a black and white, no gray type of thing. Why have one useless line and leave the rest out when I could either remove it or add all the lines and not worry about it... I guess would explain it.

Last edited by SchpamGram (2012-02-24 02:17:43)

Offline

#4 2012-02-24 02:18:57

orionthehunter
#! Constellation
From: Japan
Registered: 2011-04-09
Posts: 912
Website

Re: New #! Install - Conky and Tint2 Code Optimization

The issue with "needed" is that what is needed depends on personal preferences.  Conky is used to display whatever you want it to display, and tint2 can similarly display things in a wide variety of manners.

If you really have OCD and this stuff bothers you, then the commented lines starting with "#" are "unnecessary" for function, but very helpful for code-reading.  Still, if you see some lines of code that aren't descriptive prefixed by that and have no intent of using it you could cut it, though you're not losing anything by leaving it there, I often do leave commented lines of code for reference when I'm editing, redoing, tweaking a conky or tint2 configuration.

for example none of the following is executed or displayed, it's all prefixed with #, effectively turning it into a comment.

#clock_lclick_command = xclock
#clock_rclick_command = orage
#clock_tooltip = %A %d %B
#time1_timezone = :US/Hawaii
#time2_timezone = :Europe/Berlin
#clock_tooltip_timezone = :/usr/share/zoneinfo/Europe/Paris

Offline

#5 2012-02-24 02:22:41

orionthehunter
#! Constellation
From: Japan
Registered: 2011-04-09
Posts: 912
Website

Re: New #! Install - Conky and Tint2 Code Optimization

The default RC file for conky is what comes with the system, it's found in /etc/conky/conky.conf (might be changed in your version)

The default RC file for tint2 is in ... wow, I dunno actually.  Typically they're in /etc/ but I can't find it.

Offline

#6 2012-02-24 02:25:58

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

Re: New #! Install - Conky and Tint2 Code Optimization

where did you get your conky?
reminds me of another conky in that it is filled with pointless commands

the very first line after TEXT is ridiculous

if you want a neat lean conky, you cant beat the corenominal original that comes with crunchbang

Offline

#7 2012-02-24 02:28:53

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

I once spent 48 hours tidying up my home folder and making all the sub-folders conform to a system of three categories for each original category, then each file named specifically following the same rules of "[Owner] Keyword, Keyword (Version)"

IDK why I typed that, haha.
Anyway, I like the commenting method and will follow it once I find the original RC files and plug the settings I have into them.

It's not that I'll lose any space or anything, it's just a mental thing.
I know it's there, no matter what it looks like, I'll still know that it's broken in some way.

Almost like having a paragraph about carrots with two or three lines talking about celery.

I deleted the original RC files, and the Conky is from here:
http://bigrza.deviantart.com/art/notify … -206763506

I had to edit out the temperature options as my system doesn't recognize and sensors.

Last edited by SchpamGram (2012-02-24 02:32:22)

Offline

#8 2012-02-24 02:32:02

orionthehunter
#! Constellation
From: Japan
Registered: 2011-04-09
Posts: 912
Website

Re: New #! Install - Conky and Tint2 Code Optimization

I guess I can't really relate, it makes it difficult to help you in your task. 


Sorry, :-/

Offline

#9 2012-02-24 02:34:27

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

Tint2rc is in ~/.config/tint2
In Statler, anyway.

Thanks for your time anyway smile

Last edited by SchpamGram (2012-02-24 02:35:10)

Offline

#10 2012-02-24 02:41:15

orionthehunter
#! Constellation
From: Japan
Registered: 2011-04-09
Posts: 912
Website

Re: New #! Install - Conky and Tint2 Code Optimization

RIght, that's your personal tint2 (for your user), there should be a system-wide default file as well.  I just don't know where that lies.

Offline

#11 2012-02-24 02:51:08

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

I think I'm going to just re-install and run stock...

Offline

#12 2012-02-24 03:13:44

cJones
#! Junkie
From: Oregon
Registered: 2012-02-21
Posts: 447

Re: New #! Install - Conky and Tint2 Code Optimization

SchpamGram wrote:

completely tweaking every setting to perfectionism since I plan and hope to learn how to somehow export my install to an ISO for CD or DVD install on other systems due to the heavy tweaking and the pain in the butt it would be to do it all over every time I install.

After saying all of that, and the thing about 48 hours, you think you want to reinstall?? Over a conky file...I think I'm confused


d(o_O)b

Offline

#13 2012-02-24 18:26:37

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

Black or white, no grey. Either stock or custom, no half way.
It's an OCD thing. I still want to go custom, but I'm in for some hours of tweaking... then I'm unsure if I can even export my install to an image... maybe if I do it in a virtual machine. I tried remastersys last time I tweaked #! to all oblivion but it didn't work because I needed an install disk to install the install disk. Long story short, I lost that install that I spent days on because my laptop crashed (HP DV7).

Offline

#14 2012-02-24 19:22:00

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: New #! Install - Conky and Tint2 Code Optimization

@schpamgram: welcome to the community. let me start by saying that i know where you're coming from with the OCD-thing. i know exactly what you are talking about. there is one problem here though: seems the dudes who know more about Conky do not understand you as well as i do. another thing: try and familiarize yourself with Conky and Tint2 some more. give it some more time. you can live with a messy config-file for a while, until you learn more about this config-thing. clean it up after that, or forget about it. whichever it is, it will be a fine solution. dunno, maybe i'm still capable of thinking grey instead of b/w.
all i can say is: good luck. smile

Offline

#15 2012-02-24 21:29:00

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

Thanks, man, I appreciate the reply.
OCD is getting to be a problem and one that I'm working to resolve since the stress it causes for me, but until then, I'm a tidy freak. I'm running stock again, and an looking into setting up a virtual box for customizing, etc.

This thread is starting to become a welcome thread vs. a help one, so feel free, moderators, to get all OCD on me and move it to the appropriate forum if need be smile

I'm trying to ignore my computer right now due to the sheer amount of changes to make and being held up by one file. I guess my situation is hard to understand, but basically, in terms of body work on a restored car... you can have the cleanest paint job out there, but if there's Bondo under the primer, I'll know it's there and that's what matters to me. You can paint a turd gold, but in the end, it's still a turd. The turd being Windows, of course. I switched to Linux because it was customizable, making that dream of a perfect OS reachable... I really don't want to have to start from scratch in building it, too... which is why I love #!. It's the perfect OS for the job. I really am not bashing on #! either, I would like to just take it a step further and personalize it... IDK how to explain it tongue

Offline

#16 2012-02-24 21:49:15

cJones
#! Junkie
From: Oregon
Registered: 2012-02-21
Posts: 447

Re: New #! Install - Conky and Tint2 Code Optimization

So I understand the OCD thing...although I am not medically diagnosed as having obsessive compulsive disorder, I always try to keep everything as clean as possible (maybe not to your extreme but still, just saying). As for the conky thing, I feel that having some of those useless lines help with organizing and actually make it cleaner then just lines of text as you can easily edit it in the future.
So, and Im not a conky pro (only been using for about two weeks) so this may not be as minimal as possible but, if you want to clean it up to a literal minimalness (as some others have said), just get rid of anything that has a #


d(o_O)b

Offline

#17 2012-02-24 21:58:47

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

Re: New #! Install - Conky and Tint2 Code Optimization

comments in conkyrc are fine, above TEXT they are helpful but below TEXT, even though you dont see them conky counts the line the comment is on, making you need a negative voffset to close the gap

every conky command uses cpu cycles

what i mean about useless commands is this line for example

${goto 92}Core 1: ${font Ubuntu:style=Bold:size=9}${color1}${cpu cpu1}%${font}${color} ${alignr 15}

that last ${alignr} affects the text or command that comes AFTER the alignr, so isnt doing anything
the conky will still work but...

i am very particular about having as little fluff as possible in my conkyrc's and scripts
not for OCD reasons but because well written code is efficient code

unfortunately i dont want to go re-writing other peoples conkies (ok i did it one time but that was a special case)

you have to know a bit about conky to know what to keep and remove and there are plenty of conky resources available through the forums here

Last edited by mrpeachy (2012-02-24 22:01:10)

Offline

#18 2012-02-24 22:12:12

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

Sure thing. I'm working towards it, and going with the default Conky config with excess lines commented out and filling in the blanks with the config I currently have for the same looking Conky but more efficient code, hopefully I don't screw up too much because when I tweak these files, it's just trial and error for the most part. I'm all about learning and when I asked the question, I had just spent 24 hours getting a WN111v2 to work when all I needed was an Atheros driver xD

At that time, I was pretty much ready to accept a spoon fed code, not learning anything.
This way, I can learn it and always redo it if need be by myself. The whole, "Teach a man to fish" thing.

Google, here I come.

I'm trying to find a template, for lack of better word.

Last edited by SchpamGram (2012-02-24 22:33:12)

Offline

#19 2012-02-24 23:50:31

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

Re: New #! Install - Conky and Tint2 Code Optimization

actually once you get part the first few lines it inst as bad as i thought
the rest has no problems

Offline

#20 2012-02-25 04:10:04

SchpamGram
Member
Registered: 2012-02-24
Posts: 12

Re: New #! Install - Conky and Tint2 Code Optimization

I love CRUNCHBANG! Haha, the more I use it, the more I learn it, the more I love it. big_smile

I finished Tint2rc, now onto Conky and soforth.

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.

Debian Logo