rc

Update my i3 config with a fresh new look

Author
Maarten Vangeneugden
Date
Aug. 20, 2018, 3:10 p.m.
Hash
188b6d2265eac0cfe62160cf7916cc2e4ca53c74
Parent
6a82753d293766e4ef4aac5cf302e53b496b0532
Modified files
i3/config
install.sh

i3/config

57 additions and 90 deletions.

View changes Hide changes
1
-
#
2
-
# Copy this to ~/.config/sway/config and edit it to your liking.
3
-
#
4
-
# Read `man 5 sway` for a complete reference.
5
-
6
-
### Variables
7
-
#
8
-
# Logo key. Use Mod1 for Alt.
9
1
set $mod Mod4
10
2
# Home row direction keys, like vim
11
3
set $left h
12
4
set $down j
13
5
set $up k
14
6
set $right l
15
7
# Your preferred terminal emulator
16
8
set $term urxvt
17
9
# Your preferred application launcher
18
10
set $menu rofi -show run 
19
11
20
12
21
13
### Output configuration
22
-
#
23
-
# Default wallpaper (more resolutions are available in /usr/share/sway/)
24
-
#output * bg ~/.wallpapers/Abstract\ with\ lime\ green\ and\ blue\ accents.jpg fill
25
-
#
26
-
# Example configuration:
27
-
#
28
-
#   output HDMI-A-1 resolution 1920x1080 position 1920,0
29
-
#
30
-
# You can get the names of your outputs by running: swaymsg -t get_outputs
31
-
32
-
### Input configuration
33
-
#
34
-
# Example configuration:
35
-
#
36
-
#   input "2:14:SynPS/2_Synaptics_TouchPad" {
37
-
#       dwt enabled
38
-
#       tap enabled
39
-
#       natural_scroll enabled
40
-
#       middle_emulation enabled
41
-
#   }
42
-
#
43
-
# You can get the names of your inputs by running: swaymsg -t get_inputs
44
-
# The escape symbol "\" has to be removed.
45
-
# Read `man 5 sway-input` for more information about this section.
46
-
47
-
### Key bindings
48
-
#
49
-
# Basics:
50
-
#
51
-
    # start a terminal
52
-
    bindsym $mod+Return exec $term
53
-
+
14
bindsym $mod+Return exec $term
+
15
54
16
    # kill focused window
55
-
    bindsym $mod+Shift+q kill
56
-
+
17
bindsym $mod+Shift+q kill
+
18
57
19
    # start your launcher
58
-
    bindsym $mod+d exec $menu
59
-
+
20
bindsym $mod+d exec $menu
+
21
60
22
    # Start GNU Emacs
61
-
    bindsym $mod+m exec emacsclient -nc -s gnuemacs
62
-
+
23
bindsym $mod+m exec emacsclient -nc -s gnuemacs
+
24
63
25
    # Scream in chicken
64
-
    bindsym $mod+p exec mpv ~/Movies/raaaaah.mp4
65
-
+
26
bindsym $mod+p exec mpv ~/Movies/raaaaah.mp4
+
27
66
28
    # Mouse+$mod to drag floating windows
67
-
	floating_modifier $mod
68
-
+
29
floating_modifier $mod
+
30
69
31
    # Lock screen
70
-
    bindsym $mod+i exec i3lock-wrapper
71
-
+
32
bindsym $mod+i exec i3lock-wrapper
+
33
72
34
    # reload the configuration file
73
-
    bindsym $mod+Shift+c reload
74
-
    # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
75
-
    bindsym $mod+Shift+r restart
76
-
# exit i3 (logs you out of your X session)
+
35
bindsym $mod+Shift+c reload
+
36
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
+
37
bindsym $mod+Shift+r restart
+
38
# exit i3 (logs you out of your X session)
77
39
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
78
40
#
79
41
# Moving around:
80
42
#
81
43
    # Move your focus around
82
44
    bindsym $mod+$left focus left
83
45
    bindsym $mod+$down focus down
84
46
    bindsym $mod+$up focus up
85
47
    bindsym $mod+$right focus right
86
48
    # or use $mod+[up|down|left|right]
87
49
    bindsym $mod+Left focus left
88
50
    bindsym $mod+Down focus down
89
51
    bindsym $mod+Up focus up
90
52
    bindsym $mod+Right focus right
91
53
92
54
    # _move_ the focused window with the same, but add Shift
93
55
    bindsym $mod+Shift+$left move left
94
56
    bindsym $mod+Shift+$down move down
95
57
    bindsym $mod+Shift+$up move up
