diff --git a/README.md b/README.md index 832b3ca69..2ee1fd6f0 100644 --- a/README.md +++ b/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,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.* - 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.* + 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 diff --git a/contrib/borders/README.md b/contrib/borders/README.md index de5daf2de..02098b211 100644 --- a/contrib/borders/README.md +++ b/contrib/borders/README.md @@ -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) diff --git a/contrib/borders/rounded.png b/contrib/borders/rounded.png new file mode 100644 index 000000000..353bfabed Binary files /dev/null and b/contrib/borders/rounded.png differ diff --git a/contrib/borders/rounded/0.png b/contrib/borders/rounded/0.png deleted file mode 100644 index a643e085b..000000000 Binary files a/contrib/borders/rounded/0.png and /dev/null differ diff --git a/contrib/borders/rounded/1.png b/contrib/borders/rounded/1.png deleted file mode 100644 index 739514772..000000000 Binary files a/contrib/borders/rounded/1.png and /dev/null differ diff --git a/contrib/borders/rounded/2.png b/contrib/borders/rounded/2.png deleted file mode 100644 index e8f849d1f..000000000 Binary files a/contrib/borders/rounded/2.png and /dev/null differ diff --git a/contrib/borders/rounded/3.png b/contrib/borders/rounded/3.png deleted file mode 100644 index ad109f9c1..000000000 Binary files a/contrib/borders/rounded/3.png and /dev/null differ diff --git a/contrib/borders/rounded/4.png b/contrib/borders/rounded/4.png deleted file mode 100644 index b01a4ccfe..000000000 Binary files a/contrib/borders/rounded/4.png and /dev/null differ diff --git a/contrib/borders/rounded/5.png b/contrib/borders/rounded/5.png deleted file mode 100644 index 739514772..000000000 Binary files a/contrib/borders/rounded/5.png and /dev/null differ diff --git a/contrib/borders/rounded/6.png b/contrib/borders/rounded/6.png deleted file mode 100644 index a68fdf691..000000000 Binary files a/contrib/borders/rounded/6.png and /dev/null differ diff --git a/contrib/borders/rounded/7.png b/contrib/borders/rounded/7.png deleted file mode 100644 index ad109f9c1..000000000 Binary files a/contrib/borders/rounded/7.png and /dev/null differ diff --git a/contrib/borders/rounded/sample.png b/contrib/borders/rounded/sample.png deleted file mode 100644 index 2dbd6d5ed..000000000 Binary files a/contrib/borders/rounded/sample.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows.png b/contrib/borders/rounded_and_shadows.png new file mode 100644 index 000000000..e5ede702b Binary files /dev/null and b/contrib/borders/rounded_and_shadows.png differ diff --git a/contrib/borders/rounded_and_shadows/0.png b/contrib/borders/rounded_and_shadows/0.png deleted file mode 100644 index 0e17c9fd4..000000000 Binary files a/contrib/borders/rounded_and_shadows/0.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/1.png b/contrib/borders/rounded_and_shadows/1.png deleted file mode 100644 index 36cefaeb7..000000000 Binary files a/contrib/borders/rounded_and_shadows/1.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/2.png b/contrib/borders/rounded_and_shadows/2.png deleted file mode 100644 index 555fb9708..000000000 Binary files a/contrib/borders/rounded_and_shadows/2.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/3.png b/contrib/borders/rounded_and_shadows/3.png deleted file mode 100644 index 5864ba8df..000000000 Binary files a/contrib/borders/rounded_and_shadows/3.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/4.png b/contrib/borders/rounded_and_shadows/4.png deleted file mode 100644 index 74bb994ea..000000000 Binary files a/contrib/borders/rounded_and_shadows/4.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/5.png b/contrib/borders/rounded_and_shadows/5.png deleted file mode 100644 index 0128eeb3c..000000000 Binary files a/contrib/borders/rounded_and_shadows/5.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/6.png b/contrib/borders/rounded_and_shadows/6.png deleted file mode 100644 index 638cc9f73..000000000 Binary files a/contrib/borders/rounded_and_shadows/6.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/7.png b/contrib/borders/rounded_and_shadows/7.png deleted file mode 100644 index 0eee4040c..000000000 Binary files a/contrib/borders/rounded_and_shadows/7.png and /dev/null differ diff --git a/contrib/borders/rounded_and_shadows/sample.png b/contrib/borders/rounded_and_shadows/sample.png deleted file mode 100644 index 1315390ed..000000000 Binary files a/contrib/borders/rounded_and_shadows/sample.png and /dev/null differ diff --git a/contrib/borders/shadows.png b/contrib/borders/shadows.png new file mode 100644 index 000000000..1f9e4a90c Binary files /dev/null and b/contrib/borders/shadows.png differ diff --git a/contrib/borders/shadows/0.png b/contrib/borders/shadows/0.png deleted file mode 100644 index 0f9f8693e..000000000 Binary files a/contrib/borders/shadows/0.png and /dev/null differ diff --git a/contrib/borders/shadows/1.png b/contrib/borders/shadows/1.png deleted file mode 100644 index e142dbea3..000000000 Binary files a/contrib/borders/shadows/1.png and /dev/null differ diff --git a/contrib/borders/shadows/2.png b/contrib/borders/shadows/2.png deleted file mode 100644 index f17eb328b..000000000 Binary files a/contrib/borders/shadows/2.png and /dev/null differ diff --git a/contrib/borders/shadows/3.png b/contrib/borders/shadows/3.png deleted file mode 100644 index 84ad935fa..000000000 Binary files a/contrib/borders/shadows/3.png and /dev/null differ diff --git a/contrib/borders/shadows/4.png b/contrib/borders/shadows/4.png deleted file mode 100644 index 56ebd7d33..000000000 Binary files a/contrib/borders/shadows/4.png and /dev/null differ diff --git a/contrib/borders/shadows/5.png b/contrib/borders/shadows/5.png deleted file mode 100644 index ec54cf9ac..000000000 Binary files a/contrib/borders/shadows/5.png and /dev/null differ diff --git a/contrib/borders/shadows/6.png b/contrib/borders/shadows/6.png deleted file mode 100644 index a745e8540..000000000 Binary files a/contrib/borders/shadows/6.png and /dev/null differ diff --git a/contrib/borders/shadows/7.png b/contrib/borders/shadows/7.png deleted file mode 100644 index 5c8bf68ea..000000000 Binary files a/contrib/borders/shadows/7.png and /dev/null differ diff --git a/contrib/borders/shadows/sample.png b/contrib/borders/shadows/sample.png deleted file mode 100644 index edf524023..000000000 Binary files a/contrib/borders/shadows/sample.png and /dev/null differ diff --git a/contrib/borders/testing.png b/contrib/borders/testing.png new file mode 100644 index 000000000..9c956bdd4 Binary files /dev/null and b/contrib/borders/testing.png differ diff --git a/contrib/borders/testing/0.png b/contrib/borders/testing/0.png deleted file mode 100644 index a715cd849..000000000 Binary files a/contrib/borders/testing/0.png and /dev/null differ diff --git a/contrib/borders/testing/1.png b/contrib/borders/testing/1.png deleted file mode 100644 index 65a803b00..000000000 Binary files a/contrib/borders/testing/1.png and /dev/null differ diff --git a/contrib/borders/testing/2.png b/contrib/borders/testing/2.png deleted file mode 100644 index 356eb6925..000000000 Binary files a/contrib/borders/testing/2.png and /dev/null differ diff --git a/contrib/borders/testing/3.png b/contrib/borders/testing/3.png deleted file mode 100644 index b77583097..000000000 Binary files a/contrib/borders/testing/3.png and /dev/null differ diff --git a/contrib/borders/testing/4.png b/contrib/borders/testing/4.png deleted file mode 100644 index b148a17d2..000000000 Binary files a/contrib/borders/testing/4.png and /dev/null differ diff --git a/contrib/borders/testing/5.png b/contrib/borders/testing/5.png deleted file mode 100644 index 65a803b00..000000000 Binary files a/contrib/borders/testing/5.png and /dev/null differ diff --git a/contrib/borders/testing/6.png b/contrib/borders/testing/6.png deleted file mode 100644 index 8515493e2..000000000 Binary files a/contrib/borders/testing/6.png and /dev/null differ diff --git a/contrib/borders/testing/7.png b/contrib/borders/testing/7.png deleted file mode 100644 index b77583097..000000000 Binary files a/contrib/borders/testing/7.png and /dev/null differ diff --git a/contrib/borders/testing/sample.png b/contrib/borders/testing/sample.png deleted file mode 100644 index 08ca0b63e..000000000 Binary files a/contrib/borders/testing/sample.png and /dev/null differ