Update README.md and contrib
34
README.md
|
|
@ -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,14 +28,15 @@ 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.
|
||||
*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.
|
||||
|
||||
The available classes are:
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||

|
||||

|
||||
|
||||
## Rounded and Shadows
|
||||

|
||||

|
||||
|
||||
## Shadows
|
||||

|
||||

|
||||
|
||||
## Testing
|
||||

|
||||

|
||||
|
|
|
|||
BIN
contrib/borders/rounded.png
Normal file
|
After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 618 B |
|
Before Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 598 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 2.2 KiB |
BIN
contrib/borders/rounded_and_shadows.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 511 B |
|
Before Width: | Height: | Size: 934 B |
|
Before Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 871 B |
|
Before Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 921 B |
|
Before Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 3.5 KiB |
BIN
contrib/borders/shadows.png
Normal file
|
After Width: | Height: | Size: 753 B |
|
Before Width: | Height: | Size: 647 B |
|
Before Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 665 B |
|
Before Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 505 B |
|
Before Width: | Height: | Size: 665 B |
|
Before Width: | Height: | Size: 501 B |
|
Before Width: | Height: | Size: 2.6 KiB |
BIN
contrib/borders/testing.png
Normal file
|
After Width: | Height: | Size: 151 B |
|
Before Width: | Height: | Size: 487 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 487 B |
|
Before Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 487 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 487 B |
|
Before Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 1.8 KiB |