]> git.sur5r.net Git - i3/i3.github.io/blob - docs/4.13/wsbar.html
save docs for 4.13
[i3/i3.github.io] / docs / 4.13 / wsbar.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
2     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
4 <head>\r
5 <link rel="icon" type="image/x-icon" href="/favicon.ico">\r
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
7 <meta name="generator" content="AsciiDoc 8.6.9" />\r
8 <title>i3: External workspace bars</title>\r
9 <link rel="stylesheet" href="/css/style.css" type="text/css" />\r
10 <link rel="stylesheet" href="/css/xhtml11.css" type="text/css" />\r
11 <script type="text/javascript">\r
12 /*<![CDATA[*/\r
13 document.addEventListener("DOMContentLoaded", function(){asciidoc.footnotes(); asciidoc.toc(2);}, false);\r
14 /*]]>*/\r
15 </script>\r
16 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>\r
17 </head>\r
18 <body class="article">\r
19 \r
20         <div id="main">\r
21             <a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>\r
22                         <ul id="nav">\r
23                                 <li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>\r
24                                 <li><a href="/screenshots">Screens</a></li>\r
25                                 <li><a href="https://www.reddit.com/r/i3wm/">FAQ</a></li>\r
26                                 <li><a href="/contact">Contact</a></li>\r
27                                 <li><a href="https://github.com/i3/i3/issues">Bugs</a></li>\r
28                         </ul>\r
29         <br style="clear: both">\r
30 <div id="content">\r
31 <div id="header">\r
32 <h1>External workspace bars</h1>\r
33 <span id="author">Michael Stapelberg</span><br />\r
34 <span id="email"><tt>&lt;<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>&gt;</tt></span><br />\r
35 <span id="revdate">April 2013</span>\r
36 <div id="toc">
37   <div id="toctitle">Table of Contents</div>
38   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
39 </div>\r
40 </div>\r
41 <div id="preamble">\r
42 <div class="sectionbody">\r
43 <div class="paragraph"><p>i3 comes with i3bar by default, a simple bar that is sufficient for most users.\r
44 In case you are unhappy with it, this document explains how to use a different,\r
45 external workspace bar. Note that we do not provide support for external\r
46 programs.</p></div>\r
47 </div>\r
48 </div>\r
49 <div class="sect1">\r
50 <h2 id="_internal_and_external_bars">1. Internal and external bars</h2>\r
51 <div class="sectionbody">\r
52 <div class="paragraph"><p>The internal workspace bar of i3 is meant to be a reasonable default so that\r
53 you can use i3 without having too much hassle when setting it up. It is quite\r
54 simple and intended to stay this way.</p></div>\r
55 </div>\r
56 </div>\r
57 <div class="sect1">\r
58 <h2 id="_dock_mode">2. dock mode</h2>\r
59 <div class="sectionbody">\r
60 <div class="paragraph"><p>You typically want to see the same workspace bar on every workspace on a\r
61 specific screen. Also, you don’t want to place the workspace bar somewhere\r
62 in your layout by hand. This is where dock mode comes in: When a program sets\r
63 the appropriate hint (_NET_WM_WINDOW_TYPE_DOCK), it will be managed in dock\r
64 mode by i3. That means it will be placed at the bottom or top of the screen\r
65 (while other edges of the screen are possible in the NetWM standard, this is\r
66 not yet implemented in i3), it will not overlap any other window and it will be\r
67 on every workspace for the specific screen it was placed on initially.</p></div>\r
68 </div>\r
69 </div>\r
70 <div class="sect1">\r
71 <h2 id="_the_ipc_interface">3. The IPC interface</h2>\r
72 <div class="sectionbody">\r
73 <div class="paragraph"><p>In the context of using an external workspace bar, the IPC interface needs to\r
74 provide the bar program with the current workspaces and output (as in VGA-1,\r
75 LVDS-1, …) configuration. In the other direction, the program has to be able\r
76 to switch to specific workspaces.</p></div>\r
77 <div class="paragraph"><p>By default, the IPC interface is enabled and you can get the path to the socket\r
78 by calling <tt>i3 --get-socketpath</tt>.</p></div>\r
79 <div class="paragraph"><p>To learn more about the protocol which is used for IPC, see <tt>docs/ipc</tt>.</p></div>\r
80 </div>\r
81 </div>\r
82 <div class="sect1">\r
83 <h2 id="_output_changes_on_the_fly">4. Output changes (on-the-fly)</h2>\r
84 <div class="sectionbody">\r
85 <div class="paragraph"><p>i3 implements the RandR API and can handle changing outputs quite well. So, an\r
86 external workspace bar implementation needs to make sure that when you change\r
87 the resolution of any of your screens (or enable/disable an output), the bars\r
88 will be adjusted properly.</p></div>\r
89 </div>\r
90 </div>\r
91 <div class="sect1">\r
92 <h2 id="_i3_wsbar_an_example_implementation">5. i3-wsbar, an example implementation</h2>\r
93 <div class="sectionbody">\r
94 <div class="paragraph"><p><tt>i3-wsbar</tt> used to be the reference implementation before we had <tt>i3bar</tt>.\r
95 Nowadays, it is not shipped with release tarballs, but you can still get it at\r
96 <a href="http://code.stapelberg.de/git/i3/tree/contrib/i3-wsbar">http://code.stapelberg.de/git/i3/tree/contrib/i3-wsbar</a></p></div>\r
97 <div class="sect2">\r
98 <h3 id="_the_big_picture">5.1. The big picture</h3>\r
99 <div class="paragraph"><p>The most common reason to use an external workspace bar is to integrate system\r
100 information such as what <tt>i3status</tt> or <tt>conky</tt> provide into the workspace bar.\r
101 So, we have <tt>i3status</tt> or a similar program, which only provides\r
102 text output (formatted in some way). To display this text nicely on the screen,\r
103 there are programs such as dzen2, xmobar and similar. We will stick to dzen2\r
104 from here on. So, we have the output of i3status, which needs to go into dzen2\r
105 somehow. But we also want to display the list of workspaces. <tt>i3-wsbar</tt> takes\r
106 input on stdin, combines it with a formatted workspace list and pipes it to\r
107 dzen2.</p></div>\r
108 <div class="paragraph"><p>Please note that <tt>i3-wsbar</tt> does not print its output to stdout. Instead, it\r
109 launches the dzen2 instances on its own. This is necessary to handle changes\r
110 in the available outputs (to place a new dzen2 on a new screen for example).</p></div>\r
111 <div class="paragraph"><p><span class="image">\r
112 <a class="image" href="wsbar.png">\r
113 <img src="wsbar.png" alt="Overview" />\r
114 </a>\r
115 </span></p></div>\r
116 </div>\r
117 <div class="sect2">\r
118 <h3 id="_running_i3_wsbar">5.2. Running i3-wsbar</h3>\r
119 <div class="paragraph"><p>The most simple usage of i3-wsbar looks like this:</p></div>\r
120 <div class="listingblock">\r
121 <div class="content">\r
122 <pre><tt>i3-wsbar -c "dzen2 -x %x -dock"</tt></pre>\r
123 </div></div>\r
124 <div class="paragraph"><p>The <tt>%x</tt> in the command name will be replaced by the X position of the output\r
125 for which this workspace bar is running. i3 will automatically place the\r
126 workspace bar on the correct output when dzen2 is started in dock mode. The\r
127 bar which you will see should look exactly like the internal bar of i3.</p></div>\r
128 <div class="paragraph"><p>To actually get a benefit, you want to give <tt>i3-wsbar</tt> some input:</p></div>\r
129 <div class="listingblock">\r
130 <div class="content">\r
131 <pre><tt>i3status | i3-wsbar -c "dzen2 -x %x -dock"</tt></pre>\r
132 </div></div>\r
133 </div>\r
134 </div>\r
135 </div>\r
136 </div>\r
137 <div id="footnotes"><hr /></div>\r
138 <div id="footer" lang="de">\r
139 © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>\r
140 </div>\r
141 </body>\r
142 </html>\r