This script allows you to move the active window to the left or right on a dual-monitor setup without affecting maximized or fullscreen windows. It's designed for use on Linux systems with X11 and requires xdotool and wmctrl.
xdotoolwmctrl
You can install these utilities using your distribution's package manager. For example, on Ubuntu:
sudo apt-get install xdotool wmctrlClone this repository or download the script file. Make the script executable:
chmod +x windowtoggle.shExecute the script directly from the terminal to move the active window:
./windowtoggle.shTo bind this script to a keyboard shortcut:
1: Open "Settings" > "Keyboard Shortcuts" in your desktop environment.
2: Create a new shortcut, set the command to the full path of the script, e.g., /path/to/windowtoggle.sh.
3: Assign a key combination of your choice.
Contributions are welcome! Please feel free to submit pull requests or open issues for improvements or bug fixes.