-
Notifications
You must be signed in to change notification settings - Fork 6
/
example
89 lines (64 loc) · 2.84 KB
/
example
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
center =================================================================
___ _ ___ _ _ _
| _ ) __ _ __| |_ / __| (_)__| |___ ___
| _ \/ _` (_-< ' \ \__ \ | / _` / -_|_-<
|___/\__,_/__/_||_| |___/_|_\__,_\___/__/
<b>Stanislav Kontár<r>
2018
center =================================================================
<u>Basic slide show for terminal<r>
<b><i>Written in Bash!<r>
Needs modern terminal emulator with
support for ANSI escape sequences
and 256 colors
center =================================================================
<b>Supports<r> <u>some<r> <i>basic<r> <b><i>formatting<r>...
...<R>a<r> <G>few<r> <Y>nice<r> <V>and<r> <E>fancy<r> <B>colors<r>...
...and <s> Export to PDF <r> using ImageMagick.
If 'unclutter' is installed,
it also hides mouse cursor.
block ==================================================================
Supported slide styles are:
• <b>Block<r> – No alignment, centered block
• <b>Center<r> – Every line aligned to center
• <b>Code<r> – Highlighted code
• <b>Section<r> – Chapter / section division slide
code bash ==============================================================
# Uses `highlight` for code highlighting
for (( i = 0; i < nr_lines; i++ )); do
for (( j = 0; j < filler; j++ )); do
printf " "
done
echo -e "${lines[i]}"
done
block ==================================================================
Very easy to control:
• <b>→, k, Space, Enter, Page Down<r> – Next slide
• <b>←, j, Backspace, Page Up<r> – Previous slide
• <b>↑, Home<r> – First slide
• <b>↓, End<r> – Last slide
• <b>b<r> – Blank / restore screen
• <b>s<r> – Show / hide status line
• <b>r<r> – Reload slides
• <b>p<r> – Export to PDF
• <b>Esc, q<r> – Quit
block ==================================================================
More fun is possible with Unicode and
ASCII art ¯\_(ツ)_/¯
┌───────────┐ ╔═══════════╗
│ Tables │ ║ Tables ║
├─────┬─────┤ ╠═════╦═════╣
│ ONE │ TWO │ ║ ONE ║ TWO ║
└─────┴─────┘ ╚═════╩═════╝
Few missing lines: ╡╢╖╕╜╛┼╞╟╬╧╨╤╥╙╘╒╓╫╪
Also not to forget FontAwesome!
block ==================================================================
`figlet` and `showfigfonts` are good commands
to create a nice looking ASCII art headings.
___ __ ___________ __
/ _ )___ ____ / / / __/_ __/ | /| / /
/ _ / _ `(_-</ _ \ / _/ / / | |/ |/ /
/____/\_,_/___/_//_/ /_/ /_/ |__/|__/
<G>$<r> figlet -f smslant <G>$<r> figlet -f small
section ================================================================
That's all folks!