Publish html

This commit is contained in:
2020-04-05 11:30:26 +02:00
parent 866a1947d6
commit 0af6fccd0f
17 changed files with 4792 additions and 1250 deletions

View File

@@ -4,7 +4,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2020-03-22 dim. 23:03 -->
<!-- 2020-04-05 dim. 11:29 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Scripts</title>
@@ -201,50 +201,28 @@
<script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
<script type="text/javascript" src="./js/readtheorg.js"></script>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2020 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&amp;dn=gpl-3.0.txt GPL-v3-or-Later
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
// @license-end
</script>
</head>
<body>
@@ -258,30 +236,16 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgfbe1cfb">Wallpapers</a></li>
<li><a href="#orgf13ea83">LockScreen</a></li>
<li><a href="#org872b600">Lock / Exit / Suspend / &#x2026;</a></li>
<li><a href="#org872b600"><span class="todo TODO">TODO</span> Lock / Exit / Suspend / &#x2026;</a></li>
<li><a href="#org8a282fd">NAS - Mount</a></li>
<li><a href="#orge80ca70">Icons Unicode</a></li>
<li><a href="#orgb5498b2">Download Torrent</a></li>
<li><a href="#orgfe8be19">Org-Protocol-Capture-HTML</a></li>
<li><a href="#orgcd3ccf1">Restart Mopidy</a></li>
</ul>
</div>
</div>
<div id="outline-container-orgfbe1cfb" class="outline-2">
<h2 id="orgfbe1cfb">Wallpapers</h2>
<div class="outline-text-2" id="text-orgfbe1cfb">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">while</span> true; <span class="org-keyword">do</span>
nitrogen --set-zoom-fill --random <span class="org-string">".wallpapers"</span>
<span class="org-type">sleep</span> 10m
<span class="org-keyword">done</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgf13ea83" class="outline-2">
<h2 id="orgf13ea83">LockScreen</h2>
<div class="outline-text-2" id="text-orgf13ea83">
@@ -363,8 +327,12 @@ revert
</div>
<div id="outline-container-org872b600" class="outline-2">
<h2 id="org872b600">Lock / Exit / Suspend / &#x2026;</h2>
<h2 id="org872b600"><span class="todo TODO">TODO</span> Lock / Exit / Suspend / &#x2026;</h2>
<div class="outline-text-2" id="text-org872b600">
<ul class="org-ul">
<li class="off"><code>[&#xa0;]</code> Seems duplicated with <a href="binaries.html#org1ce653d"><code>i3exit</code> - Manage lock, suspend, reboot, &#x2026;</a></li>
</ul>
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">option</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">"Lock\nExit\nLogout\nSuspend\nHibernate\nReboot\nShutdown"</span> | rofi -i -dmenu<span class="org-rainbow-delimiters-depth-1">)</span>
@@ -392,15 +360,23 @@ revert
<div id="outline-container-org8a282fd" class="outline-2">
<h2 id="org8a282fd">NAS - Mount</h2>
<div class="outline-text-2" id="text-org8a282fd">
<p>
As an alternative, <code>sshfs</code> can be used:
</p>
<div class="org-src-container">
<pre class="src src-bash">sshfs -o allow_other,default_permissions nas:/Data ~/mnt/NAS
</pre>
</div>
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-highlight-numbers-number">1</span> == <span class="org-string">"mount"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-keyword">if</span> <span class="org-type">sudo</span> -A mount 192.168.1.2:/volume1/Downloads/ /mnt/NAS/; <span class="org-keyword">then</span>
<span class="org-keyword">if</span> mount /home/thomas/mnt/NAS/; <span class="org-keyword">then</span>
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'NAS'</span> <span class="org-string">'Successfully mounted'</span>
<span class="org-keyword">else</span>
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'NAS'</span> <span class="org-string">'Error while mounted'</span>
<span class="org-keyword">fi</span>
<span class="org-keyword">elif</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-highlight-numbers-number">1</span> == <span class="org-string">"umount"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-keyword">if</span> <span class="org-type">sudo</span> -A umount /mnt/NAS/; <span class="org-keyword">then</span>
<span class="org-keyword">if</span> umount /home/thomas/mnt/NAS/; <span class="org-keyword">then</span>
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'NAS'</span> <span class="org-string">'Successfully unmounted'</span>
<span class="org-keyword">else</span>
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'NAS'</span> <span class="org-string">'Error while unmounted'</span>
@@ -411,26 +387,14 @@ revert
</div>
</div>
<div id="outline-container-orge80ca70" class="outline-2">
<h2 id="orge80ca70">Icons Unicode</h2>
<div class="outline-text-2" id="text-orge80ca70">
<div id="outline-container-orgb5498b2" class="outline-2">
<h2 id="orgb5498b2">Download Torrent</h2>
<div class="outline-text-2" id="text-orgb5498b2">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-comment-delimiter"># </span><span class="org-comment">The famous "get a menu of emojis to copy" script.</span>
<pre class="src src-bash">transmission-remote ***REMOVED***:9091 --auth tdehaeze:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> nas/transmission | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> -a $<span class="org-highlight-numbers-number">1</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify <span class="org-string">'Torrent'</span> <span class="org-string">'Successfully added'</span> || <span class="org-sh-escaped-newline">\</span>
dunstify <span class="org-string">'Torrent'</span> <span class="org-string">'Error'</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Must have xclip installed to even show menu.</span>
xclip -h <span class="org-highlight-numbers-number">2</span>&gt;/dev/null || <span class="org-keyword">exit</span> <span class="org-highlight-numbers-number">1</span>
<span class="org-variable-name">chosen</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">cut</span> -d <span class="org-string">';'</span> -f1 ~/.local/share/emoji | rofi -dmenu -i -l <span class="org-highlight-numbers-number">20</span> | sed <span class="org-string">"s/ .*//"</span><span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">chosen</span></span><span class="org-string">"</span> != <span class="org-string">""</span> <span class="org-rainbow-delimiters-depth-1">]</span> || <span class="org-keyword">exit</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">If you run this command with an argument, it will automatically insert the character.</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -n <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
xdotool key Shift+Insert
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">chosen</span></span><span class="org-string">"</span> | tr -d <span class="org-string">'\n'</span> | xsel -ib
dunstify <span class="org-string">"'</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">chosen</span></span><span class="org-string">' copied to clipboard."</span> &amp;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
@@ -609,7 +573,7 @@ mopidy --config ~/.config/mopidy/mopidy.conf &gt;/dev/null <span class="org-high
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-03-22 dim. 23:03</p>
<p class="date">Created: 2020-04-05 dim. 11:29</p>
</div>
</body>
</html>