4 <%inherit file="_templates/i3.mako" />
27 <div id="screencasts">
28 <div class="video clearfix">
29 <a href="http://www.youtube.com/watch?v=pKfP7Ws-CN8" title="Watch i3 screencast v3.δ on YouTube">
30 <img src="/img/screencast-3.d.thumb.png" width="240" height="150" border="0" style="float: left">
32 <div style="float: left">
33 <strong>Screencast of v3.δ</strong>
35 This video (5 min) shows the basic features of i3:
38 <li>Layouts, Focus, Moving, Workspaces</li>
39 <li>dmenu, Floating Windows, Resizing</li>
40 <li>Window Borders, Urgency Hint, i3lock, i3status</li>
43 <a href="http://www.youtube.com/watch?v=pKfP7Ws-CN8">Watch it on YouTube</a> or <a href="/screenshots/screencast-3.d.mkv">download it (2.5 MB)</a>.
52 To get a quick impression of i3, have a look at these screenshots.
55 <div class="screenshots clearfix">
57 <a href="/screenshots/i3-1.png"><img src="/screenshots/i3-1.thumb.png" width="240" border="0"></a><br>
58 <span>Vimperator, VIM, MPlayer, dzen2</span>
62 <a href="/screenshots/i3-2.png"><img src="/screenshots/i3-2.thumb.png" width="240" border="0"></a><br>
63 <span>Vimperator, VIM, xpdf, bc</span>
67 <a href="/screenshots/i3-3.png"><img src="/screenshots/i3-3.thumb.png" width="240" border="0"></a><br>
68 <span>PCManFM, ROXTerm, evince</span>
74 <a href="/screenshots/i3-4.png"><img src="/screenshots/i3-4.thumb.png" width="240" border="0"></a><br>
75 <span>i3 logo out of terminals</span>
79 <a href="/screenshots/i3-6.png"><img src="/screenshots/i3-6.thumb.png" width="240" border="0"></a><br>
80 <span>VIM, zsh, i3status (FreeBSD)</span>
84 <a href="/screenshots/i3-7.png"><img src="/screenshots/i3-7.thumb.png" width="240" border="0"></a><br>
85 <span>GIMP, urxvt (both floating)</span>
91 <a href="/screenshots/i3-5.png"><img src="/screenshots/i3-5.thumb.png" width="240" border="0"></a><br>
92 <span>mc, xosview, MPlayer, irssi, gajim</span>
96 <a href="/screenshots/i3-8.jpg"><img src="/screenshots/i3-8.thumb.jpg" width="240" border="0"></a><br>
97 <span>git, synergy, htop, urxvt</span>
104 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js">
106 <script type="text/javascript" src="/js/jquery.mousewheel.js">
108 <script type="text/javascript" src="/js/jquery.ba-hashchange.js">
110 <script type="text/javascript">
111 $(document).ready(function() {
112 $('.shot span').css('color', '#888');
114 $('.shot').mouseover(function() {
115 $(this).children('span').css('color', 'white');
118 $('.shot').mouseout(function() {
119 $(this).children('span').css('color', '#888');
122 // build an array of all images (full URLs)
125 $('.shot a').each(function(idx, element) {
126 images[cnt++] = $(element).attr('href');
129 // handlers for mousewheel scrolling
130 // defined here because we need to enable it after the animation finished
131 $(window).mousewheel(function(event, delta) {
132 // if we are not in the slideshow mode, process the event as normal
133 return (!$('#mask').is(':visible'));
136 var wheelhandler = function(event, delta) {
137 //console.log('event = ' + event + ', delta = ' + delta);
139 // if we are not in the slideshow mode, process the event as normal
140 if (!$('#mask').is(':visible')) {
148 } else if (delta > 0) {
155 $(window).mousewheel(wheelhandler);
157 var loadimage = function(url, direction, fromhash) {
158 // now load the image
159 var img = new Image();
162 var loadcomplete = function() {
163 var winW = $(window).width();
164 var winH = $(window).height();
165 var max_w = winW - (2 * 64);
166 var max_h = winH - 64;
170 'width': (img.width > max_w ? max_w : img.width),
173 dims.height = (dims.width / img.width) * img.height;
174 if (dims.height > max_h) {
176 dims.width = (dims.height / img.height) * img.width;
178 dims.top = (winH - dims.height) / 2;
179 dims.left = ((max_w - dims.width) / 2) + 64;
180 $('#loading').hide();
181 var element = $('<img>');
182 element.attr({ 'src': url, 'width':dims.width });
183 element.css({ 'position': 'absolute', 'top':dims.top + 'px', 'left':dims.left + 'px' });
184 if (direction !== undefined) {
185 // slide from right to left
186 if (direction === 'left') {
187 element.css({ 'left':winW + 'px' });
188 element.animate({ 'left': '-=' + (winW - dims.left) }, 'fast', function() {
189 $(window).mousewheel(wheelhandler);
192 element.css({ 'left':'-' + winW + 'px' });
193 element.animate({ 'left': '+=' + (winW + dims.left) }, 'fast', function() {
194 $(window).mousewheel(wheelhandler);
198 $('#maskinner').append(element);
199 $('#maskinner').show();
203 if (!fromhash && window.history.pushState) {
204 window.history.pushState(undefined, 'i3 screenshot: ' + url, "#" + url);
209 //console.log('image already in cache');
212 //console.log('loading image');
213 img.onload = loadcomplete;
217 // clicking anywhere outside the image will bring you back to the page
218 var masks = $('#mask, #bigimg');
220 var endshow = function(fromhash) {
222 $('#maskinner img').remove();
224 if (!fromhash && window.history.pushState) {
225 window.history.pushState(undefined, 'i3 screenshots', '#');
229 masks.click(function() {
232 var showmask = function() {
233 var winH = $(window).height();
234 var maskHeight = $(document).height();
235 var maskWidth = $(window).width();
237 var mask = $('#mask');
238 mask.css({ 'width': maskWidth, 'height': maskHeight }).show();
241 $('.shot img').click(function() {
244 var full = $(this).parent().attr('href');
245 var loading = $('#loading');
248 loadimage(full, undefined, false);
250 // TODO: also preload the next image?
252 // don't follow the link
256 var imgright = function() {
257 var idx = $.inArray($('#maskinner img').attr('src'), images);
258 var next = images[idx+1];
260 if (next === undefined) {
261 //console.log('there is no next image');
265 //console.log('loading next one: ' + next);
266 // slide out the current image
267 var winW = $(window).width();
268 $('#maskinner img').animate({ 'left': '-=' + (winW - 64) }, 'fast', function() {
271 loadimage(next, 'left', false);
273 // disable mousewheel handler during load (will be re-enabled after the animation)
274 $(window).unmousewheel(wheelhandler);
278 $('#imgright').click(imgright);
280 var imgleft = function() {
281 var idx = $.inArray($('#maskinner img').attr('src'), images);
282 var prev = images[idx-1];
284 if (prev === undefined) {
285 //console.log('there is no next image');
289 //console.log('loading prev one: ' + prev);
290 // slide out the current image
291 var winW = $(window).width();
292 $('#maskinner img').animate({ 'left': '+=' + winW }, 'fast', function() {
295 loadimage(prev, 'right', false);
297 // disable mousewheel handler during load (will be re-enabled after the animation)
298 $(window).unmousewheel(wheelhandler);
302 $('#imgleft').click(imgleft);
304 // setup key press handlers for the left/right arrow keys
305 var keydown = function(e) {
322 if ($.browser.mozilla) {
323 $(document).keypress(keydown);
325 $(document).keydown(keydown);
328 if (location.hash.length > 0) {
329 var url = location.hash.substring(1);
331 loadimage(url, undefined, true);
334 $(window).hashchange(function() {
335 if (location.hash.length === 0) {
339 var url = location.hash.substring(1);
340 if (url.length === 0) {
344 loadimage(url, undefined, true);