class Tput::Emulator

Overview

Class for terminal emulator program detection.

The detection is always just a best-effort because it relies on testing environment variables, and these are passed from processes to children. (I.e. if a person opens an xterm, then an lxterminal in it, xterm-specific environment variables will propagate to lxterm, confusing the detection.

Included Modules

Defined in:

tput/emulator.cr

Constant Summary

Log = ::Log.for((self.name.gsub("::", '.')).underscore)

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(tput : Tput) #

Creates an instance of Features and performs the autodetection.


[View source]

Instance Method Detail

def inspect(io) #

[View source]
def iterm2=(iterm2 : Bool) #

Is the emulator iTerm2?


[View source]
def iterm2? : Bool #

Is the emulator iTerm2?


[View source]
def lxterm=(lxterm : Bool) #

Is the emulator LXDE's lxterm?


[View source]
def lxterm? : Bool #

Is the emulator LXDE's lxterm?


[View source]
def osxterm=(osxterm : Bool) #

Is the emulator Mac OS X terminal?


[View source]
def osxterm? : Bool #

Is the emulator Mac OS X terminal?


[View source]
def rxvt=(rxvt : Bool) #

Is the emulator rxvt?


[View source]
def rxvt? : Bool #

Is the emulator rxvt?


[View source]
def screen=(screen : Bool) #

Is the emulator screen?


[View source]
def screen? : Bool #

Is the emulator screen?


[View source]
def terminator=(terminator : Bool) #

Is the emulator terminator?


[View source]
def terminator? : Bool #

Is the emulator terminator?


[View source]
def tmux=(tmux : Bool) #

Is the emulator tmux?


[View source]
def tmux? : Bool #

Is the emulator tmux?


[View source]
def vte=(vte : Bool) #

Is the emulator based on VTE?


[View source]
def vte? : Bool #

Is the emulator based on VTE?


[View source]
def xfce=(xfce : Bool) #

Is the emulator XFCE's terminal?


[View source]
def xfce? : Bool #

Is the emulator XFCE's terminal?


[View source]
def xterm=(xterm : Bool) #

Is the emulator xterm?


[View source]
def xterm? : Bool #

Is the emulator xterm?


[View source]