Page 1577 of 2348 FirstFirst ... 5771077147715271567157515761577157815791587162716772077 ... LastLast
Results 15,761 to 15,770 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #15761
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by lcovel View Post
    I think I posted what you were asking this time around, wasn't sure so I added all of them, lol.
    OK, but I asked for the image as well:
    Code:
    /home/lansing/.Conky/pix/fantasy-4.png
    You showed the code...
    You showed a screenshot

    You are using the image: fantasy-4.png but you didn't show it.

  2. #15762
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by foutes View Post
    Showing just how much I know about this with this question

    Do these lines of code both go in the lua? does 1 go in template and 1 in lua?

    I will not be offended if you talk to me like I am an idiot because when it comes to code I am an idiot
    They're both lines from a lua script. You're not an idiot! There was a point when I was working with mrpeachy on getting a lua script working in my conky and I confused the two. Sometimes it happens!

  3. #15763
    Join Date
    Jul 2010
    Location
    Ubuntu Land
    Beans
    53
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    darn...

    ok, just did a test, seems co-opting the already existing if to check that updates >3 should work

    revert to the origoinal script and change this line:
    Code:
    if tonumber(conky_parse('${updates}'))>3 then
    with
    Code:
    running=tonumber(conky_parse('${if_running rhythmbox}1${else}0${endif}'))
    if tonumber(conky_parse('${updates}'))>3 and running==1 then
    Thank you sir,that did the trick.

    Played with x= and y= and cover size in template to get things looking a little better.
    Attached Images Attached Images
    Last edited by foutes; January 7th, 2011 at 02:24 AM. Reason: add screen shots
    Eee Pc 1215N notebook-12in Screen-Ubnutu 12.10
    Dual core 1.8 Atom
    2 gig DDR3
    Nvidia Ion(Yes it works,even have HDMI out working)

  4. #15764
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    seems my reply was well too late

    glad its working!

  5. #15765
    Join Date
    Jul 2008
    Beans
    70

    Re: Post your .conkyrc files w/ screenshots

    Hey everyone. Bit of a strange request for all the gurus. I'm using conky to randomly change my wallpaper, but is it possible for conky to display (a): the name of wallpaper and (b): the top 3 used wallpapers used. Kind of like the top 3 processes running you see in most conkys

    either in number of times displayed or % format would be great. i think it would be something along lines of grep, but i'm not really sure. would something like this be hard to do?

    EDIT : i can post script i have for changing wallpaper if needed
    Linux...The mistress we all left Windows for

  6. #15766
    Join Date
    May 2008
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by merlin_ie View Post
    Hey everyone. Bit of a strange request for all the gurus. I'm using conky to randomly change my wallpaper, but is it possible for conky to display (a): the name of wallpaper and (b): the top 3 used wallpapers used. Kind of like the top 3 processes running you see in most conkys

    either in number of times displayed or % format would be great. i think it would be something along lines of grep, but i'm not really sure. would something like this be hard to do?

    EDIT : i can post script i have for changing wallpaper if needed
    Yes, post the script you use to change wallpaper. It probably wouldn't take much to adjust it to show the name of the wallpaper.

  7. #15767
    Join Date
    Jul 2008
    Beans
    70

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mobilediesel View Post
    Yes, post the script you use to change wallpaper. It probably wouldn't take much to adjust it to show the name of the wallpaper.
    Code:
    #!/bin/bash
    # Random wallpaper setter
    #-------------------------------------------------------------------------------------
    # Configuration
    
    # Wallpaper directory
    wpDir="/usr/share/backgrounds"
    
    # Wallpaper list path
    wpList=$HOME/.wallpaper-list
    
    # Scale images that have a lower resolution than that of the screen (yes or no)
    scaleLowerRes="yes"
    #scaleLowerRes="no"
    
    # Screen resolution
    resWidth=1024
    resHeight=768
    
    # Command for tiling the wallpaper
    cmdTile="feh --bg-tile"
    #cmdTile="nitrogen --set-tiled --save"
    
    # Command for scaling the wallpaper
    cmdScale="feh --bg-scale"
    #cmdScale="nitrogen --set-scaled --save"
    
    # Command for centering the wallpaper
    cmdCenter="feh --bg-center"
    #cmdCenter="nitrogen --set-centered --save"
    
    # End of configuration
    #-------------------------------------------------------------------------------------
    
    setTiled ()
    {
    `$cmdTile "$1"`
    if [ "$?" = "0" ]; then
    echo "Wallpaper tiled."
    else
    echo "Wallpaper not set!"
    exit 1
    fi
    }
    
    setScaled ()
    {
    `$cmdScale "$1"`
    if [ "$?" = "0" ]; then
    echo " "
    else
    echo ":-O"
    exit 1
    fi
    }
    
    setCentered ()
    {
    `$cmdCenter "$1"`
    if [ "$?" = "0" ]; then
    echo " "
    else
    echo ":-O"
    exit 1
    fi
    }
    
    createList ()
    {
    # Go to the wallpaper directory
    cd "$wpDir"
    
    # Load the list of pictures to a variable
    wpDirList=`(find . -regex ".*\([jJ][pP][gG]\|[jJ][pP][eE][gG]\|[gG][iI][fF]\|[pP][nN][gG]\)$"  -type f)`
    
    # Save the list to disk
    if [[ ( -w "$wpList" ) ]]; then
    echo -n "$wpDirList" > "$wpList"
    echo " "
    else
    echo ":-O"
    exit 1
    fi
    }
    
    getImage ()
    {
    # Count number of pictures in the wallpaper list by counting number of lines.
    # Check if the wallpaper list exists, is not empty and we have read persmission on it
    if [[ ( -s "$wpList" && -f "$wpList" ) && -r "$wpList" ]]
        then
        wpListNumber=$(wc -l < "$wpList")
        else
        echo ":-O";
        exit 1
    fi
    
    # Counter for bad entries in wallpaper list
    badMax=100
    
    while true; do
    # Find a random line number in the wallpaper list
    # Random number from 1..n.                               
    #r=$((RANDOM % $wpListNumber + 1))
    r=$(echo $RANDOM%"$wpListNumber"+1 | bc)
    
    # Print what the line number is
    # Print the r'th line.
    imgPath=`sed -n "$r{p;q;}" "$wpList"`
    # #./ crops that substring but it doesn't matter if it left there
    wpPath="${wpDir}${imgPath#./}"
    
    # Check if the chosen file exists
    if [ -f "$wpPath" ]; then
        break
    else
        echo -e ":-O"
        badMax=$(( $badMax - 1 ))
        if [ "$badMax" == "0" ]; then
        echo ":-O"
        exit 1
        fi
    continue
    fi
    done
    
    # Calculate size and aspect for chosen image and print out information
    imgHeight=$(identify -format "%h" "$wpPath")
    imgWidth=$(identify -format "%w" "$wpPath")
    imgAspect=$(echo "scale=1; "$imgWidth"/"$imgHeight"" | bc)
    echo -e " "
    echo -e " "
    echo -e " "
    }
    
    setWallpaper ()
    {
    # Calculate resolution aspect ratio
    resAspect=$(echo "scale=1; "$resWidth"/"$resHeight"" | bc)
    
    # If the image is smaller than the resolution and is not a tile then scale it, otherwise look at aspect
    if [[ ("$scaleLowerRes" == "yes") && ( "$imgAspect" != "1.0" && ("$imgWidth" -lt "$resWidth" || "$imgHeight" -lt "$resHeight") ) ]]
    then
    setScaled "$wpPath"
    else
    case $imgAspect in
    1.0)
    setTiled "$wpPath"
    ;;   
    1.5 | 1.6 | 1.7 | 1.8)
    if [[ "$resAspect" < "1.5" ]]; then
    setCentered "$wpPath"
    else
    setScaled "$wpPath"
    fi
    ;;
    *)
    if [[ "$resAspect" < "1.5" ]]; then
    setScaled "$wpPath"
    else
    setCentered "$wpPath"
    fi
    ;;
    esac
    fi
    }
    
    checkConfig ()
    {
    # Initial errors
    errorsPresent="no"
    # Check if all variables are set
    if [[ !( ( -n "$wpDir" ) && ( -n "$wpList" ) && ( -n "$resWidth" ) && ( -n "$resHeight" ) && ( -n "$scaleLowerRes" ) && ( -n "$cmdTile" ) && ( -n "$cmdScale" ) && ( -n "$cmdCenter" ) ) ]]
    then
    echo -e ":-O"
    exit 1
    fi
    
    # Check if there is a trailing backslash in the wallpaper directory
    spDir=`echo -n "$wpDir" | tail -c -1`
    if [[ !( "$spDir" == "/" ) ]]
    then
    wpDir=""$wpDir"/"
    fi
    
    # Check if there is read permission on wallpaper directory and if it is a directory
    if [[ !( ( -r "$wpDir" ) && ( -d "$wpDir" ) ) ]]
    then
    echo "Can't read wallpaper directory!"
    errorsPresent="yes"
    fi
    
    # Check if the specified wallpaper list is a regular file and not a directory
    touch "$wpList" &> /dev/null
    if [[ ( -d "$wpList" ) ]]
    then
    echo "Specified wallpaper list is a directory, not a file!"
    errorsPresent="yes"
    fi
    
    # Check if variables are set correctly
    if [[ !( "$scaleLowerRes" == "yes" || "$scaleLowerRes"  == "no" ) ]]
    then
    echo "Specified option for scaling the wallpaper is not valid!"
    errorsPresent="yes"
    fi
    
    if $(echo ""$resWidth"" | grep [^0-9] &>/dev/null)
    then
    echo "Specified resolution width is not a number!"
    errorsPresent="yes"
    fi
    
    if $(echo ""$resHeight"" | grep [^0-9] &>/dev/null)
    then
    echo "Specified resolution height is not a number!"
    errorsPresent="yes"
    fi
    
    # Check if any of the tests failed
    if [[ "$errorsPresent" == "yes" ]]
    then
    echo -e "\nOne or more errors found, aborting!"
    exit 1
    fi
    }
    
    printUsage ()
    {
    echo -e "Invalid command line argument(s), usage:\n"
    echo -e "-s  | --set\t\tSet a wallpaper without updating the list"
    echo -e "-u  | --update\tUpdate the list without setting a wallpaper"
    echo -e "-su | --set-update\tUpdate the list and set a wallpaper"
    }
    
    if [ "$#" == "1" ]; then
    case "$1" in
    "-s" | "--set")
    checkConfig
    getImage
    setWallpaper
    exit 0
    ;;
    "-u" | "--update")
    checkConfig
    createList
    exit 0
    ;;
    "-su" | "--set-update")
    checkConfig
    createList
    getImage
    setWallpaper
    exit 0
    ;;
    *)
    printUsage
    exit 1
    ;;
    esac
    else
    printUsage
    exit 1
    fi
    and to run it
    Code:
    ${execi 30 ~/scripts/auto-wall-paper.sh -su}
    i'm usin fluxbox if its any help
    Linux...The mistress we all left Windows for

  8. #15768
    Join Date
    May 2008
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by merlin_ie View Post
    Code:
    ${execi 30 ~/scripts/auto-wall-paper.sh -su}
    i'm usin fluxbox if its any help
    Getting the name of the current wallpaper is easy:
    Code:
    ${execi 30 awk -F'[/\"]' '{print $(NF-1)}' $HOME/.fehbg}
    $HOME/.fehbg is where feh puts the most recent wallpaper it sets. Showing the top 3 wallpapers might take a bit more work. The script will have to see if the wallpaper had been set before and if so, how many times.
    Last edited by mobilediesel; January 8th, 2011 at 11:01 AM. Reason: Made it a bit simpler

  9. #15769
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mobilediesel View Post
    Getting the name of the current wallpaper is easy:
    Code:
    ${execi 30 awk -F'/' '{file=$NF;sub(/"/,"",file);print file}' $HOME/.fehbg}
    $HOME/.fehbg is where feh puts the most recent wallpaper it sets. Showing the top 3 wallpapers might take a bit more work. The script will have to see if the wallpaper had been set before and if so, how many times.
    couldn't you write the name to a text file, then append the file every time the wallpaper changes.

    then grep the text file with each wallpaper file name and find out how many times it is there

    not sure of all the commands to do such... but im sure its do-able

  10. #15770
    Join Date
    May 2008
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    couldn't you write the name to a text file, then append the file every time the wallpaper changes.

    then grep the text file with each wallpaper file name and find out how many times it is there

    not sure of all the commands to do such... but im sure its do-able
    Damn. That sounds simpler than what I was about to try.

    Edit: actually the file storing the wallpaper names would eventually grow quite large. Now back to the slightly more complicated version...

Page 1577 of 2348 FirstFirst ... 5771077147715271567157515761577157815791587162716772077 ... 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
  •