Skip to content

Concepts

Josu Igoa edited this page Feb 20, 2023 · 3 revisions

Concepts of Ideckia

  • Layout: Bunch of items
  • Item: An element that has a single or multiple states. It is clickable in the client.
  • State: Definition of the item status: text, textColor, bgColor, icon and an action list.
  • Action: Action which will be fired (can be more than one in a state) in the host computer when the item is pressed in the client.

Layout file

All the items and their actions are defined in a plain JSON file. Here is a basic one.

Item

There can be two types of item:

  • ChangeDir: When clicked goes to the folder with name specified by the toDir property. Here goes to the directory named _main_.
  • States: When clicked executes the actions in order they are defined in the current state from list array. Actions array can be null or empty. After executing the actions and goes to the next element in list.
    • Here at the beginning the text shown will be working and the backgroud will be green. When clicked the state changes to not working and red background. When clicked again working and so on. No action will be executed.
    • Here will execute counter action every time is clicked.

RichString

The text in the state can have different size, color and style (bold, italic, underline) parts. The format is {transformer:text to transform}. The transformer can be:

  • b: The text to transform will be bold
  • i: The text to transform will be italic
  • u: The text to transform will be underlined
  • color.colorName: The text to transform will be rendered in colorName color.
  • size.fontSize: The text to transform will be rendered in fontSize size.
  • emoji.unicode: This one has no : since it doesn't apply to a text. Will render the emoji of the unicode value, multiple values can be separated with commas (,). For example emoji.1F919,1F3FC.

The transformers can be chained. For example:

The text is {b:{i:{u:bold, italic and underlined}}}. And this text will be {color.red:{size.50:colored with red and BIG}}
Clone this wiki locally