notes

Dash Eclipse's Notes
git clone git://ezup.dev/notes.git
Log | Files | Refs | Submodules | README | LICENSE

index.html (29804B)


      1<?xml version="1.0" encoding="utf-8"?>
      2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      3"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      4<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
      5<head>
      6<!-- 2020-11-09 Mon 21:37 -->
      7<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
      8<meta name="viewport" content="width=device-width, initial-scale=1" />
      9<title>Notes by Dash Eclipse</title>
     10<meta name="generator" content="Org mode" />
     11<meta name="author" content="Dash Eclipse" />
     12<style type="text/css">
     13 <!--/*--><![CDATA[/*><!--*/
     14  .title  { text-align: center;
     15             margin-bottom: .2em; }
     16  .subtitle { text-align: center;
     17              font-size: medium;
     18              font-weight: bold;
     19              margin-top:0; }
     20  .todo   { font-family: monospace; color: red; }
     21  .done   { font-family: monospace; color: green; }
     22  .priority { font-family: monospace; color: orange; }
     23  .tag    { background-color: #eee; font-family: monospace;
     24            padding: 2px; font-size: 80%; font-weight: normal; }
     25  .timestamp { color: #bebebe; }
     26  .timestamp-kwd { color: #5f9ea0; }
     27  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
     28  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
     29  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
     30  .underline { text-decoration: underline; }
     31  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
     32  p.verse { margin-left: 3%; }
     33  pre {
     34    border: 1px solid #ccc;
     35    box-shadow: 3px 3px 3px #eee;
     36    padding: 8pt;
     37    font-family: monospace;
     38    overflow: auto;
     39    margin: 1.2em;
     40  }
     41  pre.src {
     42    position: relative;
     43    overflow: auto;
     44    padding-top: 1.2em;
     45  }
     46  pre.src:before {
     47    display: none;
     48    position: absolute;
     49    background-color: white;
     50    top: -10px;
     51    right: 10px;
     52    padding: 3px;
     53    border: 1px solid black;
     54  }
     55  pre.src:hover:before { display: inline;}
     56  /* Languages per Org manual */
     57  pre.src-asymptote:before { content: 'Asymptote'; }
     58  pre.src-awk:before { content: 'Awk'; }
     59  pre.src-C:before { content: 'C'; }
     60  /* pre.src-C++ doesn't work in CSS */
     61  pre.src-clojure:before { content: 'Clojure'; }
     62  pre.src-css:before { content: 'CSS'; }
     63  pre.src-D:before { content: 'D'; }
     64  pre.src-ditaa:before { content: 'ditaa'; }
     65  pre.src-dot:before { content: 'Graphviz'; }
     66  pre.src-calc:before { content: 'Emacs Calc'; }
     67  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
     68  pre.src-fortran:before { content: 'Fortran'; }
     69  pre.src-gnuplot:before { content: 'gnuplot'; }
     70  pre.src-haskell:before { content: 'Haskell'; }
     71  pre.src-hledger:before { content: 'hledger'; }
     72  pre.src-java:before { content: 'Java'; }
     73  pre.src-js:before { content: 'Javascript'; }
     74  pre.src-latex:before { content: 'LaTeX'; }
     75  pre.src-ledger:before { content: 'Ledger'; }
     76  pre.src-lisp:before { content: 'Lisp'; }
     77  pre.src-lilypond:before { content: 'Lilypond'; }
     78  pre.src-lua:before { content: 'Lua'; }
     79  pre.src-matlab:before { content: 'MATLAB'; }
     80  pre.src-mscgen:before { content: 'Mscgen'; }
     81  pre.src-ocaml:before { content: 'Objective Caml'; }
     82  pre.src-octave:before { content: 'Octave'; }
     83  pre.src-org:before { content: 'Org mode'; }
     84  pre.src-oz:before { content: 'OZ'; }
     85  pre.src-plantuml:before { content: 'Plantuml'; }
     86  pre.src-processing:before { content: 'Processing.js'; }
     87  pre.src-python:before { content: 'Python'; }
     88  pre.src-R:before { content: 'R'; }
     89  pre.src-ruby:before { content: 'Ruby'; }
     90  pre.src-sass:before { content: 'Sass'; }
     91  pre.src-scheme:before { content: 'Scheme'; }
     92  pre.src-screen:before { content: 'Gnu Screen'; }
     93  pre.src-sed:before { content: 'Sed'; }
     94  pre.src-sh:before { content: 'shell'; }
     95  pre.src-sql:before { content: 'SQL'; }
     96  pre.src-sqlite:before { content: 'SQLite'; }
     97  /* additional languages in org.el's org-babel-load-languages alist */
     98  pre.src-forth:before { content: 'Forth'; }
     99  pre.src-io:before { content: 'IO'; }
    100  pre.src-J:before { content: 'J'; }
    101  pre.src-makefile:before { content: 'Makefile'; }
    102  pre.src-maxima:before { content: 'Maxima'; }
    103  pre.src-perl:before { content: 'Perl'; }
    104  pre.src-picolisp:before { content: 'Pico Lisp'; }
    105  pre.src-scala:before { content: 'Scala'; }
    106  pre.src-shell:before { content: 'Shell Script'; }
    107  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
    108  /* additional language identifiers per "defun org-babel-execute"
    109       in ob-*.el */
    110  pre.src-cpp:before  { content: 'C++'; }
    111  pre.src-abc:before  { content: 'ABC'; }
    112  pre.src-coq:before  { content: 'Coq'; }
    113  pre.src-groovy:before  { content: 'Groovy'; }
    114  /* additional language identifiers from org-babel-shell-names in
    115     ob-shell.el: ob-shell is the only babel language using a lambda to put
    116     the execution function name together. */
    117  pre.src-bash:before  { content: 'bash'; }
    118  pre.src-csh:before  { content: 'csh'; }
    119  pre.src-ash:before  { content: 'ash'; }
    120  pre.src-dash:before  { content: 'dash'; }
    121  pre.src-ksh:before  { content: 'ksh'; }
    122  pre.src-mksh:before  { content: 'mksh'; }
    123  pre.src-posh:before  { content: 'posh'; }
    124  /* Additional Emacs modes also supported by the LaTeX listings package */
    125  pre.src-ada:before { content: 'Ada'; }
    126  pre.src-asm:before { content: 'Assembler'; }
    127  pre.src-caml:before { content: 'Caml'; }
    128  pre.src-delphi:before { content: 'Delphi'; }
    129  pre.src-html:before { content: 'HTML'; }
    130  pre.src-idl:before { content: 'IDL'; }
    131  pre.src-mercury:before { content: 'Mercury'; }
    132  pre.src-metapost:before { content: 'MetaPost'; }
    133  pre.src-modula-2:before { content: 'Modula-2'; }
    134  pre.src-pascal:before { content: 'Pascal'; }
    135  pre.src-ps:before { content: 'PostScript'; }
    136  pre.src-prolog:before { content: 'Prolog'; }
    137  pre.src-simula:before { content: 'Simula'; }
    138  pre.src-tcl:before { content: 'tcl'; }
    139  pre.src-tex:before { content: 'TeX'; }
    140  pre.src-plain-tex:before { content: 'Plain TeX'; }
    141  pre.src-verilog:before { content: 'Verilog'; }
    142  pre.src-vhdl:before { content: 'VHDL'; }
    143  pre.src-xml:before { content: 'XML'; }
    144  pre.src-nxml:before { content: 'XML'; }
    145  /* add a generic configuration mode; LaTeX export needs an additional
    146     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
    147  pre.src-conf:before { content: 'Configuration File'; }
    148
    149  table { border-collapse:collapse; }
    150  caption.t-above { caption-side: top; }
    151  caption.t-bottom { caption-side: bottom; }
    152  td, th { vertical-align:top;  }
    153  th.org-right  { text-align: center;  }
    154  th.org-left   { text-align: center;   }
    155  th.org-center { text-align: center; }
    156  td.org-right  { text-align: right;  }
    157  td.org-left   { text-align: left;   }
    158  td.org-center { text-align: center; }
    159  dt { font-weight: bold; }
    160  .footpara { display: inline; }
    161  .footdef  { margin-bottom: 1em; }
    162  .figure { padding: 1em; }
    163  .figure p { text-align: center; }
    164  .equation-container {
    165    display: table;
    166    text-align: center;
    167    width: 100%;
    168  }
    169  .equation {
    170    vertical-align: middle;
    171  }
    172  .equation-label {
    173    display: table-cell;
    174    text-align: right;
    175    vertical-align: middle;
    176  }
    177  .inlinetask {
    178    padding: 10px;
    179    border: 2px solid gray;
    180    margin: 10px;
    181    background: #ffffcc;
    182  }
    183  #org-div-home-and-up
    184   { text-align: right; font-size: 70%; white-space: nowrap; }
    185  textarea { overflow-x: auto; }
    186  .linenr { font-size: smaller }
    187  .code-highlighted { background-color: #ffff00; }
    188  .org-info-js_info-navigation { border-style: none; }
    189  #org-info-js_console-label
    190    { font-size: 10px; font-weight: bold; white-space: nowrap; }
    191  .org-info-js_search-highlight
    192    { background-color: #ffff00; color: #000000; font-weight: bold; }
    193  .org-svg { width: 90%; }
    194  /*]]>*/-->
    195</style>
    196<link rel="stylesheet" type="text/css" href="styles/readtheorg/css/htmlize.css"/>
    197<link rel="stylesheet" type="text/css" href="styles/readtheorg/css/readtheorg.css"/>
    198<script type="text/javascript" src="styles/lib/js/jquery.min.js"></script>
    199<script type="text/javascript" src="styles/lib/js/bootstrap.min.js"></script>
    200<script type="text/javascript" src="styles/lib/js/jquery.stickytableheaders.min.js"></script>
    201<script type="text/javascript" src="styles/readtheorg/js/readtheorg.js"></script>
    202<script type="text/javascript">
    203// @license magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt Public Domain
    204<!--/*--><![CDATA[/*><!--*/
    205     function CodeHighlightOn(elem, id)
    206     {
    207       var target = document.getElementById(id);
    208       if(null != target) {
    209         elem.classList.add("code-highlighted");
    210         target.classList.add("code-highlighted");
    211       }
    212     }
    213     function CodeHighlightOff(elem, id)
    214     {
    215       var target = document.getElementById(id);
    216       if(null != target) {
    217         elem.classList.remove("code-highlighted");
    218         target.classList.remove("code-highlighted");
    219       }
    220     }
    221    /*]]>*///-->
    222// @license-end
    223</script>
    224</head>
    225<body>
    226<div id="content">
    227<h1 class="title">Notes by Dash Eclipse</h1>
    228<div id="table-of-contents">
    229<h2>Table of Contents</h2>
    230<div id="text-table-of-contents">
    231<ul>
    232<li><a href="#server">1. Server</a>
    233<ul>
    234<li><a href="#server_http">1.1. HTTP (nginx)</a></li>
    235<li><a href="#server_git">1.2. Git</a>
    236<ul>
    237<li><a href="#server_git_daemon">1.2.1. Git Daemon</a></li>
    238<li><a href="#server_git_bare-repo">1.2.2. Bare Repository</a></li>
    239<li><a href="#server_git_static-git-page">1.2.3. Static Git Page</a></li>
    240</ul>
    241</li>
    242<li><a href="#server_webdav">1.3. WebDAV (rclone)</a></li>
    243<li><a href="#server_pastebin">1.4. Pastebin (fiche)</a></li>
    244<li><a href="#server_irc">1.5. IRC Network Bouncer (znc)</a></li>
    245<li><a href="#server_music-radio">1.6. Music Radio (vlc)</a></li>
    246</ul>
    247</li>
    248<li><a href="#desktop">2. Desktop</a>
    249<ul>
    250<li><a href="#desktop_shell-zsh">2.1. Shell (zsh)</a></li>
    251<li><a href="#desktop_xorg">2.2. Xorg</a>
    252<ul>
    253<li><a href="#desktop_xorg_keyboard">2.2.1. Keyboard</a></li>
    254<li><a href="#desktop_xorg_mouse">2.2.2. Mouse</a></li>
    255<li><a href="#desktop_xorg_monitors">2.2.3. Monitors</a></li>
    256</ul>
    257</li>
    258<li><a href="#desktop_automatic-login">2.3. Automatic Login</a></li>
    259</ul>
    260</li>
    261<li><a href="#browser">3. Browser</a>
    262<ul>
    263<li><a href="#browser-extensions">3.1. Extensions</a></li>
    264</ul>
    265</li>
    266<li><a href="#movie">4. Movies</a></li>
    267</ul>
    268</div>
    269</div>
    270<div id="outline-container-server" class="outline-2">
    271<h2 id="server"><span class="section-number-2">1</span> Server</h2>
    272<div class="outline-text-2" id="text-server">
    273</div>
    274<div id="outline-container-server_http" class="outline-3">
    275<h3 id="server_http"><span class="section-number-3">1.1</span> HTTP (nginx)</h3>
    276<div class="outline-text-3" id="text-server_http">
    277<div class="org-src-container">
    278<pre class="src src-sh"><span style="color: #616e88;"># </span><span style="color: #616e88;">install docker</span>
    279xi docker docker-compose
    280</pre>
    281</div>
    282</div>
    283</div>
    284<div id="outline-container-server_git" class="outline-3">
    285<h3 id="server_git"><span class="section-number-3">1.2</span> Git</h3>
    286<div class="outline-text-3" id="text-server_git">
    287</div>
    288<div id="outline-container-server_git_daemon" class="outline-4">
    289<h4 id="server_git_daemon"><span class="section-number-4">1.2.1</span> <a href="https://git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon">Git Daemon</a></h4>
    290<div class="outline-text-4" id="text-server_git_daemon">
    291<div class="org-src-container">
    292<pre class="src src-sh"><span style="color: #616e88;">#</span><span style="color: #616e88;">!/bin/</span><span style="color: #81A1C1;">sh</span>
    293<span style="color: #616e88;"># </span><span style="color: #616e88;">/etc/sv/git-daemon/run</span>
    294<span style="color: #81A1C1;">exec</span> chpst -u username:username git daemon <span style="color: #A3BE8C;">\</span>
    295     --reuseaddr <span style="color: #A3BE8C;">\</span>
    296     --base-path=/home/username/git/repo <span style="color: #A3BE8C;">\</span>
    297     /home/username/git/repo
    298</pre>
    299</div>
    300</div>
    301</div>
    302<div id="outline-container-server_git_bare-repo" class="outline-4">
    303<h4 id="server_git_bare-repo"><span class="section-number-4">1.2.2</span> <a href="https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server">Bare Repository</a></h4>
    304<div class="outline-text-4" id="text-server_git_bare-repo">
    305<div class="org-src-container">
    306<pre class="src src-sh"><span style="color: #81A1C1;">cd</span> $<span style="color: #D8DEE9;">HOME</span>/git/repo
    307mkdir reponame.git &amp;&amp; <span style="color: #81A1C1;">cd</span> $<span style="color: #D8DEE9;">_</span>
    308git init --bare --shared=group
    309touch git-daemon-export-ok
    310vim decription owner url
    311<span style="color: #616e88;"># </span><span style="color: #616e88;">change denyNonFastforwards to false</span>
    312vim config
    313</pre>
    314</div>
    315</div>
    316</div>
    317<div id="outline-container-server_git_static-git-page" class="outline-4">
    318<h4 id="server_git_static-git-page"><span class="section-number-4">1.2.3</span> Static Git Page</h4>
    319<div class="outline-text-4" id="text-server_git_static-git-page">
    320<p>
    321Install <code>stagit</code> and add <code>repo/.git/hooks/post-receive</code>
    322</p>
    323</div>
    324</div>
    325</div>
    326<div id="outline-container-server_webdav" class="outline-3">
    327<h3 id="server_webdav"><span class="section-number-3">1.3</span> WebDAV (rclone)</h3>
    328<div class="outline-text-3" id="text-server_webdav">
    329<div class="org-src-container">
    330<pre class="src src-sh"><span style="color: #616e88;">#</span><span style="color: #616e88;">!/bin/</span><span style="color: #81A1C1;">sh</span>
    331<span style="color: #616e88;"># </span><span style="color: #616e88;">/etc/sv/rclone-webdav/run</span>
    332<span style="color: #81A1C1;">exec</span> rclone serve webdav <span style="color: #A3BE8C;">\</span>
    333     --addr domain.tld:1234 <span style="color: #A3BE8C;">\</span>
    334     --user username <span style="color: #A3BE8C;">\</span>
    335     --pass password <span style="color: #A3BE8C;">\</span>
    336     --cert /etc/letsencrypt/live/domain.tld/fullchain.pem <span style="color: #A3BE8C;">\</span>
    337     --key /etc/letsencrypt/live/domain.tld/privkey.pem <span style="color: #A3BE8C;">\</span>
    338     /home/username/webdav 2&gt;&amp;1
    339</pre>
    340</div>
    341</div>
    342</div>
    343<div id="outline-container-server_pastebin" class="outline-3">
    344<h3 id="server_pastebin"><span class="section-number-3">1.4</span> Pastebin (fiche)</h3>
    345<div class="outline-text-3" id="text-server_pastebin">
    346<p>
    347<b>/etc/sv/fiche/run</b>
    348</p>
    349<div class="org-src-container">
    350<pre class="src src-sh"><span style="color: #616e88;">#</span><span style="color: #616e88;">!/bin/</span><span style="color: #81A1C1;">sh</span>
    351<span style="color: #81A1C1;">exec</span> chpst -u _fiche:_fiche fiche <span style="color: #A3BE8C;">\</span>
    352     -S -d domain.tld/pastebin <span style="color: #A3BE8C;">\</span>
    353     -o /var/tmp/fiche <span style="color: #A3BE8C;">\</span>
    354     -l /var/log/fiche/log
    355</pre>
    356</div>
    357</div>
    358</div>
    359<div id="outline-container-server_irc" class="outline-3">
    360<h3 id="server_irc"><span class="section-number-3">1.5</span> IRC Network Bouncer (znc)</h3>
    361<div class="outline-text-3" id="text-server_irc">
    362<p>
    363<code>znc</code>
    364</p>
    365</div>
    366</div>
    367<div id="outline-container-server_music-radio" class="outline-3">
    368<h3 id="server_music-radio"><span class="section-number-3">1.6</span> Music Radio (vlc)</h3>
    369<div class="outline-text-3" id="text-server_music-radio">
    370<p>
    371<b>/etc/sv/vlc-stream/run</b>
    372</p>
    373<div class="org-src-container">
    374<pre class="src src-sh"><span style="color: #616e88;">#</span><span style="color: #616e88;">!/bin/</span><span style="color: #81A1C1;">sh</span>
    375 <span style="color: #81A1C1;">exec</span> chpst -u username:username cvlc <span style="color: #A3BE8C;">\</span>
    376     /home/username/music <span style="color: #A3BE8C;">\</span>
    377     <span style="color: #A3BE8C;">':sout=#http{mux=ogg,dst=:12345/}'</span> <span style="color: #A3BE8C;">':no-sout-all'</span> <span style="color: #A3BE8C;">':sout-keep'</span> <span style="color: #A3BE8C;">\</span>
    378     --intf <span style="color: #A3BE8C;">\</span>
    379     http 1&gt;/dev/null
    380</pre>
    381</div>
    382</div>
    383</div>
    384</div>
    385<div id="outline-container-desktop" class="outline-2">
    386<h2 id="desktop"><span class="section-number-2">2</span> Desktop</h2>
    387<div class="outline-text-2" id="text-desktop">
    388</div>
    389<div id="outline-container-desktop_shell-zsh" class="outline-3">
    390<h3 id="desktop_shell-zsh"><span class="section-number-3">2.1</span> Shell (zsh)</h3>
    391<div class="outline-text-3" id="text-desktop_shell-zsh">
    392<ul class="org-ul">
    393<li>zsh</li>
    394<li>grml-zsh-config</li>
    395<li>zsh-autosuggestions</li>
    396<li>zsh-completion</li>
    397<li>zsh-syntax-highlighting</li>
    398<li>skim-key-bindings.zsh</li>
    399<li>powerlevel10k</li>
    400</ul>
    401<p>
    402<b>Plugins</b>
    403</p>
    404<div class="org-src-container">
    405<pre class="src src-sh"><span style="color: #616e88;"># </span><span style="color: #616e88;">$HOME/.zshrc.local</span>
    406
    407. /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
    408. /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
    409. /usr/share/zsh/site-functions/skim-key-bindings.zsh
    410
    411<span style="color: #81A1C1;">if</span> [ <span style="color: #81A1C1;">!</span> -z ${<span style="color: #D8DEE9;">DISPLAY</span>+x} ] ; <span style="color: #81A1C1;">then</span>
    412        . /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
    413        . $<span style="color: #D8DEE9;">HOME</span>/.p10k.zsh
    414        <span style="color: #D8DEE9;">POWERLEVEL9K_LEFT_PROMPT_ELEMENTS</span>=(dir rbenv vcs)
    415        <span style="color: #D8DEE9;">ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE</span>=<span style="color: #A3BE8C;">'fg=240'</span>
    416        <span style="color: #616e88;">#</span><span style="color: #616e88;">ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=blue,underline'</span>
    417        <span style="color: #616e88;">#</span><span style="color: #616e88;">ZSH_HIGHLIGHT_STYLES[precommand]='fg=blue,underline'</span>
    418        <span style="color: #616e88;">#</span><span style="color: #616e88;">ZSH_HIGHLIGHT_STYLES[arg0]='fg=blue'</span>
    419        <span style="color: #616e88;">#</span><span style="color: #616e88;">ZSH_HIGHLIGHT_STYLES[comment]='fg=239'</span>
    420        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[suffix-alias]=<span style="color: #D8DEE9;">fg</span>=32,underline
    421        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[precommand]=<span style="color: #D8DEE9;">fg</span>=32,underline
    422        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[arg0]=<span style="color: #D8DEE9;">fg</span>=32 <span style="color: #616e88;"># </span><span style="color: #616e88;">26</span>
    423        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[single-hyphen-option]=<span style="color: #A3BE8C;">'fg=38'</span>
    424        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[double-hyphen-option]=<span style="color: #A3BE8C;">'fg=38'</span>
    425        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[default]=<span style="color: #A3BE8C;">'fg=38'</span>
    426        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[single-quoted-argument-unclosed]=<span style="color: #A3BE8C;">'fg=red'</span>
    427        <span style="color: #D8DEE9;">ZSH_HIGHLIGHT_STYLES</span>[double-quoted-argument-unclosed]=<span style="color: #A3BE8C;">'fg=red'</span>
    428<span style="color: #81A1C1;">fi</span>
    429</pre>
    430</div>
    431<p>
    432<b>Functions</b>
    433</p>
    434<div class="org-src-container">
    435<pre class="src src-sh"><span style="color: #616e88;"># </span><span style="color: #616e88;">$HOME/.zsh.local</span>
    436<span style="color: #616e88;"># </span><span style="color: #616e88;">wordnet</span>
    437<span style="color: #88C0D0;">wn</span>() { <span style="color: #81A1C1;">while </span><span style="color: #81A1C1;">true</span>; <span style="color: #81A1C1;">do</span> dict -d wn $(<span style="color: #81A1C1;">read</span> -e); <span style="color: #81A1C1;">done</span> }
    438<span style="color: #616e88;"># </span><span style="color: #616e88;">memory usage</span>
    439<span style="color: #88C0D0;">memu</span>() {
    440        <span style="color: #81A1C1;">local</span> <span style="color: #D8DEE9;">CHECK</span>=<span style="color: #A3BE8C;">" $@"</span>
    441        [ -z $<span style="color: #D8DEE9;">1</span> ] || [ <span style="color: #A3BE8C;">"${CHECK#* -}"</span> != <span style="color: #A3BE8C;">"$CHECK"</span> ] &amp;&amp; { <span style="color: #81A1C1;">echo</span> <span style="color: #A3BE8C;">"Usage: memu program [program...]"</span>; <span style="color: #81A1C1;">return</span> 1; }
    442        <span style="color: #81A1C1;">local</span> <span style="color: #D8DEE9;">PIDS</span>=$(pidof <span style="color: #A3BE8C;">"$@"</span>)
    443        test -z <span style="color: #A3BE8C;">"$PIDS"</span> &amp;&amp; <span style="color: #81A1C1;">return</span> 0
    444        <span style="color: #81A1C1;">echo</span> <span style="color: #A3BE8C;">"$PIDS"</span> <span style="color: #A3BE8C;">\</span>
    445                | xargs -I{} ps -p <span style="color: #A3BE8C;">"{}"</span> -o size,vsize,rss,cmd <span style="color: #A3BE8C;">\</span>
    446                | awk <span style="color: #A3BE8C;">'NR==1; NR&gt;1 {print $1"K", $2"Ki", $3"K", $4}'</span> <span style="color: #A3BE8C;">\</span>
    447                | numfmt --header --field 1,3 --from=si --to=si --suffix=B --format %.1f <span style="color: #A3BE8C;">\</span>
    448                | numfmt --header --field 2 --from=iec-i --to=iec-i --suffix=B --format %.1f <span style="color: #A3BE8C;">\</span>
    449                | sort -hk3,3 <span style="color: #A3BE8C;">\</span>
    450                | column -t -R1,2,3 <span style="color: #A3BE8C;">\</span>
    451                | <span style="color: #D8DEE9;">GREP_COLORS</span>=<span style="color: #A3BE8C;">'mt=1;94'</span> egrep --color=always <span style="color: #A3BE8C;">'.*SIZE.*VSZ.*RSS.*CMD.*|$'</span> <span style="color: #A3BE8C;">\</span>
    452                | <span style="color: #D8DEE9;">GREP_COLORS</span>=<span style="color: #A3BE8C;">'mt=1;32'</span> egrep --color=always <span style="color: #A3BE8C;">"KB|KiB|$"</span> <span style="color: #A3BE8C;">\</span>
    453                | <span style="color: #D8DEE9;">GREP_COLORS</span>=<span style="color: #A3BE8C;">'mt=0;33'</span> egrep --color=always <span style="color: #A3BE8C;">'MB|MiB|$'</span> <span style="color: #A3BE8C;">\</span>
    454                | <span style="color: #D8DEE9;">GREP_COLORS</span>=<span style="color: #A3BE8C;">'mt=1;31'</span> egrep --color=always <span style="color: #A3BE8C;">"GB|GiB|$"</span>
    455}
    456</pre>
    457</div>
    458<p>
    459<b>Environment variables</b>
    460</p>
    461<div class="org-src-container">
    462<pre class="src src-sh"><span style="color: #616e88;"># </span><span style="color: #616e88;">$HOME/.zshenv</span>
    463<span style="color: #616e88;"># </span><span style="color: #616e88;">http://zsh.sourceforge.net/Guide/zshguide02.html#l24</span>
    464<span style="color: #81A1C1;">typeset</span> -U path
    465<span style="color: #D8DEE9;">path</span>=(~/.local/bin $<span style="color: #D8DEE9;">path</span>)
    466<span style="color: #D8DEE9;">SRC_GITHUB</span>=<span style="color: #A3BE8C;">"$HOME/.local/src/github"</span>
    467<span style="color: #D8DEE9;">PROXYCHAINS_QUIET_MODE</span>=1
    468<span style="color: #D8DEE9;">CLICOLOR_FORCE</span>=1
    469<span style="color: #81A1C1;">export</span> <span style="color: #D8DEE9;">GPG_TTY</span>=$(tty)
    470</pre>
    471</div>
    472</div>
    473</div>
    474<div id="outline-container-desktop_xorg" class="outline-3">
    475<h3 id="desktop_xorg"><span class="section-number-3">2.2</span> Xorg</h3>
    476<div class="outline-text-3" id="text-desktop_xorg">
    477<ul class="org-ul">
    478<li>xorg-server</li>
    479<li>xf86-input-libinput</li>
    480<li>xf86-video-intel</li>
    481<li>sx</li>
    482<li>dwm</li>
    483<li>slock</li>
    484<li>st</li>
    485</ul>
    486
    487<p>
    488non-root Xorg
    489</p>
    490<pre class="example" id="org9f87be4">
    491# /etc/X11/Xwrapper.config
    492needs_root_rights = no
    493</pre>
    494</div>
    495<div id="outline-container-desktop_xorg_keyboard" class="outline-4">
    496<h4 id="desktop_xorg_keyboard"><span class="section-number-4">2.2.1</span> Keyboard</h4>
    497<div class="outline-text-4" id="text-desktop_xorg_keyboard">
    498<p>
    499Programmer Dvorak keyboard layout
    500</p>
    501<pre class="example" id="orgc6e68b6">
    502# /etc/X11/xorg.conf.d/00-keyboard.conf
    503Section "InputClass"
    504        Identifier "Cherry GmbH G83 (RS 6000) Keyboard"
    505        MatchIsKeyboard "on"
    506        MatchUSBID "046a:0011"
    507        Driver "libinput"
    508        Option "XkbLayout" "us"
    509        Option "XkbModel" "pc104"
    510        Option "XkbVariant" "dvp"
    511EndSection
    512</pre>
    513</div>
    514</div>
    515<div id="outline-container-desktop_xorg_mouse" class="outline-4">
    516<h4 id="desktop_xorg_mouse"><span class="section-number-4">2.2.2</span> Mouse</h4>
    517<div class="outline-text-4" id="text-desktop_xorg_mouse">
    518<p>
    519Left-handed mouse
    520</p>
    521<pre class="example" id="org38a2fec">
    522# /etc/X11/xorg.conf.d/50-mouse.conf
    523Section "InputClass"
    524        Identifier "Pixart Imaging, Inc. Optical Mouse"
    525        MatchIsPointer "yes"
    526        MatchUSBID "093a:2510"
    527        Driver "libinput"
    528        Option "ButtonMapping" "3 2 1"
    529EndSection
    530</pre>
    531</div>
    532</div>
    533<div id="outline-container-desktop_xorg_monitors" class="outline-4">
    534<h4 id="desktop_xorg_monitors"><span class="section-number-4">2.2.3</span> Monitors</h4>
    535<div class="outline-text-4" id="text-desktop_xorg_monitors">
    536<p>
    537Dual-monitor
    538</p>
    539<pre class="example" id="org61d8898">
    540# /etc/X11/xorg.conf.d/10-monitor.conf
    541Section "Monitor"
    542        Identifier	"VGA1"
    543        Option		"Primary" "true"
    544        Option		"PreferredMode" "1440x900"
    545        Option		"Position" "0 1020"
    546EndSection
    547
    548Section "Monitor"
    549        Identifier	"HDMI1"
    550        Option		"RightOf" "VGA1"
    551        Option		"PreferredMode" "1920x1080"
    552        Option		"Position" "1440 0"
    553        Option		"Rotate" "right"
    554        Option		"DPMS" "true"
    555        Option		"StandbyTime" "60"
    556        Option		"SuspendTime" "120"
    557        Option		"OffTime" "180"
    558EndSection
    559</pre>
    560</div>
    561</div>
    562</div>
    563
    564<div id="outline-container-desktop_automatic-login" class="outline-3">
    565<h3 id="desktop_automatic-login"><span class="section-number-3">2.3</span> Automatic Login</h3>
    566<div class="outline-text-3" id="text-desktop_automatic-login">
    567<p>
    568<code>ln -s /etc/sv/agetty-autologin-tty1 /var/service/agetty-tty1</code>
    569</p>
    570
    571<p>
    572<b>/etc/sv/agetty-autologin-tty1/conf</b>
    573</p>
    574<div class="org-src-container">
    575<pre class="src src-sh"><span style="color: #81A1C1;">if</span> [ -x /sbin/agetty -o -x /bin/agetty ]; <span style="color: #81A1C1;">then</span>
    576        <span style="color: #616e88;"># </span><span style="color: #616e88;">util-linux specific settings</span>
    577        <span style="color: #81A1C1;">if</span> [ <span style="color: #A3BE8C;">"${tty}"</span> = <span style="color: #A3BE8C;">"tty1"</span> ]; <span style="color: #81A1C1;">then</span>
    578                <span style="color: #D8DEE9;">GETTY_ARGS</span>=<span style="color: #A3BE8C;">"--autologin username --noclear"</span>
    579        <span style="color: #81A1C1;">fi</span>
    580<span style="color: #81A1C1;">fi</span>
    581
    582<span style="color: #D8DEE9;">BAUD_RATE</span>=38400
    583<span style="color: #D8DEE9;">TERM_NAME</span>=linux
    584</pre>
    585</div>
    586
    587<p>
    588<b>$HOME/.zprofile</b>
    589</p>
    590<div class="org-src-container">
    591<pre class="src src-sh"><span style="color: #81A1C1;">if</span> [ -z <span style="color: #A3BE8C;">"$DISPLAY"</span> ] &amp;&amp; [ <span style="color: #A3BE8C;">"$(fgconsole)"</span> -eq 1 ]; <span style="color: #81A1C1;">then</span>
    592        sx ~/.config/sx/sxrc dwm
    593<span style="color: #81A1C1;">fi</span>
    594</pre>
    595</div>
    596</div>
    597</div>
    598</div>
    599<div id="outline-container-browser" class="outline-2">
    600<h2 id="browser"><span class="section-number-2">3</span> Browser</h2>
    601<div class="outline-text-2" id="text-browser">
    602<p>
    603It's possible to run your own <a href="https://mozilla-services.readthedocs.io/en/latest/howtos/run-sync-1.5.html">Sync Server</a> and <a href="https://mozilla-services.readthedocs.io/en/latest/howtos/run-fxa.html">Firefox Accounts Server</a> for your Firefox, it's the main reason I choose Firefox over Chromium
    604</p>
    605</div>
    606<div id="outline-container-browser-extensions" class="outline-3">
    607<h3 id="browser-extensions"><span class="section-number-3">3.1</span> Extensions</h3>
    608<div class="outline-text-3" id="text-browser-extensions">
    609<ul class="org-ul">
    610<li>uBlock Origin</li>
    611<li>uMatrix</li>
    612<li>Multi-Account Containers</li>
    613<li>Vimium</li>
    614<li>HTTPS Everywhere</li>
    615<li>Privacy Badger</li>
    616<li>Decentraleyes</li>
    617</ul>
    618</div>
    619</div>
    620</div>
    621<div id="outline-container-movie" class="outline-2">
    622<h2 id="movie"><span class="section-number-2">4</span> Movies</h2>
    623<div class="outline-text-2" id="text-movie">
    624<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
    625
    626
    627<colgroup>
    628<col  class="org-left" />
    629
    630<col  class="org-left" />
    631
    632<col  class="org-right" />
    633</colgroup>
    634<thead>
    635<tr>
    636<th scope="col" class="org-left">Name</th>
    637<th scope="col" class="org-left">Country</th>
    638<th scope="col" class="org-right">Release</th>
    639</tr>
    640</thead>
    641<tbody>
    642<tr>
    643<td class="org-left"><a href="https://www.imdb.com/title/tt5165468/">Schnick Schnack Schnuck</a></td>
    644<td class="org-left">DE</td>
    645<td class="org-right">2015</td>
    646</tr>
    647
    648<tr>
    649<td class="org-left"><a href="https://www.imdb.com/title/tt0226259/">Female Teacher: In Front of the Students</a></td>
    650<td class="org-left">JP</td>
    651<td class="org-right">1982</td>
    652</tr>
    653
    654<tr>
    655<td class="org-left"><a href="https://www.imdb.com/title/tt0188503/">The Quiet Family</a></td>
    656<td class="org-left">KR</td>
    657<td class="org-right">1998</td>
    658</tr>
    659
    660<tr>
    661<td class="org-left"><a href="https://www.imdb.com/title/tt4392454/">13 Cameras</a></td>
    662<td class="org-left">US</td>
    663<td class="org-right">2015</td>
    664</tr>
    665
    666<tr>
    667<td class="org-left"><a href="https://www.imdb.com/title/tt6927316/">Human, Space, Time and Human</a></td>
    668<td class="org-left">KR</td>
    669<td class="org-right">2018</td>
    670</tr>
    671</tbody>
    672</table>
    673</div>
    674</div>
    675</div>
    676<div id="postamble" class="status">
    677<p class="author">Author: Dash Eclipse</p>
    678<p class="date">Created: 2020-11-09 Mon 21:37</p>
    679<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
    680</div>
    681</body>
    682</html>