What is iron?
iron is a minimal rautafarmi client written in Bash for GNU/Linux. It allows the user to post/recieve messages using the rautafarmi API and it displays the information to the user in a nice format. iron is based on the older rchat rautafarmi client that used messages.txt to get messages.
Why should I use iron over rchat?
Unlike rchat, iron is minimal in design and only does what you expect a basic client to do. It does not have auto updating, no history, no donate command, no news, no changelog, and no :open. It also brings a much cleaner and improved codebase. Because of this, bugs are less likely and the client is much faster. The user doesn't have to run lines of code he doesn't need.
Most importantly though, iron does not use the old messages.txt method used by older instances. This also means iron is the first rautafarmi client to use and support the new JSON based rautafarmi API. This API is much faster and will allow compatible instances to push updates without breaking client support.
iron much like rchat is Vim like. Just like Vim, iron has different modes which are used in Vim like ways. You can even use Vim to compose your message if you want (using the ':e' command).
- 16 color support
iron supports 16 colors out of the box. There will also be a 256-color patch for terminals that support it as soon as the rchat patch has been ported over.
- 4chan-like green text
iron has 4chan-like green text for messages that start with '>'.
- Support for the new, fast rautafarmi API
iron is the first unofficial Rautafarmi client with support for the new Rautafarmi API. This API is much faster and less likely to break.
- No pointless features instead.
iron does not have pointless features slowing it down. If the user wants a feature that does not exist, he can easily implement it. Patches can be submitted and the user can apply it to his iron copy using the patch coreutil.
Because it is written in Bash, it is highly flexible and hackable allowing it to do many things with minimal effort by the user.
iron has three modes - Normal mode, Command mode and Insert mode. When you first load messages, you will be in Normal mode. This mode is simply used for reading and entering another mode. If you choose to enter Command mode, you're able to perform actions to iron such as exiting or composing a message in an editor.
If you press 'i', you'll be in Insert mode. This mode is used to compose messages. This will bring up a little area where you can type your message. If you press enter, your message will be sent. If you want to send messages with multiple lines, press e or :e to open up a file in an editor ($EDITOR).
Simply run iron inside a terminal emulator or something like tmux. For iron to work though, it needs to connect to an instance. As of writing this document, there is only one. You can find it here. Run ':set instance' and then type in the URL of the instance. If you press enter, the instance will be set. This is saved until settings are reset (or ~/.local/share/iron is deleted). To join the instance, type ':j' and press Enter. This will (assuming dependencies are installed and you are connected to the internet) download the API and then print messages to the screen. Here, you are in Normal mode.
From here, you may run commands, or enter Insert mode to compose a message. See 'Commands' or 'Keybinds' for more information.
Download it (see 'Download') and run 'make install' as root.
iron can be downloaded using dev-vcs/git. To do this:
- cd - git clone https://codeberg.org/speedie/iron - cd iron
- ':q' - Quit iron
- ':l' - Leave the instance
- ':r' - Refresh
- ':e' - Compose a message in $EDITOR (or Vi if none is specified)
- ':reset' - Reset all settings (including instance) to default.
- i - Enter insert mode
- r - Refresh messages
- : - Enter command mode
- e - Compose a message in $EDITOR
- q - Leave the instance
- l - Leave the instance
- ZQ - Quit iron
- ZZ - Leave the instance
To submit patches, Create a pull request with your patch in the patches branch or send me an email. Patches can be generated using the 'diff -up' command on a GNU/Linux system.
This patch replaces the ANSI escape codes with tput commands. This allows for more colors and also allows you to separate your iron color scheme from your terminal color scheme (Useful if you use Pywal).
NOTE: The 1.1 version is compatible with 1.2 too.iron-tputcols-1.0.diff iron-tputcols-1.1.diff
This patch adds new image functionality to iron. Specifically it allows you to post images (using the imgurl field). To post an image, simply add the link somewhere in your message. It will be moved to the Image URL field before the post is sent to the instance.
NOTE: The 1.1 version is compatible with 1.2 too.iron-embed-image-1.0.diff iron-embed-image-1.1.diff
This patch adds xrdb or .Xresources support to iron. Note that values must be defined with the 'iron' prefix to be used. You may modify the patch to use any values if you want which would enable Pywal support.
NOTE: The 1.0 version is compatible with 1.1 and 1.2 too.iron-xresources-1.0.diff
This patch adds keybinds for viewing older/newer messages. If you press 'u', you will see the newest messages. If you press 'd', you will go down the history.
Do note that this requires parsing ALL messages, not just the terminal size meaning loading messages takes longer. Because of this, there are two variants. The regular variant will download and parse every single message on load and then will not parse it again. The ondemand variant will only parse the old messages when navigating through the history. I personally prefer this variant!iron-viewhist-1.1.diff iron-viewhist-ondemand-1.1.diff iron-viewhist-1.2.diff iron-viewhist-ondemand-1.2.diff
This patch allows the user of iron to set nicknames for themselves. It will be saved until the ':reset' command is used (data is cleared) or the nickname is changed.
Once a nickname is set, messages will be sent with it. To set a nickname, simply use the ':set nickname' command.iron-nickname-1.1.diff iron-nickname-1.2.diff
This patch adds two commands, ':hide' and ':show'. The hide command will open all messages sent inside $EDITOR (or Vim if $EDITOR is not defined) and allow the user to make changes. A patch will then be created that will be applied on startup. The show command does the complete opposite, it reverts the patch.
This means the patch is useful for other things because it allows you to modify the messages in any way you want (or even create new ones client side).
NOTE: The 1.1 version is compatible with 1.2 too.iron-hidemessages-1.1.diff
This patch implements notification support. With this patch, the latest message along with the username will be sent as a notification. It requires a notification daemon and libnotify-send to work. If it is not available, no notification will be sent.
NOTE: The 1.0 version is compatible with 1.1 and 1.2 too.iron-notification-1.0.diff
This patch adds a keybind to open a URL. To open the latest image sent (using the image field), you use the ':i' command. To open the latest URL sent (using the message field), you use the ':o' command. By default this patch uses xdg-open but you can change the browser to anything you want.
NOTE: The 1.0 version is compatible with 1.1 and 1.2 too.iron-openurl-1.0.diff
Insert mode editor
This patch replaces the 'i' bind with the action of the ':e' command. You can still access the old insert mode by pressing 'e' though.iron-itoedit-1.0.diff iron-itoedit-1.1.diff iron-itoedit-1.2.diff
This patch allows you to add art or general text to display in the iron starter menu.
NOTE: The 1.0 version is compatible with 1.1 and 1.2 too.iron-art-1.0.diff
This patch allows iron to refresh its borders and messages based on terminal size without any reloading. This is done inside the IRON_HEADER function so any time the header is printed, the size is updated first.
Was considering merging this into main but decided not to as not everyone would want this!iron-refreshzoom-1.2.diff
This patch removes the iron version number, all separators and the instance status from the chat area so that all space (minus two lines) will be used for messages.iron-hidestatus-1.0.diff iron-hidestatus-1.1.diff iron-hidestatus-1.2.diff
speedie's combo patch
This patch is a combo patch. It adds embed image, hide messages, i to edit, nickname, tput colors and view history patches into one patch that can be applied to a clean iron build.
This diff was created for use with the Gentoo ebuild (because a few of the patches I use conflict with each other). If you want these patches, simply apply this patch.
NOTE: The 1.2-r2 patch adds the refreshzoom patch as well.iron-speedie-1.1.diff iron-speedie-1.2.diff iron-speedie-1.2-r2.diff
iron, along with any contributions made to it (such as all user-submitted patches) are licensed under the GNU GPLv3 free software license.
Submit them in the Codeberg repository or let me know elsewhere such as email.