Skip to main content

A rich python wrapper on the CMDOW window util

Project description

Welcome to my rich CMDOW cli

The CMDOW cli is a command line interface for the CMDOW tool. It is written in python and is a work in progress.

The CMDOW cli

The goal is to make a command line interface for CMDOW that is easy to use and has a rich feature set. To avoid python's (and pandas' overhead, the cli uses polars to do the heavy lifting.

The CMDOW tool

CMDOW is a command line tool for Windows that allows you to control windows. It is written in C++ and is available on the author's webpage.

Why use CMDOW?

I just stumbled upon CMDOW and I think it is a great tool. It is very powerful and allows you to do a lot of smart stuff with regards to windows. As a humble side project, I decided to write a command line interface for CMDOW that is easy to use and has a rich feature set.

For example, CMDOW allows you to do the following:

Get a list of all windows and their positions/sizes (in pixels):

cmdow /p /f

However the output was pure text, and I wanted to add a little bit of spark to it. So I wrote a python script that uses polars to parse the output and make it a bit more readable. You can get the same output as above by running the following command:

rcmdow raw

Note that the raw command is just an alias for cmdow /p /f. To add a little bit of spark to the output, you can run the following command:

rcmdow ls

This will give you a nice table with the windows and their positions/sizes.

Features / Usage

Get information about windows

The equivalent of cmdow /t /p /f (which lists only taskbar windows) can be achieved by running the following command:

rcmdow lst

To let the cli tool guess what your current layout is, run the following command:

rcmdow layout

This output is just a filter on top of the rcmdow ls command. It will show you all windows that are visible on your screen.

Move windows

So far the cli tool only supports screen splitting. You can split your screen into two halves by running the following command:

Left/Right:

rcmdow hzl name1 name2

You can get the names of the windows by running the rcmdow ls or rcmdow lst command and selecting the Image column. Note that the names are not case sensitive.

Top/Bottom:

rcmdow vtl name1 name2

Installation

Prerequisites

  • Python 3.8 or higher
  • The CMDOW tool (available here)

An easy way to install

I recommend using scoop to install the CMDOW cli. It is a command line installer for Windows that makes installing and updating software a breeze.

To install scoop, run the following command in powershell:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm get.scoop.sh | iex

To install the CMDOW cli, run the following command in powershell:

scoop bucket add extras
scoop install cmdow

Note: The cli tool assumes you can call cmdow from the command line. If you installed CMDOW to a different location, you will have to add the location to your PATH variable.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rcmdow-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

rcmdow-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file rcmdow-0.1.0.tar.gz.

File metadata

  • Download URL: rcmdow-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.11.1 Windows/10

File hashes

Hashes for rcmdow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8dc33775797ac7affcd6db089b8e1e93ef136bb3ef9fd1a07dc7e2bcfc680fb5
MD5 8bdb28d231bebcd8c99ec90bf3bb22ff
BLAKE2b-256 5708fbe5275ec8f9a12ad42f93c20bab44dddbff9710681e865e3bc7bae3441e

See more details on using hashes here.

File details

Details for the file rcmdow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rcmdow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.11.1 Windows/10

File hashes

Hashes for rcmdow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4dbd1b4feefaad71e9f419aeef117d74c940be472f91d59c3e6ac8b36131650
MD5 752b1d6041801ed6e19414ed775c5559
BLAKE2b-256 79133a05a400c8de2297ecddf302c8a8234e9233d9870687a8e98dd3671dafe8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page