From Schmid.wiki
Jump to: navigation, search

Tricks

Change keyboard repeat rate to 30 chars/second - I added this to /etc/init.d/keymaps to get it to work automatically:

# kbdrate -r30

Change beep frequency and length

# setterm -bfreq 220 -blength 50

Change the current virtual terminal

# chvt 2

Change cursor in virtual terminal to yellow solid cursor

# printf "\033[?152;9c"

Do the same in vim - change .vimrc:

if &term == "linux"
       set t_ve+=^[[?152;9c
endif

Note that the ^[ above needs to be typed like this: <CTRL-V> <ESC>.

Awesome Software

mplayer -quiet -vo aa someFile.ogm

Filter ANSI Color Control Codes from Input

decolorize.rb:

#!/usr/bin/env ruby
while gets
    # \e escape
    # typical ANSI colour control sequences look like this:
    # ESC[0;33m
    #
    # \ch CTRL+H (backspace)
    puts gsub(/\e\[\d(;\d+)?m|\ch/,"")
end

Use like this:

someprogram|decolorize.rb 

References