wmctrl-pad

0.7.0 • Public • Published

controlpad Donate on Gittip

WindowPad functionality for Linux.

The initial intent was to write this in bash. However, due to conflicts, it was decided to write this in node.js. The end goal is to rewrite the project in bash.

This also is the same reason for the poor structuring (technically bin should be talking to a class which moves windows).

Getting Started

Verify Linux dependencies are installed:

  • xrandr - Used to determine current displays and their sizings
  • wmctrl - Used to control window position and sizing
  • xprop - Used to determine id of active window
  • xwininfo - Used to determine current size and position of active window

Install the module globally via npm and test it out:

# Install controlpad
npm install -g controlpad

# Resize active window to rightmost display to the top half
controlpad rightmost top-half

Documentation

controlpad presents a large set of semantic configurations for resizing/relocating the active window.

controlpad - WindowPad functionality for Linux
Usage: controlpad {{display}} {{size}}
    display - Display to move window to
        - leftmost, rightmost, topmost, bottommost - Absolute displays
        - current - Keep window on same display
    size - Size to adjust window to
        - left-half, right-half, top-half, bottom-half - Half displays
        - top-left-quarter, top-right-quarter, bottom-left-quarter, bottom-right-quarter - Quarter displays
        - top-left-eighth, top-right-eighth, bottom-left-eighth, bottom-right-eighth - Eighth displays
        - full - Take up entire screen (not maximized)
        - center - Center window in display (sized to half-by-half)

Examples

# Resize active window to center of screen 
controlpad current center
 
# Move window to rightmost display 
controlpad rightmost center
 
# Move window to left half of current display 
controlpad current left-half

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.

License

Copyright (c) 2013 Todd Wolfson

Licensed under the MIT license.

Package Sidebar

Install

npm i wmctrl-pad

Weekly Downloads

16

Version

0.7.0

License

none

Last publish

Collaborators

  • twolfson