Move the active window from a screen to another
Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
COPYING
LISEZ-MOI.md
README.md
bascule.sh

README.md

Overview

Bascule is a Bash script for GNU/Linux allowing to move the active window from a screen to another using a keyboard shortcut.

Bascule supports two screens (with or without the same display resolution) sharing part or all of a vertical side, regardless of the position on the y-axis, for example:

            |¯¯¯¯¯¯¯¯¯¯¯|
            |           |
            |           |
            |           |
            |___________|
|¯¯¯¯¯¯¯¯¯¯¯|
|           |
|           |
|           |
|___________|

            |¯¯¯¯¯¯¯¯¯¯¯|
            |           |
|¯¯¯¯¯¯¯¯¯¯¯|           |
|           |           |
|           |___________|
|           |
|___________|

|¯¯¯¯¯¯¯¯¯¯¯|¯¯¯¯¯¯¯¯¯¯¯|
|           |           |
|           |           |
|           |           |
|___________|___________|

|¯¯¯¯¯¯¯¯¯¯¯|
|           |
|           |¯¯¯¯¯¯¯¯¯¯¯|
|           |           |
|___________|           |
            |           |
            |___________|

|¯¯¯¯¯¯¯¯¯¯¯|
|           |
|           |
|           |
|___________|
            |¯¯¯¯¯¯¯¯¯¯¯|
            |           |
            |           |
            |           |
            |___________|

Bascule also takes into account panels, regardless of their number and location. Thus, a window moved to another screen will never be partially hidden under a panel or be off-screen. A maximized window will remain as it is on the new screen.

Bascule was inspired by a script posted on the English forum of Ubuntu.

Installation

Current user

The script is ready to be used by the current user.

All users

To make the script accessible to all users, add the file bascule.sh in the folder /usr/bin/ (requires root privileges).

In that case, the folder created by the extraction can be deleted after the file is being copied.

Uninstallation

Current user

Simply remove the folder created by the extraction of the archive.

All users

Remove the file previously copied in /usr/bin/ (requires root privileges).

Usage

  • Open the script bascule.sh with a text editor and change variable values at the beginning of the file (section Variables à modifier.).

  • Open the keyboard shortcut manager shipped with your desktop environment (example on Xfce: Main Menu > Settings > Settings Manager > Keyboard > Application Shortcuts).

  • Set a keyboard shortcut for Bascule. The path to the script is either in the local folder or in /usr/bin/.

Using this keyboard shortcut will move the active window from a screen to another.

Development

Git is used for revision control. Repository can be browsed online or cloned.

License

Author: Jean-Philippe Fleury (http://www.jpfleury.net/en/contact.php)
Copyright © 2012 Jean-Philippe Fleury

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.