back to home

kuokuo123 / otter-launcher

A hackable cli/tui launcher built for keyboard-centric wm users, featuring vi & emacs keybinds, ansi decoration, etc

255 stars
6 forks
3 issues
RustNixShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing kuokuo123/otter-launcher in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/kuokuo123/otter-launcher)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

*minimalist, blazingly fast, keyboard-centric* Overview A very hackable app launcher, designed for keyboard-centric wm users. It is blazingly fast, supports vi and emacs keybinds, and can be decorated with ansi color codes, sixel or kitty image protocols. Plus, through bash scripting, system info widgets can be added to the infinity. The core concept is making these behaviours possible: • type "gg margaret thatcher" to google the lady in a web browser • "sh htop" to run htop in a terminal • "dc linux" to search the word linux with an online dictionary • "app" to launch application menu • etc. Some helper scripts can be found in the contrib folder, modules in wiki. Features • modularized to run different commands • vi and emacs keybinds • two suggestion modes: list & hint • tab completion; tab again to undo completion • edit prompt in an external editor (vim, emacs, etc.) • url encoding for web searching • supporting ansi codes, chafa, sixel or kitty image protocol, etc. • overlay layer to show chafa image • cheat sheet • callback function • customizable shell by which programs are launched (sh -c, zsh -c, hyprctl dispatch exec, etc) • cli mode to launch modules directly (eg. "otter-launcher app" to enter app menu directly) • minimalist, blazingly fast, keyboard-centric Table of Contents • Overview • Features • Demo • Installation • Configuration • Integration • Stylling Demo > Workflow >External editor, list selection, and cheatsheet Installation AUR Install with AUR helpers Building from source • Compile from source code • Create a config file mannually Put a config at $HOME/.config/otter-launcher/config.toml. The default config looks for /etc/otter-launcher/pikachu.example to show a chafa image. You can modify the config file to remove this line from overlay_cmd. Configuration Otter reads from $HOME/.config/otter-launcher/config.toml. If missing, it looks into /etc/otter-launcher/config.toml, which is included in the AUR installation. The default config comes with a capybara to demonstrate how image integration works. Remove it by modifying overlay_cmd in the config file. The confing has four sections: • [general] includes generic options • [interface] includes options related to user interface • [overlay] includes options releated to image integration • [[modules]] can be configured through bash scripting in an unlimited number All the available options are listed below. Check more examples for module config at the wiki page. Integration Otter-launcher works well with tui, cli programs, and bash pipelines. Some tricktips: • Use your wm's window rules to control its window size, and make it large enough to contain the printed content to prevent a skewed layout. • [[modules]].cmd can be scripted to adjust window sizes. For example: • Check out the wiki page to see more integration examples, like vpn, ppd, cups, wifi, etc. • Some tui utilities that works really well: • Desktop app launcher: sway-launcher-desktop fsel • Audio control: pulsemixer • Bluetooth control: bluetui bluetuith • Wifi control: nmtui impala • Spotify: spotify_player • Mouse control: wl-kbptr • More on Awesome TUIs or Awesome Command Line(CLI/TUI) Programs. • It's recommended to setup a dedicated desktop app launcher as a module, like fsel (rust and very fast) or sway-launcher-desktop (bash speed). The default config is just a simple script finding into regular directories and flatpak. If your apps are from different sources, it won't show. • If you want to change the window size of the external editor, call a wrapper script at general.external_editor. Examples of such a wrapper are in the contrib folder. • Running otter in wayland's layer shell surface like rofi is possible, but without perceivable benefit. This should be done through a terminal capable of running in layer shell like kitty, because otter as a tui program can only run within a terminal. Below is an example using kitten panel in niri: • You can also run otter with general.loop_mode like a daemon, and hide it after command execution using general.callback. However, kitten panel currently has issues with wayland's multi-monitor setup as it cannot unhide layer shell at the focused monitor. An example for such a config in niri: Styling Two Liner in Hint Mode Fastfetch Since v0.6.4 fastfetch in interface.header_cmd is supported. It works without extra settings. However, fastfetch comes with its own "pipe mode" that sometimes does not pipe colors, so using it in overlay.overlay_cmd should turn an extra switch "fastfetch --pipe false". Image Protocol Using chafa in header_cmd to render the image. Image Source: Artist Kat Corrigan & MWMO Stormwater Park Image to the Left Rendering chafa image by overlay_cmd at the left, moving the inteface to the right. Image to the Right This config renders a prinny using overlay_cmd, and then move the overlay right. `toml [overlay] render image in overlay layer using chafa overlay_cmd = "chafa -s x10 $HOME/.config/otter-launcher/image.png" overlay_trimmed_lines = 1 #move overlay rightwards move_overlay_right = 32 [interface] move the interface move_interface_down = 1 customized header & list prefix header = """ ┌ \u001B[1;34m $USER@$(echo $HOSTNAME) \u001B[0m───┐ │ \u001B[90m󱎘 \u001B[31m󱎘 \u001B[32m󱎘 \u001B[33m󱎘 \u001B[34m󱎘 \u001B[35m󱎘 \u001B[36m󱎘\u001B[0m │ └ \u001B[36m \u001B[1;36m system\u001B[0m archlinux ┘ ┌ \u001B[33m \u001B[1;36m window \u001B[0m $XDG_CURRENT_DESKTOP ┐ │ \u001B[31m \u001B[1;36m loads\u001B[0m $(cat /proc/loadavg | cut -d ' ' -f 1) │ │ \u001B[32m \u001B[1;36m memory\u001B[0m $(free -h | awk 'FNR == 2 {print $3}') │ │ \u001B[90m\u001B[0m """ list_prefix = " └ \u001B[34m󱓞 " selection_prefix = " └ \u001B[31m󱓞 " default_module_message = " └ \u001B[34m󱓞 \u001B[33msearch\u001B[0m the internet" place_holder = "type & search" suggestion_mode = "list" suggesti _...truncated for preview_