-
Notifications
You must be signed in to change notification settings - Fork 1
/
i3.txt
146 lines (109 loc) · 5.04 KB
/
i3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2016-12-18T03:20:18+01:00
====== i3 ======
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.**
{{{code: lang="texinfo" linenumbers="True"
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 **
{{{code: lang="texinfo" linenumbers="True"
"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**
{{{code: lang="texinfo" linenumbers="True"
"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//
{{{code: lang="texinfo" linenumbers="True"
#!/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**