Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:FactoryCandidates
xterm-console
xterm_console-1.1.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xterm_console-1.1.obscpio of Package xterm-console
07070100000000000081A4000001D9000001DA0000000160C250EA00000433000000000000000000000000000000000000001A00000000xterm_console-1.1/LICENSEMIT License Copyright (c) 2020 openQA Development Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 07070100000001000081A4000001D9000001DA0000000160C250EA0000003C000000000000000000000000000000000000001C00000000xterm_console-1.1/README.md# xterm-console A Linux vt console look-alike xterm wrapper 07070100000002000081A4000001D9000001DA0000000160C250EA000011E3000000000000000000000000000000000000001D00000000xterm_console-1.1/psf2bdf.pl#!/usr/bin/env perl # Convert PC Screen Font (PSF) font to Glyph Bitmap Distribution Format (BDF). # Copyright (c) 2015 Kacper Gutowski # Copyright (c) 2015 Susanne Oberhauser-Hirschoff # The MIT License applies (http://opensource.org/licenses/MIT) # https://gist.github.com/mwgamera/6ad86e71e002e5aef1b8/01ffe8208b2763dd353ea7afacedf83072477372 # with minor fixes use strict; use constant { PSF1_MODE512 => 0x01, PSF1_MODEHASTAB => 0x02, PSF2_HAS_UNICODE_TABLE => 0x01, }; push @ARGV, '-' unless scalar @ARGV; for (@ARGV) { my $fn = /^-$/ ? 'stdin' : $_; eval { my ($length, $width, $height); my (@glyphs, @unicode); my $unilen = 0; open my $fh, $_ or die $!; binmode $fh; read $fh, $_, 4 or die $!; if (0x0436 == unpack 'v') { # psf1 my ($mode, $size) = unpack 'x2CC'; $length = $mode & PSF1_MODE512 ? 512 : 256; $height = $size; $width = 8; read $fh, $_, $length * $size; @glyphs = unpack "(a$size)$length"; if ($mode & PSF1_MODEHASTAB) { for my $i (0 .. $length - 1) { my ($u, @u) = 0; do { read $fh, $_, 2; $u = unpack 'v'; push @u, $u if $u < 0xFFFE; } while $u < 0xFFFE; while ($u != 0xFFFF) { read $fh, $_, 2; $u = unpack 'v'; warn 'Unicode sequence ignored' if $u == 0xFFFE; } $unicode[$i] = [@u]; $unilen += (scalar @u) - 1 if (scalar @u); } } } elsif (0x864ab572 == unpack 'V') { # psf2 read $fh, $_, 28 or die $!; (my ($ver, $hlen, $flg), $length, my $size, $height, $width) = unpack 'V7'; die "Unknown version $ver\n" unless $ver == 0; warn "Unexpected glyph size $size bytes for ${width}×$height px\n" unless $size == $height * int(($width + 7) / 8); read $fh, $_, $hlen - 32; # skip to data read $fh, $_, $length * $size; @glyphs = unpack "(a$size)$length"; if ($flg & PSF2_HAS_UNICODE_TABLE) { my $buf = do { local $/; <$fh>; }; for my $i (0 .. $length - 1) { $buf =~ m/\G([^\xfe\xff]*+)(?:\xfe[^\xfe\xff]++)*\xff/sg; utf8::decode(my $str = $1); $unicode[$i] = [map ord, split //, $str]; $unilen += (scalar @{$unicode[$i]}) - 1 if (scalar @{$unicode[$i]}); } } } else { die "Bad format\n"; } print "STARTFONT 2.1\n"; printf "FONT %s\n", '-psf-'; printf "SIZE %u 72 72\n", $height; printf "FONTBOUNDINGBOX %u %u 0 0\n", $width, $height; printf "STARTPROPERTIES %u\n", 6 + 2 * !!@unicode; printf "PIXEL_SIZE %u\n", $height; printf "POINT_SIZE %u\n", 10 * $height; printf "FONT_ASCENT %u\n", $height; print "FONT_DESCENT 0\n"; print "RESOLUTION_X 72\n"; print "RESOLUTION_Y 72\n"; if (@unicode) { print "CHARSET_REGISTRY \"ISO10646\"\n"; print "CHARSET_ENCODING \"1\"\n"; } print "ENDPROPERTIES\n"; printf "CHARS %u\n", $length + $unilen; for my $i (0 .. $length - 1) { my @encodings = ($i); my $is_unicode = 0; if(@unicode && @{$unicode[$i]}) { @encodings = @{$unicode[$i]}; $is_unicode = 1; } foreach my $e (@encodings) { printf "STARTCHAR psf%03x-%04x\n", $i, $e; if ($is_unicode) { printf "ENCODING %u\n", $e; } else { printf "ENCODING -1 %u\n", $e; } printf "SWIDTH %u 0\n", $width * 1000 / $height; printf "DWIDTH %u 0\n", $width; printf "BBX %u %u 0 0\n", $width, $height; my $bw = (($width + 7) & ~7) >> 3; printf "BITMAP\n%s\n", join "\n", map unpack('H*', $_), unpack "(a$bw)*", $glyphs[$i]; printf "ENDCHAR\n"; } } print "ENDFONT\n"; }; warn "$fn: $@" if $@; last; } 07070100000003000081A4000001D9000001DA0000000160C250EA00000799000000000000000000000000000000000000002000000000xterm_console-1.1/xterm-console#!/usr/bin/python3 # Copyright (C) 2015 Susanne Oberhauser-Hirschoff <froh@suse.de> # The MIT License applies (http://opensource.org/licenses/MIT) """start an xterm that looks like a linux console # do this once, to let the xserver know about the fonts xset fp+ $(pwd) # for each font you want to try... gunzip -c /usr/share/kbd/consolefonts/lat9w-16.psfu.gz | perl psf2bdf.pl > lat9w-16.bdf sed -i -e s,-psf-,lat9w_16, lat9w-16.bdf # update the fonts.dir file mkfontdir # notify X about the new font xset fp rehash # have a look :) # start an xterm with the right colors and all, script is attached [3] python3 xterm_linux_vt.py """ # from pprint import pprint as pp default_kernel_vt_colors = {} RGB = ("red", "grn", "blu") for cname in RGB: with open("/sys/module/vt/parameters/default_{}".format(cname)) as f: colors = f.read().rstrip().split(',') default_kernel_vt_colors[cname] = map(int, colors) xterm_colors= list() for r, g, b in zip(*(default_kernel_vt_colors[c] for c in RGB)): xterm_colors.append("rgb:{r:02x}/{g:02x}/{b:02x}".format(**locals())) def xtc(label, color): return ("-xrm", "xterm*{label}: {color}".format(**locals())) def xrm_color_options(): yield(xtc("foreground", xterm_colors[7])) yield(xtc("background", xterm_colors[0])) for i, c in enumerate(xterm_colors): yield(xtc("color{}".format(i), c)) from itertools import chain import os xx = [ "xterm", # console font "-fn", "eurlatgr", "-fullscreen", # no scrollbar "+sb", # no border "-b", "0", # blinking underline cursor "-bc", "-uc", "-bcf", "200", "-bcn", "200", # intense colors for bold "+bdc", # intense for bold... "-xrm", "xterm*boldMode: false", ] import sys # for argv sys.argv.pop(0) # strip command name xx.extend(chain(*xrm_color_options())) xx.extend(sys.argv) os.execvp("xterm", xx) 07070100000004000081A4000001D9000001DA0000000160C250EA000007DB000000000000000000000000000000000000002500000000xterm_console-1.1/xterm-console.spec# # spec file for package xterm-console # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: xterm-console Version: 1.1 Release: 0 Summary: A Linux vt console look-alike xterm wrapper License: MIT Group: System/X11/Utilities URL: https://github.com/os-autoinst/xterm-console Source: xterm-console Source1: psf2bdf.pl BuildRequires: bdftopcf BuildRequires: fontpackages-devel # the original consolefonts: BuildRequires: kbd Requires: fonts-config # svirt, eg. s390x, xen Supplements: os-autoinst %reconfigure_fonts_prereq BuildArch: noarch %description This package contains the basic X.Org terminal program. %prep %setup -q -c -T cp %{SOURCE1} . %build chmod +x ./psf2bdf.pl for font in %{_datadir}/kbd/consolefonts/*.psfu.gz; do fontname="${font##*/}" fontname="${fontname%.psfu.gz}" gunzip -c $font | ./psf2bdf.pl | sed -e "s,FONT \+-psf-,FONT ${fontname}," > "$fontname".bdf done for i in *.bdf; do bdftopcf "$i" | gzip -9 >"${i%.bdf}.pcf.gz" done %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/fonts/misc/ install -m 0755 %{SOURCE0} %{buildroot}%{_bindir} install -m 0644 *.pcf.gz %{buildroot}%{_datadir}/fonts/misc/ %reconfigure_fonts_scriptlets %files %{_bindir}/xterm-console %dir %{_datadir}/fonts/misc %{_datadir}/fonts/misc/*.pcf.gz %changelog 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!21 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor