User Tools

Site Tools


project:i3wm:start

This is an old revision of the document!


Table of Contents

I<3wm

— Template infobox not found.

~~META: status = active &relation firstimage = :project:i3wmfans.png ~~

Motivation

There are lot of windows managers and graphical interfaces. Those used in standart Linux distros are quite usable (most of them) and customizable. MacOS X GUI sux, Windows GUI sux a lot. i3wm is one those you will love if you have a need to have it lightweight, customizable and have at least one evening to discover all the posibilities. We are using i3wm for some time and have a tips and reasons why we love it. This page is intended to be a yet another one place to exchange cool tips on i3wm customizations.

tips'n'tricks

Switch keyboard layout per window

proper Xorg way with a layout flag on each window
  • keyabord layouts will be switched on per window basis
  • you'll get an applet based visual notification of the current layout used
  • each X window will have an layout flag in its corner (doesnt work for Chromium)
  • it will behave properly
  • switching layouts is made using Alt+Shift toggle
sudo wget https://raw.githubusercontent.com/tampakrap/dotfiles/master/.xxkb/cz.xpm -O /usr/share/xxkb/cz.xpm
sudo wget https://raw.githubusercontent.com/tampakrap/dotfiles/master/.xxkb/us.xpm -O /usr/share/xxkb/us.xpm
~/.i3/config
exec_always --no-startup-id xxkb
exec_always --no-startup-id /usr/bin/setxkbmap -layout "us,cz" -option "grp:alt_shift_toggle" 
~/.xxkbrc
XXkb.image.path: /usr/share/xxkb/
XXkb.mainwindow.type: tray
XXkb.group.base: 1
XXkb.group.alt: 2
XXkb.mainwindow.enable: yes
XXkb.mainwindow.geometry: 12x12+0+0
XXkb.mainwindow.image.1: us.xpm
XXkb.mainwindow.image.2: cz.xpm
XXkb.mainwindow.appicon: no
XXkb.mainwindow.label.enable: no
XXkb.button.enable: yes
XXkb.button.image.1: us.xpm
XXkb.button.image.2: cz.xpm
XXkb.button.geometry: 10x10-1+1
XXkb.controls.add_when_start: yes
XXkb.controls.add_when_create: yes
XXkb.controls.add_when_change: no
XXkb.controls.focusout: no

Never ever use “setxkbmap cz && setxkbmap us” or you will broke the setup.

Desktop screenshots

  • PrintScreen to take a screenshot and open it via gimp for the subsequent editation
  • PrintScreen+Shift for silent screenshots
~/.i3/config
# scrot & gimp - root
bindsym Print exec scrot 'screen-%Y-%m-%d-%H:%M:%S_$wx$h.png' -e 'mv $f ~/screenshots/ && gimp ~/screenshots/$f'
# scrot & gimp - select window or rectangle 
bindsym Shift+Print exec scrot 'screen-%Y-%m-%H:%M:%S-%d_$wx$h.png' -s -e 'mv $f ~/screenshots/ && gimp ~/screenshots/$f'

Transparent windows

~/.i3/config
# transparency control                                                                                                          
bindsym $mod+period exec /usr/bin/compton-trans -w $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) -o +5
bindsym $mod+comma exec /usr/bin/compton-trans -w $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) -o -5
exec --no-startup-id /usr/bin/compton -b -CG
project/i3wm/start.1503665617.txt.gz · Last modified: 2017/08/25 12:53 by ruza