[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

¡Esta es una revisión vieja del documento!


i3 Administrador de ventanas en mosaico

i3 es un administrador muy ligero, flexible y personalizable window manager con excelente soporte para múltiples monitores. Los administradores de ventanas en mosaico apuntan a maximizar el espacio de la pantalla en mosaico de todas las ventanas abiertas en un modo no superpuesto. Los bordes y botones son prácticamente inexistentes en los administradores de ventanas de mosaico, tienen un aspecto muy minimalista y se centran principalmente en el teclado. Si el concepto de administradores de ventanas en mosaico aún es desconcertante, consulte el i3 oficial screencast.

i3 en Slackware

Slackware no viene con el administrador de ventanas i3. Sin embargo, el proceso de instalación es rápido y fácil. i3 está disponible en SlackBuilds. Tenga en cuenta que debido a una serie de factores, las últimas versiones de i3 no se construirán en versiones ligeramente más antiguas de Slackware:

  • Para los sistemas Slackware anteriores a 14.1, debe instalar i3 versión 4.2.
  • Para Slackware 14.1, la versión más alta de i3 que se compilará sin reemplazar los paquetes de stock de Slackware será i3 4.8.
  • Slackware-current (y posteriormente 14.2) podrá alojar la última versión de i3 (i3wm 4.11)

Puede compilar e instalar las dependencias mediante el tutorial este o mediante sbopkg, un navegador SlackBuild.

i3 Dependencias

Todas las dependencias de i3 también están disponibles en SlackBuilds:

También es muy recomendable instalar i3status y su dependencia confuse.

A partir de la versión 4.8, i3 es capaz de guardar y restaurar sus diseños en espacios de trabajo particulares. Para obtener más información, consulte this.

Si desea utilizar las nuevas funciones, debe instalar más dependencias. Todos ellos están disponibles en Slackbuilds.org:

Iniciando i3

Una vez instalados todos los paquetes, puede salir de X y ejecutar xwmconfig para seleccionar i3 y luego ejecutar startx para iniciar la interfaz gráfica de usuario.

Problemas conocidos

Controlador binario i3 y nVidia

Hasta hace poco, los usuarios de controladores binarios nVidia tenían que agregar el indicador –force-xinerama a su archivo .xinitrc .

# Start i3

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
    exec ck-launch-session i3 --force-xinerama
else
    exec i3
fi

A partir de la versión 302.17 del controlador binario nVidia, ya no es necesario . (Ver más info)

Configuración i3

Cuando inicie i3 por primera vez, será recibido por i3-config-wizard :

You have not configured i3 yet.
Do you want me to generate ~/.i3/config?

<Enter> Yes, generate ~/.i3/config
<Esc>   No, I will use the defaults

Deje que el asistente genere el archivo de configuración. Entonces enfrentarás otro dilema:

Please choose either:

--> <Win>  Win as default modifier
    <Alt>  Alt as default modifier

Afterwards, press

<Enter> to write ~/.i3/config
<ESC>   to abort

Use las teclas Win y Alt para cambiar entre los modificadores y elegir uno de ellos. En este tutorial uso Alt como modificador predeterminado (uso Win para todo tipo de keybindigs personalizados para evitar conflictos con i3 u otras aplicaciones).

Tenga en cuenta que si ha cambiado la distribución del teclado desde que el asistente generó automáticamente el archivo de configuración, es posible que deba volver a visitar el archivo de configuración y modificar manualmente las combinaciones de teclas

Changing i3 Modifier Key(s)

Es fácil cambiar o agregar modificadores i3. Justo en la parte superior del archivo ~ / .i3 / config verá:

Alt as the default modifier:

set $mod Mod1

Or Win as the default modifier:

set $mod Mod4

También puede configurar un modificador secundario asignándolo a una variable (por ejemplo, $ ms ):

set $mod Mod1
set $ms Mod4

Vinculaciones de teclas para las actividades y aplicaciones más comunes

Las siguientes son algunas combinaciones de teclas básicas para ayudarlo a comenzar. Para obtener un mapa completo de las combinaciones de teclas predeterminadas, consulte here o consulte un archivo config muy comentado ubicado en ~ /. i3 / .

Terminal

Al presionar Alt+Return se inicia un terminal que en Slackware se establece por defecto en xterm . Si desea cambiarlo, modifique la siguiente línea:

bindsym $mod+Return exec i3-sensible-terminal

Specify a terminal of your choice:

bindsym $mod+Return exec /usr/bin/urxvt
Cerrar una ventana

Alt+Shift+Q

Go to a Given Workspace

Alt+2

En este caso, vamos al Espacio de trabajo 2 .

Recargar la configuración

Alt+Shift+C

Reiniciar i3

Alt+Shift+R

Salir de i3

Alt+Shift+E

Agregar sus propias combinaciones de teclas

Si desea iniciar Firefox usando Alt+B, agregue lo siguiente a ~ / .i3 / config :

bindsym $mod+b exec /usr/bin/firefox

Abrir otras aplicaciones

La combinación de teclas Alt+D inicia dmenu donde puede escribir el programa que desea ejecutar.

Diseño del teclado

Visite this HOWTO para configurar la distribución del teclado en i3.

Lectura adicional

i3status

i3status is a status bar generator which will help you display all sorts of information.

Once you've started i3, you should see a status bar at the bottom of the screen. To start customising it, copy /etc/i3status.conf to ~/.i3status.conf where you can place your changes. The configuration is pretty straightforward. You can comment out any modules you don't want to be displayed:

# order  = "ipv6"
order += "disk /"
# order += "run_watch DHCP"
# order += "run_watch VPN"
order += "wireless wlan4"
#order += "ethernet eth0"
# order += "battery 0"
# order += "cpu_temperature 0"
order += "load"
order += "time"

You can configure modules in the sections below. For example:

time {
        format = "%d-%m-%Y %H:%M"
}

Custom i3status Display

By default i3status functionality is somewhat limited. The fact that the basic configuration offers only a handful of predefined functions does not, however, prevent you from customising it to include your own scripts.

The most basic method of calling i3status is by including the following code in ~/i3.config:

bar {
        status_command i3status
}

i3status will first look for ~/.i3status.conf and if it is not present, it will read /etc/i3status.conf. You can also manually specify the location of the config file:

status_command i3status --config ~/.i3/scripts/i3status.conf

Instead of calling i3status here, you can run a custom script which will start i3status.

status_command /path/to/my/i3-custom-status.sh

i3-custom-status.sh

#!/bin/sh
# shell script to prepend i3status output with some custom stuff

i3status --config ~/.i3status-secondary.conf | while :
do
        read line
        LG=$(setxkbmap -print | grep xkb_symbols | awk -F"+" '{print $2}') 
        pycom=$(/home/user/.i3/pys.py)
        todo=$(task ls | sed -n '4s/[[:blank:]]\+/ /pg' )
        echo "TODO:$todo | LG: $LG | $pycom | $line" || exit 1
done

The following should give you some idea of how you could adapt it for your own needs:

LG=$(setxkbmap -print | grep xkb_symbols | awk -F"+" '{print $2}')

The current keyboard layout is assigned to variable LG.

pycom=$(/home/user/.i3/pys.py)

The output of a Python script is assigned to variable pycon.

todo=$(task ls | sed -n '4s/[[:blank:]]\+/ /pg' )

The most important task of my todo list (TaskWarrior) is assigned to variable todo.

echo "TODO:$todo | LG: $LG | $pycom | $line" || exit 1

The contents of the variables is sent to the status bar followed by default i3status output.

i3status in a Multi-monitor Setup

You can identify your monitors using the 'xrandr' utility (please note that xrandr is not fully supported with versions older than 302.17 of nVidia binary driver):

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
...
HDMI-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200      60.0*+
...

The active connections are identified as DVI-I-1 and HDMI-0. Knowing this we can configure separate outputs for each display:

bar {
        output DVI-I-1
        status_command i3status
        font -*-terminus-bold-*-normal-*-20-*-*-*-*-*-iso8859-1
        colors {
                background: #002b36
                statusline: #586e75
                focused_workspace: $col3 $col2 $col9
                active_workspace: $col3 $col2 $col16
                inactive_workspace: $col3 $col2 $col3
                urgent_workspace: $col11 $col12 $col13
                }
}

bar {
        output HDMI-0
        status_command /home/user/.i3/scripts/i3status_script.sh
        font -*-terminus-bold-*-normal-*-20-*-*-*-*-*-iso8859-1
}

i3 Support

Apart from excellent documentation both for i3 users and developers, you can also get support in the following places:

  • Subscribe to the mailing list (Browse archives)
  • Join i3 IRC channel (#i3 on irc.twice-irc.de)
  • Register with the recently created stackexchange-like FAQ section (Update: As of 20/12/2015 that site is read only. The i3-related questions have moved to a new place - see the next bullet point)
  • i3wm questions on reddit

Sources

 es:howtos:window_managers:i3wm ()