-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
186 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/<program>/<program>.<suffix>`. | ||
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 <script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# `mars-status.sh` | ||
|
||
Dependencies: | ||
* `canberra-gtk-play` ([`libcanberra-gtk3`](https://pkgs.org/search/?q=libcanberra-gtk3)) | ||
* `notify-send` ([`libnotify`](https://pkgs.org/search/?q=libnotify)) | ||
* `powerprofilesctl` ([`power-profiles-daemon`](https://pkgs.org/search/?q=power-profiles-daemon)) | ||
* `pactl` ([`pulseaudio`](https://pkgs.org/search/?q=pulseaudio)) | ||
* `xmenu` ([`xmenu`](https://github.com/phillbush/xmenu)) | ||
|
||
```sh | ||
{{#include ../../examples/mars-status.sh}} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# `touchegg.conf` | ||
|
||
```xml | ||
{{#include ../../examples/touchegg.xml}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# `wallpaper-daemon` | ||
|
||
Dependencies: | ||
* `xev` | ||
* `xwallpaper` | ||
|
||
```sh | ||
{{#include ../../examples/wallpaper-daemon.sh}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# `xdg-xmenu.py` | ||
|
||
Dependencies: | ||
* `python3` | ||
* `imagemagick` | ||
|
||
```py | ||
{{#include ../../examples/xdg-xmenu.py}} | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Introduction | ||
|
||
{{#include ../marswm/README.md}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
The configuration should be stored in the [YAML](https://yaml.org/) format at `~/.config/marswm/marsbar.yaml` | ||
You can get the default configuration with `marsbar --print-default-config`. | ||
|
||
## The Status Script | ||
You can set the status on the right side of the bar with a custom skript or program. | ||
On X11 it uses the custom property `_MARS_STATUS` on the root window. | ||
You can use any program to set it, but `mars-relay` also supports the `set-status` command: | ||
```sh | ||
mars-relay set-status "Today is $(date +%F)" | ||
``` | ||
|
||
You also have the possibility to use multiple **modules** for different metrics. | ||
They are separated by a special character, the default is currently `0x1f`. | ||
In a shell script you could use it like so: | ||
```sh | ||
load="$(cut -d' ' -f1 /proc/load)" | ||
date="$(date +%F)" | ||
status="$(printf "%s\x1f%s" "load: $load" "date: $date")" | ||
mars-relay set-status "$status" | ||
``` | ||
|
||
The script/program is expected to update the status on its own. | ||
It can either be started by your own startup scripts/systemd/etc. or by `marsbar` itself. | ||
To launch the script with `marsbar` you have to make sure the script is executable (`chmod +x`). | ||
Then you can add it to the config file under the option `status_cmd`. | ||
|
||
### Button Actions | ||
`marsbar` also lets you handle button clicks for those status blocks. | ||
These are handled by a script/program which can be a different executable or just the same as used for status updates. | ||
Place the path to the executable under the `action_cmd` option in the config file. | ||
|
||
When a button is pressed that executable is called with the environment variables `BLOCK` and `BUTTON` are set: | ||
* `$BLOCK` contains the index of the status block that was clicked | ||
* `$BUTTON` contains the index number of the mouse button that generated the event | ||
|
||
|
||
## Theming | ||
Theming is available under the `style` subsection in the configuration file. | ||
|
||
This section might look something like this: | ||
```yaml | ||
style: | ||
background: 0x262626 # background color of the bar | ||
expand_workspace_widgets: false # make all workspace widgets the same width | ||
height: 31 # height of the whole bar | ||
font: FiraCode:size=12 # font of text surfaces (as xft name) | ||
workspaces: | ||
foreground: 0x262626 # foreground (text) color of the workspace widget | ||
inner_background: 0x5F87AF # background of the individual workspaces | ||
outer_background: 0x262626 # background *around* the individual workspaces | ||
padding_horz: 0 # horizontal padding around the workspaces | ||
padding_vert: 0 # vertical padding around the workspaces | ||
text_padding_horz: 10 # horizontal padding around the text | ||
text_padding_vert: 4 # vertical padding around the text | ||
spacing: 0 # spacing between the individual workspaces | ||
title: | ||
foreground: 0xBCBCBC # foreground (text) color | ||
background: 0x262626 # background color of the text widget | ||
status: | ||
foreground: 0x262626 # foreground (text) color | ||
inner_background: 0xAF5F5F # background of the individual blocks | ||
outer_background: 0x262626 # background *around* the individual blocks | ||
padding_horz: 4 # horizontal padding around the blocks | ||
padding_vert: 4 # vertical padding around the blocks | ||
text_padding_horz: 5 # horizontal padding around the text | ||
text_padding_vert: 0 # vertical padding around the text | ||
spacing: 4 # spacing between the individual blocks | ||
``` | ||
*Note: Although they may look very weird in the output of `marsbar --print-default-config` colors can simply be written as hex values (like `0x1a2b3c`).* | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters