Page 1690 of 2284 FirstFirst ... 6901190159016401680168816891690169116921700174017902190 ... LastLast
Results 16,891 to 16,900 of 22832

Thread: Post your .conkyrc files w/ screenshots

  1. #16891
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    try this
    Code:
    ${if_match ${exec ls /media | grep -c "Ext VID1.5"} == 1}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}Ext VID1.5: ${font DroidSans:size=8.3} ${fs_used /media/Ext VID1.5}/ ${fs_size /media/Ext VID1.5}${alignr}${fs_used_perc /media/Ext VID1.5}%${font}${else}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color dark red}Ext VID1.5: ${font DroidSans:size=6.4}${color red} NOT CONNECTED ${alignr}${fs_used_perc /media/Ext VID1.5}%${font}${endif}
    Or... That works too... I bow to the master on this one with no shame...

    Speaking of which, is there anything special I need to know to add a label to the bandwidth ring? Right now the label is in Conky, and the ring itself is being drawn over it. Can I do something simple to put the entire function together?

  2. #16892
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 42dorian View Post
    Or... That works too... I bow to the master on this one with no shame...

    Speaking of which, is there anything special I need to know to add a label to the bandwidth ring? Right now the label is in Conky, and the ring itself is being drawn over it. Can I do something simple to put the entire function together?
    here is a typical text display chunk from lua
    Code:
    cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 12);
    cairo_set_source_rgba (cr,1,1,1,1)
    cairo_move_to (cr,x,y)
    cairo_show text (cr, "text")
    cairo_stroke (cr)
    RE wifi list
    here is some basic code that gives you the list, based on what djyoug posted earlier
    Code:
    sudo iwlist eth1 scan | egrep 'ESSID|Encryption'
    gives this
    Code:
                        ESSID:"TheWhiteHouse"
                        Encryption key:on
                        ESSID:"Club 154"
                        Encryption key:on
                        ESSID:"Captain"
                        Encryption key:on
                        ESSID:"TRON"
                        Encryption key:on
                        ESSID:"LCC_CORP"
                        Encryption key:on
                        ESSID:"LCC_GUEST"
                        Encryption key:off
                        ESSID:"guest"
                        Encryption key:off
                        ESSID:"Swaggalicious Network"
                        Encryption key:on
                        ESSID:"myqwest2225"
                        Encryption key:on
                        ESSID:"HaydenSquare147"
                        Encryption key:on
                        ESSID:"WNET"
                        Encryption key:on
                        ESSID:"j4"
                        Encryption key:on
    or if you just wanted something to tell you if there were any unencrypted networks
    Code:
    sudo iwlist eth1 scan | grep -c 'Encryption key:off
    this just simply shows a number
    Last edited by mrpeachy; April 1st, 2011 at 06:43 PM.

  3. #16893
    Join Date
    Mar 2011
    Beans
    424
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Post your .conkyrc files w/ screenshots

    # UBUNTU-CONKY
    # A comprehensive conky script, configured for use on
    # Ubuntu / Debian Gnome, without the need for any external scripts.
    #
    # Based on conky-jc and the default .conkyrc.
    # INCLUDES:
    # - tail of /var/log/messages
    # - netstat shows number of connections from your computer and application/PID making it. Kill spyware!
    #
    # -- Pengo
    #

    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes

    # fiddle with window
    use_spacer right

    # Use Xft?
    use_xft yes
    xftfont DejaVu Sans:size=8
    xftalpha 0.8
    text_buffer_size 2048

    # Update interval in seconds
    update_interval 3.0

    # Minimum size of text area
    # minimum_size 250 5

    # Draw shades?
    draw_shades no

    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    uppercase no # set to yes if you want all text to be in uppercase

    # Stippled borders?
    stippled_borders 3

    # border margins
    border_margin 9

    # border width
    border_width 10

    # Default colors and also border colors, grey90 == #e5e5e5
    default_color yellow

    own_window_colour brown
    own_window_transparent yes

    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right

    # Gap between borders of screen and text
    gap_x 10
    gap_y 10

    # stuff after 'TEXT' will be formatted on screen

    TEXT
    $color
    ${color red}SYSTEM ${hr 2}$color
    David Aaron Groves Xubuntu 10.04 (XFCE 4.6.1)

    ${color red}CPU ${hr 2}$color
    ${freq}MHz Load: ${loadavg} Temp: ${acpitemp}
    $cpubar
    ${cpugraph 000000 ffffff}
    NAME PID CPU% MEM%
    ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
    ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
    ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
    ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}

    ${color red}MEMORY / DISK ${hr 2}$color
    RAM: $memperc% ${membar 6}$color
    Swap: $swapperc% ${swapbar 6}$color

    Root: ${fs_free_perc /}% ${fs_bar 6 /}$color
    hda1: ${fs_free_perc /media/sda1}% ${fs_bar 6 /media/sda1}$color

    ${color red}NETWORK (${addr eth0}) ${hr 2}$color
    Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s
    ${downspeedgraph eth0 25,140 000000 ff0000} ${alignr}${upspeedgraph eth0
    25,140 000000 00ff00}$color
    Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0}
    ${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr}
    Attached Images Attached Images

  4. #16894
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Come to think of it, mrpeachy, no. Your compensation for the space in the mounted file system won't work entirely. It will detect a filesystem, but it won't be able to read any of it's variables. Conky still can't see it, only detect it's presence.

  5. #16895
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 42dorian View Post
    Come to think of it, mrpeachy, no. Your compensation for the space in the mounted file system won't work entirely. It will detect a filesystem, but it won't be able to read any of it's variables. Conky still can't see it, only detect it's presence.
    so the problem isnt just with the if's? its with all conky variables not reading spades...
    hmm well everything you could ever want to know about a file system is available through a cli command or written somehwere in a text file...

    you just have to get the info out with a bit of line editing

  6. #16896
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    so the problem isnt just with the if's? its with all conky variables not reading spades...
    hmm well everything you could ever want to know about a file system is available through a cli command or written somehwere in a text file...

    you just have to get the info out with a bit of line editing
    ...That sounds like a giant headache... Another day perhaps, just not today.

  7. #16897
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 42dorian View Post
    ...That sounds like a giant headache... Another day perhaps, just not today.
    not at all
    you just have to learn a few cli commands (and a smidge of line editing )

    for example i have a usb drive called F801-488C

    so in a terminal (so exec in conky)
    Code:
    df | grep "F801-488C" | awk '{print $5}'
    returns the percent used

    just try df (or df -h so that the numbers are more usable) and it will have most of the info re filesystems you need

    the grep finds the line that matches the string you give it
    then the awk, in this case prints the 5th piece of text in the row (awk without modifiers splits the row up using spaces)
    so
    df -h | grep "F801-488C" | awk '{print $2}' = size
    df -h | grep "F801-488C" | awk '{print $3}' = space used
    df -h | grep "F801-488C" | awk '{print $4}' = space available

    or format the whole thing in the awk command
    Code:
    mcdowall@mcdowall-desktop:~/Desktop$ df -h | grep "F801-488C" | awk '{print "Size:"$2 " Used:"$3 " Free:"$4 " ("$5")"}'
    Size:1.9G Used:75M Free:1.8G (4%)
    Last edited by mrpeachy; April 1st, 2011 at 08:32 PM.

  8. #16898
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    not at all
    you just have to learn a few cli commands (and a smidge of line editing )

    for example i have a usb drive called F801-488C

    so in a terminal (so exec in conky)
    Code:
    df | grep "F801-488C" | awk '{print $5}'
    returns the percent used

    just try df (or df -h so that the numbers are more usable) and it will have most of the info re filesystems you need

    the grep finds the line that matches the string you give it
    then the awk, in this case prints the 5th piece of text in the row (awk without modifiers splits the row up using spaces)
    so
    df -h | grep "F801-488C" | awk '{print $2}' = size
    df -h | grep "F801-488C" | awk '{print $3}' = space used
    df -h | grep "F801-488C" | awk '{print $4}' = space available
    ...Indeed.... And we can start using some of the least used exec calls in the entire Conky library. the execbar, execgraph, and execgauge. But, still. Headaches

  9. #16899
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Okay, that works, but now I want to make use of it in the lua ring script and it's giving me nil values. Should I be worried? Is this wrong?

    Code:
    --RING 9 SETUP:Sansa Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_match ${exec df -h | grep -c "SANSA CLIPP"} == 1}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${execi 30 df -h | grep "SANSA CLIPP" | awk '{print $5}' | sed 's/%//'}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=335
    down=710
    --radius of ring-----------------------
    rad=5
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=-180
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=255,192,0,1.0
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=0,0,0,0.0
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina)
    --END RING 9 SETUP---------------copy setup section and paste for additional rings----------
    The rest of that script is the same from ringtest.lua on my last data dump. *EDIT* Cleared up some syntax errors, but still getting nil values.
    Last edited by 42dorian; April 1st, 2011 at 09:18 PM.

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

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 42dorian View Post
    Okay, that works, but now I want to make use of it in the lua ring script and it's giving me nil values. Should I be worried? Is this wrong?

    Code:
    --RING 9 SETUP:Sansa Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_match ${exec df -h | grep -c "SANSA CLIPP"} == 1}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${execi 30 df -h | grep "SANSA CLIPP" | awk '{print $5}' | sed 's/%//'}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=335
    down=710
    --radius of ring-----------------------
    rad=5
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=-180
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=255,192,0,1.0
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=0,0,0,0.0
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina)
    --END RING 9 SETUP---------------copy setup section and paste for additional rings----------
    The rest of that script is the same from ringtest.lua on my last data dump. *EDIT* Cleared up some syntax errors, but still getting nil values.
    what do the errors say?
    one other thing... execi used this way wont work
    try changing that to just exec, and if that works, then its possible to implement a timer in lua

Page 1690 of 2284 FirstFirst ... 6901190159016401680168816891690169116921700174017902190 ... 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
  •