You are not logged in.
Pages: 1
Hi. I would like to have available information about the phase of moon as shown on these sites. https://www.die.net/moon/ or https://www.moongiant.com/phase/today/
There is my code, just want add information about moon.
Thank you.
ackground yes
font Zekton:size=7
xftfont Zekton:size=7
use_xft yes
xftalpha 0.1
update_interval 1.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
minimum_size 220 5
maximum_width 220
default_color d7d7d7
default_shade_color white
default_outline_color black
alignment top_right
gap_x 2
gap_y 10
no_buffers yes
cpu_avg_samples 2
override_utf8_locale no
uppercase no # set to yes if you want all text to be in uppercase
use_spacer no
TEXT
${font Zekton:style=Bold:pixelsize=20}${alignc}${time %H:%M:%S}${font Zekton:size=8}${color violet}
${font Zekton:style=Bold:pixelsize=10}${alignc}${time %A - %D}${font Zekton:size=8}
SYSTEM ${hr 1 }${color white}
Hostname: $alignr$nodename ${color white}
Kernel: $alignr$kernel
Uptime: $alignr$uptime
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg
CPU ${alignc} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu1}%)
${cpubar 4 cpu1}
${cpugraph}
RAM ${alignr}$mem / $memmax ($memperc%)
${membar 4}
SWAP ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}
Highest CPU $alignr CPU% MEM%
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}
Highest MEM $alignr CPU% MEM%
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}
NETWORK ${hr 1}${color red}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}Last edited by mouni (2018-06-02 18:43:44)
"See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." - Linus Torvalds
Offline
A web search for conky moonphase shows for example this: https://forums.bunsenlabs.org/viewtopic.php?id=189
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
curl -sA "Mozilla/5.0" "https://www.die.net/moon/" | awk -F'[<>]' '/colspan=2/ {print $5; exit}'Moving to NC...
And please edit your thread title to one that actually describes your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post
Offline
curl -sA "Mozilla/5.0" "https://www.die.net/moon/" | awk -F'[<>]' '/colspan=2/ {print $5; exit}'
Hi, this code dont work.
"See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." - Linus Torvalds
Offline
It's fine here...
slithery@red:~$ curl -sA "Mozilla/5.0" "https://www.die.net/moon/" | awk -F'[<>]' '/colspan=2/ {print $5; exit}'
Full Moon Offline
His code worked fine for me too. But it would seem the following instruction failed to have any effect:
And please edit your thread title to one that actually describes your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
If you only need the phase of the Moon, you can also call pom ("phase of the moon", in bsd-games).
% pom
The Moon is Waning Gibbous (99% of Full)Offline
Hi, this code dont work.
Please read the CoC, in particular https://bbs.archlinux.org/viewtopic.php?id=57855
Then try again.
Offline
Thank you all. Let me read and learn
"See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." - Linus Torvalds
Offline
curl -sA "Mozilla/5.0" "https://www.die.net/moon/" | awk -F'[<>]' '/colspan=2/ {print $5; exit}'
"Full moon" is everyday now
Last edited by Docbroke (2018-06-02 14:02:06)
Arch is home!
https://github.com/Docbroke
Offline
The current phase string spans 3 columns and the html source includes newlines, iow: parsing webpages sucks. (I'd suggest xml starlet, but that will stumble over the embedded JS code ...)
=> see comment #7
Offline
There is also the navy api which returns a json object with a daily sun and moon data for a chosen location and date, but if the moon phase is all you want, then pom from bsd-games is better.
http://aa.usno.navy.mil/data/docs/api.php#rstt
Last edited by progandy (2018-06-02 14:52:38)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
mouni,
Please do change your post title (as instructed); the current title will be very unhelpful for people searching for solutions to similar problems.
All the best,
-HG
Offline
Pages: 1