|
Hello, |
Answered by
mrflos
Dec 18, 2025
Replies: 4 comments 1 reply
|
We don't have an option for that, however you may be able to script a solution with the IPC |
0 replies
|
Is there any example of scripts with IPC ? But how to interact with it? |
0 replies
|
You could press the center-window bind afterward |
1 reply
|
ok thanks @YaLTeR and @Sempyos I made this script : #!/usr/bin/env bash
WINDOW_JSON=$(niri msg --json focused-window)
IS_FLOATING=$(echo "$WINDOW_JSON" | jq '.is_floating')
niri msg action set-column-width $1;
if [ "$IS_FLOATING" == "true" ]; then
niri msg action center-window
fiafter put this in my niri config: Mod+Equal { spawn-sh "~/Code/nixos-config/scripts/center-after-resize.sh +10%"; }
Mod+Minus { spawn-sh "~/Code/nixos-config/scripts/center-after-resize.sh -10%"; }Probably not the most elegant way but it seems to work. |
0 replies
Answer selected by
mrflos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok thanks @YaLTeR and @Sempyos
I made this script :
after put this in my niri config:
Probably not the most elegant way but it seems to work.