/coninfo_windows

Get a console's column and row size, cursor position, and buffer size. Defaults to all information. Windows version.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Con Info (Windows version) Con Info logo

Readme Card



About

All files can be found on the Releases page.

Description

This is a command line utility that can print some basic information about a console's (terminal display) size and the cursor position within that console.

This is a very basic version and does not work well for things like variables or file output. This is simply for your own use in profile configs and in-time/on-screen information. I do plan to write a more thorough version at some point.

This is the Windows version, but I have plans to write a Linux version[1] as well.

All executable binaries (portable and installation) provided by this repository were built at this repository and MD5 hashes were obtained during compile/build time and are updated at the same time and provided below and on the Release page.

Motivation

I wrote this for use in the command line and especially for use in AutoHotkey[2] to help me get this sort of information so I can manipulate/control my console's better.

Yes, I know there are other ways to get this information, but I like to create my own tools just for the sake of it and because I know exactly what my program is doing.


Support Me If You Like

If you like any of the projects below and care to donate to my PayPal:

PayPal Donation

Or Buy Me A Coffee if your prefer:

Buy Me A Coffee


Usage

Environment

This is a Windows command line tool for CMD and PowerShell. This tool is a single stand-alone executable and therefore can be used portably, but has an installer provided. The installer provides a means for easy removal and the option to add the programs path to the %PATH% environment variable (which is also removed on uninstallation). There are both x86 (32 bit) and x64 (64 bit) versions of both the portable and installer executables.

How

Portable

As with any portable program this can be placed anywhere you like on your machine, but more preferably in a directory that is in your %PATH% environment variable so you can run it without a full path (coninfo for example). I recommend using a dedicated Bin directory, but of course, it's your choice. If your path isn't already in your %PATH% environment then I suggest adding it[3], but if not then you have provide the full path (C:\Path\To\coninfo.exe for example) when executing the program.

Installation

Though it's not necessary an installer is provided for both the 32 bit and 64 bit versions. The installer provides a way to easily uninstall the program like you would any other Windows program and also provides the ability to automatically add the program's directory to the %PATH% environment variable. Everything is removed upon uninstallation. Just download the installer of your choice and run like you would any other intaller in Windows.

A preview is provided below.

Examples

Help

PS> & coninfo /?

Con Info - Get a console's column and row size, cursor position, and buffer
           size. Defaults to all information.

confinfo [/? | /h | /help] | [/b | /buffer] [/s | /size] [/C | /cursor]
         [/c | /columns] [/r | /rows] [/bc | /buffercolumns]
         [/br | /bufferrows] [/cc | /cursorcolumn] [/cr | /cursorrow]
         [/u | /unformatted]

  /?, /h, /help        This help screen.
  /b, /buffer          Only print the buffer size by columns and rows.
  /s, /size            Only print the visible console's size by columns and
                       rows.
  /C, /cursor          Only print the cursor position by column and row.
  /c, /columns         Only print the visible console's column width.
  /r, /rows            Only print the visible console's column height.
  /bc, /buffercolumns  Only print the buffer's width.
  /br, /bufferrows     Only print the buffer's height.
  /cc, /cursorcolumn   Only print the cursors's column position (X).
  /cr, /cursorrow      Only print the cursors's row position (Y).
  /u, /unformatted     No special formatting; no color and only returns
                       integer values. Values are printed in their normal
                       formatted order. Implies /monochrome.
  /m, /monochrome      No color output.

PS> 

Print All of a Console's Information

PS> & coninfo

Console Information

Buffer Columns : [110]
Buffer Rows    : [28]
Cursor Column  : [0]
Cursor Row     : [2]
Columns        : [110]
Rows           : [28]

PS> 

Only Print the Console's Size

PS> & coninfo /size

Console Information

Columns        : [110]
Rows           : [28]

PS> 

Only Print the Console's Buffer Size

PS> & coninfo /buffer

Console Information

Buffer Columns : [110]
Buffer Rows    : [28]

PS> 

Only Print the Console's Cursor Position

The x and y coodinates of the cursor position of where the command executed.

PS> & coninfo /cursor

Console Information

Cursor Column  : [0]
Cursor Row     : [2]

PS> 

Print All of a Console's Information Unformatted

PS> & coninfo /unformatted
110
28
0
2
110
28
PS> 

Project Information

This project is written in C++.

C++

Source File Quality

This is graded by CodeFactor and is subjective, but helps me to refactor my work.

Name Status
codefactor.io

File MD5 Hashes

All hashes are retrieved at compile/build time.

Current Windows X86 MD5

WINDOWS X86 MD5

Current Windows X64 MD5

WINDOWS X64 MD5

Current Windows X86 Installer MD5

WINDOWS X86 INSTALLER MD5

Current Windows X64 Installer MD5

WINDOWS X64 INSTALLER MD5

Other Miscellaneous File Information

Description Status
Project Release Date GitHub Release Date
Total downloads for this project GitHub all releases
Complete repository size This Repo Size
Commits in last month GitHub commit activity
Commits in last year GitHub commit activity

Notes

Note 1

I normally combine all architecture/operating system versions into one repository/project, but I'll be separating this into the different operating system's own repositories. The Android (Termux) version will be under Linux.

Note 2

AutoHotkey is a powerful and fun (in my humble opinion) Windows scripting language which can be used to automate countless tasks in the Windows operating system from controlling hotkeys and hotstrings to creating full Win32 guis and making library function calls from DLLs.

Note 3

Tips (from DuckDuckGo) for adding directory entries to the %PATH% environment variable in Windows:

From a gui

From the command line


Media

Logo

I created this.

LOGO

Help Screen

HELP SCREENSHOT

Examples In PowerShell And CMD

EXAMPLES1 SCREENSHOT

Installer Preview

INSTALLATION PREVIEW


License Info

License Excerpt
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.