Skip to content

Lommelun/slides

 
 

Repository files navigation

Slides

Slides in your terminal.

Slides Presentation

Installation

Homebrew Snapcraft AUR

Instructions

MacOS

brew install slides

Arch

yay -S slides

Nixpkgs (unstable)

nix-env -iA nixpkgs.slides

Any Linux Distro running snapd

sudo snap install slides

Go

go install github.com/maaslalani/slides@latest

From source:

git clone https://github.com/maaslalani/slides.git
cd slides
go install

You can also download a binary from the releases page.

Usage

Create a simple markdown file that contains your slides:

# Welcome to Slides
A terminal based presentation tool

---

## Everything is markdown
In fact, this entire presentation is a markdown file.

---

## Everything happens in your terminal
Create slides and present them without ever leaving your terminal.

---

## Code execution
```go
package main

import "fmt"

func main() {
  fmt.Println("Execute code directly inside the slides")
}
```

You can execute code inside your slides by pressing `<C-e>`,
the output of your command will be displayed at the end of the current slide.

---

## Pre-process slides

You can add a code block with three tildes (`~`) and write a command to run *before* displaying
the slides, the text inside the code block will be passed as `stdin` to the command
and the code block will be replaced with the `stdout` of the command.

```
~~~graph-easy --as=boxart
[ A ] - to -> [ B ]
~~~
```

The above will be pre-processed to look like:

┌───┐  to   ┌───┐
│ A │ ────> │ B │
└───┘       └───┘

For security reasons, you must pass a file that has execution permissions
for the slides to be pre-processed. You can use `chmod` to add these permissions.

```bash
chmod +x file.md
```

Checkout the example slides.

Then, to present, run:

slides presentation.md

If given a file name, slides will automatically look for changes in the file and update the presentation live.

slides also accepts input through stdin:

curl https://example.com/slides.md | slides

Go to the first slide with the following key sequence:

  • g g

Go to the next slide with any of the following key sequences:

  • space
  • right
  • down
  • enter
  • n
  • j
  • l
  • Page Down
  • number + any of the above (go forward n slides)

Go to the previous slide with any of the following key sequences:

  • left
  • up
  • p
  • h
  • k
  • N
  • Page Up
  • number + any of the above (go back n slides)

Go to a specific slide with the following key sequence:

  • number + G

Go to the last slide with the following key:

  • G

Search

To quickly jump to t