diff --git a/.github/workflows/docs-github-pages.yml b/.github/workflows/docs-github-pages.yml index 0e91442d..c3927c4c 100644 --- a/.github/workflows/docs-github-pages.yml +++ b/.github/workflows/docs-github-pages.yml @@ -12,6 +12,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: 'latest' + - run: mdbook build . + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: './target/book' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 + - name: Install X11 dependencies uses: awalsh128/cache-apt-pkgs-action@latest with: @@ -25,8 +38,8 @@ jobs: with: command: doc args: --no-deps - - name: Create forwarding to actual index.html - run: echo '' > ./target/doc/index.html + # - name: Create forwarding to actual index.html + # run: echo '' > ./target/doc/index.html - name: Fix file permissions shell: sh run: | @@ -34,12 +47,21 @@ jobs: while read line; do echo "::warning title=Invalid file permissions automatically fixed::$line" done - - name: Setup Pages - uses: actions/configure-pages@v3 + + - name: Copy stuff around + shell: sh + run: + mkdir output + cp -r target/book output/ + cp -r target/doc output/crate + - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: - path: './target/doc' + path: './output' + - name: Setup Pages + uses: actions/configure-pages@v3 - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 + diff --git a/book.toml b/book.toml new file mode 100644 index 00000000..7a359cc3 --- /dev/null +++ b/book.toml @@ -0,0 +1,13 @@ +[book] +authors = ["jzbor"] +language = "en" +multilingual = false +src = "docs" +title = "MARSWM Documentation" + +[build] +build-dir = "target/book" + +[output.html] +default-theme = "rust" +preferred-dark-theme = "ayu" diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..7585238e --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +book diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 00000000..3821cb72 --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,12 @@ +# Summary +- [Introduction](introduction.md) +- [Installation](./installation.md) +- [Quick Start](./quickstart.md) +- [Configuration](./configuration.md) + - [marswm](./marswm.md) + - [marsbar](./marswm.md) +- [Examples](./examples.md) + - [mars-status.sh](examples/mars-status.md) + - [touchegg.conf](examples/touchegg.md) + - [wallpaper-daemon.sh](examples/wallpaper-daemon.md) + - [xdg-xmenu.py](examples/xdg-xmenu.md) diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 00000000..a025a48b --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1 @@ +# Configuration diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 00000000..8b51bd1b --- /dev/null +++ b/docs/examples.md @@ -0,0 +1,19 @@ +# Examples +This chapter contains a couple of example scripts and configurations. +All examples are available on [Github](https://github.com/jzbor/marswm/tree/master/examples). + +## Installing Configurations +Most config files go into `~/.config//.`. +For example marswm's main config goes into `~/.config/marswm/marswm.yaml`. + +## Installing Scripts +To install a script you will first need to install all of its dependencies. + +Then place the script into a directory that is listed in your `$PATH`. +It is suggested to use `~/.local/bin/` to store all of your personal scripts. +You can check if that is in your path with `echo $PATH` and add it to your `~/.profile` otherwise. + +You will also have to make the script executable: +```sh +chmod +x