sway-resize est un utilitaire permettant de redimensionner visuellement les fenêtres dans Sway à l'aide de lignes de guidage.
Fork de https://github.com/moverest/sway-resize/tree/main (inactif)
!!! Option
-g invalide, elle n'a jamais été implémenter
- C 97.6%
- Meson 2.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| protocol | ||
| src | ||
| .clang-format | ||
| .gitignore | ||
| LICENSE | ||
| meson.build | ||
| README.md | ||
sway-resize
sway-resize is a utility to help resize windows visually on Sway with the use of guiding lines.
Usage
sway-resize -g GUIDING_LINES
GUIDING_LINES is a list of guiding lines to generate. Each item has the <symbol>:<direction>:<resize value> format, e.g. a:h:+50 will create a guiding line with the symbol a, the horizontal direction, and with a relative increase in size of 50px. <direction> can be either h or v for the horizontal and vertical directions respectively. <resize value> can be on of the following format:
| Format | Example | Description |
|---|---|---|
x |
250 |
Set the size to 250px. |
x% |
50% |
Set the size to 50% of the available space. |
+x |
+50 |
Increase the size by 50px. |
+x% |
+25% |
Increase the size by 25%. |
-x |
-50 |
Decrease the size by 50px. |
-x% |
-25% |
Decrease the size by 25%. |
Example
sway-resize -g "a:h:25% b:h:33% c:h:50% d:h:66% k:h:75% l:h:85% e:v:25% f:v:33% g:v:50% h:v:66% i:v:75% j:v:85%"
Installation
Arch Linux
If you are using Arch Linux, you can install the sway-resize AUR package.
You can build and install the package with:
curl 'https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=sway-resize' -O PKGBUILD
makepkg -si
From sources
The program can be built from sources with:
meson build
meson compile -C build
meson install -C build
Bindings
Here's an example of binding:
bindsym $mod+r exec sway-resize -g 'a:h:+32 b:h:+64 c:h:+128 d:h:+256 e:h:+512 f:v:+32 g:v:+64 h:v:+128 i:v:+256 j:v:+512 k:h:-32 l:h:-64 m:h:-128 n:h:-256 o:h:-512 p:v:-32 q:v:-64 l:v:-128 m:v:-256 n:v:-512'