Update README.md and contrib

This commit is contained in:
TheAvidDev 2020-08-31 12:11:34 -04:00
parent bb09fa197d
commit ad924c0f8d
42 changed files with 24 additions and 24 deletions

View file

@ -6,9 +6,9 @@ Please refer to the [Sway GitHub](https://github.com/swaywm/sway/) for docs and
## Installation
The following package distributions exist. If you package sway-borders for another distribution, feel free to PR its entry here.
|Distribution|Name|Maintainer|
|---|---|---|
|AUR|`sway-borders-git`|TheAvidDev|
|Distribution|Name|Maintainer|Notes|
|---|---|---|---|
|AUR|`sway-borders-git`|TheAvidDev|Not created yet, but will be shortly.|
Releases will follow Sway's.
@ -28,15 +28,16 @@ This feature allows the use of eight images that get snapped on to the corners a
### Configuration
Directly from the manpage:
```
*border-images.<class>* <folder_path>
Configures the images used for borders. The _folder_path_ is expected to be
the full path, with a trailing slash, to a folder that contains 8 PNG images
named 0.png, 1.png, ..., 7.png. These images are used in clockwise order,
starting from the top-left corner, ending on the left edge. For the classes
below, "container" refers to a container which has gaps around it.
The available classes are:
*border_images.<class>* <path>
Configures the images used for borders. The _path_ is expected to be an
absolute path to an image with an odd width and height which will be scaled to
container sizes. The edges are expected to be 1 pixel in width for top and
bottom edges, and 1 pixel in height for left edges as they will be stretched
across container edges.
For the classes below, "container" refers to a container which has gaps
around it. The available classes are:
*border_images.focused*
The container which is focused or has a window that has focus.
@ -52,19 +53,18 @@ Directly from the manpage:
support urgency. Urgency only works for Xwayland windows.
```
In less technical terms, you can draw your borders around a 1x1 pixel in the center of your image. This image doesn't have to be a square, but for offsets across a single axis, you have to use completely transparent pixels since the center of the image will always be used.
Unlike pixel borders, the border images will overflow into gaps, so you may have to alter your gaps to accomidate.
To use this in your config, you would probably use the following:
```
exec_always border-images.focused /some/folder/
exec_always border-images.focused_inactive /some/folder/
exec_always border-images.unfocused /some/folder/
exec_always border-images.urgent /some/folder/
border_images.focused /some/folder/
border_images.focused_inactive /some/folder/
border_images.unfocused /some/folder/
border_images.urgent /some/folder/
```
**Note**: A folder which doesn't contain any images, or only contains some of the images will not throw any errors or warnings, do double check your folder path if you experience issues.
### Samples
The [`/contrib/borders/` folder](https://github.com/TheAvidDev/sway-borders/tree/master/contrib/borders/) contains some example and community contributed border images, alongside screenshots. Feel free to add your own and make a PR!
## Rounded Borders

View file

@ -1,16 +1,16 @@
# Border Image Samples
This folder contains sample border images for anyone's use. A `testing` folder also provides border images which can be used for easier debugging of incorrect border image rendering.
This folder contains sample border images for anyone's use. A `testing.png` file also provides borders which can be used for easier debugging of incorrect border image rendering.
Feel free to add your own and make a PR, as long as they aren't _too_ similar to existing samples. Please include a sample image and keep the list in alphabetical order.
Feel free to add your own and make a PR, as long as they aren't _too_ similar to existing samples. Please keep them list in alphabetical order. Keep in mind that this directory will likely be removed once the contrib script for creating such images becomes available.
## Rounded
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/rounded/sample.png)
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/rounded.png)
## Rounded and Shadows
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/rounded_and_shadows/sample.png)
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/rounded_and_shadows.png)
## Shadows
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/shadows/sample.png)
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/shadows.png)
## Testing
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/testing/sample.png)
![](https://raw.githubusercontent.com/TheAvidDev/sway-borders/master/contrib/borders/testing.png)

BIN
contrib/borders/rounded.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
contrib/borders/shadows.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

BIN
contrib/borders/testing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB