You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's make the command line a more colorful place, one ASCII character at a time.
14
+
15
+
### Create Your Own Screensaver
16
+
17
+
Got an idea for a cool ASCII animation? Want to contribute to the collection? It's easy!
18
+
19
+
#### The Easy Way (Generator)
20
+
21
+
You can use the built-in generator to create a new screensaver with all the boilerplate code you need. Just run:
22
+
23
+
```bash
24
+
./screensaver.sh --new my-awesome-screensaver
25
+
```
26
+
(You can also use `-n` instead of `--new`)
27
+
28
+
This will create a new directory `gallery/my-awesome-screensaver` with a starter `my-awesome-screensaver.sh` script and a `config.sh` file. All you have to do is edit the `.sh` file to add your animation logic!
29
+
30
+
#### The Hard Way (Manual)
31
+
32
+
1.**Create a new directory** for your screensaver inside the `gallery` directory. For example, `gallery/my-awesome-screensaver`.
33
+
2.**Create a shell script** inside your new directory with the same name as the directory, ending in `.sh`. For example, `gallery/my-awesome-screensaver/my-awesome-screensaver.sh`.
34
+
3.**Write your masterpiece!** Your script should:
35
+
- Be executable (`chmod +x your-script.sh`).
36
+
- Handle cleanup gracefully. Use `trap` to catch `SIGINT` (`Ctrl+C`) and restore the terminal to its normal state.
37
+
- Be awesome.
38
+
39
+
That's it! The main `screensaver.sh` script will automatically detect your new creation.
40
+
41
+
### Project Overview
42
+
43
+
*`./screensaver.sh` is the main menu script
44
+
* it shows a list of available screensavers
45
+
* and prompts user to pick one to run.
46
+
*`./gallery` is the gallery directory, where all screensavers are stored.
47
+
* Each screensaver has its own directory inside `./gallery`
48
+
* The name of the directory is the name of the screensaver.
49
+
* example: screensaver named 'foo' is in: `./gallery/foo`
50
+
* Each screensaver has a run script in format 'name.sh'
51
+
* example: `./gallery/foo/foo.sh`
52
+
* Each screensaver has a config file with name, tagline, etc
53
+
* example: `./gallery/foo/config.sh`
54
+
*`./tests` directory is the BATS test suite for this project
55
+
*`./.github` directory is for GitHub Workflows for this project.
56
+
57
+
### Project Structure
58
+
59
+
```
60
+
.
61
+
├─ screensaver.sh # Where the ASCII magic begins
62
+
├─ LICENSE # MIT Licensed, because all the cool kids are doing it
63
+
├─ README.md # This file, isn't it pretty?
64
+
├─ CONTRIBUTING.md # Guidelines for contributing to this project
65
+
├─ gallery # Welcome to the Gallery of Terminal Visualizations
66
+
│ ├─ name # I'm a screensaver, and I have my own directory!
67
+
│ │ └─ name.sh # I'm a screensaver, and I can run, run, run!
68
+
│ │ └─ config.sh # Psst... want some free metadata?
69
+
├─ tests # I gotta BATSy idea, we should test this stuff
70
+
│ └─ tests.sh # It can't be that bad, can it?
71
+
└─ .github # GitHub magic lives here
72
+
└─ workflows
73
+
└─ create.release.for.tag.yml
74
+
```
75
+
76
+
### Style Suggestions
77
+
78
+
* Indents **SHOULD** be whatever works for you
79
+
* Functions and variables **SHOULD** be in `snake_case`
80
+
* Super-duper important variables **SHOULD** be in `SCREAMING_SNAKE_CASE`
81
+
* You **MUST** have fun
82
+
* Why use boring function names like `main()`
83
+
when `start_the_visual_pleasure()` is just a few more characters
84
+
85
+
### Requirements
86
+
87
+
* Bash v3.2 for `./screensaver.sh`
88
+
* Individual screensavers may use any Bash version that makes them happy
89
+
* All screensavers must die with honor
90
+
* Gracefully handle `^C` to clean up the terminal and `exit 0`
91
+
* All shell scripts must have execute permission: `chmod +x *.sh`
92
+
93
+
### Codespaces
94
+
95
+
* whip up a [Codespace from attogram/bash-screensavers](https://codespaces.new/attogram/bash-screensavers) for fun!
Let's make the command line a more colorful place, one ASCII character at a time.
94
-
95
-
### Create Your Own Screensaver
96
-
97
-
Got an idea for a cool ASCII animation? Want to contribute to the collection? It's easy!
98
-
99
-
#### The Easy Way (Generator)
100
-
101
-
You can use the built-in generator to create a new screensaver with all the boilerplate code you need. Just run:
102
-
103
-
```bash
104
-
./screensaver.sh --new my-awesome-screensaver
105
-
```
106
-
(You can also use `-n` instead of `--new`)
107
-
108
-
This will create a new directory `gallery/my-awesome-screensaver` with a starter `my-awesome-screensaver.sh` script and a `config.sh` file. All you have to do is edit the `.sh` file to add your animation logic!
109
-
110
-
#### The Hard Way (Manual)
111
-
112
-
1.**Create a new directory** for your screensaver inside the `gallery` directory. For example, `gallery/my-awesome-screensaver`.
113
-
2.**Create a shell script** inside your new directory with the same name as the directory, ending in `.sh`. For example, `gallery/my-awesome-screensaver/my-awesome-screensaver.sh`.
114
-
3.**Write your masterpiece!** Your script should:
115
-
- Be executable (`chmod +x your-script.sh`).
116
-
- Handle cleanup gracefully. Use `trap` to catch `SIGINT` (`Ctrl+C`) and restore the terminal to its normal state.
117
-
- Be awesome.
118
-
119
-
That's it! The main `screensaver.sh` script will automatically detect your new creation.
120
-
121
-
### Project Overview
122
-
123
-
*`./screensaver.sh` is the main menu script
124
-
* it shows a list of available screensavers
125
-
* and prompts user to pick one to run.
126
-
*`./gallery` is the gallery directory, where all screensavers are stored.
127
-
* Each screensaver has its own directory inside `./gallery`
128
-
* The name of the directory is the name of the screensaver.
129
-
* example: screensaver named 'foo' is in: `./gallery/foo`
130
-
* Each screensaver has a run script in format 'name.sh'
131
-
* example: `./gallery/foo/foo.sh`
132
-
* Each screensaver has a config file with name, tagline, etc
133
-
* example: `./gallery/foo/config.sh`
134
-
*`./tests` directory is the BATS test suite for this project
135
-
*`./.github` directory is for GitHub Workflows for this project.
136
-
137
-
### Project Structure
138
-
139
-
```
140
-
.
141
-
├─ screensaver.sh # Where the ASCII magic begins
142
-
├─ LICENSE # MIT Licensed, because all the cool kids are doing it
143
-
├─ README.md # This file, isn't it pretty?
144
-
├─ gallery # Welcome to the Gallery of Terminal Visualizations
145
-
│ ├─ name # I'm a screensaver, and I have my own directory!
146
-
│ │ └─ name.sh # I'm a screensaver, and I can run, run, run!
147
-
│ │ └─ config.sh # Psst... want some free metadata?
148
-
├─ tests # I gotta BATSy idea, we should test this stuff
149
-
│ └─ tests.sh # It can't be that bad, can it?
150
-
└─ .github # GitHub magic lives here
151
-
└─ workflows
152
-
└─ create.release.for.tag.yml
153
-
```
154
-
155
-
### Style Suggestions
156
-
157
-
* Indents **SHOULD** be whatever works for you
158
-
* Functions and variables **SHOULD** be in `snake_case`
159
-
* Super-duper important variables **SHOULD** be in `SCREAMING_SNAKE_CASE`
160
-
* You **MUST** have fun
161
-
* Why use boring function names like `main()`
162
-
when `start_the_visual_pleasure()` is just a few more characters
163
-
164
-
### Requirements
165
-
166
-
* Bash v3.2 for `./screensaver.sh`
167
-
* Individual screensavers may use any Bash version that makes them happy
168
-
* All screensavers must die with honor
169
-
* Gracefully handle `^C` to clean up the terminal and `exit 0`
170
-
* All shell scripts must have execute permission: `chmod +x *.sh`
171
-
172
-
### Codespaces
173
-
174
-
* whip up a [Codespace from attogram/bash-screensavers](https://codespaces.new/attogram/bash-screensavers) for fun!
91
+
For more information, please see the [Developers Guide](./CONTRIBUTING.md).
175
92
176
93
---
177
94
178
-
## Development Tools
95
+
## Gallery Tools
179
96
180
97
This project includes several scripts to help with development and maintenance. For a full list of tools and their usage, please see the [Tools README](./tools/README.md).
0 commit comments