···6677# Usage
8899-Eventually you should download the bin from the releases and copy it to your board and then follow the vim plugin steps i will add below.
99+So the orginal goal was for keystrokes to make a nice pattern in your status bar as well as on the led matrix of daedalus but I couldn't get the serial to work from vim; not entirely sure why but it really doesn't like this for some reason.
1010+1111+What I do have instead is firmware for random led blinking when a serial character is detected and a vim plugin that displays random braille characters in the status bar.
1212+1313+You can read the [plugin](/lua/braille_indicator/README.md) for more information on installation and for the firmware you can use any serial interface set to a `115200` baud rate (screen for example `screen /dev/tty.usbmodem101 115200`).
10141115<p align="center">
1216 <img src="https://raw.githubusercontent.com/taciturnaxolotl/carriage/main/.github/images/line-break.svg" />
+78
lua/braille_indicator/README.md
···11+# Braille Typing Indicator Plugin for Neovim
22+33+A simple plugin that displays a random Braille character in your statusline that changes every time you type.
44+55+## Installation
66+77+### Using a plugin manager (recommended)
88+99+#### [packer.nvim](https://github.com/wbthomason/packer.nvim)
1010+1111+```lua
1212+use {
1313+ 'taciturnaxolotl/daedalus',
1414+ config = function()
1515+ require('braille_indicator').setup()
1616+ end
1717+}
1818+```
1919+2020+#### [lazy.nvim](https://github.com/folke/lazy.nvim)
2121+2222+```lua
2323+{
2424+ 'taciturnaxolotl/daedalus',
2525+ config = function()
2626+ require('braille_indicator').setup()
2727+ end
2828+}
2929+```
3030+3131+### Manual installation
3232+3333+1. Clone this repository to your Neovim configuration directory:
3434+3535+ ```
3636+ git clone https://github.com/taciturnaxolotl/daedalus.git ~/.config/nvim/pack/plugins/start/daedalus
3737+ ```
3838+3939+2. Add the following to your `init.lua`:
4040+ ```lua
4141+ require('braille_indicator').setup()
4242+ ```
4343+4444+## Configuration
4545+4646+The plugin works with minimal configuration, but you can customize it:
4747+4848+```lua
4949+require('braille_indicator').setup({
5050+ update_statusline = true, -- Automatically update the statusline
5151+ verbose = true, -- Show setup messages
5252+})
5353+```
5454+5555+### Adding to your statusline
5656+5757+If you're using a custom statusline setup, add the Braille indicator with:
5858+5959+```lua
6060+%{v:lua.getBrailleIndicator()}
6161+```
6262+6363+For example, with lualine:
6464+6565+```lua
6666+require('lualine').setup({
6767+ sections = {
6868+ lualine_a = {
6969+ function()
7070+ return getBrailleIndicator()
7171+ end,
7272+ 'mode'
7373+ },
7474+ -- other sections...
7575+ }
7676+})
7777+```
7878+
+77
lua/braille_indicator/init.lua
···11+-- Braille Typing Indicator Plugin for Neovim
22+-- This is a proper plugin structure for installation in your Neovim config
33+44+local M = {}
55+66+-- Braille unicode characters (⠀ to ⣿)
77+local brailleChars = {
88+ '⠀', '⠁', '⠂', '⠃', '⠄', '⠅', '⠆', '⠇', '⠈', '⠉', '⠊', '⠋', '⠌', '⠍', '⠎', '⠏',
99+ '⠐', '⠑', '⠒', '⠓', '⠔', '⠕', '⠖', '⠗', '⠘', '⠙', '⠚', '⠛', '⠜', '⠝', '⠞', '⠟',
1010+ '⠠', '⠡', '⠢', '⠣', '⠤', '⠥', '⠦', '⠧', '⠨', '⠩', '⠪', '⠫', '⠬', '⠭', '⠮', '⠯',
1111+ '⠰', '⠱', '⠲', '⠳', '⠴', '⠵', '⠶', '⠷', '⠸', '⠹', '⠺', '⠻', '⠼', '⠽', '⠾', '⠿',
1212+ '⡀', '⡁', '⡂', '⡃', '⡄', '⡅', '⡆', '⡇', '⡈', '⡉', '⡊', '⡋', '⡌', '⡍', '⡎', '⡏',
1313+ '⡐', '⡑', '⡒', '⡓', '⡔', '⡕', '⡖', '⡗', '⡘', '⡙', '⡚', '⡛', '⡜', '⡝', '⡞', '⡟',
1414+ '⡠', '⡡', '⡢', '⡣', '⡤', '⡥', '⡦', '⡧', '⡨', '⡩', '⡪', '⡫', '⡬', '⡭', '⡮', '⡯',
1515+ '⡰', '⡱', '⡲', '⡳', '⡴', '⡵', '⡶', '⡷', '⡸', '⡹', '⡺', '⡻', '⡼', '⡽', '⡾', '⡿',
1616+ '⢀', '⢁', '⢂', '⢃', '⢄', '⢅', '⢆', '⢇', '⢈', '⢉', '⢊', '⢋', '⢌', '⢍', '⢎', '⢏',
1717+ '⢐', '⢑', '⢒', '⢓', '⢔', '⢕', '⢖', '⢗', '⢘', '⢙', '⢚', '⢛', '⢜', '⢝', '⢞', '⢟',
1818+ '⢠', '⢡', '⢢', '⢣', '⢤', '⢥', '⢦', '⢧', '⢨', '⢩', '⢪', '⢫', '⢬', '⢭', '⢮', '⢯',
1919+ '⢰', '⢱', '⢲', '⢳', '⢴', '⢵', '⢶', '⢷', '⢸', '⢹', '⢺', '⢻', '⢼', '⢽', '⢾', '⢿',
2020+ '⣀', '⣁', '⣂', '⣃', '⣄', '⣅', '⣆', '⣇', '⣈', '⣉', '⣊', '⣋', '⣌', '⣍', '⣎', '⣏',
2121+ '⣐', '⣑', '⣒', '⣓', '⣔', '⣕', '⣖', '⣗', '⣘', '⣙', '⣚', '⣛', '⣜', '⣝', '⣞', '⣟',
2222+ '⣠', '⣡', '⣢', '⣣', '⣤', '⣥', '⣦', '⣧', '⣨', '⣩', '⣪', '⣫', '⣬', '⣭', '⣮', '⣯',
2323+ '⣰', '⣱', '⣲', '⣳', '⣴', '⣵', '⣶', '⣷', '⣸', '⣹', '⣺', '⣻', '⣼', '⣽', '⣾', '⣿'
2424+}
2525+2626+-- Current braille character
2727+local currentBraille = brailleChars[1]
2828+2929+-- Update braille character randomly
3030+local function updateBrailleChar()
3131+ -- Use os.time() for randomness
3232+ math.randomseed(os.time() * 1000 + os.clock() * 10000)
3333+ local idx = math.random(1, #brailleChars)
3434+ currentBraille = brailleChars[idx]
3535+ return currentBraille
3636+end
3737+3838+-- Get current braille character for statusline
3939+function M.getBrailleIndicator()
4040+ return currentBraille
4141+end
4242+4343+-- Setup function with options
4444+function M.setup(opts)
4545+ opts = opts or {}
4646+4747+ -- Make sure statusline is visible
4848+ vim.o.laststatus = 2
4949+5050+ -- Key press handler
5151+ local function onKeyPress()
5252+ -- Update braille character
5353+ updateBrailleChar()
5454+ end
5555+5656+ -- Set up autocommands
5757+ vim.api.nvim_create_autocmd({"InsertCharPre", "CursorMovedI"}, {
5858+ callback = onKeyPress,
5959+ group = vim.api.nvim_create_augroup("BrailleIndicator", { clear = true })
6060+ })
6161+6262+ -- Make the function available globally for statusline
6363+ _G.getBrailleIndicator = M.getBrailleIndicator
6464+6565+ -- Add to statusline if requested
6666+ if opts.update_statusline then
6767+ vim.o.statusline = "%{v:lua.getBrailleIndicator()} %f %m %r %= %l,%c "
6868+ end
6969+7070+ -- Print setup message
7171+ if opts.verbose then
7272+ print("Braille indicator active. The character will change as you type.")
7373+ print("Add %{v:lua.getBrailleIndicator()} to your statusline if not already there.")
7474+ end
7575+end
7676+7777+return M