Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for vtmx-files #704

Open
o-sdn-o opened this issue Feb 4, 2025 · 1 comment
Open

Support for vtmx-files #704

o-sdn-o opened this issue Feb 4, 2025 · 1 comment

Comments

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Feb 4, 2025

*.vtmx Support

The application layout is described by a hierarchical xml-like structure stored as plain text in the app.vtmx file with a shebang. This is in the spirit of *.html markup, only we have our own tags and Lua is used instead of JavaScript.

It should be like:

  • app1.vtmx:

    #!/bin/vtm
    <vtmx>
        <config>
          ...
        </config>
        <body id="App_1" title="Application Title" footer="vtmx-application">
            <fork axis="vt">
                <slot1>
                    <item="Application Title"/>
                </slot1>
                <slot2>
                    <fork axis="hz">
                        <slot1>
                            <item="Left side."/>
                        </slot1>
                        <slot2>
                            <list>
                                <item="Right side:"/>
                                <item="Hello!"/>
                                <item="World!"/>
                                <item="Click me to exit." id="label_1">
                                    <onclick script="App_1.exit();"/>
                                    <onhover script="is_active=gear.is_active(); label_1.underline(is_active); label_1.invert(is_active);"/>
                                </item>
                            </list>
                        </slot2>
                    </fork>
                </slot2>
            </fork>
        </body>
        <events>
            <App_1 key*>
                <key="Esc" script="vtm.exit()"/>
            </App_1>
        </events>
    </vtmx>
  • Approx result:

    screen_record_Tue_02.04.2025_20-01-20.97.mp4
@joeskeen
Copy link

joeskeen commented Mar 20, 2025

I love this idea! This would be the most useful feature for me. I am often looking for a way to quickly get a bunch of tools up for a work load (currently using one laptop for both fun and profit, so I'm switching between things often). This would allow me and my ADHD to not get distracted as much when switching contexts and be able to get into the flow. 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants