Created søndag 18 december 2016
Installation
# Local configurations for many of these applications can be found at Github
FROM THE OFFICIAL REPOSITORY
# Install the i3 package group
$ pacman -S i3
# dmenu will launch applications on the fly. Here is a nice drop-in for dmenu
$ pacman -S rofi
# My logout script requires polkit too (Github)
$ pacman -S polkit
# An Authentication Agent helps authenticate the user, and is a common thing in DEs.
$ pacman -S polkit-gnome
# For the $mod+l lock screen you need imagemagick and scrot (Github)
# You also need a icon (https://www.iconfinder.com) and correct it in the i3 config.
$ pacman -S imagemagick scrot
# (Statusbar) The temp. indicator in the statusbar needs lm-sensors
$ pacman -S lm_sensors
# (Statusbar) Battery indicator needs ACPI
$ pacman -S acpi
# (Statusbar) CPU monitor needs sysstat
$ pacman -S sysstat
FROM THE AUR
# You need the i3blocks for your i3status bar
$ yaourt -S i3blocks
# i3-gaps are needed to make a gap between windows, when there's more than 1 window
$ yaourt -S i3-gaps
# The screen locker needs xss-lock (auto lock/ 10min.)
# You can change the background image for the lockscreen in the i3 config
$ yaourt -S xss-lock-git
# You need font-awesome to display icons in the workspace bar
$ yaourt -S ttf-font-awesome
NOTE
# Also install the ttf-font-package that you chose and correct in i3 config.
Configuration
# A complete user guide for i3 can be fount at https://i3wm.org/docs/userguide.htm
# Launch i3 on login with xinitrc. Add the following to your ~/.xinitrc file.
exec i3
# First time i3 is run it'll provide you with a configuration wizard.
# Quit the wizard and copy your config to ~/.config/i3/config
i3status
# Local i3status configuration at Github.
# This file is read from ~/.config/i3status/config (can be defined in i3 configuration)
# A default version of this file can be fount at /etc/i3status.conf
Getting Window Information
# Should you change your applications and want information for key-binding etc
# Install the xorg-xprop package
$ pacman -S xorg-xprop
# Run xprop and watch your cursor turn into a corsair.
# Now click the Window you want information about.
# The WM_CLASS(STRING) = "Navigator", "Firefox" (etc) is probably what you are looking for.
Icons in Workspace bar
# You should have the font-awesome package installed.
# A nice cheat-sheet for these icons can be found here http://fontawesome.io/cheatsheet/
# Then just copy the icon you'd like into the string in the configuration file.
Saving & Restoring Workspace Layout
# Requires perl-anyevent-i3 and perl-json-xs
$ pacman -S perl-anyevent-i3 perl-json-xs
Save Workspace Layout
# Navigate to the workspace
# Then open and arrange the programs the way you'd like it to be restore
# Then save that layout to a json file.
# N = workspace (numeric).
$ i3-save-tree --workspace N > ~/dotfiles/.config/i3/layouts/workspace_N.json
# Once the workspace files has been created, they need to be edited
# Open it with your favorite editor and look for the following
"swallows": [ { // "class": "", // "instance": "", // "title": "", // "transient_for": "" } ]
# We just need class and instance so remove the bottom two lines and comment out the two needed
# Also note the trailing , (comma) after instance - remove this too
"swallows": [ { "class": "", "instance": "" ]
# Note, that the instance variable is for named windows.
# You could ex specify something like; "instance": "Special"
# Now only windows open with the name Special will correspond. Ex; urxvt -name Special
Load Workspace Layout
# Once the workspace layout has been saved (as showed above),
# create a script that will load the layout and run the applications
# Change N accordingly; ~/dotfiles/.config/i3/layouts/load_workspace_N.json
#!/bin/bash # First we append the saved layout to the workspace - Change N accordingly i3-msg "workspace N; append_layout ~/dotfiles/.config/i3/layouts/workspace_N.json" # Then run the programs, Ex (urxvt &) (firefox &) (zim &)
# Make the Shell files executable
$ chmod u+x ~/.config/i3/layouts/load_layout_N.sh
# You can now run the Shell scripts - or add them to your i3 config