SUNCLOCK(1)
π SUNCLOCK(1) π
General Commands Manual β yes bestie, the whole manual, and it's a long one so buckle up π«Ά
πΈ NAME πΈ
sunclock β a fancy clock for the X Window system π
it gives you local time (both legal time and solar time), sunrise, sunset, and a whole pile of geographical data, all through a point-and-click interface. iykyk β¨
π SYNOPSIS π
sunclock [ options ]
where the list of licit options is the following long list (starting
from (**) the options are configurable at runtime):
[-help] [-listmenu] [-version] [-citycheck] [-display name] [-sharedir
directory] [-citycategories value] [-clock] [-map] [-dock] [-undock]
[-menu] [-nomenu] [-selector] [-noselector] [-zoom] [-nozoom] [-option]
[-nooption] [-urban] [-nourban]
(**) [-language name] [-rcfile file] [-command string] [-helpcommand
string] [-mapmode * <L,C,S,D,E>] [-dateformat string1|string2|...]
[-image file] [-clockimage file] [-mapimage file] [-zoomimage file]
[-clockgeom <geom>] [-mapgeom <geom>] [-auxilgeom <geom>] [-menugeom
<geom>] [-selgeom <geom>] [-zoomgeom <geom>] [-optiongeom <geom>]
[-urbangeom <geom>] [-title name] [-clockclassname name] [-mapclassname
name] [-auxilclassname name] [-classname name] [-setfont
<field>|<fontsetting>{|<languages>}] [-verbose] [-silent] [-synchro]
[-nosynchro] [-zoomsync] [-nozoomsync] [-placement (random, fixed,
center, NW, NE, SW, SE)] [-placementshift x y] [-extrawidth value]
[-decimal] [-dms] [-city name] [-position latitude|longitude] [-addcity
size|name|lat|lon|tz] [-removecity name (name|lat|lon)] [-rootdx value]
[-rootdy value] [-fixedrootpos] [-randomrootpos] [-screensaver]
[-noscreensaver] [-rootperiod value (in seconds)] [-animation]
[-noanimation] [-animateperiod value (in seconds)] [-progress
number[s,m,h,d,M,Y]] [-jump number[s,m,h,d,M,Y]] [-aspect mode]
[-colorlevel level=0,1,2,3] [-fillmode number=0,1,2] [-coastlines]
[-contour] [-landfill] [-shading mode=0,1,2,3,4,5] [-diffusion value]
[-refraction value] [-night] [-terminator] [-twilight] [-luminosity]
[-lightgradient] [-nonight] [-darkness value<=1.0] [-colorscale
number>=1] [-mag value] [-magx value] [-magy value] [-dx value ] [-dy
value] [-spotsizes s1|s2|s3|... (0<=si<=4, 1<=i<=citycategories)]
[-sizelimits w1|w2|w3|... (wi = zoom width values,
1<=i<=citycategories)] [-citymode mode=0,1,2,3] [-objectmode mode=0,1,2]
[-sun] [-nosun] [-moon] [-nomoon] [-tropics] [-notropics] [-meridianmode
mode=0,1,2,3] [-parallelmode mode=0,1,2,3] [-meridianspacing value]
[-parallelspacing value] [-dottedlines] [-plainlines] [-bottomline]
[-nobottomline] [-reformat] [-vmfcolors color1|color2|color3...]
[-vmfrange a|b|c|d] [-vmfcoordformat format] [-vmfflags integer]
[-setcolor field|color]
so like, everything starting from the little (**) marker is stuff you can also change at runtime, no big deal π the rest is startup-only energy.
π DESCRIPTION π
sunclock is an X11 application that puts a map of the Earth on your screen and shows you which part of the globe is lit up by the sun π. and that's not even the half of it β it also gives you:
- local time for the default timezone
- GMT time
- legal time and solar time for major cities
- latitude and longitude of those cities
- the mutual distances between arbitrary locations on Earth
- the position at zenith of the Sun and the Moon
it can draw meridians, parallels, tropics and arctic circles too, no cap. plus it has builtin functions that speed up time itself so you can watch the seasons evolve π¦. it can be internationalized for various western languages, and yeah, you can customize the app-default file and add your own extra city entries. go off β¨
sunclock commutes between two states β the "clock window" and the "map window". the clock window shows a lil baby map of the Earth so it barely takes up any screen real estate π, while the "map window" shows a big map and unlocks the more advanced functions. the Sunclock package ships with a resizable and zoomable vector map. external Earth maps can be loaded too (starting with version 3.51, the formats .jpg, .gif, .png, .xpm or .xpm.gz, and .vmf can be read β .vmf is the specific vector map format of sunclock). some additional formats could get added in the future. maybe. we'll see π
the map window can work in five different modes:
- "Legal time" mode: legal time of the default time zone and GMT time are displayed.
- "Coordinate" mode: click on a city and you get that city's coordinates (latitude, longitude), legal time and sunrise/sunset. π
- "Solar" mode: click anywhere on the map (a city or literally any other point) and it shows solar time and day length.
- "Hour Extension" mode: displays solar times from 00:00 to 23:00 in the bottom strip, according to the Sun position.
- "Distance" mode: shows distances in km and miles between two arbitrary locations. π§
depending on which mode you picked, the bottom line shows a short text with the info you asked for. and you can scroll that bottom line right or left by pressing PageUp/PageDown and Home/End. slay.
another whole functionality is the "Progress" feature, which lets you accelerate the evolution of time so you can just sit there and watch day/night periods and seasons do their thing π. by default the Sun and Moon are also shown on the map (or rather, the positions on Earth where Sun and Moon are at zenith are shown). coordinates of meridians, parallels and cities, plus the names of cities, can all be displayed on the map.
every functionality is reachable through GUI actions on the main window or the auxiliary windows. the main window is resizable by pulling its edges β as much as your current window manager permits, anyway π. there are 5 auxiliary windows:
- Menu Window. this is the main menu, and it offers a wide list of actions. launch it by typing
Hor by clicking once on the bottom strip with the left mouse button. each action can be obtained either by using the indicated keyboard shortcut or by clicking with the mouse on the corresponding entry. upper/lower case is irrelevant, except for options or actions which have more than 2 switches β for those, lower case rotates the switches in one direction and upper case in the other direction. and for those same switches, the left mouse button does the same thing as lower case, and the right mouse button does the same thing as upper case. π - File Selector window. click the upper part of the main window with the middle mouse button to get here. it lets you select the Earth image file to load (formats
*.vmf,*.xpm,*.xpm.gz,*.jpg,*.gif,*.png). - Zoom window. click the upper part of the main window with the right mouse button. the zoom window lets you select a specific area on the Earth, translate it, or zoom it up to 100 times. high resolutions (larger than 10) are only recommended with the "huge" Earthmap of 11 Mbytes, which offers clean images up to 20 times magnification at least. π
- Urban selector window. lets you interactively modify the list of shown cities and locations.
- Option window. lets you reconfigure pretty much everything on the fly (colors, fonts, etc), exactly like you would with the command line options. obsessed.
β¨ OPTIONS β¨
so the program does not use Xt or any other more advanced toolkit, which means only (!) the options explicitly enumerated below may be used. periodt. the only needed resource is the list of coordinates and timezones of cities to be displayed.
the system administrator can possibly customize the system-wide prepackaged config file Sunclockrc before installing the package, while users can tweak their individual configuration file ~/.sunclockrc at any time. important ordering detail bestie: the individual config file ~/.sunclockrc is read after the system wide config file Sunclockrc, so its settings override those of the system wide config. and the command line options can be used to override ~/.sunclockrc itself. layers on layers π
-helpβ show brief help and exit.-listmenuβ explanations on the actions available from the builtin menu.-versionβ show program version and exit.-verboseβ make Sunclock verbose. the program then sends tostderrsome information on the internal operations performed. this is disabled by default.-silentβ make Sunclock silent about internal operations performed. this is the default.-citycheckβ at start-up, check that there are no repetitions in the list of cities (a city counts as repeated if it appears twice under the same name, with coordinates differing by at most 0.5 degree). by default no check is performed onSunclockrcβ which is supposedly correctly set up... π-displaydispname β give the name of the X server to contact.-languagename β select language to be used in the sunclock menu and help.-titlename β change the specification of the string which should appear in the title bar of the main and auxiliary windows. default is the application name, i.e.,sunclock.-classnamename β change the specification of class application name. default isSunclock. other specifications can be passed so that aware window managers might use it for configuration purposes. you might e.g. pass-classname NoTitle-Sticky, and configure properly your WM so that it removes the title bar, and make the window sticky with respect to the Desktop Pager. withfvwm, you could use for instance
Style "*NoTitle*" NoTitle, WindowListHit, Sticky
Style "*ShowTitle*" Title, WindowListHit, Slippery
Style "*Sticky*" Sticky
to specify such a behaviour. β¨
-setfont<field>|<fontsetting>{|<languages>}β select the font for the given text field (clockstrip,menustrip,city,coord,menu). optionally, you can specify a list of languages for which this font setting should apply. if the<languages>option is not specified, the font setting applies to all languages.-rcfilefilename β read a configuration file that is different from the user default~/.sunclockrc(if this option is not set, the user config file defaults to~/.sunclockrc). notice that the app-default config fileSunclockrcis read first, and the file set by the-rcfileoption is read afterwards; therefore its settings override those set by the system wide config file. reading further config files is possible at runtime, using the option window. set-rcfilewith a void string""if you wish to bypass the user config file step. π«Ά-sharedirdirectory β set the directory where system wide shared Earthmaps are located. default is/usr/share/sunclock/earthmaps.-image*.jpg(or*.gif,*.png,*.vmf,*.xpm,*.xpm.gz) β start sunclock with an Earth map image loaded in the clock and map windows. the same map is then used for both windows, but the clock image is usually scaled down.-mapimage*.jpg(or*.gif,*.png,*.vmf,*.xpm,*.xpm.gz) β start sunclock with an Earth map image loaded in the map window.-clockimage*.jpg (or *.gif, *.png, *.vmf, *.xpm, *.xpm.gz) β bestie, this one loads an Earth map image straight into the clock window the second sunclock starts. Iconic behavior, no notes. πΌοΈ-zoomimage*.jpg (or *.gif, *.png, *.vmf, *.xpm, *.xpm.gz) β same energy but for the zoom widget: the file you name becomes the image showing up in there. β¨-colorlevellevel=0,1,2,3 β sets the whole color vibe of the thing. Let's break it down because it's giving β¨optionsβ¨:0= monochrome. Day and night show up asmapbgcolor(white by default) andmapfgcolor(black by default), and shading? Not available, sorry bestie. Everything else β city names, coordinates β also goes monochrome.1= few colors. The menus and city spots can get their own dedicated colors, but the meridians/parallels/tropics are still stuck in monochrome.2= many colors. Now the meridians/parallels/tropics can also be drawn in color too. π3= full colors.
In those first 3 modes, literally only .vmf vector maps can be loaded, and they save so much CPU power because the algorithm is just a simple inversion of colors to set the color of every point on the map. Monochrome mode is lowkey perfect for super slow CPUs β think PDAs with black and white screens, the ancestors of your phone fr. The full color mode (level=3) lets you load jpeg or other colorful images, and day and night can be drawn with all kinds of shading parameters. This one is the default and the recommended mode if you've got a reasonably recent machine with enough video RAM. π₯
-dockβ okay so this option gives sunclock the ability to be docked in your window manager's buttons or menu bar, as long as that WM offers the possibility without needing special hints. (fvwm2orwindowmakerorafterstepwill work perfectly well for that purpose β KDE or Gnome won't... π).
Under -dock, sunclock locks the size of the first launched window, which is necessarily a small clock. Also, that initial window can no longer be closed by typing 'K' or 'Q'. (The only way to exit the application, then, is to kill it with xkill, or to undock it first with the -undock option from the Option window.) π³
You might want to customize the size and suitable options so sunclock fits with the size of your dockable applets. Like, for example, sunclock could be invoked as follows:
sunclock -language fr -nobottomline -dock -clockgeom 63x42+2+190 -dateformat "%H:%M:%S|%a%_%d%_%b|%b%_%Y|%j%_%U/52" -command "xdiary"
-undockβ undocks sunclock. That's literally it, no other effect than reallowing the use of options that were "frozen" under-dock. Use it e.g. to exit the application when sunclock has been started in dock mode. π«Ά-synchroβ with this option, sunclock updates all windows simultaneously. Which, of course, requires more CPU time and may slow down sunclock's operation if too many windows have been opened. The default is to update only the active window. π-nosynchroβ with this option, sunclock only updates the active window. This is the default.-clockβ start in the clock state. This is the default, so bestie you don't even need to specify it. β-dateformatstring1|string2|... β sets the format(s) used in the text output in the bottom strip of the clock. The default date format consists of 3 strings:
%H:%M%_%a%_%d%_%b%_%y|%H:%M:%S%_%Z|%a%_%j/%t%_%U/52
Here's the tea on the placeholders: %H,%M,%S stand for hour, minutes, seconds, %a for dayname, %b for monthname, %d for monthday number, %j for yearday number, %m for month number, %y for year last two digits, %Y for year number, %t for number of days in year (365 or 366), %Z for timezone, %U for week number (week #1 is the week with the first thursday of the year). All other characters are reproduced as such, except %_ which stands for a blank space, %% which stands for % and %| which stands for |.
The vertical bar | is used as a delimiter to indicate successive time formats. There can be as many formats as you want, and the actual selection cycles through all these formats by clicking on the bottom strip with the mouse. The first string (i.e. the one preceding the first bar) is taken as the default format. There are a few other switches too, such as %h for hour in 12-hour mode, %P fo AM/PM indicator, %G for hour in GMT time, %N for minutes in GMT time. πβ¨
-mapβ start in the map state. Useful to start right away with advanced functionalities. πΊοΈ-decimalβ initializes coordinate values of geographical data in decimal degrees. However, this can still be switched at runtime, no biggie.-dmsβ initializes coordinate values of geographical data in degrees, minutes and seconds. However, this can still be switched at runtime.-menuβ raise the menu window along with the main (map, clock) window. π-nomenuβ don't raise the menu window along with the main (map, clock) window. This is the default.-selectorβ raise the selector window along with the main (map, clock) window.-noselectorβ don't raise the selector window along with the main (map, clock) window. This is the default.-zoomβ raise the zoom window along with the main (map, clock) window. π-nozoomβ don't raise the zoom window along with the main (map, clock) window. This is the default.-optionβ raise the option window along with the main (map, clock) window.-nooptionβ don't raise the option window along with the main (map, clock) window. This is the default.-urbanβ raise the urban window along with the main (map, clock) window. ποΈ-nourbanβ don't raise the urban window along with the main (map, clock) window. This is the default.-aspectmode β sets the aspect mode, i.e. the way zooming behaves with respect to horizontal and vertical directions. Mode =0means no synchronizations are made, mode =1means the zoom factors are always made to be equal, and mode =2(the more subtle one, iykyk) means the horizontal and vertical zoom factors are adjusted so that the region near the central point of the zoomed area will be conformal to its actual geometry on Earth β like it won't appear distorted horizontally or vertically. That won't be true elsewhere though, especially if the zoomed area is large. π-zoomsyncβ when this option is set, the zoom window will open in synchronization mode: any zooming action made from the main map or from the zoom window will take place as the mouse button is released (or as a key is pressed). This is the default when the zoom window has not been opened (synchronization is automatically set). π«-nozoomsyncβ when set, the zoom window will open in non-synchro mode. Synchronizing the zoom will still be possible though, by clicking on the"Synchro"button. By default, synchronization does not occur when the zoom window is opened, unless option-zoomsynchas been set.-mapmode*** (single character =C,D,E,LorS) β start the map functions in mode (C)oordinates, (D)istances, hour (E)xtension, (L)egal time or (S)olar time respectively. Any other specification is ignored. Default is legal time mode. π§-placement<choice> (random,fixed,center,NW,NE,SW,SE) β specify whether commuting between clock and map windows should proceed with letting the window centers, respectively, the NW, NE, SW, SE corners fixed, or rather whether it should operate randomly, or through user defined placement. Default isNWplacement.-placementshiftx y β relative displacement <clock window> --> <map window>, to apply with respect to the-placementspecification. If placement isNW, then the NW window corner will move by (x,y) pixels. Default is(0,0), i.e. no modification to apply to the-placementspecification. π-extrawidthvalue β when using the 'enlarge window' command specified by key'>', the width of the full X display is used, minus some default width equal to 10 pixels. This is enough to accommodate the width of window borders of most window managers. In case it is not,-extrawidth<value> can be used to change this setting. π-clockgeom(width)x(height)+(xcoord)+(ycoord) β specify the geometry of the clock window, i.e. its size and position (absolute position with respect to the left upper corner of the screen). β°-mapgeom(width)x(height)+(xcoord)+(ycoord) β specify the geometry of the map window, i.e. its size and position (absolute position with respect to the left upper corner of the screen). πΊοΈ-menugeom+(xcoord)+(ycoord) β specify the relative position (x = horizontal shift, y = vertical shift) of the menu window with respect to the main window, starting from the bottom edge of the main window (from its top edge in case ofSWorSEplacements, see above). The y value may need an adjustment, according to the height of the title bar allocated by the window manager, if any. In the case of the menu window, width and height solely depend on the menufont, and therefore any given specification of width and height is ignored. The default relative position is x =0, y =30.-selgeom(width)x(height)+(xcoord)+(ycoord) β specify the geometry of the selector window. The position specification is relative to the main window (or to the menu, when the menu is raised). See above option-menugeomfor further explanations. The default geometry of the selector window is600x180+0+30.-zoomgeom(width)x(height)+(xcoord)+(ycoord) β specify the geometry of the zoom window. The position specification is relative to the main window (or to the menu, when the menu is raised). See above option-menugeomfor further explanations. The default geometry of the zoom window is500x320+0+30.-optiongeom(width)x(height)+(xcoord)+(ycoord) β specify the geometry of the option window. The position specification is relative to the main window (or to the menu, when the menu is raised). See above option-menugeomfor further explanations. The height specification depends solely on the selected menufont and is therefore ignored. The default geometry of the option window is630x80+0+30. π-urbangeom+(xcoord)+(ycoord)β sets where the urban window sits relative to the main window (or relative to the menu, when the menu's up).x= horizontal shift,y= vertical shift. Wanna know how the relative math works? It's the same deal as the-menugeomoption above, go peek at that π-auxilgeom+(xcoord)+(ycoord)β same energy but for the auxiliary windows (menu, zoom, selector, option).x= horizontal shift,y= vertical shift, and every single relative displacement gets set to(x,y). All of them. At once. Slay π«Ά-magvalue β rescales the image by a magnification factor of value, and value has to be at least1.0, no cap. What that means: the window only shows a fraction of the whole map, specifically1/<value>x1/<value>of it. Default is1.0.-magxvalue β literally-magbut only the x direction (width) gets rescaled. Defaultmagxis1.0.-magyvalue β same as-magbut only the y direction (height) gets rescaled. Defaultmagyis1.0.-dxvalue (degrees) β-dxand-dylet you set the longitude (respectively the latitude) of the city or location that the zoom area should be centered on. Values go in degrees. Default(dx,dy)is(0.0,0.0).-dyvalue (degrees) β see-dxabove bestie, it's the latitude half of that duo π-coastlinesβ in the builtin vector map, generates coast lines without filling in the land areas.-contourβ same as before but uses a smart algorithm that eliminates lines, especially at lower resolutions. Heads up: if the coasts are super irregular, some parts may just disappear π but the overall picture looks sharper.-landfillβ in the builtin vector map, fills the land areas without generating coast lines.-fillmode0,1,2β quick cheat sheet:fillmode=0=-coastlines,fillmode=1=-contour,fillmode=2=-landfill. That's it, that's the whole option.-dottedlinesβ meridians and parallels get drawn as dotted lines β¨-plainlinesβ meridians and parallels get drawn as plain lines instead.-bottomlineβ draws a line at the bottom of the map, so the map is separated from the text strip that shows time and coordinates.-nobottomlineβ doesn't draw that bottom line. This is the default.-commandstring β sets an external action or program that gets called through keyboard shortcutx. Default is an empty command.-helpcommandstring β sets an external action or program that gets called through keyboard shortcut doubleh(call help). Default is"xterm -fn 9x15 -cr green -ms red -e man sunclock &".-jumpnumber[unit] (where unit=s,m,h,d,M,Y) β the number of seconds (or minutes, hour, days, Months, Years, depending on the unit) by which the current date and time should be shifted. No blank space between the number and its unit, okay? If the unit is absent, the number is understood to be in seconds by default. Super useful to get sunclock display info on earlier or later epochs π°οΈ-progressnumber[unit] (where unit=s,m,h,d,M,Y) β the number of seconds (or minutes, hour, days, Months, Years) by which the time progression should operate. Again: no blank space between the number and its unit, and if the unit is absent it defaults to seconds. Handy for getting sunclock to progress by steps other than the predefined ones (by default the steps cycle between the values 1 mn, 1 hour, 1 day, 7 days, 30 days).-rootdxvalue (between0.0and1.0) β-rootdxand-rootdyset the position where the sunclock map gets copied onto the root window in rootwindow or screensaver modes.-rootdx 0.0= left side,-rootdx 1.0= right side,-rootdy 0.0= top,-rootdy 1.0= bottom of the root window. Default is0.5for both values, i.e. a centered map π―-rootdyvalue (degrees) β see-rootdxabove. (Yes it says degrees, we're just relaying the facts bestie.)-fixedrootposβ uses therootdxandrootdyvalues above to fix the position of the map on the root window. This is the default unless-screensaverhas been specified.-randomrootposβ instead of usingrootdxandrootdyto fix the position, it just uses a random position instead. This is the default when the-screensaveroption has been set.-screensaverβ starts sunclock in screensaver mode. Heads up: no window and no GUI controls are available in that case, and the only way to terminate the program is to kill it explicitly π-noscreensaverβ doesn't start sunclock in screensaver mode. This is the default.-rootperiodvalue (in seconds, between1and120sec) β sets the period for refreshing the root window. Default is30seconds. This only takes effect when writing the map onto the root window is active (strike twice on[or hit the relevant box in the Option window). And writing onto the root window gets disabled by using the]key.-animationβ starts animation mode right away when sunclock launches. Main character energy from the jump β¨-noanimationβ doesn't start animation mode on launch β this is the default. Anyway, sunclock can switch between animation/noanimation modes by typing key'(apostrophe) at runtime.-animateperiodvalue (in seconds, between0and5sec) β sets the period for animating the map. Default is0seconds, which means images are switched as fast as sunclock can compute them. Otherwise, time is shifted by the current progress value (as set by the-progessoption) after waiting the number of seconds prescribed by theanimateperiodvalue. This only takes effect when the animation is active (strike on the'key or hit the relevant box in the Option window).-addcitysize|name|latitude|longitude|timezone
where name is the ascii name of the place to be shown on the map. The first argument size is a nonnegative integer meant to indicate the size of the city (1: major city, 2: important city, 3: less important city, ...). The size argument can also be set to 0, with the effect of hiding the corresponding city while keeping all of its other parameters in memory. The city can then be shown again with latitude and longitude, which are floating point numbers representing the geographical location of the place. Western longitudes and southern latitudes should be entered as negative numbers. timezone is the name of the timezone that the place is in β this should be the name of a file under /usr/share/zoneinfo (or whatever directory is used on your system), and incorrect timezones cause the clock to display GMT. It's also possible to reference a file in a directory relative to /usr/share/zoneinfo, for example Canada/Eastern instead of EST5EDT.
-cityname (name|lat|lon) β initializes the program so it displays data of city name, respectively (name, with latitude and longitude specified). This only becomes effective if that city is listed in the systemwide RC fileSunclockrcor in the user's private~/.sunclockrc. The operating mode gets set to Coordinates mode.-positionlatitude|longitudeβ initializes the program so it displays data of the position specified by two coordinates (in degrees). The operating mode gets set to Solar time mode. Notice that it uses a vertical bar|(a blank space is also admitted instead of a|).-addcitysize|name|lat|lon|tzβ adds a city to the list of cities to be displayed. They must be defined by exactly 5 parameters: size, name, latitude, longitude, timezone, in this order, with parameters separated by a vertical bar|. Blank characters may appear in the name if double quotes are used to mark the group of parameters (but there shouldn't be any blank characters in the other parameters). In the RC config file, blank characters should be replaced by the octal character037(i.e. Ctrl-Q Ctrl-_ within emacs).-removecityname (name|lat|lon) β removes name (respectivelyname|lat|lon) from the list of cities to be displayed. Same remarks as above for blank characters.-citycategoriesvalue β specifies the maximal number of city categories. Categories range from1(highest category, i.e. major city) to some maximum number, and-citycategoriesspecifies that maximum. It can only be used at start-up, not at runtime. The default value is5.-spotsizess1|s2|s3|...(0<=si<=5,1<=i<=citycategories) β with this setting, major cities (category 1) get represented by the symbol of sizes1, category 2 cities by the symbol of sizes2, etc. The default setting is-spotsize 1|2|3|4|5. Assigning sizesi=0means the corresponding category of cities (rank i) will not be displayed. If there are less data than the number of city categories (5by default), the last given data is repeated as many times as needed β e.g.-spotsizes 2is equivalent to-spotsizes 2|2|2|2|2. Example: specifying-spotsizes 0|2|0|3|0will let only city categories 2 and 4 appear, but those of category 4 will appear with the symbol normally allocated to cities of category 3. This is useful in combination with the option-sizelimits(see below) π-sizelimitsw1|w2|w3|...(wi= zoom width values,1<=i<=citycategories) β with this setting, cities of ranki=1,2,3,...will appear if (and only if) the width of the zoomed map is at least equal towi(as it would appear if the Earth would be entirely displayed...). The default is0|580|2500|6000|12000(no constraint for major cities; rank 4 cities appear only if the width is at least6000pixels, e.g. if an original window of width800, say, has been applied a zoom at least equal to7.5). So-sizelimits 0is equivalent to-sizelimits 0|0|0|0|0, and-sizelimits 0|400is equivalent to-sizelimits 0|400|400|400|400.
-shading mode=0,1,2,3,4,5β start sunclock with a specific shading mode, your choice bestie. Mode 0 = the night area is literally not displayed at all. Higher modes show the night area, with increasingly sophisticated shading algorithms. Mode 1 = no shading whatsoever (just bright colors and dark colors, that's it). Mode 2 shades the terminator area β that's the zone where the sun is partially hidden by the horizon. Mode 3 shades the region where there's still substantial luminosity left after sunset (this depends on thediffusionparameter down below). Default is 3Λ below horizon. Mode 4 also represents the luminosity values in all parts of the illuminated area. Mode 5 represents the gradient of luminosity from the brightest area (facing the sun) to the darkest area (opposite to the sun) β though ngl, this has nothing to do with the actual luminosity values. π-nonightβ start sunclock with the night region not drawn. Equivalent to-shading 0.-nightβ start sunclock with the night region in plain shading mode. Equivalent to-shading 1.-terminatorβ equivalent to-shading 2.-twilightβ equivalent to-shading 3.-luminosityβ equivalent to-shading 4.-lightgradientβ equivalent to-shading 5.-diffusion value(degrees) β sets the amplitude of the area where diffusion of light in the atmosphere is still sufficient to keep some luminosity after sunset. Default is 3 degrees. π-refraction value(degrees) β sets the value of the refraction angle for tangential sun rays at sunset. This is related to the fact that the sun sometimes looks bigger at sunset (iconic behavior honestly). Changing the refraction degree slightly affects the computation of sunrise and sunset times. Default is 0.1 degree.-darkness value(in the range 0.0 ... 1.0) β sets the contrast between day and night areas. A 0.0 value means the night area will not be distinguishable from day, while 1.0 means it will be completely black. Default is 0.5.-colorscale value(integer in the range 1 ... 256) β sets the number of color subdvisions which will be in use for producing shading, that is, the number of colors ranging from bright colors (day) to dark colors (night). Default is 16.-meridianmode mode=0,1,2,3β start sunclock with meridians displayed or not, according to the mode.mode=0: no meridians,mode=1: meridians drawn,mode=2: meridians drawn with labels at the bottom,mode=3: meridians drawn with labels at the top. The default mode is 0 (no meridians).-parallelmode mode=0,1,2,3β start sunclock with parallels displayed or not, according to the mode.mode=0: no parallels,mode=1: parallels drawn,mode=2: parallels drawn with labels at the left hand side,mode=3: parallels drawn with labels at the right hand side. The default mode is 0 (no parallels).-meridianspacing value(degree) β specify how many degrees (or fractions of degree) should separate meridians drawn on the map.-parallelspacing value(degree) β specify how many degrees (or fractions of degree) should separate parallels drawn on the map.-citymode mode=0,1,2,3β start sunclock with cities displayed or not, according to the mode.mode=0: no cities,mode=1: cities drawn,mode=2: cities drawn with their names,mode=3: cities drawn with their coordinates. The default mode is 1 (cities shown without names or coordinates). ποΈ-tropicsβ start sunclock with tropics and arctic circles displayed (by default, they aren't).-sunβ start sunclock with the Sun position displayed (by default, it is).-moonβ start sunclock with the Moon position displayed (by default, it is).-notropics,-nosun,-nomoonβ these options just negate the above ones. π-objectmode mode=0,1,2βMode=0stands for no objects (Sun, Moon) at all,mode=1for objects just drawn by their symbol,mode=2for objects drawn with their symbol and coordinates in decimal degrees (or degrees, minutes, seconds, using the Λ key switch).-reformatβ this option only produces an effect when a*.vmffile is loaded. The file is then reformatted according to the allowed syntax and normal line length, and printed tostdout. To capture the output, one should redirect the standard output to a file (with a'> file'as usual).-vmfcolors color1|color2|color3...β redefine the list of colors to be used in the.vmffile. This option has no effect when loading files with other formats. Default isNULLstring (so that the default colors are loaded). The string"|"is also considered to be a void string and can be used in the option widget to enforce default colors back.-vmfrange a|b|c|dβ define the range in which point coordinates (latitude, longitude) should vary in the*.vmffiles, default is-90|90|-180|180. This option can be useful in combination with-reformatto make a linear change of coordinates in a*.vmffile.-vmcoordformat formatβ set the format for the output of double values produced via the-reformatoption. The default format is"%7.3f %8.3f"(format for latitude and longitude, respectively), unless the-vmfrangehas been modified, in which case the default becomes"%g %g"(from the POSIX rules, this stands for 6 significant digits in any position).-vmfflags numberβ sets the flags (integer value) for a*.vmffile. Each bit is a distinct flag. The zeroth order bit (i.e.&1) determines whether features which have their own zeroth bit set are to be drawn in clock window mode (if the zeroth bit is not set, the feature will always be drawn). Other bits are used to control whether given features are to be drawn or not. For instance setting-vmfflags 2withtimezones.vmfwill let the timezone regions appear, while-vmfflags 6will also show the timezone boundary lines. (Only bits 0, 1, 2 are currently used intimezones.vmf).-setcolor field|colorβ sets the color of a specified field in the sunclock widgets. The color can be specified as any litteral value (red,yellow, etc..., as defined in the resource filergb.txt), or as a 6 digit hexadecimal value#ijklmn, or even 12 digits (for 48 bits displays!). The field can take any of the following values (between parentheses, the meaning and default value):clockbg(clock background color;White)clockfg(clock foreground color;Black)mapbg(map background color;White)mapfg(map foreground color;Black)menubg(menu text background color;Grey92)menufg(menu text foreground color;Black)buttonbg(button background color;Grey84)buttonfg1(button very dark border color ;Black)buttonfg2(button dark border color ;Grey50)buttonfg3(button light border color ;Grey95)buttonfg4(button very light border color ;White)weak(color for disabled menu commands;Red)clockstripbg(background color of bottom strip in clock window;Grey92)clockstripfg(foreground color of bottom strip in clock window;Black)mapstripbg(background color of bottom strip in map window;Grey92)mapstripfg(foreground color of bottom strip in map window;Black)zoombg(background color of the small monochrome map used in the zoom widget;White)zoomfg(foreground color of the small monochrome map used in the zoom widget;Black)optionbg(background color of option text entry;White)optionfg(foreground color of option text entry;Black)caret(color of text caret;SkyBlue2)change(color for temporary changes;Brown)choice(color for selected changes and choices;SkyBlue2)directory(color of text indicating directory entries;Blue)image(color of text indicating image files;Magenta)cityname(color of text indicating city names;Red)city0(color of unmarked cities;Orange)city1(color of marked cities, main selection;Red)city2(color of marked cities, secondary selection;Red3)mark1(color of first mark;Pink1)mark2(color of secondary mark;Pink2)line(color of geodesic lines;White).meridian(color of meridians;White).parallel(color of parallels;White).tropic(color of Equator/Tropics/Arctic circles;White)sun(color of Sun;Yellow)moon(color of Moon;Khaki)star(color of Stars;White)root(color of Root window on which stars will be drawn;Black)
π PRIVATE CONFIGURATION FILE π
Okay so bestie, you can keep a file in your home directory called ~/.sunclockrc. This file can contain specify any number of options which are also available as command line options:
mapmode: L
language: en
city: Washington
map
mapimage: /usr/share/sunclock/earthmaps/jpeg/caida.jpg
tropics
twilight
π HOW IT WORKS π
sunclock calculates the position of the Sun using the algorithm in chapter 18 of:
Astronomical Formulae for Calculators by Jean Meeus, Third Edition,
Richmond: Willmann-Bell, 1985.
and projects the illuminated area onto the map image by an equidistributed (latitude, longitude) cylindrical projection. The Sun's position is calculated to better than one arc-second in accuracy. π°οΈβ¨
π BUGS π
Sunclock makes intensive use of pointers and memory allocation/deallocation, so memory leaks might still be possible under some circumstances. However, the program has been thoroughly debugged, and crashes seem to be rather rare. As new features are introduced, older ones may become broken during the phase of development :-(
The illuminated area shown is the area which would be sunlit if the Earth atmosphere would be absolutely uniform. The actual illuminated area may depend on weather, temperature, atmospheric refraction and diffusion, etc. π
fr fr, that last one is not a bug so much as a vibe β the map is showing you the ideal, not the weather report.
π AUTHORS π
okay so bestie, this program has layers of history and you're gonna respect every single one of them, because sunclock is giving collaborative masterpiece energy and the lineage is iconic π
- John Walker, Autodesk, Inc.,
kelvin@acad.uu.NETβ he wrote the original Suntools program, and that's the whole thing sunclock is derived from. like, the blueprint. the origin story. the moment it all began π - John Mackin, Basser Department of Computer Science, University of Sydney, Sydney, Australia,
john@cs.su.oz.AUβ he took that Suntools situation and wrote the X11 version out of it. glow-up era, fr fr β¨ - Stephen Martin, Fujitsu Systems Business of Canada,
smartin@fujitsu.caβ he added support for interactive map. yes, the clicky fun part. thank him personally, no cap π«Ά - Jean-Pierre Demailly, UniversitΓ© de Grenoble I,
demailly@fourier.ujf-grenoble.frβ he worked out versions 3.xx, and that's the era where it ate. it added so many new major features: loading maps, shading, zoom functionalities, and configuration of options on the fly at runtime, through a point and click GUI interface π
not to be dramatic but four whole humans across three continents poured themselves into this and it's lowkey the most wholesome thing in this entire manual π
so yeah, that's the whole page! you made it to the end bestie, i'm so proud of you π β¨ go make something cool with it, and remember: every flag you type is standing on the shoulders of some very dedicated people. main character energy all around ππ
this was SUNCLOCK(1), dated June 22, 2006 β yeah it's vintage, it's classic, it's serving timeless π¦
π¦ where this page comes from
- debian trixie: sunclock 3.57-15 Β· GPL-2.0-or-later
- ubuntu questing: sunclock 3.57-15
- ubuntu resolute: sunclock 3.57-15build1 Β· GPL-2.0-or-later
- ubuntu stonking: sunclock 3.57-15build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms