We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sway Version:
Debug Log:
sway -d 2> ~/sway.log
This was run with -c /etc/sway/config: gist
In i3wm we get a 2x2 grid of windows. In sway we get 4 horizontal windows with this workspace representation:
V[H[foot foot V[H[foot foot]]]]
It should be:
V[H[foot foot] H[foot foot]]
I have a simple script to do the above operations -
The script outputs the swaymsg operations and the workspace representation: workspace 20 is used as a 'scratch' workspace and is assumed to be empty.
swaymsg [con_id=7] move to workspace 20 swaymsg [con_id=8] move to workspace 20 swaymsg [con_id=15] move to workspace 20 swaymsg [con_id=16] move to workspace 20 swaymsg layout splith swaymsg [con_id=7] move to workspace current, focus H[foot] swaymsg split h H[foot] swaymsg [con_id=8] move to workspace current, focus H[foot foot] swaymsg focus parent, split v <<<<<<< here be dragons H[H[foot foot]] <<<<<<< should be V[H[foot foot]] swaymsg [con_id=15] move to workspace current, focus V[H[foot foot foot]] swaymsg split h V[H[foot foot H[foot]]] swaymsg [con_id=16] move to workspace current, focus V[H[foot foot H[foot foot]]] swaymsg focus parent, split v V[H[foot foot V[H[foot foot]]]]
Here is the script:
#!/usr/bin/env bash do_msg() { echo "$msg $*" $msg "$*" } show_representation() { [[ "$SWAYSOCK" ]] && $msg -t get_workspaces | jq -r '.[] | select(.focused==true)|.representation' } msg="i3-msg" [[ "$SWAYSOCK" ]] && { msg="swaymsg" } cols="$1" if [[ "$SWAYSOCK" ]]; then query="select(.visible==true) | select(.app_id != null or .window_properties.instance != null)" else query='select(.window_properties?) | select(.floating == "auto_off" or .floating == "user_off") | select(.output != "__i3")' fi # Set the layout for all windows in the focused workspace to vertical/horizontal tree=$( $msg -t get_tree ) id_list=$( echo "$tree" | jq ".. | select(.type?) | $query | .id" ) # NB we need to send everything off screen, change the layout and # bring them back for id in ${id_list[@]}; do do_msg "[con_id=$id] move to workspace 20" done do_msg "layout splith" count=0 for id in ${id_list[@]}; do do_msg "[con_id=$id] move to workspace current, focus" show_representation if (( ( count + 1 ) % cols == 0 )); then do_msg 'focus parent, split v' elif (( ( count + 1 ) % cols == 1 )); then do_msg 'split h' fi show_representation count=$(( count + 1 )) done
Curiously, if I create new windows (instead of moving them from another workspace) I end up with a correct grid:
We have a 2x2 grid with representation:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sway Version:
Debug Log:
sway -d 2> ~/sway.log
from a TTY and upload it to a pastebin, such as gist.github.com.This was run with -c /etc/sway/config:
gist
In i3wm we get a 2x2 grid of windows. In sway we get 4 horizontal windows with this workspace representation:
It should be:
I have a simple script to do the above operations -
The script outputs the swaymsg operations and the workspace representation: workspace 20 is used as a 'scratch' workspace and is assumed to be empty.
Here is the script:
Curiously, if I create new windows (instead of moving them from another workspace) I end up with a correct grid:
We have a 2x2 grid with representation:
The text was updated successfully, but these errors were encountered: