Difference between pages "Package:Tmux" and "Template:Subarch"

(Difference between pages)
 
 
Line 1: Line 1:
{{Ebuild
+
<includeonly>{{#widget:AddThis}}{{#if:{{{title|}}}|
|Summary=Terminal multiplexer
+
{{DISPLAYTITLE:Download - {{{title}}}}}
|CatPkg=app-misc/tmux
+
|
|Maintainer=
+
{{DISPLAYTITLE:Download - {{{subarch}}}}}
|Homepage=http://tmux.sourceforge.net/
+
}}'''This page lists CPU-optimized builds of Funtoo Linux for {{#if:{{{title|}}}|{{{title}}} ({{{subarch}}} subarch)|{{{subarch}}}}} [[{{{CPU Family}}}]].'''
}}
+
Tmux is a terminal multiplexer (just as [[Package:Screen (Terminal Multiplexer)|screen]], which is generally installed by default on servers). It enables you to run multiple terminals in one. You can arrange them in multiple tabs that you can split into multiple panes as well.
+
  
== Installation ==
+
{{{Description|}}}
 
+
{{#seo:
<console>
+
|title={{#if:{{{title|}}}|Download - {{{title}}}|Download - {{{subarch}}}}}
###i## emerge -a tmux
+
|keywords=funtoo,linux,build,subarch,{{{subarch}}},{{{title}}}
</console>
+
|description=This page lists CPU-optimized builds of Funtoo Linux for {{#if:{{{title|}}}|{{{title}}} ({{{subarch}}} subarch)|{{{subarch}}}}} [[{{{CPU Family}}}]].
 
+
== Getting Started ==
+
 
+
To launch Tmux, run <code>tmux</code> in a terminal. This should clear your current terminal and display a <i>status bar</i> on the bottom. In this status bar, you should see something like <i>"[0] 0:bash*"</i>. This means you are on session 0 (<b>[0]</b>), window 0 (<b>0:</b>) and you run "bash".
+
 
+
Tmux uses <b><code>Ctrl+b</code></b> as default prefix. This means that before issuing any command you will have to hit <b><code>Ctrl+b</code></b> to tell tmux you are asking <i>it</i>. For instance, type <b><code>Ctrl+b</code></b> and then <b><code>%</code></b>. This should split vertically the window to add a new pane. Now issue <b><code>Ctrl+b "</code></b>, this will split the new pane horizontally to create a new pane. You can switch against panes with <b><code>Ctrl+b Left/Up/Right/Down</code></b> (Left/Up/Right/Down being the arrow keys).
+
 
+
Another cool stuff is windows. Splitting your window into panes is good, but for readability purpose, you can't indefinitely split your window. So you can open a new window (which would behave more like a tab) by issuing <b><code>Ctrl+b c</code></b>. Your current window will be replaced by a brand new one. However you will notice that your status bar now looks like this <i>"[0] 0:bash- 1:bash*"</i>. The minus symbol (<b>-</b>) means this is the last visited window. The asterisk symbol (<b>*</b>) means this is the current window. You can add panes to this window as well. To go back to the first window, issue <b><code>Ctrl+b 0</code></b>. Generally speaking, issue <b><code>Ctrl+b <window-id></code></b> to go to the window <i><window-id></i>.
+
 
+
You can do much more with tmux, but this is the minimum to know if you want to quickly get started.
+
 
+
== Keyboard Shortcuts ==
+
 
+
{|class="table table-striped"
+
!! Shortcut !! Description
+
|-
+
|| <code>C-b ?</code> || List all keybindings
+
|-
+
|| <code>C-b :</code> || Enter tmux command prompt
+
|-
+
|| <code>C-b d</code> || Detach session
+
|-
+
|| <code>C-b c</code> || Create window
+
|-
+
|| <code>C-b n</code> || Switch to next window
+
|-
+
|| <code>C-b p</code> || Switch to previous window
+
|-
+
|| <code>C-b l</code> || Switch to last window
+
|-
+
|| <code>C-b "</code> || Split current pane into top and bottom
+
|-
+
|| <code>C-b %</code> || Split current pane into left and right
+
|-
+
|| <code>C-b o</code> || Move to next pane
+
|-
+
|| <code>C-b ;</code> || Move to previous pane
+
|-
+
|| <code>C-b [</code> || Enter copy/scroll mode (type <code>q</code> to leave this mode)
+
|}
+
 
+
== Configuration ==
+
=== ~/.tmux.conf ===
+
Example tmux configuration shown below
+
<code>~/.tmux.conf</code> gets loaded on tmux startup.
+
{{file|name=~/.tmux.conf|lang=|desc=tmux configuration|body=
+
set -g base-index 1
+
set -g default-terminal "st-256color"
+
set -g history-limit 4096
+
set -g status-left ''
+
set -g status-right "#[bg=brightblack]#[fg=green] #T "
+
set -g status-style "bg=black"
+
 
+
setw -g pane-base-index 1
+
setw -g window-status-format "#[bg=magenta]#[fg=black] #I #[bg=brightblack]#[fg=green] #W "
+
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=black] #I #[bg=green]#[fg=black] #W "
+
 
+
bind r source-file ~/.tmux.conf
+
 
}}
 
}}
 
+
{{#set:CPU Family={{{CPU Family|}}}|subarch={{{subarch|}}}|CHOST={{{CHOST|}}}|CFLAGS={{{CFLAGS|}}}|USE={{{USE|}}}|CPU Features={{{CPU Features|}}}|Description={{{Description|}}}|title={{{title|}}}}}
{{EbuildFooter}}
+
=== Optimizations ===
 +
__NOTOC__
 +
{{TableStart}}
 +
<tr><td>CHOST</td><td><code>{{{CHOST|}}}</code></td></tr>
 +
<tr><td>CFLAGS</td><td><code>{{{CFLAGS|}}}</code></td></tr>
 +
<tr><td>USE (see [[CPU_FLAGS]] for more info)</td><td>{{#if:{{{USE|}}}|<code>{{{USE}}}</code>|(none)}}</td></tr>
 +
{{TableEnd}}{{#vardefine:subarch|{{{subarch|}}}}}{{#get_web_data:url=http://build.funtoo.org/index.xml|format=xml|use xpath|data=builds=/subarches/subarch[@name='{{{subarch|}}}']/@builds}}{{#vardefine:builds|{{#external_value:builds}}}}
 +
=== Download ===
 +
{{#if:{{#var:builds}}|This section lists the Funtoo Linux builds currently available for download for '''{{{subarch}}}'''.  A full list of Funtoo Linux builds can be found on the [[Subarches]] page.
 +
{{table|1=
 +
<tr><th class="active">Build</th><th class="active">Variant</th><th class="active">Latest Build</th><th class="active">Download</th><th class="active">Browse Mirror</th></tr>{{#arraymaptemplate:{{#var:builds}}|DisplayBuilds|,|}}}}|No downloadable stage builds are currently available for this sub-architecture.}}
 +
{{Important|Do you want a particular build of Funtoo Linux but do not see it here? Let us know what you need, and we will likely add it for you. [https://bugs.funtoo.org Create a bug report] requesting the build you need. To see what options there are, see our [[Corei7|Intel Core i7]] subarch page, which has a lot of builds listed.}}
 +
[[Category:Subarches]]
 +
__NOEDITSECTION__
 +
=== Detailed Description ===
 +
</includeonly>

Revision as of 00:03, March 29, 2015