From b90fcf83ad15aa30fa9329ae3165e45b9685aecc Mon Sep 17 00:00:00 2001 From: jlecour Date: Wed, 1 Mar 2017 10:31:22 +0100 Subject: [PATCH] astuces --- HowtoI3.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/HowtoI3.md b/HowtoI3.md index bd865519..a8fafd88 100644 --- a/HowtoI3.md +++ b/HowtoI3.md @@ -3,4 +3,49 @@ title: Howto i3, a tiling window manager category: window-manager --- -_TODO_ \ No newline at end of file +_TODO_ + +## Barre d'état + +Une barre d'état est proposée par i3 via la commande `i3status` qui affiche une ligne de texte d'information, mise à jour en continu. + +i3 affiche par défaut cette barre sur tous les écrans, en dessous des "workspaces". + +Via la configuration, il est possible de modifier ce comportement. Par exemple la placer en haut, seulement sur l'écran principal : + +~~~ +bar { + position top + tray_output primary + status_command i3status +} +~~~ + +## Utile + +### Déplacer des "workspaces" sur un autre écran + +Pour déplacer le "workspace" courant sur un autre écran (à placer dans la config de i3) : + +~~~ +bindsym $mod+Control+Shift+Right move workspace to output right +bindsym $mod+Control+Shift+Left move workspace to output left +~~~ + +Si on branche/débranche régulièrement des écrans, il peut être utile d'automatiser le retour de certains "workspaces" sur un écran ajouté : + +~~~{.bash} +# list all worspaces on the internal display, except "worspace 1" (using "jq" for json parsing) +i3_workspaces=$(i3-msg -t get_workspaces | jq '.[] | select(.output == "eDP1" and .num != 1) | .num') +for i in $i3_workspaces; do + i3-msg -q "workspace ${i}; move workspace to output right" +done + +### Faire une capture d'écran + +~~~ +bindsym Print exec scrot -e 'mv $f ~/tmp/ && sxiv ~/tmp/$f' +~~~ + +La commande exécutée est `scrot […]` et il est évidemment possible de la personnaliser ou la remplacer par une autre. +~~~ \ No newline at end of file