96
58
    bindsym $mod+Shift+$right move right
97
59
    # ditto, with arrow keys
98
60
    bindsym $mod+Shift+Left move left
99
61
    bindsym $mod+Shift+Down move down
100
62
    bindsym $mod+Shift+Up move up
101
63
    bindsym $mod+Shift+Right move right
102
64
#
103
65
# Workspaces:
104
66
#
105
67
    # switch to workspace
106
68
    bindsym $mod+1 workspace 1: MeLA
107
-
    bindsym $mod+2 workspace 2: Bachelor
108
-
    bindsym $mod+3 workspace 3: WAna2
109
-
    bindsym $mod+4 workspace 4: MatTech
110
-
    bindsym $mod+5 workspace 5: Diary
111
-
    bindsym $mod+6 workspace 6
+
69
    bindsym $mod+2 workspace 2
+
70
    bindsym $mod+3 workspace 3
+
71
    bindsym $mod+4 workspace 4
+
72
    bindsym $mod+5 workspace 5
+
73
    bindsym $mod+6 workspace 6
112
74
    bindsym $mod+7 workspace 7
113
75
    bindsym $mod+8 workspace 8
114
76
    bindsym $mod+9 workspace 9: Website
115
-
    bindsym $mod+0 workspace 10: Leisure
+
77
    bindsym $mod+0 workspace 10: Leisure
116
78
    # move focused container to workspace
117
79
    bindsym $mod+Shift+1 move container to workspace 1: MeLA
118
-
    bindsym $mod+Shift+2 move container to workspace 2: Bachelor
119
-
    bindsym $mod+Shift+3 move container to workspace 3: WAna2
120
-
    bindsym $mod+Shift+4 move container to workspace 4: MatTech
121
-
    bindsym $mod+Shift+5 move container to workspace 5: Diary
122
-
    bindsym $mod+Shift+6 move container to workspace 6
+
80
    bindsym $mod+Shift+2 move container to workspace 2
+
81
    bindsym $mod+Shift+3 move container to workspace 3
+
82
    bindsym $mod+Shift+4 move container to workspace 4
+
83
    bindsym $mod+Shift+5 move container to workspace 5
+
84
    bindsym $mod+Shift+6 move container to workspace 6
123
85
    bindsym $mod+Shift+7 move container to workspace 7
124
86
    bindsym $mod+Shift+8 move container to workspace 8
125
87
    bindsym $mod+Shift+9 move container to workspace 9: Website
126
-
    bindsym $mod+Shift+0 move container to workspace 10: Leisure
+
88
    bindsym $mod+Shift+0 move container to workspace 10: Leisure
127
89
    # Note: workspaces can have any name you want, not just numbers.
128
90
    # We just use 1-10 as the default.
129
91
#
130
92
# Layout stuff:
131
93
#
132
94
    # You can "split" the current object of your focus with
133
95
    # $mod+b or $mod+v, for horizontal and vertical splits
134
96
    # respectively.
135
97
    bindsym $mod+b split h
136
98
    bindsym $mod+v split v
137
99
138
100
    # Switch the current container between different layout styles
139
101
    bindsym $mod+s layout stacking
140
102
    bindsym $mod+w layout tabbed
141
103
    bindsym $mod+e layout toggle split
142
104
143
105
    # Make the current focus fullscreen
144
106
    bindsym $mod+f fullscreen toggle
145
107
146
108
    # Toggle the current focus between tiling and floating mode
147
109
    bindsym $mod+Shift+space floating toggle
148
110
149
111
    # Swap focus between the tiling area and the floating area
150
112
    bindsym $mod+space focus mode_toggle
151
113
152
114
    # move focus to the parent container
153
115
    bindsym $mod+a focus parent
154
116
#
155
-
# Scratchpad:
156
-
#
157
-
    # Sway has a "scratchpad", which is a bag of holding for windows.
158
-
    # You can send windows there and get them back later.
159
-
160
117
    # Move the currently focused window to the scratchpad
161
-
    bindsym $mod+Shift+minus move scratchpad
162
-
+
118
#bindsym $mod+Shift+minus move scratchpad
+
119
#bindsym $mod+minus scratchpad show
+
120
163
121
    # Show the next scratchpad window or hide the focused scratchpad window.
164
-
    # If there are multiple scratchpad windows, this command cycles through them.
165
-
    bindsym $mod+minus scratchpad show
