StartTree/README.md

88 lines
3.0 KiB
Markdown
Raw Normal View History

2020-08-24 06:32:31 +02:00
# StartTree
2020-08-24 09:14:08 +02:00
A terminal-style home page replicating the tree command.
2020-08-24 06:32:31 +02:00
2020-08-24 01:43:38 +02:00
<p align="center">
2020-08-25 01:07:57 +02:00
<img src="/images/StartTree.png", title="StartTree"/>
2020-08-24 01:43:38 +02:00
</p>
2020-08-25 01:27:16 +02:00
<div align="center">
<h1>
<a href="https://gideonwolfe.com/">
<img style="vertical-align:middle" src="/images/forest.png", width="400", />
</a>
<span style="">
<img style="vertical-align:middle" src="/images/void.png", width="400", />
</a>
</span>
</h1>
</div>
2020-08-25 01:16:21 +02:00
2020-08-25 02:14:04 +02:00
# Usage
## Installation
To install StartTree for the first time, run the following commands:
(Note: If the `~/.config/StartTree` directory already exists, `init.py` will not execute to prevent accidentally overwriting a custom config. )
```
git clone https://github.com/Paul-Houser/StartTree.git
cd StartTree
./init.py
./generate.py
```
This will create the directory `~/.config/StartTree` containing the default `config.yaml`, as well as generate the html/css, which you can view by pointing your browser at `$HOME/.cache/StartTree/index.html`.
2020-08-24 00:50:40 +02:00
2020-08-25 02:14:04 +02:00
## Config
The config should be placed in `~/.config/StartTree/config.yaml`
2020-08-24 23:52:50 +02:00
2020-08-25 02:14:04 +02:00
## Updating the HTML
To re-generate the html/css after editing the config, navigate to the `StartTree` directory and execute `./generate.py`.
# Example Config
```yaml
font_size: 22 # specify font size
theme: void # specify the name of a theme in the themes/ directory, or use 'pywal'
tree_1: # each column should be named 'tree_X' where X is unique for each tree.
general: # Header name
github: "https://www.github.com/" # Link-text: url
gmail: "https://mail.google.com/"
2020-08-25 00:54:37 +02:00
reddit:
2020-08-25 02:14:04 +02:00
# the following is an example of naming a link something with a space,
# or containing characters that cannot be in a yaml variable name.
frontpage:
- "https://www.reddit.com/"
- "front page" #
2020-08-25 00:54:37 +02:00
unixporn: "https://www.reddit.com/r/unixporn/"
2020-08-25 02:14:04 +02:00
tree_2:
other:
archwiki:
- "https://archlinux.org/"
- "arch wiki"
hulu: "https://www.hulu.com/"
netflix: "https://www.netflix.com/"
youtube: "https://www.youtube.com/"
2020-08-24 00:50:40 +02:00
```
2020-08-24 23:52:50 +02:00
# Themes
A variety of themes can be found in the `themes` directory.
If one wishes to dynamically theme from `pywal`, they may select `pywal` as their chosen theme in `config.yaml`.
2020-08-25 01:53:32 +02:00
# Docker
In order to circumvent some restrictions on browsers for what is allowed as a "Home" and "New Tab" page, you can host StartTree as a lightweight `NGINX` server through `docker-compose`.
To set this up, one must have `docker` and `docker-compose` installed and configured. Then, go into the directory where you cloned `StartTree`, and run
```bash
cd docker
vim docker-compose.yaml # edit specifics to your liking
docker-compose -f docker-compose.yaml up -d
```
This will make the `NGINX` server persist across reboots. You can point your browser's new tab and home page to `localhost:p<port#>` and you should your startpage!
### NOTE:
Currently, docker is unaware if a file changes on the fly (like generating a new colorscheme or adding new shortcuts), so you have to restart the container with
`docker-compose -f docker-compose.yaml restart <servicename>`