Skip to content

Repository files navigation

Archy5250

A native IBM i / AS-400 5250 green screen for the Omarchy Quickshell bar — a bar widget for your hosts and sessions, and a fullscreen overlay that renders the 24x80 screen in QML.

the pub400.com sign-on screen rendered in the Omarchy shell

What this is

The 5250 protocol is not reimplemented here. tn5250 ships lib5250, whose Tn5250Terminal struct is an explicit display-driver vtable. Archy5250 adds a second implementation, a5250-bridge, which renders to newline-delimited JSON on stdout and takes keystrokes as NDJSON on stdin.

  Panel.qml / Overlay.qml          the bar entry and the green screen
           |
      Service.qml                  keepLoaded, owns every session
           |  NDJSON over stdio
    a5250-bridge                   ~750 lines of C, one process per session
           |
      lib5250.so                   telnet, the 5250 data stream, EBCDIC
           |
    IBM i / AS-400

lib5250 keeps doing telnet negotiation, character translation, field handling and AID processing. QML is only a display driver. The shell never speaks telnet.

Install

omarchy plugin add https://github.com/AydenB/archy5250.git --enable

Then open the panel from the bar and press Run setup in a terminal. Setup needs to install lib5250 and compile the bridge, it runs in a visible terminal where you can see and approve what it does — omarchy plugin add.

Setup offers two routes:

  • System package — the AUR tn5250 package, via paru or yay.
  • Private copy — builds lib5250 from the upstream release tarball into ~/.local/share/archy5250/vendor.

Hosts

Profiles live in ~/.tn5250rc, the same file the tn5250 command line reads, in the format tn5250rc(5) documents:

pub400 {
    host = pub400.com
    env.TERM = IBM-3477-FC
}

The panel reads and writes this file as a round trip: comments, key order and options this plugin knows nothing about all survive an edit, so it stays safe to hand-edit and your profiles keep working from the CLI. Anything the panel does not expose can simply be typed into the file.

Add hosts from the panel, or edit the file directly — the panel follows changes either way.

the panel, listing one live session and one connected host

Keys

The bindings follow tn5250's own.

Key Does
F1-F12 F1-F12
Shift+F1-Shift+F12 F13-F24
Tab / Shift+Tab next / previous field
Enter Enter
Page Up / Page Down Roll down / Roll up
Ctrl+R Reset — clears II, the inhibited keyboard
Ctrl+A Attention
Ctrl+C System Request
Ctrl+K Field Exit
Ctrl+E Erase
Ctrl+L Refresh
Ctrl+H Help
Ctrl+Shift+V paste the clipboard as keystrokes
Ctrl+Shift+Tab switch between live sessions
Ctrl+Shift+Q close the screen

Settings

Right-click the bar icon to jump straight to the screen. Per-widget settings live in the bar's own settings form:

Setting Default
Monospace font auto Empty picks the first available of CaskaydiaMono Nerd Font, JetBrainsMono Nerd Font, monospace
Screen font size 15 A ceiling — the screen shrinks to fit a small display
Palette 5250 5250 is the authentic terminal palette; Theme tints it with your Omarchy theme
Cursor blink On

Development

scripts/dev-sync.sh   # copy the tree into ~/.config/omarchy/plugins and rescan
test/run.sh           # exercise the Qt-free logic modules under node
omarchy plugin validate ~/.config/omarchy/plugins/io.github.aydenb.archy5250

Editing QML under ~/.config/omarchy/plugins/ hot-reloads it — except for this plugin, which is keepLoaded so sessions survive the screen closing. That also means the whole plugin only reloads on omarchy restart shell. The Qt-free logic lives in Attributes.js, Keymap.js and Tn5250rc.js, which is where the test suite reaches it.

The bridge is debuggable on its own, which is the point of the split:

printf '{"t":"key","k":"Enter"}\n' | a5250-bridge pub400.com | jq -c 'select(.t=="screen")'

Licence

MIT. lib5250 is LGPL-2.1 and is linked, not vendored.

About

5250 emulator for the Omarchy shell, rendered in QML on top of lib5250.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages