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%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-31 16:51:53 +02:00
protocol Remove unnecessary Wayland protocol definitions 2025-05-04 14:33:13 +01:00
src fix: réarrange le nombres et la position des guides 2026-07-31 16:51:53 +02:00
.clang-format Initial commit 2025-05-01 23:27:03 +01:00
.gitignore Initial commit 2025-05-01 23:27:03 +01:00
LICENSE Add LICENSE 2025-05-04 13:52:57 +01:00
meson.build Select border before resizing 2025-08-01 20:43:19 +01:00
README.md README: rewording 2025-05-04 17:49:15 +01:00

sway-resize

sway-resize is a utility to help resize windows visually on Sway with the use of guiding lines.

demo.webm

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'

Dependencies