Page 1744 of 2317 FirstFirst ... 7441244164416941734174217431744174517461754179418442244 ... LastLast
Results 17,431 to 17,440 of 23163

Thread: Post your .conkyrc files w/ screenshots

  1. #17431
    Join Date
    Oct 2008
    Beans
    90

    Re: Post your .conkyrc files w/ screenshots

    42dorian

    this is the printout of my terminal after i did conky killall
    Code:
    Conky: desktop window (18000a5) is subwindow of root window (15a)
    Conky: window type - normal
    Conky: drawing to created window (0x3000001)
    Conky: drawing to double buffer
    Traceback (most recent call last):
      File "/usr/share/conkyforecast/conkyForecast.py", line 1700, in <module>
        main()
      File "/usr/share/conkyforecast/conkyForecast.py", line 1697, in main
        forecastinfo.writeOutput()
      File "/usr/share/conkyforecast/conkyForecast.py", line 1473, in writeOutput
        output = self.getDatasetOutput(self.options.location, self.options.datatype, self.options.startday, self.options.endday, self.options.night, self.options.shortweekday, self.options.imperial, self.options.beaufort, self.options.metrespersecond, self.options.hideunits, self.options.hidedegreesymbol, self.options.spaces, self.options.minuteshide, self.options.centeredwidth)
      File "/usr/share/conkyforecast/conkyForecast.py", line 1309, in getDatasetOutput
        output += self.getDatatypeFromSet(location, datatype, self.forecast_data[location].day[daynumber], shortweekday, imperial, beaufort, metrespersecond, tempunit, speedunit, distanceunit, pressureunit, minuteshide, centeredwidth)
    IndexError: list index out of range
    Traceback (most recent call last):
      File "/usr/share/conkyforecast/conkyForecast.py", line 1700, in <module>
        main()
      File "/usr/share/conkyforecast/conkyForecast.py", line 1697, in main
        forecastinfo.writeOutput()
      File "/usr/share/conkyforecast/conkyForecast.py", line 1473, in writeOutput
        output = self.getDatasetOutput(self.options.location, self.options.datatype, self.options.startday, self.options.endday, self.options.night, self.options.shortweekday, self.options.imperial, self.options.beaufort, self.options.metrespersecond, self.options.hideunits, self.options.hidedegreesymbol, self.options.spaces, self.options.minuteshide, self.options.centeredwidth)
      File "/usr/share/conkyforecast/conkyForecast.py", line 1309, in getDatasetOutput
        output += self.getDatatypeFromSet(location, datatype, self.forecast_data[location].day[daynumber], shortweekday, imperial, beaufort, metrespersecond, tempunit, speedunit, distanceunit, pressureunit, minuteshide, centeredwidth)
    IndexError: list index out of range
    yes i do have a fonts folder in my home folder and I ran (fc-cache -f -v) .
    yes i did not check the spelling of the fonts as I copied and pasted all the code. If you can point me in the right direction I should(fingers crossed) be able to figure the rest.


    Rusty

  2. #17432
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by rusty_jones View Post
    hope this helps
    Nope. Can't tell just from an image. Do you have a .fonts folder in your home folder? And do you mind if I go through more than one or two sentences at a time?

    (And, yes, this looks like it's going to be one of the longer troubleshooting sessions. I don't want to hear anyone complain.)

    *EDIT* What form did you put the fonts in the folder? The zip file, or did you open the zip file and decompress everything into the .fonts folder?

  3. #17433
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    It's sudo killall conky. Changing the order causes problems. Conky has no internal switch called killall.

    *EDIT* And copy and paste your entire script into some code tags here so we can see it. Not just a screenshot. They kinda go together.
    Last edited by 42dorian; May 7th, 2011 at 03:44 AM.

  4. #17434
    Join Date
    Oct 2008
    Beans
    90

    Re: Post your .conkyrc files w/ screenshots

    Seems
    Code:
    sudo killall conky
    did the trick. both
    date & Time and Weather are as they should be. The only thing not working is the highlighted date in Date & Time.

  5. #17435
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by VinDSL View Post
    WoW! Thanks!

    That's the way it is, and second nature to me, but it's nice to have something to point to, when ppl give me "that look". LoL!

    I taught myself to hand-count in Base 16 (hex) using one of the techniques mentioned in the article.

    I discovered another cute trick, 3 years ago, during a period of extreme mental stress. I figured out how to switch the brain from right-side to left-side processing.

    I'm right-side dominant. That's what *feels* normal to me.

    When I switch to the left-side, the processing shifts behind my left eye socket, and it's rather uncomfortable. It makes that side of my face red and warm to the touch. But, it comes in handy, when the right-side is overtaxed.

    Think of it like this: right-side more or less uses my whole brain, so it's like a general variable in coding. Left-side thinking is more localized, thus like a local variable.

    General variables are what we normally use in coding, but it isn't without problems, such as memory leaks, and difficulty in garbage collection, and clean-up.

    Localized variables are more controllable, but require extra effort and concentration to implement correctly.

    It's funny when computer science imitates life, isn't it?!?!?
    Not... Really Vin I don't mean to ruin your buzz on this, but the truth is programming in global and local variables was designed around that methodology. It's modeled after human brain functions anyways.

    The first code languages started it. It's not intentional, mind you, but the first languages were based off of the order in which people think about the task at hand. And as time went on, having a coder that could think the way the item had to behave melded more and more with the language mimicking how a coder thought. Years down the line and you're programming your dreams and trying to make your brain run mini-applications. Train your brain any way you wish, my friend. It's not really all that weird. What IS weird is the fact that you are, literally, coding and running Neuro-API's if you will. I do very different things with my mind. But, that's another story, not for a public forum.

  6. #17436
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by rusty_jones View Post
    Seems
    Code:
    sudo killall conky
    did the trick. both
    date & Time and Weather are as they should be. The only thing not working is the highlighted date in Date & Time.
    Excellent. Now. You see VinDSL's latest calendar he showed you? Is that the one you've got now, or are you using an older one?

    The next few questions are going to involve you recognizing more than just that section. Be prepared.

    *EDIT* Okay. My shoulder has had it for the night. I thought I could hold out for ya rusty, but I gotta go. For the best chance at help, copy and paste your entire script, along with a full screenshot into your next post. The other crazies here in the thread can probably pick away at your problems until you've got the hang of it yourself. Sorry man. The pain is just a bit too distracting now.
    Last edited by 42dorian; May 7th, 2011 at 04:07 AM.

  7. #17437
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by VinDSL View Post
    WoW! Thanks!

    That's the way it is, and second nature to me, but it's nice to have something to point to, when ppl give me "that look". LoL!

    I taught myself to hand-count in Base 16 (hex) using one of the techniques mentioned in the article.

    I discovered another cute trick, 3 years ago, during a period of extreme mental stress. I figured out how to switch the brain from right-side to left-side processing.

    I'm right-side dominant. That's what *feels* normal to me.

    When I switch to the left-side, the processing shifts behind my left eye socket, and it's rather uncomfortable. It makes that side of my face red and warm to the touch. But, it comes in handy, when the right-side is overtaxed.

    Think of it like this: right-side more or less uses my whole brain, so it's like a general variable in coding. Left-side thinking is more localized, thus like a local variable.

    General variables are what we normally use in coding, but it isn't without problems, such as memory leaks, and difficulty in garbage collection, and clean-up.

    Localized variables are more controllable, but require extra effort and concentration to implement correctly.

    It's funny when computer science imitates life, isn't it?!?!?
    Ye, I was doing some brain switching the other day when I had a Brain Panic.
    The only way I could get out of it was to punch myself in the face.
    Might come in handy next time your doing some left-side switching.

  8. #17438
    Join Date
    Oct 2008
    Beans
    90

    Re: Post your .conkyrc files w/ screenshots

    Code:
    # set to yes if you want Conky to be forked in the background
        background yes
        use_xft yes
        xftfont HandelGotD:size=9
        xftalpha 0.5
        update_interval 4.0
        total_run_times 0
        own_window yes
        own_window_type normal
        own_window_transparent yes
        own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
        double_buffer yes
        minimum_size 200 5
        maximum_width 250
        draw_shades no
        draw_outline no
        draw_borders no
        draw_graph_borders yes
       
        default_color grey
        default_shade_color red
        default_outline_color grey
        alignment top_right
        gap_x 25
        gap_y 48
        no_buffers yes
        uppercase no
        cpu_avg_samples 2
        override_utf8_locale yes
    
        TEXT
            
        SYSTEM ${hr 2}
        $sysname $kernel on $machine
        Hostname $alignr $nodename
        Uptime $alignr $uptime
        Intel(R) Core(TM) i7cpu		  	920 @ 2.67GHz
        
        CPU $alignr ${cpu cpu0}%
        ${cpugraph cpu0}
    
        MEM $alignc $mem / $memmax $alignr $memperc%
        ${memgraph ff0000 77a44a}
        
        SWAP $alignc $swap / $swapmax $alignr $swapperc%
        ${swapbar}
    
        ROOT $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_free_perc /}%
        ${fs_bar /}
        
        PROCESSES ${hr 2}
        $processes processes ($running_processes running)
        
        NAME $alignr PID    CPU  MEM
        ${top name 1} $alignr ${top pid 1} ${top cpu 1} ${top mem 1}
        ${top name 2} $alignr ${top pid 2} ${top cpu 2} ${top mem 2}
        ${top name 3} $alignr ${top pid 3} ${top cpu 3} ${top mem 3}
        ${top name 4} $alignr ${top pid 4} ${top cpu 4} ${top mem 4}
        
        DATE & TIME  ${hr 2}
    
        ${voffset 1}${font WenQuanYiMicroHei:bold:size=8.75}${color4}${voffset 10}${font LiberationMono:size=8}${color3}${alignc 60}${time %A}${font}
    	${voffset -3}${if_match ${time %e}<=9}${font LiberationMono:size=22}${color4}${alignc 70}${time %e}${font}${else}${if_match ${time %e}>=10}${font LiberationMono:size=22}${color4}${alignc 60}${time %e}${font}${endif}${endif}
    	${voffset -1}${font LiberationMono:size=8}${color3}${alignc 60}${time %B}${font}${voffset -3}${font LiberationMono:size=8}${color3}${alignc 60}${time %Y}${font}
    ${voffset -82}${font LiberationMono:size=8}${color3}${execpi 1800 VinDSL_Cal_4= cal | sed '1d' | sed s/^/"\$\{offset 107"\}/ | sed '/^ *$/d' | sed 's/\<'"$(date +%-d)"'\>/${color4}&${color3}/'}${font}
    ${voffset -90}${font CutOutsFor3DFX:size=64}${color8}${alignc 99}2${font}
     
    ${alignc}${font Arial Black:size:24}${time %I:%M:%S %p}${font}   
        
        WEATHER ${hr 2}
        
    	${voffset -10}${alignr 66}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=USPA0311 --datatype=WF}${font}
    	${voffset -70}${font Weather:size=40}${font}  ${voffset -18}${font Arial Black:size=26}${execi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial}${font}
    
    	${alignc 63}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --imperial --startday=1 --shortweekday}${alignc 28}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --imperial --startday=2 --shortweekday}${alignc -7}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=3 --shortweekday}${alignc -42}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=4 --shortweekday}${alignc -77}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=5 --shortweekday}${alignc -77}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=5 --shortweekday}
    ${alignc 95}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=USPA0311 --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
    ${font DejaVu Sans:size=7}${alignc 38}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=1 --hideunits --centeredwidth=3} ${alignc 12}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=2 --hideunits --centeredwidth=3} ${alignc -17}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=3 --hideunits --centeredwidth=3} ${alignc -46}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=4 --hideunits --centeredwidth=3}${font}
    ${voffset 4}Location:${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=CN}
    Last Updated: ${alignr} ${execi 600 conkyForecast --location=USPA0311 --hideunits --datatype=LU -m 0 }
    Feels Like:${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial}
    Dew Point: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=DP --imperial}
    Current Condition:${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=CC}
    Chance of Precip: ${alignr}${execi 600 conkyForecast  --location=USPA0311 --startday=0 --datatype=PC}
    Humidity: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=HM}
    Wind: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=WS --imperial} - ${execi 600 conkyForecast --location=USPA0311 --datatype=WD}
    Pressure: ${alignr}${execi 600 conkyForecast --location=USPA0311 --hideunits --datatype=BR}
    Visibility: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=VI --imperial}
    Sunrise: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=SR}
    Sunset: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=SS}
    Moon Phase:${alignr 8}${execi 600 conkyForecast --location=USPA0311 --datatype=MP} ${font MoonPhases:size=8}${execi 600 conkyForecast --location=USPA0311 --datatype=MF}${font}
    ${hr 2}
        
    
        NETWORK ${hr 2}
        
        ${alignc}  eth0 ${addr eth0}
        ${if_up wlan0}
        ${font Ariel:size=14}${font}${goto 32}${voffset -8}SSID: ${wireless_essid wlan0}
        ${goto 32}Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0} 
        
        INBOUND $alignr ${downspeed eth0} kb/s 
        ${downspeedgraph eth0 ff0000 77a44a} 
        OUTBOUND $alignr ${upspeed eth0} kb/s
        ${upspeedgraph eth0  000099 77a44a}
    under Date & Time the date is supposed to be highlighted just like VinDSL script. I haven't been able to figure it out. Can anyone help?

    Rusty
    Attached Images Attached Images

  9. #17439
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    15,737
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by rusty_jones View Post
    Code:
    # set to yes if you want Conky to be forked in the background
        background yes
        use_xft yes
        xftfont HandelGotD:size=9
        xftalpha 0.5
        update_interval 4.0
        total_run_times 0
        own_window yes
        own_window_type normal
        own_window_transparent yes
        own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
        double_buffer yes
        minimum_size 200 5
        maximum_width 250
        draw_shades no
        draw_outline no
        draw_borders no
        draw_graph_borders yes
       
        default_color grey
        default_shade_color red
        default_outline_color grey
        alignment top_right
        gap_x 25
        gap_y 48
        no_buffers yes
        uppercase no
        cpu_avg_samples 2
        override_utf8_locale yes
    
        TEXT
            
        SYSTEM ${hr 2}
        $sysname $kernel on $machine
        Hostname $alignr $nodename
        Uptime $alignr $uptime
        Intel(R) Core(TM) i7cpu		  	920 @ 2.67GHz
        
        CPU $alignr ${cpu cpu0}%
        ${cpugraph cpu0}
    
        MEM $alignc $mem / $memmax $alignr $memperc%
        ${memgraph ff0000 77a44a}
        
        SWAP $alignc $swap / $swapmax $alignr $swapperc%
        ${swapbar}
    
        ROOT $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_free_perc /}%
        ${fs_bar /}
        
        PROCESSES ${hr 2}
        $processes processes ($running_processes running)
        
        NAME $alignr PID    CPU  MEM
        ${top name 1} $alignr ${top pid 1} ${top cpu 1} ${top mem 1}
        ${top name 2} $alignr ${top pid 2} ${top cpu 2} ${top mem 2}
        ${top name 3} $alignr ${top pid 3} ${top cpu 3} ${top mem 3}
        ${top name 4} $alignr ${top pid 4} ${top cpu 4} ${top mem 4}
        
        DATE & TIME  ${hr 2}
    
        ${voffset 1}${font WenQuanYiMicroHei:bold:size=8.75}${color4}${voffset 10}${font LiberationMono:size=8}${color3}${alignc 60}${time %A}${font}
    	${voffset -3}${if_match ${time %e}<=9}${font LiberationMono:size=22}${color4}${alignc 70}${time %e}${font}${else}${if_match ${time %e}>=10}${font LiberationMono:size=22}${color4}${alignc 60}${time %e}${font}${endif}${endif}
    	${voffset -1}${font LiberationMono:size=8}${color3}${alignc 60}${time %B}${font}${voffset -3}${font LiberationMono:size=8}${color3}${alignc 60}${time %Y}${font}
    ${voffset -82}${font LiberationMono:size=8}${color3}${execpi 1800 VinDSL_Cal_4= cal | sed '1d' | sed s/^/"\$\{offset 107"\}/ | sed '/^ *$/d' | sed 's/\<'"$(date +%-d)"'\>/${color4}&${color3}/'}${font}
    ${voffset -90}${font CutOutsFor3DFX:size=64}${color8}${alignc 99}2${font}
     
    ${alignc}${font Arial Black:size:24}${time %I:%M:%S %p}${font}   
        
        WEATHER ${hr 2}
        
    	${voffset -10}${alignr 66}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=USPA0311 --datatype=WF}${font}
    	${voffset -70}${font Weather:size=40}${font}  ${voffset -18}${font Arial Black:size=26}${execi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial}${font}
    
    	${alignc 63}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --imperial --startday=1 --shortweekday}${alignc 28}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --imperial --startday=2 --shortweekday}${alignc -7}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=3 --shortweekday}${alignc -42}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=4 --shortweekday}${alignc -77}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=5 --shortweekday}${alignc -77}${execpi 600 conkyForecast --location=USPA0311 --datatype=DW --startday=5 --shortweekday}
    ${alignc 95}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=USPA0311 --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
    ${font DejaVu Sans:size=7}${alignc 38}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=1 --hideunits --centeredwidth=3} ${alignc 12}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=2 --hideunits --centeredwidth=3} ${alignc -17}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=3 --hideunits --centeredwidth=3} ${alignc -46}${execpi 600 conkyForecast --location=USPA0311 --datatype=HT --imperial --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial --startday=4 --hideunits --centeredwidth=3}${font}
    ${voffset 4}Location:${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=CN}
    Last Updated: ${alignr} ${execi 600 conkyForecast --location=USPA0311 --hideunits --datatype=LU -m 0 }
    Feels Like:${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=LT --imperial}
    Dew Point: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=DP --imperial}
    Current Condition:${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=CC}
    Chance of Precip: ${alignr}${execi 600 conkyForecast  --location=USPA0311 --startday=0 --datatype=PC}
    Humidity: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=HM}
    Wind: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=WS --imperial} - ${execi 600 conkyForecast --location=USPA0311 --datatype=WD}
    Pressure: ${alignr}${execi 600 conkyForecast --location=USPA0311 --hideunits --datatype=BR}
    Visibility: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=VI --imperial}
    Sunrise: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=SR}
    Sunset: ${alignr}${execi 600 conkyForecast --location=USPA0311 --datatype=SS}
    Moon Phase:${alignr 8}${execi 600 conkyForecast --location=USPA0311 --datatype=MP} ${font MoonPhases:size=8}${execi 600 conkyForecast --location=USPA0311 --datatype=MF}${font}
    ${hr 2}
        
    
        NETWORK ${hr 2}
        
        ${alignc}  eth0 ${addr eth0}
        ${if_up wlan0}
        ${font Ariel:size=14}${font}${goto 32}${voffset -8}SSID: ${wireless_essid wlan0}
        ${goto 32}Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0} 
        
        INBOUND $alignr ${downspeed eth0} kb/s 
        ${downspeedgraph eth0 ff0000 77a44a} 
        OUTBOUND $alignr ${upspeed eth0} kb/s
        ${upspeedgraph eth0  000099 77a44a}
    under Date & Time the date is supposed to be highlighted just like VinDSL script. I haven't been able to figure it out. Can anyone help?

    Rusty
    Hi, can you tell me where to find the script and screen shot please that you are using, I installed it on my computer to see if I can fix your problem, but I would like to see how it is suppose to look. Thanks.
    Last edited by Wild Man; May 7th, 2011 at 05:36 AM. Reason: To add text

  10. #17440
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    a little something ive been working on



    Code:
    --[[conky windows list indicator by mrpeachy 05/11
    call in conkyrc in a similar manner to this
    lua_load /home/mcdowall/lua/open.lua
    lua_draw_hook_pre draw_fig
    
    in the above i have this file savd as open.lua in the file indicated
    draw_fig is the name of the main function that does all the stuff you see
    
    you need these programs installed on your puter
    xprop and wmctrl, they should be both available in repositories
    ]]
    require 'cairo'
    function string:split(delimiter)
    local result = { }
    local from  = 1
    local delim_from, delim_to = string.find( self, delimiter, from  )
    while delim_from do
    table.insert( result, string.sub( self, from , delim_from-1 ) )
    from  = delim_to + 1
    delim_from, delim_to = string.find( self, delimiter, from  )
    end
    table.insert( result, string.sub( self, from  ) )
    return result
    end
    --------------------------------------------------------------------------------
    function conky_draw_fig()
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    --#########################################################################################################
    --#########################################################################################################
    --settings
    --window list area size
    height=20
    width=400
    --coordinates of top left corner
    tlx=100.5
    tlr=100.5
    
    --ACTIVE WINDOW
    --fill color
    --red,green,blue,alpha
    ar,ag,ab,aa=0.5,0.5,0.5,1
    --line color
    alr,alg,alb,ala=0,0,0,1
    --text color
    atr,atg,atb,ata=1,1,1,1
    
    --INACTIVE WINDOWS
    --fill color for inactive windows
    ir,ig,ib,ia=1,1,1,1
    --line color for inactive windows
    ilr,ilg,ilb,ila=0,0,0,1
    --text color for inactive windows
    itr,itg,itb,ita=0,0,0,1
    
    --BOX AND TEXT
    --gap from text to right of box
    rmargin=15
    --gap from left side of box to start of text
    lmargin=4
    --set line width
    lw=1
    --text vertical centering
    tvc=5
    --text font
    font="Sans"
    --font size
    fsize=10
    
    --ORIENTATION
    --horizontal set 1, vertical set 2
    orientation=1
    
    --------------------------------------
    --get active window id
    local f = io.popen("xprop -root | grep '_NET_ACTIVE_WINDOW(WINDOW)' | awk -F'# ' '{print $2}' | sed -e 's/^[ \t]*//' -e 's/x/x0/g'")
    active= f:read("*a")
    f:close()
    --get current open windows
    local f = io.popen("wmctrl -l | grep -v ' -1 ' | sed -e 's/^[ \t]*//' -e 's/  0 mcdowall-desktop /@@@/g'")-- | awk '{print $1}'")-- | awk -F'desktop ' '{print $2}'")
    data1= f:read("*a")
    f:close()
    data=string.gsub (data1,"\n","@@@")
    data=string.split(data,'@@@')
    lines=#data
    --check for active window
    for i=1,lines,2 do
        if tonumber(data[i])==tonumber(active)
        then
        entry=i
        end
    end
    box=width/((lines-1)/2)
    cairo_set_line_width (cr,lw)
    for i=2,(lines-1),2 do
        if i==entry+1 then cairo_set_source_rgba (cr,ar,ag,ab,aa) else cairo_set_source_rgba (cr,ir,ig,ib,ia) end
        if orientation==1 then
        cairo_rectangle (cr,tlx+(box*((i-2)/2)),tlr,box-(lw),height)
        cairo_fill (cr)
        elseif orientation==2 then
        cairo_rectangle (cr,tlx,tlr+(height*((i-2)/2)),width,height-lw)
        cairo_fill (cr)
        end
        if i==entry+1 then cairo_set_source_rgba (cr,alr,alg,alb,ala) else cairo_set_source_rgba (cr,ilr,ilg,ilb,ila) end
        if orientation==1 then
        cairo_rectangle (cr,tlx+(box*((i-2)/2)),tlr,box-(lw),height)
        cairo_stroke (cr)
        elseif orientation==2 then
        cairo_rectangle (cr,tlx,tlr+(height*((i-2)/2)),width,height-lw)
        cairo_stroke (cr)
        end
    end
    --text
    if orientation==1 then
    wrap=box-rmargin-lmargin-lw
    elseif orientation==2 then
    wrap=width-rmargin-lmargin-lw
    end
    for i=2,(lines-1),2 do
        cairo_select_font_face(cr,font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
        cairo_set_font_size(cr, fsize)
        text=data[i]
        extents=cairo_text_extents_t:create()
        textoriginal=text
        cairo_text_extents(cr,text,extents)
        space=extents.width
        text=string.gsub(text,".", "%1|")
        ttab=string.split(text,"|")
        tsize=#ttab
        linetab={}
        if tonumber(wrap)<tonumber(space) then
            length=0
            n=0
            for i=1,tsize do
                l=i
                while length<tonumber(wrap) do
                    if ttab[n]==nil then ttab[n]="" end
                    text=table.concat(ttab,"",1,n)
                    cairo_text_extents(cr,text,extents)
                    length=tonumber(extents.width)
                    n=n+1
                end--while
            end--for i=1,tsize
        else
        text=textoriginal
        end--if wrap<space
    if i==entry+1 then cairo_set_source_rgba (cr,atr,atg,atb,ata) else cairo_set_source_rgba (cr,itr,itg,itb,ita) end
    if orientation==1 then
    cairo_move_to (cr,tlx+(box*((i-2)/2))+lmargin,tlr+height-tvc)
    cairo_show_text (cr,text)
    cairo_stroke (cr)
    elseif orientation==2 then
    cairo_move_to (cr,tlx+lmargin,tlr+(height*((i-2)/2))+height-tvc)
    cairo_show_text (cr,text)
    cairo_stroke (cr)
    end
    end--for i=
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    end-- end main function
    ------------------------------------------------------------------------------------------------------------
    It shows all the open windows on your desktop and indicates which one is active
    you can have it horizontal or vertical

    set the size of the panel then the script divides the space up between your windows and formats the window description to fit into the space

Page 1744 of 2317 FirstFirst ... 7441244164416941734174217431744174517461754179418442244 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •