Files
GridSnap/install.sh
Keith Smith 3d79b0336a Fix critical bugs and improve laptop compatibility
Major fixes:
- Fix keybinding closure bug causing all zones to map to zone 9
- Change keybindings from Super+Numpad to Super+Ctrl+1-9 for laptop compatibility
- Fix shift-drag detection by implementing continuous modifier polling during window drag
- Fix window object reference by using global.display.focus_window
- Fix window API compatibility (use property checks instead of get_maximized())
- Correct grab-op-begin/end signal handler parameters

Technical improvements:
- Add modifier polling (50ms interval) during window drag to detect Shift key press/release
- Use Mainloop.idle_add to defer window resize operations
- Remove debug logging for production use
- Improve error handling and cleanup in destroy() method

The extension now fully supports:
- Shift-drag window snapping with visual zone overlay
- Keyboard shortcuts for direct zone snapping (Super+Ctrl+1-9)
- Zone overlay toggle (Super+Z)
- Layout cycling (Super+Shift+Z)
- Graphical zone editor (Super+Shift+E)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-15 19:50:23 -07:00

36 lines
1001 B
Bash
Executable File

#!/bin/bash
# GridSnap for Cinnamon - Installation Script
EXTENSION_UUID="gridsnap@cinnamon-extension"
INSTALL_DIR="$HOME/.local/share/cinnamon/extensions/$EXTENSION_UUID"
echo "Installing GridSnap for Cinnamon..."
# Create extensions directory if it doesn't exist
mkdir -p "$HOME/.local/share/cinnamon/extensions"
# Copy extension files
echo "Copying extension files..."
cp -r . "$INSTALL_DIR"
# Remove the install script from the installed version
rm -f "$INSTALL_DIR/install.sh"
echo ""
echo "Installation complete!"
echo ""
echo "To enable the extension:"
echo "1. Restart Cinnamon (Alt+F2, type 'r', press Enter)"
echo " OR log out and back in"
echo "2. Open System Settings → Extensions"
echo "3. Find 'GridSnap' and toggle it on"
echo ""
echo "Keyboard shortcuts:"
echo " Super+Z : Show/hide zones"
echo " Super+Shift+Z : Cycle layouts"
echo " Super+Ctrl+1-9 : Snap to zone"
echo " Super+Shift+E : Open zone editor"
echo ""
echo "Enjoy your new window manager!"