PageSourceSearch

https://huronos.org/assets/js/f883a1b9.6a64d978.js

js huronos.org collected 2026-10-08 05:50:54 UTC 16,711 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhuron_os_website=self.webpackChunkhuron_os_website||[]).push([[1083],{3905:(e,t,i)=>{i.d(t,{Zo:()=>c,kt:()=>g});var n=i(7294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){a(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function s(e,t){if(null==e)return{};var i,n,a=function(e,t){if(null==e)return{};var i,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),i=t;return e&&(i="function"==typeof e?e(t):o(o({},t),e)),i},c=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=p(i),u=a,g=m["".concat(l,".").concat(u)]||m[u]||d[u]||r;return i?n.createElement(g,o(o({ref:t},c),{},{components:i})):n.createElement(g,o({ref:t},c))}));function g(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=i.length,o=new Array(r);o[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:a,o[1]=s;for(var p=2;p<r;p++)o[p]=i[p];return n.createElement.apply(null,o)}return n.createElement.apply(null,i)}u.displayName="MDXCreateElement"},8612:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var n=i(7462),a=(i(7294),i(3905));const r={sidebar_position:2},o="Directives File Syntax",s={unversionedId:"usage/directives/directives-file-syntax",id:"usage/directives/directives-file-syntax",title:"Directives File Syntax",description:"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.",source:"@site/docs/usage/directives/directives-file-syntax.md",sourceDirName:"usage/directives",slug:"/usage/directives/directives-file-syntax",permalink:"/docs/next/usage/directives/directives-file-syntax",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Introduction to Directives",permalink:"/docs/next/usage/directives/introduction-to-directives"},next:{title:"Directives Server",permalink:"/docs/next/usage/directives/directives-server"}},l={},p=[{value:"Global Directives",id:"global-directives",level:2},{value:"Global section example",id:"global-section-example",level:3},{value:"Specific Directives",id:"specific-directives",level:2},{value:"Specific section example",id:"specific-section-example",level:3},{value:"Times section example",id:"times-section-example",level:3},{value:"Directives File Example",id:"directives-file-example",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...i}=e;return(0,a.kt)(m,(0,n.Z)({},c,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"directives-file-syntax"},"Directives File Syntax"),(0,a.kt)("p",null,"The directives file syntax heavily relies on the ",(0,a.kt)("em",{parentName:"p"},"INI config")," syntax, but with several modifications tailored to suit huronOS' requirements. As explained in the ",(0,a.kt)("a",{parentName:"p",href:"introduction-to-directives"},"introduction to directives"),", the directives are primarily governed by their ",(0,a.kt)("em",{parentName:"p"},"execution modes")," (",(0,a.kt)("em",{parentName:"p"},"contest"),", ",(0,a.kt)("em",{parentName:"p"},"event"),", ",(0,a.kt)("em",{parentName:"p"},"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."),(0,a.kt)("p",null,"For specific directives, we have three sections (case-sensitive):"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'"',(0,a.kt)("strong",{parentName:"li"},"Always"),'" for the default mode.'),(0,a.kt)("li",{parentName:"ul"},'"',(0,a.kt)("strong",{parentName:"li"},"Event"),'" for the event mode.'),(0,a.kt)("li",{parentName:"ul"},'"',(0,a.kt)("strong",{parentName:"li"},"Contest"),'" for the contest mode.')),(0,a.kt)("p",null,"When dealing with ",(0,a.kt)("em",{parentName:"p"},"Event")," and ",(0,a.kt)("em",{parentName:"p"},"Contest"),' modes, we also expect the sections "',(0,a.kt)("strong",{parentName:"p"},"Event-Times"),'" and "',(0,a.kt)("strong",{parentName:"p"},"Contest-Times"),'" (respectively) to be present, resulting in a file structure similar to this:'),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ini"}
1,"[Global]\n\n[Always]\n\n[Event]\n\n[Contest]\n\n[Event-Times]\n\n[Contest-Times]\n\n")),(0,a.kt)("h2",{id:"global-directives"},"Global Directives"),(0,a.kt)("p",null,"The global directives, applied at all times, support various configurations. Each specific syntax is detailed in its own ",(0,a.kt)("a",{parentName:"p",href:"./configurations/"},"config documents"),". This section includes the following directives (click on the title link to view the specific syntax documentation):"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/timezones"},(0,a.kt)("inlineCode",{parentName:"a"},"TimeZone=<YourTimezone>")),(0,a.kt)("br",{parentName:"p"}),"\n","This directive allows you to set the system's local timezone using IANA standard timezones.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/expiration-time"},(0,a.kt)("inlineCode",{parentName:"a"},"ConfigExpirationTime=[ never || ISO8601 Time ]")),(0,a.kt)("br",{parentName:"p"}),"\n","Use this directive to ensure that a set of rules (directives file) expires after a certain time. You can set an ISO 8601 time-date to specify the expiration time.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/keyboard-layout"},(0,a.kt)("inlineCode",{parentName:"a"},"AvailableKeyboardLayouts=[layout1|...|layoutN|]")),(0,a.kt)("br",{parentName:"p"}),"\n","Here, you can define XKB keyboard layouts available for quick switching via the system tray button. Other 
1configurations can be set via the system configuration. A list containing the possible layouts is available ",(0,a.kt)("a",{parentName:"p",href:"https://gist.github.com/jatcwang/ae3b7019f219b8cdc6798329108c9aee"},"here"),".")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/keyboard-layout"},(0,a.kt)("inlineCode",{parentName:"a"},"DefaultKeyboardLayout=layout")),(0,a.kt)("br",{parentName:"p"}),"\n","This directive allows you to specify the XKB keyboard layout to be set as the default on each mode change or at boot.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/events-and-contests"},(0,a.kt)("inlineCode",{parentName:"a"},"EventConfig=[true || false]")),(0,a.kt)("br",{parentName:"p"}),"\n","Set this flag to expect the ",(0,a.kt)("inlineCode",{parentName:"p"},"[Event]")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"[Event-Times]")," sections to be non-empty and properly configured.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/events-and-contests"},(0,a.kt)("inlineCode",{parentName:"a"},"ContestConfig=[true || false]")),(0,a.kt)("br",{parentName:"p"}),"\n","Set this flag to expect the ",(0,a.kt)("inlineCode",{parentName:"p"},"[Contest]")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"[Contest-Times]")," sections to be non-empty and properly configured."))),(0,a.kt)("h3",{id:"global-section-example"},"Global section example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ini"},"[Global]\nTimeZone=America/Mexico_City\nConfigExpirationTime=2023-05-15T11:00:00\nAvailableKeyboardLayouts=latam|us|\nDefaultKeyboardLayout=latam\nEventConfig=false\nContestConfig=true\n")),(0,a.kt)("h2",{id:"specific-directives"},"Specific Directives"),(0,a.kt)("p",null,"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 ",(0,a.kt)("em",{parentName:"p"},"Specific"),", it uses the mode names as section titles: ","[Always]",", ","[Event]",", and ","[Contest]",". Please refer to the ",(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/introduction-to-directives#mode-priorities"},"mode priorities")," to understand which mode will be selected. All these sections share the same specific directives listed here:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/web-firewall"},(0,a.kt)("inlineCode",{parentName:"a"},"AllowedWebsites=[ domain1|...|domainN ]")),(0,a.kt)("br",{parentName:"p"}),"\n","This directive configures a ",(0,a.kt)("em",{parentName:"p"},"Domain name")," DNS-based firewall to set a list of all the allowed websites (HTTP, HTTPS access) for the configured mode.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/usb-drives"},(0,a.kt)("inlineCode",{parentName:"a"},"AllowUsbStorage=[ true || false ]")),(0,a.kt)("br",{parentName:"p"}),"\n","When set to true, this directive allows the system to auto-mount plugged USBs to read/save files outside the system. When set to false, the system will not allow access to any plugged USB.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/software-modules"},(0,a.kt)("inlineCode",{parentName:"a"},"AvailableSoftware=[ pkg1|...|pkgN ]")),(0,a.kt)("br",{parentName:"p"}),"\n","This directive defines a list of software packages to enable for the user during the execution mode.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/bookmarks"},(0,a.kt)("inlineCode",{parentName:"a"},"Bookmarks=[ bookmark1|...|bookmarkN| ]")),(0,a.kt)("br",{parentName:"p"}),"\n","Set the browser bookmarks","*"," (supported only in Chromium and Firefox).")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/wallpaper"},(0,a.kt)("inlineCode",{parentName:"a"},"Wallpaper=[ default || wallpaperURL ]")),(0,a.kt)("br",{parentName:"p"}),"\n","By setting this directive to ",(0,a.kt)("inlineCode",{parentName:"p"},"default"),", the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/equetzal/huronOS-build-tools/blob/development/software-modules/base/03-budgie/files/huronos-background.png"},"huronOS wallpaper")," will be used. Otherwise, the image will be retrieved from the specified URL.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/wallpaper"},(0,a.kt)("inlineCode",{parentName:"a"},"WallpaperSha256=xxxxxxxxxx")),(0,a.kt)("br",{parentName:"p"}),"\n","This directive requires the SHA256 of the image defined in the wallpaper URL (except for default)."))),(0,a.kt)("h3",{id:"specific-section-example"},"Specific section example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ini"},"[Contest]\nAllowedWebsites=codeforces.com|omegaup.com|\nAllowUsbStorage=false\nAvailableSoftw
1are=langs/g++|programming/vscode|\nBookmarks={Codeforces^http://codeforces.com}|\nWallpaper=https://directives.huronOS.org/wallpaper1.png\nWallpaperSha256=somerandomsha\n")),(0,a.kt)("h1",{id:"specific-times-directives"},"Specific-Times Directives"),(0,a.kt)("p",null,"These sections (","[Event-Times]",", ","[Contest-Times]",") define the beginning and end date-times for the event and contest modes. The syntax is as follows:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ini"},"[Section-Times]\nBeginTime1  EndTime1\nBeginTime2  EndTime2\n...\nBeginTimeN  EndTimeN\n")),(0,a.kt)("p",null,"The date-times must use ",(0,a.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/ISO_8601"},"ISO 8601")," extended time format relative to the local time. For example: ",(0,a.kt)("inlineCode",{parentName:"p"},"2030-01-10T11:45:01"),". "),(0,a.kt)("p",null,"For more information, please refer to ",(0,a.kt)("a",{parentName:"p",href:"/docs/next/usage/directives/configurations/events-and-contests"},"here"),"."),(0,a.kt)("h3",{id:"times-section-example"},"Times section example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ini"},"[Event-Times]\n2023-05-13T10:00:00 2023-05-13T19:00:00\n[Contest-Times]\n2023-05-13T11:00:00 2023-05-13T15:00:00\n")),(0,a.kt)("h2",{id:"directives-file-example"},"Directives File Example"),(0,a.kt)("p",null,"This example was used during the ICPC Mexico Qualification Rounds of 2023."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ini"},"[Global]\nTimeZone=America/Mexico_City\nConfigExpirationTime=2023-05-29T12:00:00\nAvailableKeyboardLayouts=latam|us|es|dvorak|\nDefaultKeyboardLayout=latam\nEventConfig=false\nContestConfig=true\n\n[Always]\nAllowedWebsites=all\nAllowUsbStorage=true\nAvailableSoftware=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|\nBookmarks={Contest^https://boca.icpcmexico.org}|{BOCA_User_Manual^https://directives.huronos.org/icpcmx/boca_manual_teams.en.html}|\nWallpaper=https://directives.huronos.org/icpcmx/gpmx2023_round1_always_mode.png\nWallpaperSha256=c382c20791695176be47257ec924c9df39e40534d4ac02fb23c4f3c823334fd8\n\n[Event]\nAllowedWebsites=all\nAllowUsbStorage=true\nAvailableSoftware=internet/chromium\nBookmarks=huronOS^https://huronos.org|\nWallpaper=default\n\n[Contest]\nAllowedWebsites=boca.icpcmexico.org|score.icpcmexico.org|icpcmexico.org|\nAllowUsbStorage=false\nAvailableSoftware=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|\nBookmarks={Contest^https://boca.icpcmexico.org}|{BOCA_User_Manual^https://directives.huronos.org/icpcmx/boca_manual_teams.en.html}|\nWallpaper=https://directives.huronos.org/icpcmx/gpmx2023_round1_contest_mode.png\nWallpaperSha256=824d8560d35ec070589a5b72f2da85aff38203a7f6b1aee8bae7900c608d4369\n\n[Event-Times]\n\n[Contest-Times]\n2023-05-13T13:40:00 2023-05-13T19:02:00\n2023-05-27T10:50:00 2023-05-27T16:12:00\n")))}d.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.