Scripts and config files to make a virtual "grid" out of sway workspaces
2025-03-25 01:25:02 -04:00
config.d updated default keybinds 2024-07-29 16:04:19 -04:00
init.sh changed config file to parse key=value 2024-05-27 20:46:03 -04:00
install.sh push 2024-05-20 16:59:52 -04:00
LICENSE Initial commit 2024-05-20 09:11:58 -04:00
README.md readme markdown error 2025-03-25 01:25:02 -04:00
swaygrid.conf changed config file to parse key=value 2024-05-27 20:46:03 -04:00
workspace_grid.sh added third argument, value, and wrote documentation for it 2024-05-28 15:39:49 -04:00

swaygrid

scripts and config files to make and navigate a virtual "grid" out of sway workspaces

Features

  • customizable size, including unlimited
  • multi monitor support
    • automatically tagging workspaces per monitor either their number or name, changable in swaygrid.conf
  • automatic install script
  • enabling and disabling modules
  • moving containers between workspaces
    • moving your focus with container between workspaces, toggleable
  • using number keys to directly go to x or y values
  • touchpad gestures
  • locking modes
    • $mod+Ctrl+Q to enable locking mode, $mod+Ctrl+q to disable it
    • when in locking mode, on multi monitor setups every output will keep the same workspace coordinates

Installation

Dependencies

  • bash >4.0 or smth
  • sway

Process

WARNING: read over install.sh to make sure it won't screw with your existing config. altneratively, do manualy installation.

git clone https://git.meows.gay/eris/swaygrid
cd swaygrid
./install.sh

or, manually

  1. make sure include ~/.config/sway/config.d/* is in your sway config.
  2. move workspace_grid.sh, init.sh, and swaygrid.conf to ~/.config/sway/
  3. move the files in the config.d/ directory of this repository to ~/.config/sway/.config.d/ (this directory may need to be created). all are optional except init. edit them to your satisfaction.
  • init sets up things necessary to make this work, like variables and config options.
  • move activates moving between workspaces with $mod+Ctrl+[direction keys].
  • move_container activates moving the current container with $mod+Alt+[direction keys].
  • touchpad_move activates moving between workspaces with touchpad gestures (3 fingers by default)
  • touchpad_move_container activates moving the current container with touchpad gestures (4 fingers by default)
  • direct_move activates direct movments of focus to numbered x ($mod+[number]) or y ($mod+Ctrl+[number]) values.
  • direct_move_container activates direct movments of containers to numbered x ($mod+Alt+[number]) or y ($mod+Ctrl+Alt+[number]) values.
  • multi_monitor_modes enables keybinds to change locking mode.
  1. reload sway

Known Issues

  • none at the moment! :3

Coming Soon™

  • more config options

Documentation (?)

the workspace_grid.sh script takes 2 mandatory arguments: <workspace> <action> [value]

<workspace> can be:

  • x / y sets the workspace x or y value to [value]
  • left, right, up, or down: moves left (x-[value]), right (x+[value]), up (y-[value]), or down (y+[value])

<action> can be:

  • go: moves the focus to the specified workspace
  • move: moves the current container to the specified workspace
    • if moveWithContainers is true, this moves focus as well

[value] optional if <workspace> is a direction , required if <workspace> is x or y:

  • if direction given for <workspace>, [value] is the number of workspaces to move in the specific direction (defaults to one if not given)
  • if x or y given for <workspace>, [value] is the coordinate of the workspace to move to

Configuration

all config options are KEY=VALUE

option values default explanation
minX any integer 1 minimum x value for the grid, set to a non integer to unlimit
maxX any integer >= minX 10 maximum x value for the grid, set to a non integer to unlimit
minY any integer 1 minimum y value for the grid, set to a non integer to unlimit
maxY any integer >= minY 10 maximum y value for the grid, set to a non integer to unlimit
useOutputNumber true/false true if true, the end_tag for multi monitor setups is the output number. if false, it uses the output name.
startX any integer 1 workspace x value to start at on boot
startY any integer 1 workspace y value to start at on boot
defaultMultiMonitorMode locked/free locked if locked, all monitors will keep the same workspace coordinates when you change focus. this can be changed on-the-fly with a keybind.
moveWithContainers true/false true if true, moving a container also moves your focus