Skip to main content
Version: Next

Directives File Syntax

The directives file syntax heavily relies on the INI config syntax, but with several modifications tailored to suit huronOS' requirements. As explained in the introduction to directives, the directives are primarily governed by their execution modes (contest, event, default). However, some directives, such as keyboard distributions and timezone settings, are considered mode-independent, while others are mode-dependent. The directives are divided into two sections: Global Directives and Specific Directives.

For specific directives, we have three sections (case-sensitive):

  • "Always" for the default mode.
  • "Event" for the event mode.
  • "Contest" for the contest mode.

When dealing with Event and Contest modes, we also expect the sections "Event-Times" and "Contest-Times" (respectively) to be present, resulting in a file structure similar to this:

[Global]

[Always]

[Event]

[Contest]

[Event-Times]

[Contest-Times]

Global Directives

The global directives, applied at all times, support various configurations. Each specific syntax is detailed in its own config documents. This section includes the following directives (click on the title link to view the specific syntax documentation):

Global section example

[Global]
TimeZone=America/Mexico_City
ConfigExpirationTime=2023-05-15T11:00:00
AvailableKeyboardLayouts=latam|us|
DefaultKeyboardLayout=latam
EventConfig=false
ContestConfig=true

Specific Directives

The specific directives are only applied when their time-window is active and the system is NTP-synced. Although the section is not explicitly named Specific, it uses the mode names as section titles: [Always], [Event], and [Contest]. Please refer to the mode priorities to understand which mode will be selected. All these sections share the same specific directives listed here:

Specific section example

[Contest]
AllowedWebsites=codeforces.com|omegaup.com|
AllowUsbStorage=false
AvailableSoftware=langs/g++|programming/vscode|
Bookmarks={Codeforces^http://codeforces.com}|
Wallpaper=https://directives.huronOS.org/wallpaper1.png
WallpaperSha256=somerandomsha

Specific-Times Directives

These sections ([Event-Times], [Contest-Times]) define the beginning and end date-times for the event and contest modes. The syntax is as follows:

[Section-Times]
BeginTime1 EndTime1
BeginTime2 EndTime2
...
BeginTimeN EndTimeN

The date-times must use ISO 8601 extended time format relative to the local time. For example: 2030-01-10T11:45:01.

For more information, please refer to here.

Times section example

[Event-Times]
2023-05-13T10:00:00 2023-05-13T19:00:00
[Contest-Times]
2023-05-13T11:00:00 2023-05-13T15:00:00

Directives File Example

This example was used during the ICPC Mexico Qualification Rounds of 2023.

[Global]
TimeZone=America/Mexico_City
ConfigExpirationTime=2023-05-29T12:00:00
AvailableKeyboardLayouts=latam|us|es|dvorak|
DefaultKeyboardLayout=latam
EventConfig=false
ContestConfig=true

[Always]
AllowedWebsites=all
AllowUsbStorage=true
AvailableSoftware=internet/chromium|internet/crow|internet/firefox|langs/g++|langs/gcc|langs/javac|langs/kotlinc|langs/pypy3|langs/python3|tools/konsole|programming/atom|programming/codeblocks|programming/eclipse|programming/emacs|programming/geany|programming/gedit|programming/gvim|programming/intellij|programming/kate|programming/kdevelop|programming/pycharm|programming/sublime|programming/vim|programming/vscode|
Bookmarks={Contest^https://boca.icpcmexico.org}|{BOCA_User_Manual^https://directives.huronos.org/icpcmx/boca_manual_teams.en.html}|
Wallpaper=https://directives.huronos.org/icpcmx/gpmx2023_round1_always_mode.png
WallpaperSha256=c382c20791695176be47257ec924c9df39e40534d4ac02fb23c4f3c823334fd8

[Event]
AllowedWebsites=all
AllowUsbStorage=true
AvailableSoftware=internet/chromium
Bookmarks=huronOS^https://huronos.org|
Wallpaper=default

[Contest]
AllowedWebsites=boca.icpcmexico.org|score.icpcmexico.org|icpcmexico.org|
AllowUsbStorage=false
AvailableSoftware=internet/chromium|internet/crow|internet/firefox|langs/g++|langs/gcc|langs/javac|langs/kotlinc|langs/pypy3|langs/python3|tools/konsole|programming/atom|programming/codeblocks|programming/eclipse|programming/emacs|programming/geany|programming/gedit|programming/gvim|programming/intellij|programming/kate|programming/kdevelop|programming/pycharm|programming/sublime|programming/vim|programming/vscode|
Bookmarks={Contest^https://boca.icpcmexico.org}|{BOCA_User_Manual^https://directives.huronos.org/icpcmx/boca_manual_teams.en.html}|
Wallpaper=https://directives.huronos.org/icpcmx/gpmx2023_round1_contest_mode.png
WallpaperSha256=824d8560d35ec070589a5b72f2da85aff38203a7f6b1aee8bae7900c608d4369

[Event-Times]

[Contest-Times]
2023-05-13T13:40:00 2023-05-13T19:02:00
2023-05-27T10:50:00 2023-05-27T16:12:00