I3wm

From campisano.org
Jump to navigation Jump to search

I3 window manager

Install

apt-get install i3 rofi

Setup

i3wm as default env:

  • A graphic login managers like xdm (or slim, lightdm, etc) can be used. They will start your session as defined in ~/.xsession file.

So, to start i3 as default window manager:

echo "exec i3 $@" > ~/.xsession
chmod 750 ~/.xsession

However, a more complete configurantion can setup keyboard layout, wireless, bluetooth and audio tray icons, defines touchpad settings, display a background and so on, like in the follow example:

source ~/.bashrc

bash -c "
sleep 5s                # start after X
#
# X Settings
setxkbmap br, it, us    # keyboard layout
xset -b                 # disable pc speaker bell
# configuring mackbook pro touchpad
synclient\
 VertTwoFingerScroll=1 HorizTwoFingerScroll=1\
 TapButton1=1 TapButton2=3 TapButton3=2
#
# Monitor
nice -10 conky &
#
# Applets
nice -5 nm-applet &                     # wireless gnome applet
#nice -5 wicd-client -t &                # wireless alternative applet
nice -5 blueman-applet &                # bluetooth applet
nice -5 pnmixer &                       # pulse audio applet
#
# Background
#feh --bg-scale /home/shared/graphics/backgrounds/i3wm\ 800x600.png
xsetroot -solid '#3B4E3E'               # set a solid color background
" &
#
# finally, the X manager
mv ~/.i3.log ~/.i3.log.old
exec i3 -V $@ >> ~/.i3.log 2>&1

Config

  • brightness control by keyboard

first install a brightness utility like brightnessctl or light

apt-get install brightnessctl

then configure the keyboard in ~/.config/i3/config like

# manage brightness
bindsym XF86MonBrightnessUp exec brightnessctl s '+10%'
bindsym XF86MonBrightnessDown exec brightnessctl s '10%-'
  • lock screen

first install xss-lock and i3lock

apt-get install xss-lock i3lock

then configure the locker process in ~/.config/i3/config like

# start screen locker
# from https://www.reddit.com/r/i3wm/comments/zusjb3/comment/j1lfos3/
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c 04090e --nofork

please remember, /etc/shadow should be of the group shadow

Setup DPI resolution

See DPI resolution

and setup .config/i3/config

# font for window titles (and bar unless a different def in the bar {} block)
font xft:DejaVu Sans Mono 10


# start dmenu (a program launcher)
bindsym $mod+d exec "rofi -show run -lines 30 -sidebar-mode -font \\"DejaVu Sans Mono 12\\" -terminal xterm -run-shell-command '{terminal} -e \\" {cmd}; read -n 1 -s\\"'"

Dual monitor

See DualMonitor

References