1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.5.2" />
<title>i3 User’s Guide</title>
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
/*
border: 1px solid red;
*/
}
body {
margin: 1em 5% 1em 5%;
}
a {
color: blue;
text-decoration: underline;
}
a:visited {
color: fuchsia;
}
em {
font-style: italic;
color: navy;
}
strong {
font-weight: bold;
color: #083194;
}
tt {
color: navy;
}
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
font-family: sans-serif;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
}
h1, h2, h3 {
border-bottom: 2px solid silver;
}
h2 {
padding-top: 0.5em;
}
h3 {
float: left;
}
h3 + * {
clear: left;
}
div.sectionbody {
font-family: serif;
margin-left: 0;
}
hr {
border: 1px solid silver;
}
p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
ul, ol, li > p {
margin-top: 0;
}
pre {
padding: 0;
margin: 0;
}
span#author {
color: #527bbd;
font-family: sans-serif;
font-weight: bold;
font-size: 1.1em;
}
span#email {
}
span#revnumber, span#revdate, span#revremark {
font-family: sans-serif;
}
div#footer {
font-family: sans-serif;
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
div#footer-text {
float: left;
padding-bottom: 0.5em;
}
div#footer-badges {
float: right;
padding-bottom: 0.5em;
}
div#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.admonitionblock {
margin-top: 2.0em;
margin-bottom: 2.0em;
margin-right: 10%;
color: #606060;
}
div.content { /* Block element content. */
padding: 0;
}
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
font-family: sans-serif;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
margin-bottom: 0.5em;
}
div.title + * {
margin-top: 0;
}
td div.title:first-child {
margin-top: 0.0em;
}
div.content div.title:first-child {
margin-top: 0.0em;
}
div.content + div.title {
margin-top: 0.0em;
}
div.sidebarblock > div.content {
background: #ffffee;
border: 1px solid silver;
padding: 0.5em;
}
div.listingblock > div.content {
border: 1px solid silver;
background: #f4f4f4;
padding: 0.5em;
}
div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
border-left: 5px solid #dddddd;
color: #777777;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
text-align: right;
}
div.verseblock > div.content {
white-space: pre;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
text-align: left;
}
div.admonitionblock .icon {
vertical-align: top;
font-size: 1.1em;
font-weight: bold;
text-decoration: underline;
color: #527bbd;
padding-right: 0.5em;
}
div.admonitionblock td.content {
padding-left: 0.5em;
border-left: 3px solid #dddddd;
}
div.exampleblock > div.content {
border-left: 3px solid #dddddd;
padding-left: 0.5em;
}
div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
dt {
margin-top: 0.5em;
margin-bottom: 0;
font-style: normal;
color: navy;
}
dd > *:first-child {
margin-top: 0.1em;
}
ul, ol {
list-style-position: outside;
}
ol.arabic {
list-style-type: decimal;
}
ol.loweralpha {
list-style-type: lower-alpha;
}
ol.upperalpha {
list-style-type: upper-alpha;
}
ol.lowerroman {
list-style-type: lower-roman;
}
ol.upperroman {
list-style-type: upper-roman;
}
div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
div.tableblock > table {
border: 3px solid #527bbd;
}
thead, p.table.header {
font-family: sans-serif;
font-weight: bold;
}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
p.table {
margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
border-style: none;
}
div.tableblock > table[frame="hsides"] {
border-left-style: none;
border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
border-top-style: none;
border-bottom-style: none;
}
div.hdlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
div.hdlist tr {
padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
font-weight: bold;
}
td.hdlist1 {
vertical-align: top;
font-style: normal;
padding-right: 0.8em;
color: navy;
}
td.hdlist2 {
vertical-align: top;
}
div.hdlist.compact tr {
margin: 0;
padding-bottom: 0;
}
.comment {
background: yellow;
}
.footnote, .footnoteref {
font-size: 0.8em;
}
span.footnote, span.footnoteref {
vertical-align: super;
}
#footnotes {
margin: 20px 0 20px 0;
padding: 7px 0 0 0;
}
#footnotes div.footnote {
margin: 0 0 5px 0;
}
#footnotes hr {
border: none;
border-top: 1px solid silver;
height: 1px;
text-align: left;
margin-left: 0;
width: 20%;
min-width: 100px;
}
@media print {
div#footer-badges { display: none; }
}
div#toc {
margin-bottom: 2.5em;
}
div#toctitle {
color: #527bbd;
font-family: sans-serif;
font-size: 1.1em;
font-weight: bold;
margin-top: 1.0em;
margin-bottom: 0.1em;
}
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
div.toclevel2 {
margin-left: 2em;
font-size: 0.9em;
}
div.toclevel3 {
margin-left: 4em;
font-size: 0.9em;
}
div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
/* Workarounds for IE6's broken and incomplete CSS2. */
div.sidebar-content {
background: #ffffee;
border: 1px solid silver;
padding: 0.5em;
}
div.sidebar-title, div.image-title {
color: #527bbd;
font-family: sans-serif;
font-weight: bold;
margin-top: 0.0em;
margin-bottom: 0.5em;
}
div.listingblock div.content {
border: 1px solid silver;
background: #f4f4f4;
padding: 0.5em;
}
div.quoteblock-attribution {
padding-top: 0.5em;
text-align: right;
}
div.verseblock-content {
white-space: pre;
}
div.verseblock-attribution {
padding-top: 0.75em;
text-align: left;
}
div.exampleblock-content {
border-left: 3px solid #dddddd;
padding-left: 0.5em;
}
/* IE6 sets dynamically generated links as visited. */
div#toc a:visited { color: blue; }
</style>
<script type="text/javascript">
/*<+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
var iterate = function (el) {
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
var mo = re.exec(i.tagName);
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
}
iterate(i);
}
}
}
iterate(el);
return result;
}
var toc = document.getElementById("toc");
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.element.id == "")
entry.element.id = "_toc_" + i;
var a = document.createElement("a");
a.href = "#" + entry.element.id;
a.appendChild(document.createTextNode(entry.text));
var div = document.createElement("div");
div.appendChild(a);
div.className = "toclevel" + entry.toclevel;
toc.appendChild(div);
}
if (entries.length == 0)
toc.parentNode.removeChild(toc);
},
/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////
/* Based on footnote generation code from:
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
*/
footnotes: function () {
var cont = document.getElementById("content");
var noteholder = document.getElementById("footnotes");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
// Use [\s\S] in place of . so multi-line matches work.
// Because JavaScript has no s (dotall) regex flag.
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
spans[i].innerHTML =
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
}
if (n == 0)
noteholder.parentNode.removeChild(noteholder);
else {
// Process footnoterefs.
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnoteref") {
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
href = href.match(/#.*/)[0]; // Because IE return full URL.
n = refs[href];
spans[i].innerHTML =
"[<a href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
}
}
}
}
}
/*]]>*/
</script>
</head>
<body>
<div id="header">
<h1>i3 User’s Guide</h1>
<span id="author">Michael Stapelberg</span><br />
<span id="email"><tt><<a href="mailto:michael+i3@stapelberg.de">michael+i3@stapelberg.de</a>></tt></span><br />
<span id="revdate">March 2010</span>
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>This document contains all the information you need to configure and use the i3
window manager. If it does not, please contact me on IRC, Jabber or E-Mail and
I’ll help you out.</p></div>
</div>
</div>
<h2 id="_default_keybindings">1. Default keybindings</h2>
<div class="sectionbody">
<div class="paragraph"><p>For the "too long; didn’t read" people, here is an overview of the default
keybindings (click to see the full size image):</p></div>
<div class="paragraph"><p><strong>Keys to use with Mod1 (alt):</strong></p></div>
<div class="paragraph"><p><span class="image">
<a class="image" href="keyboard-layer1.png">
<img src="keyboard-layer1.png" alt="Keys to use with Mod1 (alt)" width="600" />
</a>
</span></p></div>
<div class="paragraph"><p><strong>Keys to use with Shift+Mod1:</strong></p></div>
<div class="paragraph"><p><span class="image">
<a class="image" href="keyboard-layer2.png">
<img src="keyboard-layer2.png" alt="Keys to use with Shift+Mod1" width="600" />
</a>
</span></p></div>
<div class="paragraph"><p>As i3 uses keycodes in the default configuration, it does not matter which
keyboard layout you actually use. The key positions are what matters (of course
you can also use keysymbols, see <a href="#keybindings">[keybindings]</a>).</p></div>
<div class="paragraph"><p>The red keys are the modifiers you need to press (by default), the blue keys
are your homerow.</p></div>
</div>
<h2 id="_using_i3">2. Using i3</h2>
<div class="sectionbody">
<h3 id="_opening_terminals_and_moving_around">2.1. Opening terminals and moving around</h3><div style="clear:left"></div>
<div class="paragraph"><p>One very basic operation is opening a new terminal. By default, the keybinding
for this is Mod1+Enter, that is Alt+Enter in the default configuration. By
pressing Mod1+Enter, a new terminal will be opened. It will fill the whole
space available on your screen.</p></div>
<div class="paragraph"><p><span class="image">
<img src="single_terminal.png" alt="Single terminal" />
</span></p></div>
<div class="paragraph"><p>It is important to keep in mind that i3 uses a table to manage your windows. At
the moment, you have exactly one column and one row which leaves you with one
cell. In this cell there is a container, which is where your new terminal is
opened.</p></div>
<div class="paragraph"><p>If you now open another terminal, you still have only one cell. However, the
container in that cell holds both of your terminals. So, a container is just a
group of clients with a specific layout. Containers can be resized by adjusting
the size of the cell that holds them.</p></div>
<div class="paragraph"><p><span class="image">
<img src="two_terminals.png" alt="Two terminals" />
</span></p></div>
<div class="paragraph"><p>To move the focus between the two terminals, you use the direction keys which
you may know from the editor <tt>vi</tt>. However, in i3, your homerow is used for
these keys (in <tt>vi</tt>, the keys are shifted to the left by one for compatibility
with most keyboard layouts). Therefore, <tt>Mod1+J</tt> is left, <tt>Mod1+K</tt> is down,
<tt>Mod1+L</tt> is up and <tt>Mod1+;</tt> is right. So, to switch between the terminals,
use <tt>Mod1+K</tt> or <tt>Mod1+L</tt>.</p></div>
<div class="paragraph"><p>To create a new row/column (and a new cell), you can simply move a terminal (or
any other window) in the direction you want to expand your table. So, let’s
expand the table to the right by pressing <tt>Mod1+Shift+;</tt>.</p></div>
<div class="paragraph"><p><span class="image">
<img src="two_columns.png" alt="Two columns" />
</span></p></div>
<h3 id="_changing_container_modes">2.2. Changing container modes</h3><div style="clear:left"></div>
<div class="paragraph"><p>A container can have the following modes:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
default
</dt>
<dd>
<p>
Windows are sized so that every window gets an equal amount of space in the
container.
</p>
</dd>
<dt class="hdlist1">
stacking
</dt>
<dd>
<p>
Only the focused window in the container is displayed. You get a list of
windows at the top of the container.
</p>
</dd>
<dt class="hdlist1">
tabbed
</dt>
<dd>
<p>
The same principle as <tt>stacking</tt>, but the list of windows at the top is only
a single line which is vertically split.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>To switch modes, press <tt>Mod1+e</tt> for default, <tt>Mod1+h</tt> for stacking and
<tt>Mod1+w</tt> for tabbed.</p></div>
<div class="paragraph"><p><span class="image">
<img src="modes.png" alt="Container modes" />
</span></p></div>
<h3 id="_toggling_fullscreen_mode_for_a_window">2.3. Toggling fullscreen mode for a window</h3><div style="clear:left"></div>
<div class="paragraph"><p>To display a window fullscreen or to go out of fullscreen mode again, press
<tt>Mod1+f</tt>.</p></div>
<div class="paragraph"><p>There is also a global fullscreen mode in i3 in which the client will use all
available outputs. To use it, or to get out of it again, press <tt>Mod1+Shift+f</tt>.</p></div>
<h3 id="_opening_other_applications">2.4. Opening other applications</h3><div style="clear:left"></div>
<div class="paragraph"><p>Aside from opening applications from a terminal, you can also use the handy
<tt>dmenu</tt> which is opened by pressing <tt>Mod1+v</tt> by default. Just type the name
(or a part of it) of the application which you want to open. The application
typed has to be in your <tt>$PATH</tt> for this to work.</p></div>
<div class="paragraph"><p>Additionally, if you have applications you open very frequently, you can
create a keybinding for starting the application directly. See the section
"Configuring i3" for details.</p></div>
<h3 id="_closing_windows">2.5. Closing windows</h3><div style="clear:left"></div>
<div class="paragraph"><p>If an application does not provide a mechanism for closing (most applications
provide a menu, the escape key or a shortcut like <tt>Control+W</tt> to close), you
can press <tt>Mod1+Shift+q</tt> to kill a window. For applications which support
the WM_DELETE protocol, this will correctly close the application (saving
any modifications or doing other cleanup). If the application doesn’t support
the WM_DELETE protocol your X server will kill the window and the behaviour
depends on the application.</p></div>
<h3 id="_using_workspaces">2.6. Using workspaces</h3><div style="clear:left"></div>
<div class="paragraph"><p>Workspaces are an easy way to group a set of windows. By default, you are on
the first workspace, as the bar on the bottom left indicates. To switch to
another workspace, press <tt>Mod1+num</tt> where <tt>num</tt> is the number of the workspace
you want to use. If the workspace does not exist yet, it will be created.</p></div>
<div class="paragraph"><p>A common paradigm is to put the web browser on one workspace, communication
applications (<tt>mutt</tt>, <tt>irssi</tt>, …) on another one, and the ones with which you
work, on the third one. Of course, there is no need to follow this approach.</p></div>
<div class="paragraph"><p>If you have multiple screens, a workspace will be created on each screen at
startup. If you open a new workspace, it will be bound to the screen you
created it on. When you switch to a workspace on another screen, i3 will set
focus to that screen.</p></div>
<h3 id="_moving_windows_to_workspaces">2.7. Moving windows to workspaces</h3><div style="clear:left"></div>
<div class="paragraph"><p>To move a window to another workspace, simply press <tt>Mod1+Shift+num</tt> where
<tt>num</tt> is (like when switching workspaces) the number of the target workspace.
Similarly to switching workspaces, the target workspace will be created if
it does not yet exist.</p></div>
<h3 id="_resizing_columns_rows">2.8. Resizing columns/rows</h3><div style="clear:left"></div>
<div class="paragraph"><p>To resize columns or rows, just grab the border between the two columns/rows
and move it to the wanted size. Please keep in mind that each cell of the table
holds a <tt>container</tt> and thus you cannot horizontally resize single windows. If
you need applications with different horizontal sizes, place them in seperate
cells one above the other.</p></div>
<div class="paragraph"><p>See <a href="#resizingconfig">[resizingconfig]</a> for how to configure i3 to be able to resize
columns/rows with your keyboard.</p></div>
<h3 id="_restarting_i3_inplace">2.9. Restarting i3 inplace</h3><div style="clear:left"></div>
<div class="paragraph"><p>To restart i3 inplace (and thus get into a clean state if there is a bug, or
to upgrade to a newer version of i3) you can use <tt>Mod1+Shift+r</tt>. Be aware,
though, that this kills your current layout and all the windows you have opened
will be put in a default container in only one cell. Saving layouts will be
implemented in a later version.</p></div>
<h3 id="_exiting_i3">2.10. Exiting i3</h3><div style="clear:left"></div>
<div class="paragraph"><p>To cleanly exit i3 without killing your X server, you can use <tt>Mod1+Shift+e</tt>.</p></div>
<h3 id="_snapping">2.11. Snapping</h3><div style="clear:left"></div>
<div class="paragraph"><p>Snapping is a mechanism to increase/decrease the colspan/rowspan of a container.
Colspan/rowspan is the number of columns/rows a specific cell of the table
consumes. This is easier explained by giving an example, so take the following
layout:</p></div>
<div class="paragraph"><p><span class="image">
<img src="snapping.png" alt="Snapping example" />
</span></p></div>
<div class="paragraph"><p>To use the full size of your screen, you can now snap container 3 downwards
by pressing <tt>Mod1+Control+k</tt> (or snap container 2 rightwards).</p></div>
<h3 id="_floating">2.12. Floating</h3><div style="clear:left"></div>
<div class="paragraph"><p>Floating mode is the opposite of tiling mode. The position and size of a window
are not managed by i3, but by you. Using this mode violates the tiling
paradigm but can be useful for some corner cases like "Save as" dialog
windows, or toolbar windows (GIMP or similar).</p></div>
<div class="paragraph"><p>You can enable floating mode for a window by pressing <tt>Mod1+Shift+Space</tt>. By
dragging the window’s titlebar with your mouse you can move the window
around. By grabbing the borders and moving them you can resize the window. You
can also do that by using the <a href="#floating_modifier">[floating_modifier]</a>.</p></div>
<div class="paragraph"><p>For resizing floating windows with your keyboard, see <a href="#resizingconfig">[resizingconfig]</a>.</p></div>
<div class="paragraph"><p>Floating windows are always on top of tiling windows.</p></div>
</div>
<h2 id="_configuring_i3">3. Configuring i3</h2>
<div class="sectionbody">
<div class="paragraph"><p>This is where the real fun begins ;-). Most things are very dependant on your
ideal working environment so we can’t make reasonable defaults for them.</p></div>
<div class="paragraph"><p>While not using a programming language for the configuration, i3 stays
quite flexible in regards to the things you usually want your window manager
to do.</p></div>
<div class="paragraph"><p>For example, you can configure bindings to jump to specific windows,
you can set specific applications to start on specific workspaces, you can
automatically start applications, you can change the colors of i3, and you
can bind your keys to do useful things.</p></div>
<div class="paragraph"><p>To change the configuration of i3, copy <tt>/etc/i3/config</tt> to <tt>~/.i3/config</tt>
(or <tt>~/.config/i3/config</tt> if you like the XDG directory scheme) and edit it
with a text editor.</p></div>
<h3 id="_comments">3.1. Comments</h3><div style="clear:left"></div>
<div class="paragraph"><p>It is possible and recommended to use comments in your configuration file to
properly document your setup for later reference. Comments are started with
a # and can only be used at the beginning of a line:</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt># This is a comment</tt></pre>
</div></div>
<h3 id="_fonts">3.2. Fonts</h3><div style="clear:left"></div>
<div class="paragraph"><p>i3 uses X core fonts (not Xft) for rendering window titles and the internal
workspace bar. You can use <tt>xfontsel(1)</tt> to generate such a font description.
To see special characters (Unicode), you need to use a font which supports
the ISO-10646 encoding.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>font <X core font description></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1</tt></pre>
</div></div>
<h3 id="keybindings">3.3. Keyboard bindings</h3><div style="clear:left"></div>
<div class="paragraph"><p>A keyboard binding makes i3 execute a command (see below) upon pressing a
specific key. i3 allows you to bind either on keycodes or on keysyms (you can
also mix your bindings, though i3 will not protect you from overlapping ones).</p></div>
<div class="ulist"><ul>
<li>
<p>
A keysym (key symbol) is a description for a specific symbol, like "a"
or "b", but also more strange ones like "underscore" instead of "_". These
are the ones you use in Xmodmap to remap your keys. To get the current
mapping of your keys, use <tt>xmodmap -pke</tt>.
</p>
</li>
<li>
<p>
Keycodes do not need to have a symbol assigned (handy for some hotkeys
on some notebooks) and they will not change their meaning as you switch to a
different keyboard layout (when using <tt>xmodmap</tt>).
</p>
</li>
</ul></div>
<div class="paragraph"><p>My recommendation is: If you often switch keyboard layouts but you want to keep
your bindings in the same physical location on the keyboard, use keycodes.
If you don’t switch layouts, and want a clean and simple config file, use
keysyms.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>bindsym [Modifiers+]keysym command
bind [Modifiers+]keycode command</tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt># Fullscreen
bindsym Mod1+f f
# Restart
bindsym Mod1+Shift+r restart
# Notebook-specific hotkeys
bind 214 exec /home/michael/toggle_beamer.sh</tt></pre>
</div></div>
<div class="paragraph"><p>Available Modifiers:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
Mod1-Mod5, Shift, Control
</dt>
<dd>
<p>
Standard modifiers, see <tt>xmodmap(1)</tt>
</p>
</dd>
<dt class="hdlist1">
Mode_switch
</dt>
<dd>
<p>
Unlike other window managers, i3 can use Mode_switch as a modifier. This allows
you to remap capslock (for example) to Mode_switch and use it for both: typing
umlauts or special characters <em>and</em> having some comfortably reachable key
bindings. For example, when typing, capslock+1 or capslock+2 for switching
workspaces is totally convenient. Try it :-).
</p>
</dd>
</dl></div>
<h3 id="floating_modifier">3.4. The floating modifier</h3><div style="clear:left"></div>
<div class="paragraph"><p>To move floating windows with your mouse, you can either grab their titlebar
or configure the so called floating modifier which you can then press and
click anywhere in the window itself to move it. The most common setup is to
use the same key you use for managing windows (Mod1 for example). Then
you can press Mod1, click into a window using your left mouse button, and drag
it to the position you want.</p></div>
<div class="paragraph"><p>When holding the floating modifier, you can resize a floating window by
pressing the right mouse button on it and moving around while holding it. If
you hold the shift button as well, the resize will be proportional.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>floating_modifier <Modifiers></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>floating_modifier Mod1</tt></pre>
</div></div>
<h3 id="_layout_mode_for_new_containers">3.5. Layout mode for new containers</h3><div style="clear:left"></div>
<div class="paragraph"><p>This option determines in which mode new containers will start. See also
<a href="#stack-limit">[stack-limit]</a>.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>new_container <default|stacking|tabbed>
new_container stack-limit <cols|rows> <value></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>new_container tabbed</tt></pre>
</div></div>
<h3 id="_border_style_for_new_windows">3.6. Border style for new windows</h3><div style="clear:left"></div>
<div class="paragraph"><p>This option determines which border style new windows will have.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>new_window <bp|bn|bb></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>new_window bp</tt></pre>
</div></div>
<h3 id="_variables">3.7. Variables</h3><div style="clear:left"></div>
<div class="paragraph"><p>As you learned in the section about keyboard bindings, you will have
to configure lots of bindings containing modifier keys. If you want to save
yourself some typing and be able to change the modifier you use later,
variables can be handy.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>set name value</tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>set $m Mod1
bindsym $m+Shift+r restart</tt></pre>
</div></div>
<div class="paragraph"><p>Variables are directly replaced in the file when parsing. There is no fancy
handling and there are absolutely no plans to change this. If you need a more
dynamic configuration you should create a little script which generates a
configuration file and run it before starting i3 (for example in your
<tt>.xsession</tt> file).</p></div>
<h3 id="_automatically_putting_clients_on_specific_workspaces">3.8. Automatically putting clients on specific workspaces</h3><div style="clear:left"></div>
<div class="paragraph" id="assign_workspace"><p>It is recommended that you match on window classes wherever possible because
some applications first create their window, and then worry about setting the
correct title. Firefox with Vimperator comes to mind. The window starts up
being named Firefox, and only when Vimperator is loaded does the title change.
As i3 will get the title as soon as the application maps the window (mapping
means actually displaying it on the screen), you’d need to have to match on
<em>Firefox</em> in this case.</p></div>
<div class="paragraph"><p>You can prefix or suffix workspaces with a <tt>~</tt> to specify that matching clients
should be put into floating mode. If you specify only a <tt>~</tt>, the client will
not be put onto any workspace, but will be set floating on the current one.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>assign ["]window class[/window title]["] [→] [~ | workspace]</tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>assign urxvt 2
assign urxvt → 2
assign "urxvt" → 2
assign "urxvt/VIM" → 3
assign "gecko" → ~4
assign "xv/MPlayer" → ~</tt></pre>
</div></div>
<div class="paragraph"><p>Note that the arrow is not required, it just looks good :-). If you decide to
use it, it has to be a UTF-8 encoded arrow, not "→" or something like that.</p></div>
<h3 id="_automatically_starting_applications_on_i3_startup">3.9. Automatically starting applications on i3 startup</h3><div style="clear:left"></div>
<div class="paragraph"><p>By using the <tt>exec</tt> keyword outside a keybinding, you can configure which
commands will be performed by i3 on initial startup (not when restarting i3
in-place however). These commands will be run in order.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>exec command</tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>exec sudo i3status | dzen2 -dock</tt></pre>
</div></div>
<h3 id="workspace_screen">3.10. Automatically putting workspaces on specific screens</h3><div style="clear:left"></div>
<div class="paragraph"><p>If you assign clients to workspaces, it might be handy to put the
workspaces on specific screens. Also, the assignment of workspaces to screens
will determine which workspace i3 uses for a new screen when adding screens
or when starting (e.g., by default it will use 1 for the first screen, 2 for
the second screen and so on).</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>workspace <number> output <output></tt></pre>
</div></div>
<div class="paragraph"><p>The <em>output</em> is the name of the RandR output you attach your screen to. On a
laptop, you might have VGA1 and LVDS1 as output names. You can see the
available outputs by running <tt>xrandr --current</tt>.</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>workspace 1 output LVDS1
workspace 5 output VGA1</tt></pre>
</div></div>
<h3 id="_named_workspaces">3.11. Named workspaces</h3><div style="clear:left"></div>
<div class="paragraph"><p>If you always have a certain arrangement of workspaces, you might want to give
them names (of course UTF-8 is supported):</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>workspace <number> <name>
workspace <number> output <output> name</tt></pre>
</div></div>
<div class="paragraph"><p>For more details about the <em>output</em> part of this command, see above.</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>workspace 1 www
workspace 2 work
workspace 3 i ♥ workspaces</tt></pre>
</div></div>
<h3 id="_changing_colors">3.12. Changing colors</h3><div style="clear:left"></div>
<div class="paragraph"><p>You can change all colors which i3 uses to draw the window decorations and the
bottom bar.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>colorclass border background text</tt></pre>
</div></div>
<div class="paragraph"><p>Where colorclass can be one of:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
client.focused
</dt>
<dd>
<p>
A client which currently has the focus.
</p>
</dd>
<dt class="hdlist1">
client.focused_inactive
</dt>
<dd>
<p>
A client which is the focused one of its container, but it does not have
the focus at the moment.
</p>
</dd>
<dt class="hdlist1">
client.unfocused
</dt>
<dd>
<p>
A client which is not the focused one of its container.
</p>
</dd>
<dt class="hdlist1">
client.urgent
</dt>
<dd>
<p>
A client which has its urgency hint activated.
</p>
</dd>
<dt class="hdlist1">
bar.focused
</dt>
<dd>
<p>
The current workspace in the bottom bar.
</p>
</dd>
<dt class="hdlist1">
bar.unfocused
</dt>
<dd>
<p>
All other workspaces in the bottom bar.
</p>
</dd>
<dt class="hdlist1">
bar.urgent
</dt>
<dd>
<p>
A workspace which has at least one client with an activated urgency hint.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>Colors are in HTML hex format (#rrggbb), see the following example:</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt># class border backgr. text
client.focused #2F343A #900000 #FFFFFF</tt></pre>
</div></div>
<div class="paragraph"><p>Note that for the window decorations, the color around the child window is the
background color, and the border color is only the two thin lines at the top of
the window.</p></div>
<h3 id="_interprocess_communication">3.13. Interprocess communication</h3><div style="clear:left"></div>
<div class="paragraph"><p>i3 uses unix sockets to provide an IPC interface. This allows third-party
programs to get information from i3, such as the current workspaces
(to display a workspace bar), and to control i3.</p></div>
<div class="paragraph"><p>To enable it, you have to configure a path where the unix socket will be
stored. The default path is <tt>~/.i3/ipc.sock</tt>.</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>ipc-socket ~/.i3/ipc.sock</tt></pre>
</div></div>
<div class="paragraph"><p>You can then use the <tt>i3-msg</tt> application to perform any command listed in
the next section.</p></div>
<h3 id="_disable_focus_follows_mouse">3.14. Disable focus follows mouse</h3><div style="clear:left"></div>
<div class="paragraph"><p>If you have a setup where your mouse usually is in your way (like a touchpad
on your laptop which you do not want to disable completely), you might want
to disable <em>focus follows mouse</em> and control focus only by using your keyboard.
The mouse will still be useful inside the currently active window (for example
to click on links in your browser window).</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>focus_follows_mouse <yes|no></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>focus_follows_mouse no</tt></pre>
</div></div>
<h3 id="_internal_workspace_bar">3.15. Internal workspace bar</h3><div style="clear:left"></div>
<div class="paragraph"><p>The internal workspace bar (the thing at the bottom of your screen) is very
simple — it does not provide a way to display custom text and it does not
offer advanced customization features. This is intended because we do not
want to duplicate functionality of tools like <tt>dzen2</tt>, <tt>xmobar</tt> and so on
(they render bars, we manage windows). Instead, there is an option which will
turn off the internal bar completely, so that you can use a separate program to
display it (see <tt>i3-wsbar</tt>, a sample implementation of such a program):</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>workspace_bar <yes|no></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>workspace_bar no</tt></pre>
</div></div>
</div>
<h2 id="_list_of_commands">4. List of commands</h2>
<div class="sectionbody">
<h3 id="_manipulating_layout">4.1. Manipulating layout</h3><div style="clear:left"></div>
<div class="paragraph"><p>To change the layout of the current container to stacking, use <tt>s</tt>, for default
use <tt>d</tt> and for tabbed, use <tt>T</tt>. To make the current client (!) fullscreen,
use <tt>f</tt>, to make it span all outputs, use <tt>fg</tt>, to make it floating (or
tiling again) use <tt>t</tt>:</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>bindsym Mod1+s s
bindsym Mod1+l d
bindsym Mod1+w T
# Toggle fullscreen
bindsym Mod1+f f
# Toggle global fullscreen
bindsym Mod1+Shift+f fg
# Toggle floating/tiling
bindsym Mod1+t t</tt></pre>
</div></div>
<h3 id="_focusing_moving_snapping_clients_containers_screens">4.2. Focusing/Moving/Snapping clients/containers/screens</h3><div style="clear:left"></div>
<div class="paragraph"><p>To change the focus, use one of the <tt>h</tt>, <tt>j</tt>, <tt>k</tt> and <tt>l</tt> commands, meaning
left, down, up, right (respectively). To focus a container, prefix it with
<tt>wc</tt>. To focus a screen, prefix it with <tt>ws</tt>.</p></div>
<div class="paragraph"><p>The same principle applies for moving and snapping: just prefix the command
with <tt>m</tt> when moving and with <tt>s</tt> when snapping:</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt># Focus clients on the left, bottom, top, right:
bindsym Mod1+j h
bindsym Mod1+k j
bindsym Mod1+j k
bindsym Mod1+semicolon l
# Move client to the left, bottom, top, right:
bindsym Mod1+j mh
bindsym Mod1+k mj
bindsym Mod1+j mk
bindsym Mod1+semicolon ml
# Snap client to the left, bottom, top, right:
bindsym Mod1+j sh
bindsym Mod1+k sj
bindsym Mod1+j sk
bindsym Mod1+semicolon sl
# Focus container on the left, bottom, top, right:
bindsym Mod3+j wch
…</tt></pre>
</div></div>
<h3 id="_changing_workspaces_moving_clients_to_workspaces">4.3. Changing workspaces/moving clients to workspaces</h3><div style="clear:left"></div>
<div class="paragraph"><p>To change to a specific workspace, the command is just the number of the
workspace, e.g. <tt>1</tt> or <tt>3</tt>. To move the current client to a specific workspace,
prefix the number with an <tt>m</tt>.</p></div>
<div class="paragraph"><p>You can also switch to the next and previous workspace with the commands <tt>nw</tt>
and <tt>pw</tt>, which is handy, for example, if you have workspace 1, 3, 4 and 9 and
you want to cycle through them with a single key combination.</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>bindsym Mod1+1 1
bindsym Mod1+2 2
...
bindsym Mod1+Shift+1 m1
bindsym Mod1+Shift+2 m2
...
bindsym Mod1+o nw
bindsym Mod1+p pw</tt></pre>
</div></div>
<h3 id="resizingconfig">4.4. Resizing columns/rows</h3><div style="clear:left"></div>
<div class="paragraph"><p>If you want to resize columns/rows using your keyboard, you can use the
<tt>resize</tt> command, I recommend using it inside a so called <tt>mode</tt>:</p></div>
<div class="listingblock">
<div class="title">Example: Configuration file, defining a mode for resizing</div>
<div class="content">
<pre><tt>mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# They resize the border in the direction you pressed, e.g.
# when pressing left, the window is resized so that it has
# more space on its left
bindsym n resize left -10
bindsym Shift+n resize left +10
bindsym r resize bottom +10
bindsym Shift+r resize bottom -10
bindsym t resize top -10
bindsym Shift+t resize top +10
bindsym d resize right +10
bindsym Shift+d resize right -10
bind 36 mode default
}
# Enter resize mode
bindsym Mod1+r mode resize</tt></pre>
</div></div>
<h3 id="_jumping_to_specific_windows">4.5. Jumping to specific windows</h3><div style="clear:left"></div>
<div class="paragraph"><p>Often when in a multi-monitor environment, you want to quickly jump to a
specific window. For example, while working on workspace 3 you may want to
jump to your mail client to email your boss that you’ve achieved some
important goal. Instead of figuring out how to navigate to your mailclient,
it would be more convenient to have a shortcut.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>jump ["]window class[/window title]["]
jump workspace [ column row ]</tt></pre>
</div></div>
<div class="paragraph"><p>You can either use the same matching algorithm as in the <tt>assign</tt> command
(see above) or you can specify the position of the client if you always use
the same layout.</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt># Get me to the next open VIM instance
bindsym Mod1+a jump "urxvt/VIM"</tt></pre>
</div></div>
<h3 id="_vim_like_marks_mark_goto">4.6. VIM-like marks (mark/goto)</h3><div style="clear:left"></div>
<div class="paragraph" id="vim_like_marks"><p>This feature is like the jump feature: It allows you to directly jump to a
specific window (this means switching to the appropriate workspace and setting
focus to the windows). However, you can directly mark a specific window with
an arbitrary label and use it afterwards. You do not need to ensure that your
windows have unique classes or titles, and you do not need to change your
configuration file.</p></div>
<div class="paragraph"><p>As the command needs to include the label with which you want to mark the
window, you cannot simply bind it to a key. <tt>i3-input</tt> is a tool created
for this purpose: It lets you input a command and sends the command to i3. It
can also prefix this command and display a custom prompt for the input dialog.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>mark <identifier>
goto <identifier></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt># Read 1 character and mark the current window with this character
bindsym Mod1+m exec i3-input -p 'mark ' -l 1 -P 'Mark: '
# Read 1 character and go to the window with the character
bindsym Mod1+g exec i3-input -p 'goto ' -l 1 -P 'Goto: '</tt></pre>
</div></div>
<div class="paragraph"><p>Alternatively, if you do not want to mess with <tt>i3-input</tt>, you could create
seperate bindings for a specific set of labels and then only use those labels.</p></div>
<h3 id="_traveling_the_focus_stack">4.7. Traveling the focus stack</h3><div style="clear:left"></div>
<div class="paragraph"><p>This mechanism can be thought of as the opposite of the <tt>jump</tt> command.
It travels the focus stack and jumps to the window which had focus previously.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>focus [number] | floating | tiling | ft</tt></pre>
</div></div>
<div class="paragraph"><p>Where <tt>number</tt> by default is 1 meaning that the next client in the focus stack
will be selected.</p></div>
<div class="paragraph"><p>The special values have the following meaning:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
floating
</dt>
<dd>
<p>
The next floating window is selected.
</p>
</dd>
<dt class="hdlist1">
tiling
</dt>
<dd>
<p>
The next tiling window is selected.
</p>
</dd>
<dt class="hdlist1">
ft
</dt>
<dd>
<p>
If the current window is floating, the next tiling window will be
selected; and vice-versa.
</p>
</dd>
</dl></div>
<h3 id="_changing_border_style">4.8. Changing border style</h3><div style="clear:left"></div>
<div class="paragraph"><p>To change the border of the current client, you can use <tt>bn</tt> to use the normal
border (including window title), <tt>bp</tt> to use a 1-pixel border (no window title)
and <tt>bb</tt> to make the client borderless. There is also <tt>bt</tt> which will toggle
the different border styles.</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>bindsym Mod1+t bn
bindsym Mod1+y bp
bindsym Mod1+u bb</tt></pre>
</div></div>
<h3 id="stack-limit">4.9. Changing the stack-limit of a container</h3><div style="clear:left"></div>
<div class="paragraph"><p>If you have a single container with a lot of windows inside it (say, more than
10), the default layout of a stacking container can get a little unhandy.
Depending on your screen’s size, you might end up seeing only half of the
titlebars for each window in the container.</p></div>
<div class="paragraph"><p>Using the <tt>stack-limit</tt> command, you can limit the number of rows or columns
in a stacking container. i3 will create columns or rows (depending on what
you limited) automatically as needed.</p></div>
<div class="paragraph"><p><strong>Syntax</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>stack-limit <cols|rows> <value></tt></pre>
</div></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt># I always want to have two window titles in one line
stack-limit cols 2
# Not more than 5 rows in this stacking container
stack-limit rows 5</tt></pre>
</div></div>
<div class="paragraph"><p><span class="image">
<img src="stacklimit.png" alt="Container limited to two columns" />
</span></p></div>
<h3 id="_reloading_restarting_exiting">4.10. Reloading/Restarting/Exiting</h3><div style="clear:left"></div>
<div class="paragraph"><p>You can make i3 reload its configuration file with <tt>reload</tt>. You can also
restart i3 inplace with the <tt>restart</tt> command to get it out of some weird state
(if that should ever happen) or to perform an upgrade without having to restart
your X session. However, your layout is not preserved at the moment, meaning
that all open windows will end up in a single container in default layout
after the restart. To exit i3 properly, you can use the <tt>exit</tt> command,
however you don’t need to (simply killing your X session is fine as well).</p></div>
<div class="paragraph"><p><strong>Examples</strong>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>bindsym Mod1+Shift+r restart
bindsym Mod1+Shift+w reload
bindsym Mod1+Shift+e exit</tt></pre>
</div></div>
</div>
<h2 id="multi_monitor">5. Multiple monitors</h2>
<div class="sectionbody">
<div class="paragraph"><p>As you can see in the goal list on the website, i3 was specifically developed
with support for multiple monitors in mind. This section will explain how to
handle multiple monitors.</p></div>
<div class="paragraph"><p>When you have only one monitor, things are simple. You usually start with
workspace 1 on your monitor and open new ones as you need them.</p></div>
<div class="paragraph"><p>When you have more than one monitor, each monitor will get an initial
workspace. The first monitor gets 1, the second gets 2 and a possible third
would get 3. When you switch to a workspace on a different monitor, i3 will
switch to that monitor and then switch to the workspace. This way, you don’t
need shortcuts to switch to a specific monitor, and you don’t need to remember
where you put which workspace. New workspaces will be opened on the currently
active monitor. It is not possible to have a monitor without a workspace.</p></div>
<div class="paragraph"><p>The idea of making workspaces global is based on the observation that most
users have a very limited set of workspaces on their additional monitors.
They are often used for a specific task (browser, shell) or for monitoring
several things (mail, IRC, syslog, …). Thus, using one workspace on one monitor
and "the rest" on the other monitors often makes sense. However, as you can
create an unlimited number of workspaces in i3 and tie them to specific
screens, you can have the "traditional" approach of having X workspaces per
screen by changing your configuration (using modes, for example).</p></div>
<h3 id="_configuring_your_monitors">5.1. Configuring your monitors</h3><div style="clear:left"></div>
<div class="paragraph"><p>To help you get going if you have never used multiple monitors before, here is
a short overview of the xrandr options which will probably be of interest to
you. It is always useful to get an overview of the current screen configuration.
Just run "xrandr" and you will get an output like the following:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
1280x800 60.0*+ 50.0
1024x768 85.0 75.0 70.1 60.0
832x624 74.6
800x600 85.1 72.2 75.0 60.3 56.2
640x480 85.0 72.8 75.0 59.9
720x400 85.0
640x400 85.1
640x350 85.1</tt></pre>
</div></div>
<div class="paragraph"><p>Several things are important here: You can see that <tt>LVDS1</tt> is connected (of
course, it is the internal flat panel) but <tt>VGA1</tt> is not. If you have a monitor
connected to one of the ports but xrandr still says "disconnected", you should
check your cable, monitor or graphics driver.</p></div>
<div class="paragraph"><p>The maximum resolution you can see at the end of the first line is the maximum
combined resolution of your monitors. By default, it is usually too low and has
to be increased by editing <tt>/etc/X11/xorg.conf</tt>.</p></div>
<div class="paragraph"><p>So, say you connected VGA1 and want to use it as an additional screen:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>xrandr --output VGA1 --auto --left-of LVDS1</tt></pre>
</div></div>
<div class="paragraph"><p>This command makes xrandr try to find the native resolution of the device
connected to <tt>VGA1</tt> and configures it to the left of your internal flat panel.
When running "xrandr" again, the output looks like this:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr
Screen 0: minimum 320 x 200, current 2560 x 1024, maximum 8192 x 8192
VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
1280x1024 60.0*+ 75.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 72.8 75.0 66.7 60.0
720x400 70.1
LVDS1 connected 1280x800+1280+0 (normal left inverted right x axis y axis) 261mm x 163mm
1280x800 60.0*+ 50.0
1024x768 85.0 75.0 70.1 60.0
832x624 74.6
800x600 85.1 72.2 75.0 60.3 56.2
640x480 85.0 72.8 75.0 59.9
720x400 85.0
640x400 85.1
640x350 85.1</tt></pre>
</div></div>
<div class="paragraph"><p>Please note that i3 uses exactly the same API as xrandr does, so it will see
only what you can see in xrandr.</p></div>
<div class="paragraph"><p>See also <a href="#presentations">[presentations]</a> for more examples of multi-monitor setups.</p></div>
<h3 id="_interesting_configuration_for_multi_monitor_environments">5.2. Interesting configuration for multi-monitor environments</h3><div style="clear:left"></div>
<div class="paragraph"><p>There are several things to configure in i3 which may be interesting if you
have more than one monitor:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
You can specify which workspace should be put on which screen. This
allows you to have a different set of workspaces when starting than just
1 for the first monitor, 2 for the second and so on. See
<a href="#workspace_screen">[workspace_screen]</a>.
</p>
</li>
<li>
<p>
If you want some applications to generally open on the bigger screen
(MPlayer, Firefox, …), you can assign them to a specific workspace, see
<a href="#assign_workspace">[assign_workspace]</a>.
</p>
</li>
<li>
<p>
If you have many workspaces on many monitors, it might get hard to keep
track of which window you put where. Thus, you can use vim-like marks to
quickly switch between windows. See <a href="#vim_like_marks">[vim_like_marks]</a>.
</p>
</li>
</ol></div>
</div>
<h2 id="_i3_and_the_rest_of_your_software_world">6. i3 and the rest of your software world</h2>
<div class="sectionbody">
<h3 id="_displaying_a_status_line">6.1. Displaying a status line</h3><div style="clear:left"></div>
<div class="paragraph"><p>A very common thing amongst users of exotic window managers is a status line at
some corner of the screen. It is an often superior replacement to the widget
approach you have in the task bar of a traditional desktop environment.</p></div>
<div class="paragraph"><p>If you don’t already have your favorite way of generating such a status line
(self-written scripts, conky, …), then i3status is the recommended tool for
this task. It was written in C with the goal of using as few syscalls as
possible to reduce the time your CPU is woken up from sleep states.</p></div>
<div class="paragraph"><p>Regardless of which application you use to generate the status line, you
want to make sure that the application does one of the following things:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Register as a dock window using EWMH hints. This will make i3 position the
window above the workspace bar but below every other client. This is the
recommended way, but in case of dzen2, for example, you need to check out
the source of dzen2 from subversion, as the -dock option is not present
in the released versions.
</p>
</li>
<li>
<p>
Overlay the internal workspace bar. This method will not waste any space
on the workspace bar, however, it is rather hackish. Just configure
the output window to be over the workspace bar (say -x 200 and -y 780 if
your screen is 800 px height).
</p>
</li>
</ol></div>
<div class="paragraph"><p>The planned solution for this problem is to make the workspace bar optional
and switch to a third party application completely (dzen2 for example)
which will then contain the workspace bar.</p></div>
<h3 id="_giving_presentations_multi_monitor">6.2. Giving presentations (multi-monitor)</h3><div style="clear:left"></div>
<div class="paragraph"><p>When giving a presentation, you typically want the audience to see what you see
on your screen and then go through a series of slides (if the presentation is
simple). For more complex presentations, you might want to have some notes
which only you can see on your screen, while the audience can only see the
slides.</p></div>
<h4 id="presentations">6.2.1. Case 1: everybody gets the same output</h4>
<div class="paragraph"><p>This is the simple case. You connect your computer to the video projector,
turn on both (computer and video projector) and configure your X server to
clone the internal flat panel of your computer to the video output:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>xrandr --output VGA1 --mode 1024x768 --same-as LVDS1</tt></pre>
</div></div>
<div class="paragraph"><p>i3 will then use the lowest common subset of screen resolutions, the rest of
your screen will be left untouched (it will show the X background). So, in
our example, this would be 1024x768 (my notebook has 1280x800).</p></div>
<h4 id="_case_2_you_can_see_more_than_your_audience">6.2.2. Case 2: you can see more than your audience</h4>
<div class="paragraph"><p>This case is a bit harder. First of all, you should configure the VGA output
somewhere near your internal flat panel, say right of it:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>xrandr --output VGA1 --mode 1024x768 --right-of LVDS1</tt></pre>
</div></div>
<div class="paragraph"><p>Now, i3 will put a new workspace (depending on your settings) on the new screen
and you are in multi-monitor mode (see <a href="#multi_monitor">[multi_monitor]</a>).</p></div>
<div class="paragraph"><p>Because i3 is not a compositing window manager, there is no ability to
display a window on two screens at the same time. Instead, your presentation
software needs to do this job (that is, open a window on each screen).</p></div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2010-06-09 09:44:56 CEST
</div>
</div>
</body>
</html>
|