If you’ve ever used macOS with the Magnet app, you know how incredibly useful its window management capabilities are. As developers, efficient window management is crucial for our productivity. In this guide, I’ll show you how to achieve similar functionality in Linux using gTile, a powerful GNOME extension.
Prerequisites
- GNOME Desktop Environment (tested on version 45+)
- GNOME Extensions enabled in your browser
- GNOME Shell Extensions app installed
Installation
- Open the gTile extension page in your browser
- Toggle the switch to install the extension
- Click “Install” when prompted
Alternatively, if you prefer the terminal:
gnome-extensions install gtile@vibou
gnome-extensions enable gtile@vibou
Configuration
After installation, you’ll need to configure gTile with optimal presets and shortcuts. Here are my recommended settings that closely mirror Magnet’s functionality:
Presets
Open gTile settings and add the following presets:
- 4x4 1:1 4:4 - Full screen
- 4x4 1:1 2:4 - Left half
- 4x4 3:1 4:4 - Right half
- 4x4 1:1 4:2 - Top half
- 4x4 1:4 4:3 - Bottom half
Keyboard Shortcuts
Set up these intuitive shortcuts for quick access:
- Full screen:
<Control><Alt>Return - Left half:
<Control><Alt>Left - Right half:
<Control><Alt>Right - Top half:
<Control><Alt>Up - Bottom half:
<Control><Alt>Down
Usage Tips
The 4x4 grid system might seem complex at first, but it’s incredibly flexible. The preset format follows this pattern:
4x4 startColumn:startRow endColumn:endRow
For example, 4x4 1:1 2:4 means:
- Use a 4x4 grid
- Start at column 1, row 1
- End at column 2, row 4
- This creates a perfect left half window
Pro Tips
- Quick Activation: Double-click the gTile icon in your system tray to instantly show the grid overlay
- Grid Preview: Hold your configured shortcut to see a preview of where your window will snap
- Multiple Monitors: gTile works seamlessly across multiple displays, just like Magnet
Customization
You can further customize gTile by:
- Adjusting grid size (4x4 recommended for Magnet-like behavior)
- Modifying animation speed
- Changing grid appearance
- Adding more custom presets for specific layouts
Troubleshooting
If shortcuts stop working after a system update:
- Disable and re-enable the extension
- Log out and back in
- Verify shortcuts in GNOME Settings > Keyboard > Shortcuts
Conclusion
With gTile properly configured, you’ll have a powerful window management system that rivals (and in some ways exceeds) Magnet’s functionality. The best part? It’s completely free and open source.
Remember to log out and back in after making significant changes to ensure all settings are properly applied.