Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esublim

esublim is a Wayland-native analogue of enkiv2/asublim. It reads text from stdin, a file, or a command, splits it into whitespace-separated tokens, splits tokens larger than 512 bytes into smaller chunks, and starts showing tokens as soon as they are read. In looped modes the same stream is cached while it is displayed, then replayed after the input command finishes.

The original programs use X11/XOSD. This version uses GTK4 plus gtk4-layer-shell, which maps naturally to Wayland compositors that support wlr-layer-shell such as Sway, Hyprland, River and Wayfire.

Build

Install the development packages for:

  • gtk4
  • gtk4-layer-shell
  • pkg-config
  • a C compiler

Then build:

make

Install to /usr/local/bin:

sudo make install

Or install into your home directory:

make install PREFIX="$HOME/.local"

Usage

Single-token asublim-style mode:

./esublim --file words.txt --color LawnGreen --font "Monospace Bold 42"

Grouped overload mode:

./esublim \
  --file words.txt \
  --overload \
  --group-min 4 \
  --group-max 60 \
  --font-size-min 18 \
  --font-size-max 96 \
  -no-center

In --overload, several tokens are visible at the same time. Their coordinates, colors and font sizes are randomized. The target number of simultaneous tokens and the current font-size ceiling fluctuate smoothly between the configured minimum and maximum values.

Stop it from the same terminal with Ctrl+C. Avoid Ctrl+Z: it suspends the process and can leave the last frame visible. If that happens, run:

./esublim-stop

Background Launch

Put text files under TEXTDATA_ROOT. Two dictionaries can simply be two subdirectories or two groups of files under the same root:

$HOME/textdata/
  settings/
    a.txt
  noise/
    book-lines.txt
    words.txt

For the default $HOME/textdata layout, run:

./start.sh

start.sh is a small preset wrapper around launch-sublim.sh. For custom paths or launch settings, call launch-sublim.sh directly. It starts one overload process per data set by default, writes process IDs to esublim.pids, and writes logs to logs/.

Useful launch variables:

ESUBLIM="./esublim" \
TEXTDATA_ROOT="$HOME/textdata" \
COPIES_PER_SET=1 \
MAX_START_DELAY=0 \
PID_FILE="./esublim.pids" \
LOG_DIR="./logs" \
NICE_LEVEL=0 \
GROUP_MIN=4 \
GROUP_MAX=60 \
FONT_SIZE_MIN=18 \
FONT_SIZE_MAX=96 \
DELAY_SHOW=1 \
DELAY_WORD=0 \
DELAY_PHRASE_MIN=0 \
DELAY_PHRASE_MAX=10 \
./launch-sublim.sh

Stop the launched background set with:

./stop-sublim.sh

If no PID file is available, stop all running esublim processes by name:

./esublim-stop

Options

Supported options include:

-c, --color, --colour
-f, --font
-F, --file
-program, --program
--random-color
--random-colour
--subliminal
--random-loop
--random-words
--random
--overload
--group-min
--group-max
--font-size-min
--font-size-max
-delayShow
-delayWORD
-delayPhraseMin
-delayPhraseMax
-no-center
-no-random
-no-screensaver
--delayShowMax
--delayShowMin
--delayWordMax
--delayWordMin
--cooldown-max
--cooldown-min
--cooldownMax
--cooldownMin
-w, -x, --screen-width
-y, --screen-height
--centered
--center-offset-x
--center-offset-y
--offset-x
--offset-y
--timeout

Notes:

  • --font expects a Pango font description, for example "Inter Bold 48" or "Monospace 32", not an X font string.
  • --timeout is accepted for CLI compatibility; the show/hide timers are driven by the delay options.
  • -delayShow, -delayWORD, -delayPhraseMin and -delayPhraseMax are xsublim-compatible options and use microseconds. For example, xsublim's default -delayShow 40000 means 40 ms.
  • -program or --program runs a shell command and reads its stdout. In looped modes, tokens are displayed as they arrive and cached for replay.
  • Newlines in -program/--file input are treated as phrase boundaries for -delayPhraseMin and -delayPhraseMax.
  • -no-random loops through the collected input sequentially after the live stream ends. --subliminal, --random-loop, --random-words, --random and --overload pick random cached tokens after the live stream ends.
  • --overload enables grouped display, looped input, random replay, randomized font sizes, and the density/font-ceiling fluctuation.
  • -no-center and -no-screensaver are accepted for xsublim script compatibility. -no-screensaver is a no-op in this Wayland version.
  • --screen-width and --screen-height limit the random placement area.
  • --random-color chooses a new vivid color for each displayed token. This is the default; pass --color to use one fixed color.
  • Wayland does not have an X11-style global root window. If the compositor does not expose wlr-layer-shell, esublim falls back to ordinary fullscreen GTK windows and cannot guarantee always-on-top behavior.

License

GPL-3.0-or-later.

About

Wayland-native reimplementation of asublim using GTK4 and layer-shell.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages