Page 2151 of 2297 FirstFirst ... 1151165120512101214121492150215121522153216122012251 ... LastLast
Results 21,501 to 21,510 of 22966

Thread: Post your .conkyrc files w/ screenshots

  1. #21501
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    I can't get this to work with a variable for the life of me - unless it is "hardcoded" that works just fine



    Can you help?
    I found that when conky is daemonized, (ie forked to the background with background yes),
    the gnome-terminal -e command fails to run.
    Try with background no to see if that works.

    Beyond my understanding why the terminal command doesn't work when daemonized.
    Perhaps arclance can help.
    Last edited by stinkeye; January 21st, 2013 at 05:26 AM.

  2. #21502
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by stinkeye View Post
    I found that when conky is daemonized, (ie forked to the background with background yes),
    the gnome-terminal -e command fails to run.
    Try with background no to see if that works.

    Beyond my understanding why the terminal command doesn't work when daemonized.
    Perhaps arclance can help.
    It is probably forked to some generic "conky" process when using "background yes" so the command cannot distinguish it from other conkys.
    You can use htop or top to see what the actual "full command" conky is running under is when using "background yes" to see if that is the case.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

  3. #21503
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arclance View Post
    It is probably forked to some generic "conky" process when using "background yes" so the command cannot distinguish it from other conkys.
    You can use htop or top to see what the actual "full command" conky is running under is when using "background yes" to see if that is the case.
    Htop gives me the normal start command...
    conky -c /home/glen/conky/configs/demo-conkyrc
    Any config which is daemonized wont start with...
    Code:
    gnome-terminal -e conky -c "/path/to/config"
    I want to run the config in terminal from a script to see errors if any.
    Attached Images Attached Images
    Last edited by stinkeye; January 21st, 2013 at 05:51 AM.

  4. #21504
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by stinkeye View Post
    Htop gives me the normal start command...
    Then it might be ignoring some levels of the kill command.
    You can try adding the "-9" signal type option to the command before the "-f" option
    Code:
    pkill -9 -f ""
    to kill it more forcefully.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

  5. #21505
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arclance View Post
    Then it might be ignoring some levels of the kill command.
    You can try adding the "-9" signal type option to the command before the "-f" option
    Code:
    pkill -9 -f ""
    to kill it more forcefully.
    I can kill a conky with the script whether the conky is daemonized or not.
    It's just the gnome-terminal -e command that won't work.
    See my edit to previous post.
    Thanks.

  6. #21506
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by stinkeye View Post
    I can kill a conky with the script whether the conky is daemonized or not.
    It's just the gnome-terminal -e command that won't work.
    See my edit to previous post.
    Thanks.
    I don't know why it does not work but the "-e" type commands for terminals generally are more temperamental than running the command in a already running terminal.
    The command may need to be formatted differently when run that way.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

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

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arclance View Post
    I don't know why it does not work but the "-e" type commands for terminals generally are more temperamental than running the command in a already running terminal.
    The command may need to be formatted differently when run that way.
    OK, thanks.
    I'll do a bit of googling.

  8. #21508
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Post your .conkyrc files w/ screenshots

    Could't find a solution so I added a sed command to change
    background yes
    to
    background no
    in any pasted in configs.

    Code:
    #!/bin/bash
    
    ## click to start, click to stop
    
    
    if pgrep -f "conky -c /home/glen/conky/configs/demo-conkyrc"
    then
    	pkill -xf "conky -c /home/glen/conky/configs/demo-conkyrc" 
    else
    	sed -i 's/background yes/background no/g' /home/glen/conky/configs/demo-conkyrc &
    	gnome-terminal -e "conky -c /home/glen/conky/configs/demo-conkyrc"
    fi

  9. #21509
    Join Date
    Feb 2010
    Location
    SR11 Cockpit
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arclance View Post
    It is probably forked to some generic "conky" process when using "background yes" so the command cannot distinguish it from other conkys.
    You can use htop or top to see what the actual "full command" conky is running under is when using "background yes" to see if that is the case.
    I never saw this until I fixed it. But it was late and I was off to bed.
    But just to show: htop included

    All my conkys start with "conky -c /path/to/the/conkyrc"

    I played with this a lot yesterday until found my "Oops!", but not before one tweak restarted my session. Now that was an Oops!

    The second last line is the fix it was:
    Code:
    	"conky -c $1"
    here's the working version:

    stinkeye
    Code:
    #!/bin/bash
    ## Original idea by: GrouchyGaijin
    ## This idea by: Stinkeye - Jan 2013
    ## With another tweak by: arclance
    ## Final tweak by: Sector11
    ## click to start, click to stop
    
    ##if pgrep -f "conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc"
    ##then
    ##	pkill -xf "conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc"
    ##else
    ##	gnome-terminal -e "conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc"
    ##fi
    
    ## not running in a terminal
    ## remove: gnome-terminal -e
    
    ## Tweaked
    
    if pgrep -f "conky -c $1"
    then
    	pkill -xf "conky -c $1"
    else
    	conky -c "$1"
    fi
    Terminal output
    Code:
     sector11 @ sector11
     21 Jan 13 | 09:29:06 ~
             $ stinkeye /media/5/Conky/S11_VSIDO_v9.conkyrc
    18708
     sector11 @ sector11
     21 Jan 13 | 09:29:48 ~
             $ stinkeye /media/5/Conky/S11_VSIDO_v9.conkyrc
    Conky: forked to background, pid is 19627
     sector11 @ sector11
     21 Jan 13 | 09:29:50 ~
             $ 
    Conky: desktop window (260) is root window
    Conky: window type - normal
    Conky: drawing to created window (0x1c00001)
    Conky: drawing to double buffer
    gathering data with curl
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 71036  100 71036    0     0  81086      0 --:--:-- --:--:-- --:--:--   99k
    not checking for alerts
    processing complete
    
     sector11 @ sector11
     21 Jan 13 | 09:30:06 ~
             $
    Stopped it and started it

    Thank you GrouchyGaijin, stinkeye & arclance
    Attached Images Attached Images
    Last edited by Sector11; January 21st, 2013 at 03:22 PM.

  10. #21510
    Join Date
    Feb 2010
    Location
    SR11 Cockpit
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Another version.

    If you are developing a conky and
    1. have not started it yet, this will start it.
    2. if it is running, it will kill it and restart it 2 seconds later

    Code:
    #!/bin/bash
    ## Original idea by: GrouchyGaijin
    ## This idea by: Stinkeye - Jan 2013
    ## With another tweak by: arclance
    ## Final tweak by: Sector11
    ## click to start, click to stop & re-start
    
    if pgrep -f "conky -c $1"
    	then
    	pkill -xf "conky -c $1"
    	(sleep 2s && conky -c "$1") &
    	exit
    else
    	conky -c "$1"
    	exit
    fi
    Nice stuff guys!

Page 2151 of 2297 FirstFirst ... 1151165120512101214121492150215121522153216122012251 ... 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
  •