Cette semaine, j'ai décidé de tester une nouvelle interface graphique pour ma Debian. J'utilisais Gnome 3 depuis quelques temps, mais je cherchais quelque chose de plus orienté développement. Contrairement à Awesome qui ne m'avais pas paru très pratique, i3wm a su me convaincre très rapidement.
i3wm est une interface graphique pilotable au clavier et un peu inspirée du fonctionnement de Vim avec la possibilité de "splitter" l'écran verticalement ou horizontalement.
Ma configuration est proche de la configuration initiale avec la touche "Windows" comme touche Mod. J'ai principalement ajouté : le Alt+F4 pour quitter les fenêtres, quelques informations dans la barre de statut. La prise en charge des touches screenshot, volume (monter, descendre, muet) et la luminosité de l'écran (cette dernière n'est pas forcément compatible avec votre ordinateur). Pour la gestion du réseau j'utilise WICD.
Sources : http://forum.manjaro.org/index.php?topic=2080.0 (exemples de config) et http://i3wm.org/docs/userguide.html (doc officielle très bien faite).
Mes astuces et configuration GNU/Linux : http://amoweb.fr/static14/gnu-linux
Aide-mémoire des principaux raccourcis
Chez moi Mod = touche "Windows". D'origine, il s'agit de la touche Alt. Notez que je n'ai pas encore eu besoin d'utiliser d'autres raccourcis que ceux décrit ci-dessous.
- Mod + left/right/up/down : se déplacer entre les fenêtres
- Mod+ Shift + left/right/up/down : déplacer la fenêtre
- Mod+f : fullscreen
- Mod+d : barre de lancement d'une nouvelle application
- Mod+enter : lancer un terminal
- Mod+v/h : split horizontal ou vertical (définit où la prochaine fenêtre sera lancé)
- Mod+&/é/"/'/5/-... (touches "chiffres" en minuscule) : changement d'espace de travail
- Mod+Shift+&/é/"/'/5/-... (touches "chiffres" en minuscule) : déplacement de la fenêtre dans un autre espace de travail
- Mod+Shift+A : Fermer la fenêtre (j'ai configuré Alt+F4 avec le même effet)
- Mod+Shift+E : Quitter i3wm
Fichier .i3/config
# This file has been auto-generated by i3-config-wizard(1). # It will not be overwritten, so edit it as you like. # # Should you change your keyboard layout somewhen, delete # this file and re-run i3-config-wizard(1). # # i3 config file (v4) # # Please see http://i3wm.org/docs/userguide.html for a complete reference! set $mod Mod4 # font for window titles. ISO 10646 = Unicode font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod # start a terminal bindsym $mod+Return exec i3-sensible-terminal # kill focused window bindsym $mod+Shift+A kill # start dmenu (a program launcher) bindsym $mod+d exec dmenu_run # change focus bindsym $mod+j focus left bindsym $mod+k focus down bindsym $mod+l focus up bindsym $mod+m focus right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # move focused window bindsym $mod+Shift+J move left bindsym $mod+Shift+K move down bindsym $mod+Shift+L move up bindsym $mod+Shift+M move right # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # split in horizontal orientation bindsym $mod+h split h # split in vertical orientation bindsym $mod+v split v # enter fullscreen mode for the focused container bindsym $mod+f fullscreen # change container layout (stacked, tabbed, default) bindsym $mod+s layout stacking bindsym $mod+z layout tabbed bindsym $mod+e layout default # toggle tiling / floating bindsym $mod+Shift+space floating toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle # focus the parent container bindsym $mod+q focus parent # focus the child container #bindcode $mod+d focus child # switch to workspace bindsym $mod+ampersand workspace 1 bindsym $mod+eacute workspace 2 bindsym $mod+quotedbl workspace 3 bindsym $mod+apostrophe workspace 4 bindsym $mod+parenleft workspace 5 bindsym $mod+minus workspace 6 bindsym $mod+egrave workspace 7 bindsym $mod+underscore workspace 8 bindsym $mod+ccedilla workspace 9 bindsym $mod+agrave workspace 10 # move focused container to workspace bindsym $mod+Shift+1 move container to workspace 1 bindsym $mod+Shift+2 move container to workspace 2 bindsym $mod+Shift+3 move container to workspace 3 bindsym $mod+Shift+4 move container to workspace 4 bindsym $mod+Shift+5 move container to workspace 5 bindsym $mod+Shift+6 move container to workspace 6 bindsym $mod+Shift+7 move container to workspace 7 bindsym $mod+Shift+8 move container to workspace 8 bindsym $mod+Shift+9 move container to workspace 9 bindsym $mod+Shift+0 move container to workspace 10 # reload the configuration file bindsym $mod+Shift+C reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+R restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+E exit # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode # Pressing left will shrink the window’s width. # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. bindsym j resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt bindsym l resize shrink height 10 px or 10 ppt bindsym m resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym 113 resize shrink width 10 px or 10 ppt bindsym 116 resize grow height 10 px or 10 ppt bindsym 111 resize shrink height 10 px or 10 ppt bindsym 114 resize grow width 10 px or 10 ppt # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } focus_follows_mouse no #bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { status_command i3status --config /home/amoweb/.i3/i3status.conf mode hide } # Background exec --no-startup-id feh --bg-center /home/amoweb/Pictures/1522763_10203171953849250_843567283_o.jpg # The good old Alt+F4 bindsym Mod1+F4 kill bindsym Print exec "gnome-screenshot" # Volume control bindsym XF86AudioRaiseVolume exec "amixer set Master 500+" bindsym XF86AudioLowerVolume exec "amixer set Master 500-" bindsym XF86AudioMute exec "amixer set Master toggle" # Brightness bindsym XF86MonBrightnessDown exec "echo $(cat /sys/class/backlight/acpi_video0/brightness)-1 | bc > /sys/class/backlight/acpi_video0/brightness" bindsym XF86MonBrightnessUp exec "echo $(cat /sys/class/backlight/acpi_video0/brightness)+1 | bc > /sys/class/backlight/acpi_video0/brightness" #Screen saver exec --no-startup-id xscreensaver --nosplash # Launch icedove (thunderbird) assign [class="Icedove"] 4 assign [class="Skype"] 4 for_window [class="Skype"] floating enable exec icedove exec skype
Fichier .i3/i3status.conf
general { colors = true interval = 3 } order += "cpu_temperature 0" order += "disk /" order += "wireless wlan0" order += "ethernet eth0" order += "battery 0" order += "cpu_usage" order += "mem_usage" order += "time" cpu_usage { format = " CPU: %usage " } battery 0 { format = " %status %percentage " path = "/sys/class/power_supply/BAT1/uevent" } wireless wlan0 { format_up = "W: (%quality at %essid) %ip" format_down = "W: down" } ethernet eth0 { # if you use %speed, i3status requires root privileges format_up = "E: %ip (%speed)" format_down = "E: down" } time { format = "%Y-%m-%d %H:%M" } load { format = "%1min" } disk "/" { format = "%free" } cpu_temperature 0 { format = "T: %degrees °C" path = "/sys/devices/platform/coretemp.0/temp1_input" }