ponysay/pages/ponysay/KMS-ponies.html
Mattias Andrée 4a48c6e43c sync manual
2012-10-30 16:12:22 +01:00

81 lines
4.7 KiB
HTML

<html lang="en">
<head>
<title>KMS ponies - Ponysay</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Ponysay">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Optional-features.html#Optional-features" title="Optional features">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is for ponysay
(version 2.9.1),
Copyright (C) 2012 Mattias Andrée
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.3 or any later version published by the Free Software
Foundation; with no Invariant Sections, with no Front-Cover Texts,
and with no Back-Cover Texts. A copy of the license is included in
the section entitled ``GNU Free Documentation License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
<link rel="stylesheet" type="text/css" href="../../info.css"></head>
<body>
<div class="node">
<a name="KMS-ponies"></a>
<p>
Up:&nbsp;<a rel="up" accesskey="u" href="Optional-features.html#Optional-features">Optional features</a>
<hr>
</div>
<h3 class="section">5.1 KMS ponies</h3>
<p><a name="index-kmsponies-133"></a><a name="index-tty-134"></a><a name="index-linux-vt-135"></a><a name="index-kms-136"></a><a name="index-kernel-mode-setting-137"></a><a name="index-environment-variables-138"></a><a name="index-g_t_0040env_007bPONYSAY_005fKMS_005fPALETTE_007d-139"></a><a name="index-g_t_0040env_007bPONYSAY_005fKMS_005fPALETTE_005fCMD_007d-140"></a><a name="index-g_t_0040file_007b_002ebashrc_007d-141"></a><a name="index-g_t_0040file_007b_007e_002f_002ebashrc_007d-142"></a><a name="index-cache-143"></a><a name="index-g_t_0040file_007b_002fvar_002fcache_002fponysay_007d-144"></a><a name="index-g_t_0040file_007b_007e_002f_002ecache_002fponysay_007d-145"></a>
KMS ponies is an optional feature that required that you have <samp><span class="command">util-say&gt;=2</span></samp>
(<samp><span class="command">util-say&lt;2</span></samp> for <samp><span class="command">ponysay&lt;2.1</span></samp>) installed. It lets TTY users that
have a custom TTY colour palette and KMS support get best TTY images that can be
display at the current state of the art. KMS is supported on most computers, but due
to lack of published specifications Nvidia drivers does not support KMS.
<samp><span class="command">util-say</span></samp> can be downloaded at <a href="https://github.com/maandree/util-say">https://github.com/maandree/util-say</a>.
<p>To use this feature your <samp><span class="file">~/.bashrc</span></samp> (or equivalent for your shell) must keep
track of your colour palette; it is not possible for a program to ask to terminal.
Either the shell should export a palette string to <samp><span class="env">$PONYSAY_KMS_PALETTE</span></samp> or you
should export a command to can get the palette string to
<samp><span class="env">$PONYSAY_KMS_PALETTE_CMD</span></samp>. The palette string should be the stream which sets
the colour palette to the terminal when <samp><span class="command">echo</span></samp>:ed; preferably, to increase
speed and reduce cache usage, it should be consistent every time it is exported for
every colours palette. So you may want to keep it sorted, always be in either upper
case or lower case, and not contain an character that is not used to set the colour
palette.
<p>Assuming you have a function in your <samp><span class="file">~/.bashrc</span></samp>, to reset the colour palette
to what you set it to last time in the terminal, named <samp><span class="command">reset-palette</span></samp>,
your <samp><span class="file">~/.bashrc</span></samp> should, for example, contain:
<p><table class="cartouche" summary="cartouche" border="1"><tr><td>
<pre class="example"> [ "$TERM" = "linux" ] &amp;&amp;
function ponysay
{ export PONYSAY_KMS_PALETTE="$(reset-palette)"
exec ponysay "$@"
}
</pre>
</td></tr></table>
<p>KMS ponies uses <samp><span class="file">/var/cache/ponysay/</span></samp> or, if missing, <samp><span class="file">~/.cache/ponysay/</span></samp>
for cache space.
</body></html>