Skip Navigation

You're viewing a single thread.

339 comments
  • This is always the first thing I get set up:

    # focus next available workspace on this output

    bindsym $mod+q exec --no-startup-id ws=$(i3-msg -t get_workspaces | jq '.[] | select(.focused) | .num') && ofs=$(i3-msg -t get_outputs | jq 'map(select(.active)) | length') && i3-msg workspace $(($ws-$ofs))

    bindsym $mod+w exec --no-startup-id ws=$(i3-msg -t get_workspaces | jq '.[] | select(.focused) | .num') && ofs=$(i3-msg -t get_outputs | jq 'map(select(.active)) | length') && i3-msg workspace $(($ws+$ofs))

    # move window to next available workspace on this output

    bindsym $mod+Shift+q exec --no-startup-id ws=$(i3-msg -t get_workspaces | jq '.[] | select(.focused) | .num') && ofs=$(i3-msg -t get_outputs | jq 'map(select(.active)) | length') && dest=$(($ws-$ofs)) && i3-msg move workspace $dest && i3-msg workspace $dest

    bindsym $mod+Shift+w exec --no-startup-id ws=$(i3-msg -t get_workspaces | jq '.[] | select(.focused) | .num') && ofs=$(i3-msg -t get_outputs | jq 'map(select(.active)) | length') && dest=$(($ws+$ofs)) && i3-msg move workspace $dest && i3-msg workspace $dest

    Works with sway if you replace i3-msg with swaymsg (and remove --no-startup-id, since it's not needed for Wayland).

    Edit: ampersand issues, trying quote instead of code block

You've viewed 339 comments.