166
-
#
167
-
# Resizing containers:
168
122
#
169
123
mode "resize" {
170
124
    # left will shrink the containers width
171
125
    # right will grow the containers width
172
126
    # up will shrink the containers height
173
127
    # down will grow the containers height
174
128
    bindsym $left resize shrink width 10 px or 10 ppt
175
129
    bindsym $down resize grow height 10 px or 10 ppt
176
130
    bindsym $up resize shrink height 10 px or 10 ppt
177
131
    bindsym $right resize grow width 10 px or 10 ppt
178
132
179
133
    # ditto, with arrow keys
180
134
    bindsym Left resize shrink width 10 px or 10 ppt
181
135
    bindsym Down resize grow height 10 px or 10 ppt
182
136
    bindsym Up resize shrink height 10 px or 10 ppt
183
137
    bindsym Right resize grow width 10 px or 10 ppt
184
138
185
139
    # return to default mode
186
140
    bindsym Return mode "default"
187
141
    bindsym Escape mode "default"
188
142
}
189
143
bindsym $mod+r mode "resize"
190
144
191
145
# --recursive allows subdirectories to contain wallpapers as well, which is nice
192
146
# if you want to organize.
193
147
# --randomize chooses a different wallpaper for each screen (and of course,
194
148
# randomizes during startup)
195
149
# --bg-scale scales the wallpaper to fit the screen, so any 16:9 wallpaper is
196
150
# scaled to fit, instead of staying oversized.
197
151
exec_always feh --recursive --randomize --bg-scale ~/.wallpapers/* 
198
152
exec compton -b
199
153
exec polybar top
200
-
+
154
bar {
+
155
    status_command i3status
+
156
    font pango:Ubunto 10
+
157
    tray_padding 5
+
158
    colors {
+
159
        background #444444
+
160
        focused_workspace #F98C0E #F98C0E #333333
+
161
        active_workspace #19ea12 #19ea12 #FFFFFF
+
162
        inactive_workspace #232323 #111111 #888888
+
163
        urgent_workspace #D50000 #D50000 #FFFFFF
+
164
    }
+
165
}
+
166
201
167
202
168
# Makes my FN buttons work properly.
203
169
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
204
170
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
205
171
bindsym XF86AudioToggle exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
206
172
207
173
bindsym XF86MonBrightnessDown exec light -U 5
208
174
bindsym XF86MonBrightnessUp exec light -A 5
209
175
bindsym Print exec scrot  # Printscreen button
210
176
bindsym $mod+Print exec scrot -s  # scrot, but click for window, or drag for rectangle screenshot.
211
177
212
178
213
179
# Font settings
214
180
font pango:Ubuntu Regular 11
215
181
216
182
# Border settings
217
183
#hide_edge_borders both
218
-
+
184
default_border normal
+
185
219
186
# Color settings (yeah Material Design, I know, don't judge)
220
-
+
187
221
188
client.focused          #283593 #283593 #ffffff #283593 #283593
222
-
client.focused_inactive #5C6BC0 #5C6BC0 #FFFFFF #5C6BC0 #5C6BC0
223
-
client.unfocused        #9FA8DA #9FA8DA #000000 #9FA8DA #9FA8DA
224
-
client.urgent           #D50000 #D50000 #ffffff #D50000 #D50000
+
189
client.focused_inactive #f9be7a #f9be7a #FFFFFF #f9be7a #f9be7a
+
190
client.unfocused        #444444 #444444 #FFFFFF #444444 #444444
+
191
client.urgent           #D50000 #D50000 #ffffff #D50000 #D50000
225
192
#client.placeholder
226
193
227
194
# Stops the mouse defining what the active window is.
228
195
focus_follows_mouse no
229
196
230
197
# i3-gaps configuration
231
198
#
232
199
# i3-gaps can only work properly if title bars are completely disabled, which the
233
200
# next line is responsible for.
234
201
for_window [class="^.*"] border pixel 5
235
-
+
202
236
203
gaps inner 15
237
-
gaps outer 5
238
-
# smart_gaps disables gaps if there is only 1 container on the workspace.
+
204
#gaps outer 5
+
205
# smart_gaps disables gaps if there is only 1 container on the workspace.
239
206
smart_gaps on
240
-
# smart_borders does the same thing. If set to "on", it will always disable the
+
207
# smart_borders does the same thing. If set to "on", it will always disable the
241
208
# border if it's the only container on the workspace. If set to "no-gaps", it
242
209
# only disables the border if the gap size to the edge of the screen is 0.
243
210
smart_borders no_gaps
244
-
smart_borders no_gaps
+
211
#smart_borders no_gaps

install.sh

1 addition and 1 deletion.

View changes Hide changes
1
1
# particulary Arch, because that's the best GNU/Linux distro =P
2
2
3
3
# The next command will install the software that I'm bound to use on my PC.
4
4
sudo pacman -S --noconfirm neovim base-devel rust vlc openssh emacs 
5
5
# Don't forget to install the keys for SSH!
6
6
7
7
# Installing Spacemacs because it's bae as fuck
8
8
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
9
9
10
10
# Installing shell data:
11
11
sudo pacman -S --noconfirm zsh zsh-completions zsh-grml-config
12
12
13
13
# Installing the Noto fonts:
14
14
sudo pacman -S --noconfirm noto-fonts noto-fonts-emoji
15
15
# Firefox:
16
16
sudo pacman -S --noconfirm firefox
17
17
# Uncomment next line for Dutch firefox translations.
18
18
#sudo pacman -S --noconfirm firefox-i18n-nl
19
19
# I've ditched Firefox in favor of Chromium, because Chromium doesn't vomit when confronted with XWayland.
20
20
#sudo pacman -S --noconfirm chromium
21
21
22
22
# Sound handling (Don't forget to unmute using alsamixer!)
23
23
sudo pacman -S --noconfirm alsa-utils pulseaudio pulseaudio-jack pulseaudio-bluetooth
24
24
25
25
# To easily make use of the AUR, I'll first install Pacaur, which needs some
26
26
# special treatment up front:
27
27
cd ~/Downloads
28
28
wget https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz
29
29
tar -x -f pacaur.tar.gz
30
30
cd pacaur
31
31
makepkg -sri --noconfirm
32
32
cd ..
33
33
rm -r pacaur
34
34
cd ~
35
35
36
36
# Making a directory in which to store all repositories. It's basically a
37
37
# repository for repositories =3
38
38
mkdir Repositories
39
39
40
40
# Making some common aliases for some pieces of software
41
41
alias vi nvim
42
42
alias vim nvim
43
43
44
44
# Some Python dependencies that need to be installed
45
45
pip install paramiko
46
46
47
47
# Collecting software from the AUR:
48
48
pacaur -S vim-youcompleteme-git
49
49
pacaur -S clojure leiningen  # Clojure's 'project manager' thingy + Clojure
50
50
# Next line installs all required software for the desktop environment.
51
51
pacaur -S i3-gaps feh rofi compton i3lock-wrapper
52
52
# Installing Polybar and i3ipc-glib-git because the first one is awesome, the
53
53
# second one (allegedly) necessary for i3 interaction for Polybar:
54
54
pacaur -S --noconfirm polybar i3ipc-glib-git
55
-
# i3blocks optional dependencies:
+
55
# i3blocks optional dependencies:
56
56
pacaur -S acpi bc lm_sensors playerctl sysstat
57
57
# A terminal emulator:
58
58
pacaur -S --noconfirm rxvt-unicode
59
59
# Also, DO NOT use Termite. It's an awful thing to work with NeoVim, and slows
60
60
# down to a fucking tortoise speed.
61
61
62
62
# Now, assuming I'm using the my standard setup for Yabar, I need the JSON
63
63
# parser to correctly output my workspace name:
64
64
pacaur -S --noconfirm jq
65
65
66
66
# Uncomment when there is a driver for the Validity VFS495 138a:003f figerprint
67
67
# reader, and still working on that gorgeous laptop:
68
68
#pacaur -S --noconfirm fprintd
69
69
70
70
pacaur -S --noconfirm rsync  # Used for backing up data that can't be done properly with Git
71
71
pacaur -S --noconfirm neomutt urlview  # Least sucky mail client
72
72
73
73
# Installing CRON job services
74
74
pacaur -S --noconfirm cronie
75
75
# TODO Add a line that makes a symbolic link to my custom Cron file
76
76
sudo systemctl enable cronie.service
77
77
78
78
pacaur -S --noconfirm irssi  # IRC client
79
79
pacaur -S --noconfirm ranger w3m  # File manager. w3m for image previews
80
80
# TODO link ranger/rc.conf and scope.sh symbolically to .config/ranger
81
81
82
82
# Fonts
83
83
# Now I don't like Ubuntu, but their fonts are amazing.
84
84
pacaur -S --noconfirm ttf-ubuntu-font-family ttf-hack ttf-fira-code
85
85
86
86
# MPV is used for playing videos, and is required when using the 'Watch with
87
87
# MPV' plugin for Firefox. It's way more lightweight, and I don't get why both
88
88
# Chrome and Firefox don't do this automatically, and default to software
89
89
# decoding instead on the hardware GPU.
90
90
pacaur -S --noconfirm mpv youtube-dl-git
91
91