module RemiLib::Console::Terminology

Overview

The RemiLib::Console::Terminology module provides additional escape codes for the Terminology terminal emulator.

https://www.enlightenment.org/about-terminology

Extended Modules

Defined in:

remilib/console/terminology.cr

Instance Method Summary

Instance Method Detail

def popup(filename : String | Path, *, output : IO::FileDescriptor = STDOUT, enqueue : Bool = false) : Nil #

Pops a media file (or a URL pointing to media) up in the terminal. If enqueue is true, then the popup is queued up by the terminal, otherwise it is immediately shown.


[View source]
def queryGrid(*, output : IO::FileDescriptor = STDOUT, input : IO::FileDescriptor = STDIN) : Tuple(Int32, Int32, Int32, Int32) #

Queries the grid and font size, then returns a tuple with four values:

  1. The width of the terminal in characters
  2. The height of the terminal in characters
  3. The width of one character in pixels
  4. The height of one character in pixels

This returns {0, 0, 0, 0} if it cannot determine the sizes.


[View source]
def runningTerminology?(*, output : IO::FileDescriptor = STDOUT, input : IO::FileDescriptor = STDIN) : Bool #

Returns true if the program is connected running in a Terminology terminal, or false if it is not or it cannot be determined.


[View source]
def setAlphaState(enable : Bool, *, output : IO::FileDescriptor = STDOUT, makePermanent : Bool = false) : Nil #

Sets the background state on or off. If makePermanent is false (the default), then the change is a temporary one.


[View source]
def setBackground(filename : String | Path, *, output : IO::FileDescriptor = STDOUT, makePermanent : Bool = false) : Nil #

Sets the background to the given media file. If makePermanent is false (the default), then the change is a temporary one.


[View source]
def showMedia(filename : String | Path, width : UInt16, height : UInt16, *, output : IO::FileDescriptor = STDOUT, dispMode : DisplayMode = DisplayMode::Centered) : Nil #

Displays a media file (or a URL pointing to media) in the terminal. width and height are in cells, not pixels.


[View source]
def showThumb(filename : String | Path, width : UInt16, height : UInt16, *, output : IO::FileDescriptor = STDOUT, link : Bool | String = false) : Nil #

Displays a media file (or a URL pointing to media) thumbnail in the terminal. width and height are in cells, not pixels.


[View source]