summaryrefslogtreecommitdiffstats
path: root/bin/show_colors
blob: 4e48ec15b9b086aa1bf6522fa4f6707667892dee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>show_colors</title>
    <link rel="stylesheet" type="text/css" href="http://paste.xinu.at/data/paste.css" />
    <link rel="stylesheet" type="text/css" href="http://paste.xinu.at/data/paste-show_colors.css" />
  </head>
  <body>
    <div class="top_bar">
      <a class="raw_link no" href="http://paste.xinu.at/">New</a> |
      <a class="raw_link no" href="http://paste.xinu.at/lK6">Raw</a> |
      <a class="raw_link no" href="http://paste.xinu.at/lK6/plain">Plain</a> |
      Currently: show_colors |
      Timeout: <a class="raw_link no" href="http://paste.xinu.at/file/delete/lK6" title="delete">never</a>
      <div style="float:right;">
        <a class="raw_link no" href="http://paste.xinu.at/lK6/">Code</a> |
        <a class="raw_link no" href="http://paste.xinu.at/lK6/rmd">Render Markdown</a>
      </div>
    </div>
    <table class="content">
      <tr>
<td class="numbers"><pre><a href="#n1" class="no" id="n1">1</a>
<a href="#n2" class="no" id="n2">2</a>
<a href="#n3" class="no" id="n3">3</a>
<a href="#n4" class="no" id="n4">4</a>
<a href="#n5" class="no" id="n5">5</a>
<a href="#n6" class="no" id="n6">6</a>
<a href="#n7" class="no" id="n7">7</a>
<a href="#n8" class="no" id="n8">8</a>
<a href="#n9" class="no" id="n9">9</a>
<a href="#n10" class="no" id="n10">10</a>
<a href="#n11" class="no" id="n11">11</a>
<a href="#n12" class="no" id="n12">12</a>
<a href="#n13" class="no" id="n13">13</a>
</pre></td><td class="code">
<pre class="show_colors">#!/bin/zsh
&nbsp;
xdef=&quot;$HOME/.colors/hund&quot;
&nbsp;
colors=( $( sed -E '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed  's/^.*: *//g' ) )
&nbsp;
echo -e &quot;\e[1;37m 
 Black    Red      Green    Yellow   Blue     Magenta  Cyan     White   
────────────────────────────────────────────────────────────────────────\e[0m&quot;
for i in {0..7}; echo -en &quot;\e[$((30+$i))m $colors[i+1] \e[0m&quot;
echo
for i in {8..15}; echo -en &quot;\e[1;$((22+$i))m $colors[i+1] \e[0m&quot;
echo -e &quot;\n&quot;
&nbsp;</pre>        </td>
      </tr>
    </table>
  </body>
</html>