CLI or conky

Forum Forums General Tips and Tricks CLI or conky

Tagged: 

  • This topic has 38 replies, 12 voices, and was last updated Jun 18-12:18 am by Brian Masinick.
Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #74975
    Anonymous

      Inspired by PPC’s world-clock https://www.antixforum.com/forums/topic/cli-world-clock-mini-script/#post-74897
      you can also insert this code into your existing antiX conky. Keep in mind to put your preferred locations into the appropriate time zone.
      See /usr/share/zoneinfo

      ...
      Vancouver ${alignr}${tztime Canada/Pacific %R}
      New York ${alignr}${tztime America/New_York %R}
      London ${alignr}${tztime Europe/London %R}
      Berlin ${alignr}${tztime Europe/Berlin %R}
      Tokyo ${alignr}${tztime Asia/Tokyo %R}
      

      If you prefer a conky with day change (which could also be done with a starter to turn it on and off) above:

      # pkill -xf "conky -c /home/male/TEST/Time_rc" &
      # male 12.12.2019 works
      	background yes
      
      # font settings
      	use_xft yes
      #font monospace:size=9
      	xftfont monofur:size=10
      	uppercase no
      
      	update_interval 1
      
      	total_run_times 0
      
      	own_window yes
      	own_window_type normal
      	own_window_transparent yes
      	own_window_hints skip_taskbar,skip_pager,undecorated
      #own_window_colour 144556 #ffffff
      #own_window_argb_visual yes
      #own_window_argb_value 180
      #own_window_class Conky
      #own_window_title TEST
      
      	minimum_size 1500 0
      #maximum_width 356
      
      # position
      #alignment middle_middle
      	alignment top_left
      	gap_x 135
      	gap_y 50
      
      # colors
      	default_color ffffff
      	default_shade_color 000000
      	default_outline_color 000000
      	color0 ffffff #white
      	color1 144556 #dunkelblue
      	color2 33b0dc #hellblue
      	color3 ff8c00 #dark orange
      	color4 00ffff #cain
      	color5 c0c0c0 #silver
      	color6 808080 #gray
      
      	draw_borders no
      #stippled_borders 8
      	border_inner_margin 4
      	border_width 1
      
      	draw_shades no
      	draw_outline no
      	use_spacer left
      
      	double_buffer yes
      	no_buffers yes
      
      	cpu_avg_samples 2
      	net_avg_samples 2
      #max_specials 1024
      	max_user_text 48552
      
      TEXT
      ${alignc}${font monofur:size=12}${tztime %a %d. %B %Y} «--${color3}|||${color4}--» ${tztime NZ %d. %B %Y}${color}${font}
      ${goto 35}${if_match ${tztime Pacific/Honolulu %d} == ${tztime NZ %d}}${color4}Honolulu ${tztime Pacific/Honolulu %R}${color}${else}Honolulu ${tztime Pacific/Honolulu %R}${endif} \
      | ${if_match ${tztime Canada/Pacific %d} == ${tztime NZ %d}}${color4}Vancouver ${tztime Canada/Pacific %R} ${color}${else}Vancouver ${tztime Canada/Pacific %R}${endif} \
      | ${if_match ${tztime America/New_York %d} == ${tztime NZ %d}}${color4}New York ${tztime America/New_York %R}${color}${else} New York ${tztime America/New_York %R}${endif} \
      | ${if_match ${tztime America/Buenos_Aires %d} == ${tztime NZ %d}}${color4}Buenos Aires ${tztime America/Buenos_Aires %R}${color}${else}Buenos Aires ${tztime America/Buenos_Aires %R}${endif} \
      | ${if_match ${tztime Europe/London %d} == ${tztime NZ %d}}${color4}London ${tztime Europe/London %R}${color}${else}London ${tztime Europe/London %R}${endif} \
      | ${if_match ${tztime Europe/Berlin %d} == ${tztime NZ %d}}${color4}Berlin ${tztime Europe/Berlin %R}${color}${else}Berlin ${tztime Europe/Berlin %R}${endif} \
      | ${if_match ${tztime Europe/Athens %d} == ${tztime NZ %d}}${color4}Kastroria ${tztime Europe/Athens %R}${color}${else}Kastoria ${tztime Europe/Athens %R}${endif} \
      | ${if_match ${tztime Europe/Moscow %d} == ${tztime NZ %d}}${color4}Moscow ${tztime Europe/Moscow %R}${color}${else}Moscow ${tztime Europe/Moscow %R}${endif} \
      | ${if_match ${tztime Asia/Shanghai %d} == ${tztime NZ %d}}${color4}Beijing ${tztime Asia/Shanghai %R}${color}${else}Beijing ${tztime Asia/Shanghai %R}${endif} \
      | ${if_match ${tztime Asia/Tokyo %d} == ${tztime NZ %d}}${color4}Tokyo ${tztime Asia/Tokyo %R}${color}${else}Tokyo ${tztime Asia/Tokyo %R}${endif} \
      | ${if_match ${tztime Australia/Melbourne %d} == ${tztime NZ %d}}${color4}Melbourne ${tztime Australia/Melbourne %R}${color}${else}Melbourne ${tztime Australia/Melbourne %R}${endif} \
      | ${if_match ${tztime Pacific/Auckland %d} == ${tztime NZ %d}}${color4}Auckland ${tztime Pacific/Auckland %R}${color}${else}Auckland ${tztime Pacific/Auckland %R}${endif}
      
      
      #74980
      Member
      sleekmason
        Helpful
        Up
        0
        ::

        Excellent! Thank you for posting!

        #74981
        Member
        blur13
          Helpful
          Up
          0
          ::

          I’m more interested in the weather report you have on the left hand side, how did you accomplish that?

          #75006
          Anonymous
            Helpful
            Up
            0
            ::

            This is a weather conky based on the scripts of @TeoBigusGeekus — https://forums.bunsenlabs.org/viewtopic.php?id=189

            -WUnderground conky script – All users and
            -Moongiant conky script

            The basic idea comes from @Sector11 with the accuweather-script.
            Based on that @unklar realized it with the wunderground-script. I stole everything from both.
            https://forums.bunsenlabs.org/viewtopic.php?pid=99260#p99260
            https://forums.bunsenlabs.org/viewtopic.php?pid=93835#p93835

            If you are interested, download the scripts and read the README file.
            Start small if you have no experience yet! The original syntax is 1.10

            If you have questions, ask.

            #75012
            Forum Admin
            anticapitalista
              Helpful
              Up
              0
              ::

              @male – Funny to see Kastoria in the time widget at the top.

              Philosophers have interpreted the world in many ways; the point is to change it.

              antiX with runit - leaner and meaner.

              #75022
              Member
              blur13
                Helpful
                Up
                0
                ::

                Thank you! I’ll look into those scripts!

                #75024
                Anonymous
                  Helpful
                  Up
                  0
                  ::

                  @male – Funny to see Kastoria in the time widget at the top.

                  I love this country and its people. Yes and, it is the city from Teo. 😉

                  @blur13
                  You are welcome.

                  #75088
                  Member
                  marcelocripe
                    Helpful
                    Up
                    0
                    ::

                    Thanks a lot for the script.

                    #75605
                    Member
                    alanwake82
                      Helpful
                      Up
                      0
                      ::

                      Great work,

                      Thanks for sharing those script ……

                      #75614
                      Anonymous
                        Helpful
                        Up
                        0
                        ::

                        marcelocripe and alanwake82

                        Thanks!
                        You are welcome.

                        #75713
                        Anonymous
                          Helpful
                          Up
                          0
                          ::

                          If you want to display a simple weather in your antiX conky, you should first influence the size of the conky window:
                          Above TEXT would be

                          # Minimum size of text area
                          minimum_size 180 620
                          maximum_width 180

                          180 for the width and 620 for the length

                          Below TEXT this would be at the end

                          Weather
                          ${font DejaVu Sans:size=8} ${texeci 1200 curl 'wttr.in/KSO?q?0T?Q'}${font}

                          or
                          ${font DejaVu Sans:size=8} ${texeci 1200 curl 'wttr.in/KSO?u?q?0T?Q'}${font}

                          curl retrieves the weather of your location here every 20minutes.
                          Used wttr.in from chubin, here with the IATA code of Kastoria airport (GR). The unit of measurement is additionally converted with “?u”.
                          So if you prefer °F instead of °C.

                          OR

                          #75723
                          Member
                          calciumsodium
                            Helpful
                            Up
                            0
                            ::

                            I have not visited the forum for a while, but I noticed these weather suggestions for conky. So I wanted to try them out because they might be useful for me.

                            I was able to get them to work. Thank you.
                            I wanted two weather locations so I added these lines to the .conkyrc file

                            Waukee weather:
                            ${font DejaVu Sans:bold:size=9.82}${texeci 1200 curl 'wttr.in/waukee?u?q?0T?Q'}${font}
                            
                            Green Bay weather:
                            ${font DejaVu Sans:bold:size=9.82}${texeci 1200 curl 'wttr.in/green+bay?u?q?0T?Q'}${font}

                            I was also able to load the weather on startup in roxterm using the links2 program.
                            I added the following line to startup:

                            x-terminal-emulator --geometry 130x80+200+0 -e links2 wttr.in/waukee &

                            People will have to modify the location and also the size of the roxterm window for individual situations.
                            Thanks for these tips.

                            • This reply was modified 1 year, 3 months ago by calciumsodium.
                            #75727
                            Member
                            PPC
                              Helpful
                              Up
                              0
                              ::

                              People will have to modify the location and also the size of the roxterm window for individual situations.

                              Not really. Now you can install the ft10-transformation package. It creates a menu entry, “Weather”, that summons a small terminal window (so it fits most displays) that shows wttr.in, using a better way to get the user’s location, and also localizes its contents to the system’s language.

                              I do love the conky displaying the weather, I had mine showing just text, this is much nicer!

                              P.

                              • This reply was modified 1 year, 3 months ago by PPC.
                              #75738
                              Member
                              blur13
                                Helpful
                                Up
                                0
                                ::

                                Thanks, these are all great tips!

                                I’ve been playing around with wttr.in before, especially with the “one liner”, but I was never able to get the wind speed from km/h to m/s. Where I’m from m/s is standard so thats what I’m used to. Its a simple calculation so maybe some grep-fu and bash script could do it. Or if I just missed where the setting for it is.

                                Anyways, while we’re on weather services, this is a great one:

                                finger yourlocation@graph.no

                                gives you an ASCII graph of the weather, using data from YR.no.

                                finger @graph.no

                                gives you usage instructions.

                                #75752
                                Member
                                PPC
                                  Helpful
                                  Up
                                  0
                                  ::

                                  I was never able to get the wind speed from km/h to m/s.

                                  Hum… I guess my google fu is great (at least my ddg-fu) I searched for less than 5 minutes and found out how to do that:
                                  append “?M” at the end of the the wttr.in address:
                                  ex:
                                  curl wttr.in/london?M

                                  P.

                                  • This reply was modified 1 year, 3 months ago by PPC.
                                Viewing 15 posts - 1 through 15 (of 39 total)
                                • You must be logged in to reply to this topic.