#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/vt # # To get systemd autologin, put this # # [Service] # ExecStart= # ExecStart=-/sbin/agetty -a incal --noclear %I $TERM # # in # # /etc/systemd/system/getty@tty1.service.d/10-autologin.conf # # for each tty where desired, then do # # $ sudo systemctl daemon-reload sup () { sudo systemctl daemon-reload } print-char () { local chr=$1 printf "\\u$1\n" } all-chars () { echo 'this file: https://dataswamp.org/~incal/vt-chars.txt' echo ' source: https://dataswamp.org/~incal/conf/.zsh/vt\n' all-chars-1; echo all-chars-2 all-chars-3 all-chars-4 } all-chars-1 () { print -a -C 16 -r {" "..~} } all-chars-2 () { local beg=${1:-32} local end=${2:-127} local i for i in {$beg..$end}; do printf "\\$(printf %03o "$i")" done echo } all-chars-3 () { local i local tmp for (( i=0; i < 256; i++)); do printf -v tmp %02x "$i" printf "\x$tmp" done echo } all-chars-4 () { local i local chr for (( i=0; i < 512; i++)); do printf -v chr %04x $i printf "\u${chr}\n" 2> /dev/null done } print-rep-char () { local rc printf -v rc %04x 0xfffd printf "\u${rc}\n" } key () { local key=$1 ascii -t $key | head -n 1 | awk '{print $2}' } wake-ttys () { local first=$1 local last=$2 local t for t in {$first..$last}; do sleep 10 chvt $t done }