Git Product home page Git Product logo

winlaunch's Introduction

WinLaunch

A small tool that captures open windows and their positions and generates a script that can be used to launch those windows again at those positions.

Only tools used are xdotool, xwininfo, xprop which are quite common in Linux. The tool is very easy to use and although not 100% accurate it is very easy to tweak in order to bring to your needs.

Usage

  1. Make sure you are in the same directory as the winlaunch.py file.
  2. Run python winlaunch.py generate-script

A Python script will be generated in the same directory containing a snapshot of all open windows and their location. Feel free to make some alterations to the script since since small errors might be there (terminals tend to all look the same for example).

You can run the script with ./launch_script.py. To get a better undestanding of the contents of the script, check the API documentation below.

Dependencies

sudo apt-get install xdotool xprop xwininfo

API

Function Description
launch(command) Runs a GUI application in the background. The window id (wid) is returned and the process id (pid) that the window belongs to.
win_size(wid, width, height) Resizes the window with id wid to given width and height values. If no width and height are given, the current size of the window is returned.
win_pos(wid, x, y) Moves the window with id wid to the given x and y coordinates. If no x and y are given. the current window position is returned.
win_desktop(wid, desktop) Sets the window with id wid to the given desktop. If desktop is not given the current desktop of the window is returned.
win_screen(wid) Gives the current screen where the window with id wid is.

winlaunch's People

Contributors

trashman2 avatar pithikos avatar

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.