Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa |
es:howtos:window_managers:keyboard_layout_in_i3 [2019/08/09 17:04 (UTC)] – [Keyboard Layout in i3] slackwarespanol | es:howtos:window_managers:keyboard_layout_in_i3 [2019/08/09 18:24 (UTC)] (actual) – [Mostrar el diseño activo en el panel] slackwarespanol |
---|
| |
| |
====i3 Window Manager==== | ==== i3 Window Manager ==== |
| |
[[howtos:window_managers:i3wm|i3wm]] does not come with stock Slackware. If you want to install this extremely configurable tiling window manager, please visit [[http://slackbuilds.org/repository/13.37/desktop/i3/|SlackBuilds]]. Make sure you also install [[http://slackbuilds.org/repository/13.37/desktop/i3status/|i3status]], which will let you display all sorts of useful information in a panel. | [[howtos: window_managers: i3wm | i3wm]] no viene con stock Slackware. Si desea instalar este administrador de ventanas de mosaico extremadamente configurable, visite [[http://slackbuilds.org/repository/13.37/desktop/i3/|SlackBuilds]]. Asegúrese de instalar también [[http://slackbuilds.org/repository/13.37/desktop/i3status/|i3status]], que le permitirá mostrar todo tipo de información útil en un panel. |
| ==== Configuración de la distribución del teclado ==== |
| |
====Setting the Keyboard Layout==== | i3 no viene con ningún mecanismo de configuración de teclado incorporado. El comando '' setxkbmap '', sin embargo, funciona bien. Si ha configurado el diseño del teclado en todo el sistema y no necesita cambiar entre diseños, no necesita hacer nada. Si desea configurar el diseño solo para i3, puede editar su archivo '' .xinitrc ''. Si cambia un entorno gráfico con frecuencia y no desea que se sobrescriba el mapa de teclas, debe modificar '' /etc/X11/xinit/xinitrc.i3 ''. |
| |
i3 does not come with any built-in keyboard setting mechanism. The ''setxkbmap'' command, however, does the job well. If you've set the keyboard layout system-wide and do not need to switch between layouts, you do not need to do anything. If you'd like to set the layout just for i3, you can edit its ''.xinitrc'' file. If you change a graphical environment often and you do not want the keymap to be overwritten, you need to modify ''/etc/X11/xinit/xinitrc.i3''. | |
| |
<code># nano /etc/X11/xinit/xinitrc.i3</code> | <code># nano /etc/X11/xinit/xinitrc.i3</code> |
| |
Just before the ''Start i3'' section you can specify the desired keymap (eg. gb): | Justo antes de la sección '' Iniciar i3 '' puede especificar el mapa de teclas deseado (por ejemplo, gb): |
| |
<code>setxkbmap gb</code> | <code>setxkbmap gb</code> |
| |
Save the file and run (as a standard user) xwmconfig and choose i3 to copy the ''xinitrc'' file to your home directory. If you are in X, you might need to restart it. | Guarde el archivo y ejecute (como usuario estándar) xwmconfig y elija i3 para copiar el archivo '' xinitrc '' en su directorio de inicio. Si está en X, es posible que deba reiniciarlo. |
| |
====Changing the Keyboard Layout==== | ==== Cambiar la distribución del teclado ==== |
| |
If you need to switch between different layouts, you can map some keybindings to perform those functions. | Si necesita cambiar entre diferentes diseños, puede asignar algunas combinaciones de teclas para realizar esas funciones. |
| |
1. Open the i3 config file | 1. Abra el archivo de configuración i3 |
| |
<code>nano ~/.i3/config</code> | <code>nano ~/.i3/config</code> |
| |
2. Add the following (it's just an example): | 2. Agregue lo siguiente (es solo un ejemplo): |
| |
Assign ''Mod4'' to the Microsoft key (I use the Microsoft key a lot to avoid clashes with default i3 keybindings): | Asigne '' Mod4 '' a la clave de Microsoft (utilizo mucho la clave de Microsoft para evitar conflictos con las combinaciones de teclas i3 predeterminadas): |
| |
<code>set $ms Mod4</code> | <code>set $ms Mod4</code> |
bindsym $ms+g exec setxkbmap gb</code> | bindsym $ms+g exec setxkbmap gb</code> |
| |
Now <key>MS+d</key> and <key>MS+g</key> let me switch between the UK and German keyboard layouts. | Ahora <key> MS + d </key> y <key> MS + g </key> me permiten cambiar entre los diseños de teclado del Reino Unido y el alemán. |
| |
<note>If you usually switch between two keyboard layouts and you don't need to display the current layout in the status bar, you might also place the following code in your ''~/.i3/config'' file: | <note>Si normalmente cambia entre dos diseños de teclado y no necesita mostrar el diseño actual en la barra de estado, también puede colocar el siguiente código en su archivo '' ~ / .i3 / config '': |
setxkbmap -layout de,gb | setxkbmap -layout de,gb |
setxkbmap -option 'grp:ctrl_alt_toggle' | setxkbmap -option 'grp:ctrl_alt_toggle' |
This will let you toggle between the two layouts using <key>Ctrl</key>+<key>Alt</key>. | Esto le permitirá alternar entre los dos diseños usando <key> Ctrl </key> + <key> Alt </key>. |
</note> | </note> |
| |
====Displaying the Active Layout in the Panel==== | ==== Mostrar el diseño activo en el panel ==== |
| |
i3status comes with a lot of built-in functions. Unfortunately, the current keyboard layout is not one of them. For that reason, you need to write a short script to display the layout in the panel. The default i3status invocation is as follows: | i3status viene con muchas funciones integradas. Desafortunadamente, el diseño actual del teclado no es uno de ellos. Por esa razón, debe escribir una secuencia de comandos corta para mostrar el diseño en el panel. La invocación predeterminada de i3status es la siguiente: |
| |
<code>bar { | <code>bar { |
}</code> | }</code> |
| |
Here all the built-in functionality is configured in ~/.i3status.conf. We want to add some more on top of that and change it to: | Aquí toda la funcionalidad incorporada se configura en ~ / .i3status.conf. Queremos agregar algo más además de eso y cambiarlo a: |
| |
<code>bar { | <code>bar { |
}</code> | }</code> |
| |
The contents of i3script.sh | Los contenidos de i3script.sh |
| |
<code>#!/bin/bash | <code>#!/bin/bash |
done</code> | done</code> |
| |
The above will display the current keyboard layout before the standard i3status functions. Obviously you can add much more to [[howtos:window_managers:i3wm#i3status|i3status]]. | Lo anterior mostrará la distribución actual del teclado antes de que funcione el i3status estándar. Obviamente puedes agregar mucho más a [[es:howtos:window_managers:i3wm#i3status|i3status]]. |
| |
=== Using JSON output format (colors) === | === Uso del formato de salida JSON (colores) === |
The method above uses the simplest output mode (text only). Although easier to use, it lacks color support. For that, you'll need JSON. | El método anterior usa el modo de salida más simple (solo texto). Aunque es más fácil de usar, carece de soporte de color. Para eso, necesitarás JSON. |
| |
Add the following property in your ''.i3status.conf'' | Agregue la siguiente propiedad en su''.i3status.conf'' |
| |
<code>general { | <code>general { |
}</code> | }</code> |
| |
And replace your ''i3script.sh'' for the code below. It displays your default language in green (in the example, ''br'') and any other language in red. | Y reemplace su '' i3script.sh '' por el código a continuación. Muestra su idioma predeterminado en verde (en el ejemplo, '' br '') y cualquier otro idioma en rojo. |
| |
<code>#!/bin/bash | <code>#!/bin/bash |
| |
| |
===== Sources ===== | ===== Fuentes ===== |
* Originally written by [[wiki:user:sycamorex]] | * Originalmente escrito por [[wiki:user:sycamorex]] |
* Contributions by Anonymous | * Contribuciones de Anónimo |
| * Traducido por: [[wiki:user: slackwarespanol | Victor]] 2019/08/09 18:21 (UTC) |
| |
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> |