https://github.com/raphgl/neosent
Suckful Sent
https://github.com/raphgl/neosent
presentation sent suckless
Last synced: 7 months ago
JSON representation
Suckful Sent
- Host: GitHub
- URL: https://github.com/raphgl/neosent
- Owner: RaphGL
- License: gpl-3.0
- Created: 2021-11-08T19:26:45.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T15:49:07.000Z (about 1 year ago)
- Last Synced: 2024-10-18T15:06:26.868Z (about 1 year ago)
- Topics: presentation, sent, suckless
- Language: C
- Homepage:
- Size: 444 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Suckful Sent
Explore the docs »
·
Report Bug
·
Request Feature
Table of Contents
Neosent is a drop-in replacement for Suckless Sent.
It provides everything you need out of the box instead of relying on patches and editing header files.
| Features | Implemented |
| --------------------------------- | :---------: |
| PNG, JPG, AVIF | ✅ |
| Command-line options | ✅ |
| Inverted colors and toggling them | ✅ |
| Progress bar | ✅ |
| Fullscreen mode | ✅ |
| PDF generation | ❌ |
### Built With
- C
- [SDL2](https://www.libsdl.org/)
## Getting Started
Make sure you have the SDL2, SDL2_ttf and SDL2_image libraries installed.
On Arch:
```sh
sudo pacman -S sdl2 sdl2_image sdl2_ttf
```
### Installation
#### Manually
1. Clone the project
2. Run:
```sh
$ meson setup build
$ cd build
```
AVIF images are also supported but they're hidden behind a flag for portability reasons. To enable run:
```sh
$ meson configure -Davif_image_support=true
$
```
```sh
$ meson configure --buildtype=release
$ meson compile
```
3. Move the `nsent` file to your `$PATH`.
#### AUR
```sh
paru -S neosent-git
```
## Usage
NeoSent files usually have a `.ns` extension, but any (or no) extension is allowed as well.
```sh
$ nsent file.ns
```
Some attributes can be changed to fit the user's preference.
The syntax is very minimal, to learn it just see this example:
```
NeoSent
@some_image.png
It depends on:
- SDL2
neosent [FILE]
one slide per paragraph
# This is a comment and it won't appear in the presentation
\ # A backslash alone will create an empty slide
# both of these will be shown instead of interpreted
\@FILE.png
\# Some comment?
Having problems? Make an issue!
```
### Changing font and colors
All changeable attributes are available through flags and environment variables.
Check `nsent -h` to know what flags are available.
The following environment variables are available:
- `NS_FG_COLOR` - changes text color
- `NS_BG_COLOR` - changes the background color
- `NS_FONT` - changes the preferred font, if not found it will fallback to a system default
Fonts are matched to the system's. Just roughly name the font you want and neosent will fetch it. Fonts have to be installed on the system to work.
```sh
nsent -f "JetbrainsMono" presentation.ns
nsent -f "Ubuntu" presentation.ns
```
Colors are represented as RBG values. Passing them to the program:
```sh
nsent -t 0 -b "#FFFFFF" presentation.ns # black text and white background
nsent -t "#eb4034" -b "#0x2e22a1" presentation.ns # red text and blue background
```
### Keybindings
| Previous page | Next page |
| ------------- | ------------- |
| `Left Arrow` | `Right Arrow` |
| `Up Arrow` | `Down Arrow` |
| `Page Up` | `Page Down` |
| `Mouse Right` | `Mouse Right` |
| `h` | `l` |
| `k` | `j` |
| `p` | `n` |
Miscellaneous keybindings:
| Function | Keybind |
| ------------------------- | -------------- |
| Go to first and last page | `Home` & `End` |
| Invert colors | `i` |
| Go fullscreen | `f` / `F11` |
| Quit | `q` |
## License
Distributed under GPLv3 License. See [`LICENSE`](https://github.com/RaphGL/NeoSent/blob/main/LICENSE) for more information.