Giter Club home page Giter Club logo

controlpad's Introduction

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.

controlpad's People

Contributors

twolfson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

metainfa

controlpad's Issues

Add support for scale size

A scale size would be practical for moving between displays and wanting to keep the same proportions and location from display to display.

Add stack system

Add two new commands wmpush and wmpop. These should be invoked via the CLI and add/subtract from a stack of past window states.

Effectively, wmpush would add to the stack and call controlpad with the requested location.

Patches/testing

This is from an old note


Patches/testing for controlpad

  • Flat files
    • command for window state
    • eventually + page states

Add cycle system

The inital idea, as inspired by WindowPad, is to cycle between states of a window.

For example, toggle between top-left-quarter, to top-left-eighth, to top-left2-eighth, and repeat.

controlpad current top-left-quarter current top-left-eighth current top-left2-eighth

Alternatively, cycle through the halfs of displays (imagine binding to Host+Right)

controlpad current right-half right left-half right right-half

I thought this would use wmpush and wmpop from #4 but I am second guessing myself as the syntax would case controlpad to call wmpush which would call controlpad.

Add support for relative displays

We currently handle the extremes but we should support relative displays (e.g. right, left, 'top,down`) to the active window's current display.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.