mirror of
https://github.com/almet/notmyidea.git
synced 2025-04-28 19:42:37 +02:00
189 lines
No EOL
8.3 KiB
HTML
189 lines
No EOL
8.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
|
|
|
<title>Dynamically change your gnome desktop wallpaper - Carnets Web</title>
|
|
|
|
<meta charset="utf-8" />
|
|
<link href="https://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Carnets Web Full Atom Feed" />
|
|
<link rel="stylesheet" href="https://blog.notmyidea.org/theme/css/poole.css"/>
|
|
<link rel="stylesheet" href="https://blog.notmyidea.org/theme/css/syntax.css"/>
|
|
<link rel="stylesheet" href="https://blog.notmyidea.org/theme/css/lanyon.css"/>
|
|
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=PT+Serif:400,400italic,700%7CPT+Sans:400">
|
|
<link rel="stylesheet" href="https://blog.notmyidea.org/theme/css/styles.css"/>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
h1 {
|
|
font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif;
|
|
padding: 80px 50px;
|
|
text-align: center;
|
|
text-transform: uppercase;
|
|
text-rendering: optimizeLegibility;
|
|
color: #202020;
|
|
letter-spacing: .1em;
|
|
text-shadow:
|
|
-1px -1px 1px #111,
|
|
2px 2px 1px #eaeaea;
|
|
}
|
|
|
|
#main {
|
|
text-align: justify;
|
|
text-justify: inter-word;
|
|
}
|
|
#main h1 {
|
|
padding: 10px;
|
|
}
|
|
|
|
.post-headline {
|
|
padding: 15px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
|
|
styles, `#sidebar-checkbox` for behavior. -->
|
|
<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">
|
|
<!-- Toggleable sidebar -->
|
|
<div class="sidebar" id="sidebar">
|
|
<div class="sidebar-item">
|
|
<div class="profile">
|
|
<img src="https://blog.notmyidea.org/theme/img/profile.png"/>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="sidebar-nav">
|
|
<a class="sidebar-nav-item" href="/">Articles</a>
|
|
|
|
<a class="sidebar-nav-item" href="https://www.vieuxsinge.com">Brasserie du Vieux Singe</a>
|
|
<a class="sidebar-nav-item" href="http://blog.notmyidea.org/pages/about.html">A propos</a>
|
|
<a class="sidebar-nav-item" href="https://twitter.com/ametaireau">Messages courts</a>
|
|
<a class="sidebar-nav-item" href="https://github.com/almet">Code</a>
|
|
</nav>
|
|
</div> <div class="wrap">
|
|
<div class="masthead">
|
|
<div class="container">
|
|
<h3 class="masthead-title">
|
|
<a href="https://blog.notmyidea.org/" title="Home">Carnets Web</a>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container content">
|
|
<div id="main" class="posts">
|
|
<h1 class="post-title">Dynamically change your gnome desktop wallpaper</h1>
|
|
<span class="post-date">11 octobre 2010</span>
|
|
<img id="illustration" src="" />
|
|
|
|
<div class="post article">
|
|
<h1>🌟</h1>
|
|
<p>In gnome, you can can use a XML file to have a dynamic wallpaper.
|
|
It's not so easy, and you can't just tell: use the pictures in this folder to do
|
|
so.</p>
|
|
<p>You can have a look to the git repository if you want: <a class="reference external" href="http://github.com/ametaireau/gnome-background-generator">http://github.com/ametaireau/gnome-background-generator</a></p>
|
|
<p>Some time ago, I've made a little python script to ease that, and you can now
|
|
use it too. It's named "gnome-background-generator", and you can install it via
|
|
pip for instance.</p>
|
|
<div class="highlight"><pre><span></span>$ pip install gnome-background-generator
|
|
</pre></div>
|
|
<p>Then, you have just to use it this way:</p>
|
|
<div class="highlight"><pre><span></span>$ gnome-background-generator -p ~/Images/walls -s
|
|
/home/alexis/Images/walls/dynamic-wallpaper.xml generated
|
|
</pre></div>
|
|
<p>Here is a extract of the <cite>--help</cite>:</p>
|
|
<div class="highlight"><pre><span></span>$ gnome-background-generator --help
|
|
usage: gnome-background-generator <span class="o">[</span>-h<span class="o">]</span> <span class="o">[</span>-p PATH<span class="o">]</span> <span class="o">[</span>-o OUTPUT<span class="o">]</span>
|
|
<span class="o">[</span>-t TRANSITION_TIME<span class="o">]</span> <span class="o">[</span>-d DISPLAY_TIME<span class="o">]</span> <span class="o">[</span>-s<span class="o">]</span>
|
|
<span class="o">[</span>-b<span class="o">]</span>
|
|
|
|
A simple <span class="nb">command</span> line tool to generate an XML file to use <span class="k">for</span> gnome
|
|
wallpapers, to have dynamic walls
|
|
|
|
optional arguments:
|
|
-h, --help show this <span class="nb">help</span> message and <span class="nb">exit</span>
|
|
-p PATH, --path PATH Path to look <span class="k">for</span> the pictures. If no output is
|
|
specified, will be used too <span class="k">for</span> outputing the dynamic-
|
|
wallpaper.xml file. Default value is the current
|
|
directory <span class="o">(</span>.<span class="o">)</span>
|
|
-o OUTPUT, --output OUTPUT
|
|
Output filename. If no filename is specified, a
|
|
dynamic-wallpaper.xml file will be generated in the
|
|
path containing the pictures. You can also use <span class="s2">"-"</span> to
|
|
display the xml in the stdout.
|
|
-t TRANSITION_TIME, --transition-time TRANSITION_TIME
|
|
Time <span class="o">(</span>in seconds<span class="o">)</span> transitions must last <span class="o">(</span>default value
|
|
is <span class="m">2</span> seconds<span class="o">)</span>
|
|
-d DISPLAY_TIME, --display-time DISPLAY_TIME
|
|
Time <span class="o">(</span>in seconds<span class="o">)</span> a picture must be displayed. Default
|
|
value is <span class="m">900</span> <span class="o">(</span>15mn<span class="o">)</span>
|
|
-s, --set-background <span class="s1">''</span><span class="err">'</span>try to <span class="nb">set</span> the background using gnome-appearance-
|
|
properties
|
|
-b, --debug
|
|
</pre></div>
|
|
|
|
Vous pouvez également <a onclick="(function(){
|
|
let here = document.location;
|
|
document.location = `http://pdf.fivefilters.org/simple-print/url.php?size=A4#${here}`;
|
|
return false;
|
|
})();return false;">télécharger cet article en pdf</a>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
|
|
|
|
<script>
|
|
(function(document) {
|
|
var i = 0;
|
|
// snip empty header rows since markdown can't
|
|
var rows = document.querySelectorAll('tr');
|
|
for(i=0; i<rows.length; i++) {
|
|
var ths = rows[i].querySelectorAll('th');
|
|
var rowlen = rows[i].children.length;
|
|
if (ths.length > 0 && ths.length === rowlen) {
|
|
rows[i].remove();
|
|
}
|
|
}
|
|
})(document);
|
|
</script>
|
|
|
|
<script>
|
|
/* Lanyon & Poole are Copyright (c) 2014 Mark Otto. Adapted to Pelican 20141223 and extended a bit by @thomaswilley */
|
|
(function(document) {
|
|
var toggle = document.querySelector('.sidebar-toggle');
|
|
var sidebar = document.querySelector('#sidebar');
|
|
var checkbox = document.querySelector('#sidebar-checkbox');
|
|
document.addEventListener('click', function(e) {
|
|
var target = e.target;
|
|
if(!checkbox.checked ||
|
|
sidebar.contains(target) ||
|
|
(target === checkbox || target === toggle)) return;
|
|
checkbox.checked = false;
|
|
}, false);
|
|
})(document);
|
|
</script>
|
|
<!-- Piwik -->
|
|
<script type="text/javascript">
|
|
var _paq = _paq || [];
|
|
_paq.push(['trackPageView']);
|
|
_paq.push(['enableLinkTracking']);
|
|
(function() {
|
|
var u="//tracker.notmyidea.org/";
|
|
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
|
_paq.push(['setSiteId', 3]);
|
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
|
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
|
})();
|
|
</script>
|
|
<noscript><p><img src="//tracker.notmyidea.org/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript>
|
|
<!-- End Piwik Code -->
|
|
</div>
|
|
</body>
|
|
</html> |