blob: 97994c7c2d79d6290e1437d139f1769012543615 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# CURSOR-BREATHE-MODE
An Emacs minor mode that animates the cursor width in a slow breathing pattern, making it more visible without relying on blinking.

## Why
Because it's cool! And while a blinking cursor can be jarring, it is also more visible than a static one. This is both dynamic enough to catch the eye, yet static enough to always be visible.
## Installation
### straight.el
```elisp
(use-package cursor-breathe-mode
:straight (cursor-breathe-mode
:type git
:repo "https://git.etenil.net/cursor-breathe-mode.el")
:config (cursor-breathe-mode 1))
```
### Manual
Copy `cursor-breathe-mode.el` somewhere on your `load-path`, then:
```elisp
(require 'cursor-breathe-mode)
(cursor-breathe-mode 1)
```
## Usage
Toggle with `M-x cursor-breathe-mode`.
## Customisation
All options are under `M-x customize-group cursor-breathe`.
- `curbreathe/cursor-type`: shape to animate: `hbar` (horizontal bar,
default) or `bar` (vertical bar)
- `curbreathe/min-size`: minimum width in pixels (default `2`)
- `curbreathe/max-size`: maximum width in pixels (default `8`)
- `curbreathe/frame-rate`: animation steps per second (default `10`)
## Caveats
Emacs is complex and single-threaded, so sometimes the timer looks 'stuck', it is usually temporary and will defreeze when another command is run.
Only `bar` and `hbar` cursor types are supported for the foreseeable future (depends on emacs cursor implementation.)
|