I added a lot of things. A summary:
- Added .xinitrc - Renamed sway/config to i3/config, because, even though Wayland is awesome, it just can't make up for the amount of bugs that come from the X11 incompatibility, even through XWayland. - Moved the .vimrc runtime path to adhere to XDG_CONFIG_PATH guidelines. - install.sh: Added a couple of comment lines about what else to do, and new installations for other software I frequently use. - termite.conf: Since I'm back on X11, Termite is now my go to terminal again. I added a config file that sets the right font type. - yabar.conf: A lot. It now is (almost) completely how I want it to be, so that's a plus. Also tweaked it a bit so it correctly outputs my current workspace (tiny bug when using i3).
- Author
- Maarten 'Vngngdn' Vangeneugden
- Date
- Nov. 23, 2016, 3:42 p.m.
- Hash
- 2c7f0ffb1547ba73f65b13a32ee2331fb6c1a018
- Parent
- 3683e27ab59c2595a831f6d47a3e6295fcc937c4
- Modified files
- .vimrc
- .xinitrc
- sway/config → i3/config
- install.sh
- termite.conf
- yabar.conf
.vimrc ¶
1 addition and 1 deletion.
View changes Hide changes
1 |
1 |
" Some details on the contents: |
2 |
2 |
" This file is my personal Vim configuration file. It contains my plugins, is |
3 |
3 |
" divided to subject, and fattened with lovely comments. |
4 |
4 |
" Please be advised that some (obvious) settings are left out, because I |
5 |
5 |
" actually only use NeoVim. Again, this is my PERSONAL file, not a 'general |
6 |
6 |
" public Vi(m) compatible' file. |
7 |
7 |
|
8 |
8 |
" VUNDLE {{{ |
9 |
9 |
" Vundle is used to manage plugins for Vim. It needs additional setup, so it |
10 |
10 |
" gets priority in my .vimrc. |
11 |
11 |
|
12 |
12 |
filetype off " required |
13 |
13 |
|
14 |
14 |
" set the runtime path to include Vundle and initialize |
15 |
15 |
set rtp+=~/.vim/bundle/Vundle.vim |
16 |
- | call vundle#begin() |
+ |
16 |
call vundle#begin() |
17 |
17 |
|
18 |
18 |
" let Vundle manage Vundle, required |
19 |
19 |
Plugin 'VundleVim/Vundle.vim' |
20 |
20 |
|
21 |
21 |
" YCM is a plugin that allows Vim semantic type checking and more programming mumbo jumbo. It is godlike and it must always be there for me. |
22 |
22 |
Plugin 'Valloric/YouCompleteMe' |
23 |
23 |
|
24 |
24 |
" Java is a holy language, and because of its holiness, it requires an onslaught |
25 |
25 |
" of bloat software on your PC to even get a bit of semantic autocompletion. |
26 |
26 |
" I've found a project which (at least) works without having to install Eclipse, |
27 |
27 |
" Eclim, and whatever else you need. This is that tool. |
28 |
28 |
Plugin 'artur-shaik/vim-javacomplete2' |
29 |
29 |
|
30 |
30 |
" Neomake replaces Syntastic from now on. It's an asynchronous linter, so yeah, |
31 |
31 |
" pretty cool and must-have. |
32 |
32 |
Plugin 'neomake/neomake' |
33 |
33 |
|
34 |
34 |
" Airline provides a neat and feature rich status bar. Really nice to have. |
35 |
35 |
Plugin 'bling/vim-airline' |
36 |
36 |
|
37 |
37 |
" Bufferline will show buffers in the status bar. There's enough room anyway, so I fancied having it. |
38 |
38 |
Plugin 'bling/vim-bufferline' |
39 |
39 |
|
40 |
40 |
" A fuzzy searcher. Just CTRL+P and BAM all your files are visible. |
41 |
41 |
Plugin 'kien/ctrlp.vim' |
42 |
42 |
|
43 |
43 |
" This is a plugin for Git interaction. It places added and removed line icons |
44 |
44 |
" in the 'gutter' (the bar next to the line numbering). It's better than |
45 |
45 |
" Fugitive, because not only does it provide something you don't have with it |
46 |
46 |
" (visible change lines), Fugitive offers functionality I rarely use (Git |
47 |
47 |
" commands from Vim, which I ALWAYS do in the standard TUI), and it has |
48 |
48 |
" provisions for NeoVim's asynchronous abilities. |
49 |
49 |
Plugin 'airblade/vim-gitgutter' |
50 |
50 |
|
51 |
51 |
" This provides snippets for redundant code. Praise the hackers man. |
52 |
52 |
Plugin 'SirVer/ultisnips' |
53 |
53 |
|
54 |
54 |
" In addition to UltiSnips, this plugin contains a prefetched repository of snippets. Must have, because I'm not planning on writing all of those by myself. |
55 |
55 |
Plugin 'honza/vim-snippets' |
56 |
56 |
|
57 |
57 |
" Rust syntax files, including Syntastic integration: |
58 |
58 |
" To be removed when these are added to (Neo)Vim 'upstream'. |
59 |
59 |
Plugin 'rust-lang/rust.vim' |
60 |
60 |
|
61 |
61 |
" All of your Plugins must be added before the following line |
62 |
62 |
call vundle#end() " required |
63 |
63 |
filetype plugin indent on " required |
64 |
64 |
" }}} |
65 |
65 |
|
66 |
66 |
" YOUCOMPLETEME {{{ |
67 |
67 |
" YouCompleteMe is a godlike completer for Vim. As such, it is worthy of its own section. |
68 |
68 |
" However, I'll be trying out Deoplete in the future, which might render it |
69 |
69 |
" obsolete. Until further notice, I'm keeping this beauty. |
70 |
70 |
" |
71 |
71 |
" This setting will force YCM to close the preview buffer after selecting the completion. |
72 |
72 |
let g:ycm_autoclose_preview_window_after_completion=1 |
73 |
73 |
|
74 |
74 |
" Sets the symbol used to indicate a syntax error: |
75 |
75 |
let g:ycm_error_symbol = '>>' |
76 |
76 |
|
77 |
77 |
" Sets the symbol used to indicate a warning: |
78 |
78 |
let g:ycm_warning_symbol = 'i' |
79 |
79 |
|
80 |
80 |
" Fills the identifier completion database with the language's keywords (e.g., when starting a new Java file, "class" will already be in the completion engine. |
81 |
81 |
let g:ycm_seed_identifiers_with_syntax = 1 |
82 |
82 |
|
83 |
83 |
" This setting tells YCM what keys to use to accept completion. I removed <Down> as default, because I'm a silly coder and still use my arrow keys to navigate my source files. Hey, years of negligence for Vim leaves its marks. To think I ever thought Notepad++ was the best editor ever, the fuck... |
84 |
84 |
let g:ycm_key_list_select_completion=['<TAB>'] |
85 |
85 |
|
86 |
86 |
" Same reason; I'm a dumb fuck and arrows are still hardwired in my brain. |
87 |
87 |
let g:ycm_key_list_previous_completion=['<S-TAB>'] |
88 |
88 |
|
89 |
89 |
" Configures the pointer to the ycm_extra_conf.py file. |
90 |
90 |
let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py' |
91 |
91 |
let g:ycm_confirm_extra_conf = 0 " Disables security confirmation before loading the conf.py file. |
92 |
92 |
|
93 |
93 |
" Configuration necessary for sematic Rust completion |
94 |
94 |
let g:ycm_rust_src_path = '/usr/src/rust/src' |
95 |
95 |
" }}} |
96 |
96 |
" |
97 |
97 |
" JAVACOMPLETE {{{ |
98 |
98 |
" Refraining from having to use Eclim and all the junk that attaches itself to |
99 |
99 |
" it, means I have to use something else. Vim-javacomplete2 is that thing, but |
100 |
100 |
" it has some additional settings that need to be set, in order to use it |
101 |
101 |
" properly. |
102 |
102 |
" |
103 |
103 |
" Required; tell Vim that there's a completer for Java files: |
104 |
104 |
autocmd FileType java setlocal omnifunc=javacomplete#Complete |
105 |
105 |
" Stops adding closing braces, which conflicts with my way of thinking, which |
106 |
106 |
" is: If I didn't hit the key for it, why the fuck is it on my screen. |
107 |
107 |
let g:JavaComplete_ClosingBrace = 0 |
108 |
108 |
" JavaComplete uses a cache, which I can totally understand, because Java. I've |
109 |
109 |
" set it to something more reasonable: |
110 |
110 |
let g:JavaComplete_BaseDir = '~/.vim/.javacomplete-cache' |
111 |
111 |
" |
112 |
112 |
" TODO: javacomplete2 has a list of "default keymappings" on its GitHub page. |
113 |
113 |
" It's possible that I'll have to delete these later. If so, refer to |
114 |
114 |
" https://github.com/artur-shaik/vim-javacomplete2#required |
115 |
115 |
" }}} |
116 |
116 |
" |
117 |
117 |
" NEOMAKE {{{ |
118 |
118 |
" This setting lets Neomake run on every file write: |
119 |
119 |
autocmd! BufWritePost * Neomake |
120 |
120 |
" }}} |
121 |
121 |
" |
122 |
122 |
" GITGUTTER {{{ |
123 |
123 |
" Disables all keymappings of GitGutter. I don't use them anyway. |
124 |
124 |
let g:gitgutter_map_keys = 0 |
125 |
125 |
" Sets the 'refresh time' of when to update. Standard is 4 seconds. |
126 |
126 |
set updatetime=250 |
127 |
127 |
" Asynchronous updating is default, so no setting is needed. Check the FAQ if |
128 |
128 |
" necessary for more information. |
129 |
129 |
" }}} |
130 |
130 |
" |
131 |
131 |
" AIRLINE {{{ |
132 |
132 |
" Airline is a great status bar plugin. Although it can behave quirky if Powerline is not on the scene. These scripts are dedicated to handle that behavior. |
133 |
133 |
|
134 |
134 |
" These lines will load the powerline font for use in Airline. |
135 |
135 |
if !exists('g:airline_symbols') |
136 |
136 |
let g:airline_symbols={} |
137 |
137 |
endif |
138 |
138 |
let g:airline_symbols.space="\ua0" |
139 |
139 |
let g:airline_powerline_fonts=1 |
140 |
140 |
|
141 |
141 |
" If there is only one tab opened, the tab bar will display the different buffers. |
142 |
142 |
let g:airline#extensions#tabline#enabled=1 |
143 |
143 |
let g:bufferline_echo = 0 " Disables automatic echoing to the bufferline. |
144 |
144 |
|
145 |
145 |
" }}} |
146 |
146 |
|
147 |
147 |
" ULTISNIPS {{{ |
148 |
148 |
" As mentioned earlier, this provides snippets to stop redundant code. |
149 |
149 |
|
150 |
150 |
" To begin, changing default TAB, because YCM already uses TAB. |
151 |
151 |
let g:UltiSnipsExpandTrigger="<c-l>" |
152 |
152 |
let g:UltiSnipsJumpForwardTrigger="<c-j>" |
153 |
153 |
let g:UltiSnipsJumpBackwardTrigger="<c-k>" |
154 |
154 |
|
155 |
155 |
" }}} |
156 |
156 |
" |
157 |
157 |
" COLOURS & COLORS {{{ |
158 |
158 |
|
159 |
159 |
colorscheme molokai " I like molokai. I've used badwolf, but I like popping colors. |
160 |
160 |
|
161 |
161 |
" }}} |
162 |
162 |
|
163 |
163 |
" SPACES & TABS {{{ |
164 |
164 |
|
165 |
165 |
" The number of visual spaces per TAB hit. |
166 |
166 |
set tabstop=4 |
167 |
167 |
|
168 |
168 |
" Setting the amount of tabs to 4. The default is 8. |
169 |
169 |
set shiftwidth=4 |
170 |
170 |
|
171 |
171 |
" This breaks lines after column 80. |
172 |
172 |
set textwidth=80 |
173 |
173 |
" }}} |
174 |
174 |
|
175 |
175 |
" UI CONFIGURATION {{{ |
176 |
176 |
|
177 |
177 |
" The next 2 settings enable relative line numbering, but retain the absolute |
178 |
178 |
" line numbering for the line currently selected by the cursor. |
179 |
179 |
set number |
180 |
180 |
set relativenumber |
181 |
181 |
set cursorline " Highlights the line currently selected by the cursor. |
182 |
182 |
filetype indent on " Detects filetype on load, and loads the appropriate syntax file. |
183 |
183 |
set showmatch " Highlights matching parenthesis on hover ("[, {, ..."). |
184 |
184 |
" scrolloff tells Vim how much lines above/below the cursor should always be |
185 |
185 |
" visible. For example, if set to 5, there will always be 5 lines below and |
186 |
186 |
" above the cursor, except when reaching the EOF. |
187 |
187 |
set scrolloff=5 |
188 |
188 |
" Next setting disables outputting the current mode to the last line. I did so, |
189 |
189 |
" because I use Airline, which already prints the current mode. |
190 |
190 |
set noshowmode |
191 |
191 |
" }}} |
192 |
192 |
|
193 |
193 |
" SEARCHING {{{ |
194 |
194 |
|
195 |
195 |
" Problem with hlsearch is that it does not turn off the highlighting. So searching for vowels may quickly result in everything being highlighted. This is a mapping. It will remove highlighting when entering \<SPACE> |
196 |
196 |
nnoremap <leader><space> :nohlsearch<CR> |
197 |
197 |
" }}} |
198 |
198 |
|
199 |
199 |
" FOLDING {{{ |
200 |
200 |
" In case I forget (I'm Belgian), folding is hiding code parts that belong together, like functions. Très important. Fuck azerty. |
201 |
201 |
|
202 |
202 |
" This enables folding as is. |
203 |
203 |
set foldenable |
204 |
204 |
|
205 |
205 |
" This setting determines how many folds have to be opened. The number indicates the folding level. So 0 = every possible folding is folded. 99 = practically everything is open. I'm using 10, since I already have a problem with more than 3 nested loops. |
206 |
206 |
set foldlevelstart=10 |
207 |
207 |
|
208 |
208 |
" This setting blocks overuse of nested foldings. I don't know how this will turn out in LISP/Scheme, but I'll be damned if this setting does more harm than good. |
209 |
209 |
set foldnestmax=10 |
210 |
210 |
|
211 |
211 |
" This setting is commented by default, but included in case I start to grow hate for the current way Vim handles folding (za). It basically maps that command to spacebar. I may map it to z because then I only have to type one letter and RETURN, that's 33% of my time saved! =3 |
212 |
212 |
"nnoremap <space> za |
213 |
213 |
|
214 |
214 |
" }}} |
215 |
215 |
|
216 |
216 |
" MOVEMENT {{{ |
217 |
217 |
|
218 |
218 |
" Up and down moving in Vim using j/k defaults to "physical line movement", i.e. |
219 |
219 |
" if a line is too long, it's wrapped to the next line ("virtual lines"), but |
220 |
220 |
" the line counter still regards it as 1 line. |
221 |
221 |
" The next setting makes it so that, if j/k is pressed once, it moves over |
222 |
222 |
" virtual lines, but when repeated (say "5dd"), it moves over physical lines. |
223 |
223 |
" Basically, the perfect tradeoff solution when using relative line numbering. |
224 |
224 |
noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j') |
225 |
225 |
noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k') |
226 |
226 |
" Next 4 lines disable arrow keys. |
227 |
227 |
noremap <Up> <nop> |
228 |
228 |
noremap <Down> <nop> |
229 |
229 |
noremap <Left> <nop> |
230 |
230 |
noremap <Right> <nop> |
231 |
231 |
" }}} |
232 |
232 |
|
233 |
233 |
" BACKING UP {{{ |
234 |
234 |
|
235 |
235 |
" What these lines do, is move the backup files to the /tmp folder. This will keep my directories clean and neat. |
236 |
236 |
set backup |
237 |
237 |
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp |
238 |
238 |
set backupskip=/tmp/*,/private/tmp/* |
239 |
239 |
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp |
240 |
240 |
set writebackup |
241 |
241 |
" }}} |
242 |
242 |
" |
243 |
243 |
" NEOVIM {{{ |
244 |
244 |
" While it certainly is an improvement over 'vanilla' Vim, it does some things |
245 |
245 |
" that keep me from using Vim as it's supposed to be; limited to no mouse usage. |
246 |
246 |
" So I disable it. I'll enable it again when I've twisted my mind far enough to |
247 |
247 |
" not touch my mouse again. (Not to mention some terminals don't support mouse |
248 |
248 |
" control, so it's a bad habit nonetheless if you spend all your time on |
249 |
249 |
" GNU/Linux distros) |
250 |
250 |
set mouse="" |
251 |
251 |
" }}} |
252 |
252 |
" |
253 |
253 |
" MACROS {{{ |
254 |
254 |
" Function that allows to quickly switch between relative and absolute numbering using |
255 |
255 |
" CTRL+N(umber). |
256 |
256 |
function! NumberToggle() |
257 |
257 |
if(&relativenumber == 1) |
258 |
258 |
set norelativenumber " Necessary to disable the previous behavior. |
259 |
259 |
set number |
260 |
260 |
else |
261 |
261 |
set number " Retains absolute number on the current line. |
262 |
262 |
set relativenumber |
263 |
263 |
endif |
264 |
264 |
endfunc |
265 |
265 |
nnoremap <C-n> :call NumberToggle()<cr> |
266 |
266 |
" }}} |
267 |
267 |
" OTHER IMPORTANT STUFF {{{ |
268 |
268 |
|
269 |
269 |
|
270 |
270 |
" I found this gem on Reddit. If I'm editing a file that's read only, and I started Vim without sudo, then this little line will do just that for me. All I have to do is use "w!!" when saving. |
271 |
271 |
" Extensive explanation can also be found at https://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work#7078429 |
272 |
272 |
cmap w!! w !sudo tee > /dev/null % |
273 |
273 |
|
274 |
274 |
|
275 |
275 |
" This setting will allow me to switch to another buffer without need to save the current buffer. |
276 |
276 |
set hidden |
277 |
277 |
" }}} |
278 |
278 |
|
279 |
279 |
" Because Vim can fold vimrc files with the right syntax, These lines will tell Vim how to handle that. |
280 |
280 |
set modelines=2 "This tells Vim that the last 2 lines of this file should only apply to this file. |
281 |
281 |
" So as you can see, the last 2 lines get a special vim:-prefix, so Vim knows for sure this is what's important. |
282 |
282 |
" To wrap a new section, look at the other sections, and copy that syntax. |
283 |
283 |
" vim:foldmethod=marker |
284 |
284 |
" vim:foldlevel=0 |
285 |
285 |
.xinitrc ¶
2 additions and 0 deletions.
sway/config → i3/config ¶
22 additions and 35 deletions.
View changes Hide changes
1 |
1 |
# |
2 |
2 |
# Copy this to ~/.config/sway/config and edit it to your liking. |
3 |
3 |
# |
4 |
4 |
# Read `man 5 sway` for a complete reference. |
5 |
5 |
|
6 |
6 |
### Variables |
7 |
7 |
# |
8 |
8 |
# Logo key. Use Mod1 for Alt. |
9 |
9 |
set $mod Mod4 |
10 |
10 |
# Home row direction keys, like vim |
11 |
11 |
set $left h |
12 |
12 |
set $down j |
13 |
13 |
set $up k |
14 |
14 |
set $right l |
15 |
15 |
# Your preferred terminal emulator |
16 |
16 |
set $term termite |
17 |
- | # Your preferred application launcher |
+ |
17 |
# Your preferred application launcher |
18 |
18 |
set $menu rofi -show run |
19 |
- | |
+ |
19 |
|
+ |
20 |
|
20 |
21 |
### Output configuration |
21 |
22 |
# |
22 |
23 |
# Default wallpaper (more resolutions are available in /usr/share/sway/) |
23 |
24 |
output * bg ~/.wallpapers/Abstract\ with\ lime\ green\ and\ blue\ accents.jpg fill |
24 |
- | # |
+ |
25 |
# |
25 |
26 |
# Example configuration: |
26 |
27 |
# |
27 |
28 |
# output HDMI-A-1 resolution 1920x1080 position 1920,0 |
28 |
29 |
# |
29 |
30 |
# You can get the names of your outputs by running: swaymsg -t get_outputs |
30 |
31 |
|
31 |
32 |
### Input configuration |
32 |
33 |
# |
33 |
34 |
# Example configuration: |
34 |
35 |
# |
35 |
36 |
# input "2:14:SynPS/2_Synaptics_TouchPad" { |
36 |
37 |
# dwt enabled |
37 |
38 |
# tap enabled |
38 |
39 |
# natural_scroll enabled |
39 |
40 |
# middle_emulation enabled |
40 |
41 |
# } |
41 |
42 |
# |
42 |
43 |
# You can get the names of your inputs by running: swaymsg -t get_inputs |
43 |
44 |
# The escape symbol "\" has to be removed. |
44 |
45 |
# Read `man 5 sway-input` for more information about this section. |
45 |
46 |
|
46 |
47 |
### Key bindings |
47 |
48 |
# |
48 |
49 |
# Basics: |
49 |
50 |
# |
50 |
51 |
# start a terminal |
51 |
52 |
bindsym $mod+Return exec $term |
52 |
53 |
|
53 |
54 |
# kill focused window |
54 |
55 |
bindsym $mod+Shift+q kill |
55 |
56 |
|
56 |
57 |
# start your launcher |
57 |
58 |
bindsym $mod+d exec $menu |
58 |
59 |
|
59 |
60 |
# Drag floating windows by holding down $mod and left mouse button. |
60 |
61 |
# Resize them with right mouse button + $mod. |
61 |
62 |
# Despite the name, also works for non-floating windows. |
62 |
63 |
# Change normal to inverse to use left mouse button for resizing and right |
63 |
64 |
# mouse button for dragging. |
64 |
65 |
floating_modifier $mod normal |
65 |
- | |
+ |
66 |
|
66 |
67 |
# reload the configuration file |
67 |
68 |
bindsym $mod+Shift+c reload |
68 |
69 |
|
69 |
- | # exit sway (logs you out of your wayland session) |
70 |
- | bindsym $mod+Shift+e exit |
71 |
- | # |
+ |
70 |
bindsym $mod+Shift+r restart |
+ |
71 |
# exit i3 (logs you out of your X session) |
+ |
72 |
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'" |
+ |
73 |
# |
72 |
74 |
# Moving around: |
73 |
75 |
# |
74 |
76 |
# Move your focus around |
75 |
77 |
bindsym $mod+$left focus left |
76 |
78 |
bindsym $mod+$down focus down |
77 |
79 |
bindsym $mod+$up focus up |
78 |
80 |
bindsym $mod+$right focus right |
79 |
81 |
# or use $mod+[up|down|left|right] |
80 |
82 |
bindsym $mod+Left focus left |
81 |
83 |
bindsym $mod+Down focus down |
82 |
84 |
bindsym $mod+Up focus up |
83 |
85 |
bindsym $mod+Right focus right |
84 |
86 |
|
85 |
87 |
# _move_ the focused window with the same, but add Shift |
86 |
88 |
bindsym $mod+Shift+$left move left |
87 |
89 |
bindsym $mod+Shift+$down move down |
88 |
90 |
bindsym $mod+Shift+$up move up |
89 |
91 |
bindsym $mod+Shift+$right move right |
90 |
92 |
# ditto, with arrow keys |
91 |
93 |
bindsym $mod+Shift+Left move left |
92 |
94 |
bindsym $mod+Shift+Down move down |
93 |
95 |
bindsym $mod+Shift+Up move up |
94 |
96 |
bindsym $mod+Shift+Right move right |
95 |
97 |
# |
96 |
98 |
# Workspaces: |
97 |
99 |
# |
98 |
100 |
# switch to workspace |
99 |
101 |
bindsym $mod+1 workspace 1 |
100 |
- | bindsym $mod+2 workspace 2 |
101 |
- | bindsym $mod+3 workspace 3 |
102 |
- | bindsym $mod+4 workspace 4 |
103 |
- | bindsym $mod+5 workspace 5 |
104 |
- | bindsym $mod+6 workspace 6 |
105 |
- | bindsym $mod+7 workspace 7 |
+ |
102 |
bindsym $mod+2 workspace 2: Philosophy |
+ |
103 |
bindsym $mod+3 workspace 3: Physics |
+ |
104 |
bindsym $mod+4 workspace 4: OOP |
+ |
105 |
bindsym $mod+5 workspace 5: Math |
+ |
106 |
bindsym $mod+6 workspace 6: Leisure |
+ |
107 |
bindsym $mod+7 workspace 7 |
106 |
108 |
bindsym $mod+8 workspace 8 |
107 |
109 |
bindsym $mod+9 workspace 9 |
108 |
110 |
bindsym $mod+0 workspace 10 |
109 |
111 |
# move focused container to workspace |
110 |
112 |
bindsym $mod+Shift+1 move container to workspace 1 |
111 |
113 |
bindsym $mod+Shift+2 move container to workspace 2 |
112 |
114 |
bindsym $mod+Shift+3 move container to workspace 3 |
113 |
115 |
bindsym $mod+Shift+4 move container to workspace 4 |
114 |
116 |
bindsym $mod+Shift+5 move container to workspace 5 |
115 |
117 |
bindsym $mod+Shift+6 move container to workspace 6 |
116 |
118 |
bindsym $mod+Shift+7 move container to workspace 7 |
117 |
119 |
bindsym $mod+Shift+8 move container to workspace 8 |
118 |
120 |
bindsym $mod+Shift+9 move container to workspace 9 |
119 |
121 |
bindsym $mod+Shift+0 move container to workspace 10 |
120 |
122 |
# Note: workspaces can have any name you want, not just numbers. |
121 |
123 |
# We just use 1-10 as the default. |
122 |
124 |
# |
123 |
125 |
# Layout stuff: |
124 |
126 |
# |
125 |
127 |
# You can "split" the current object of your focus with |
126 |
128 |
# $mod+b or $mod+v, for horizontal and vertical splits |
127 |
129 |
# respectively. |
128 |
130 |
bindsym $mod+b splith |
129 |
131 |
bindsym $mod+v splitv |
130 |
132 |
|
131 |
133 |
# Switch the current container between different layout styles |
132 |
134 |
bindsym $mod+s layout stacking |
133 |
135 |
bindsym $mod+w layout tabbed |
134 |
136 |
bindsym $mod+e layout toggle split |
135 |
137 |
|
136 |
138 |
# Make the current focus fullscreen |
137 |
139 |
bindsym $mod+f fullscreen |
138 |
140 |
|
139 |
141 |
# Toggle the current focus between tiling and floating mode |
140 |
142 |
bindsym $mod+Shift+space floating toggle |
141 |
143 |
|
142 |
144 |
# Swap focus between the tiling area and the floating area |
143 |
145 |
bindsym $mod+space focus mode_toggle |
144 |
146 |
|
145 |
147 |
# move focus to the parent container |
146 |
148 |
bindsym $mod+a focus parent |
147 |
149 |
# |
148 |
150 |
# Scratchpad: |
149 |
151 |
# |
150 |
152 |
# Sway has a "scratchpad", which is a bag of holding for windows. |
151 |
153 |
# You can send windows there and get them back later. |
152 |
154 |
|
153 |
155 |
# Move the currently focused window to the scratchpad |
154 |
156 |
bindsym $mod+Shift+minus move scratchpad |
155 |
157 |
|
156 |
158 |
# Show the next scratchpad window or hide the focused scratchpad window. |
157 |
159 |
# If there are multiple scratchpad windows, this command cycles through them. |
158 |
160 |
bindsym $mod+minus scratchpad show |
159 |
161 |
# |
160 |
162 |
# Resizing containers: |
161 |
163 |
# |
162 |
164 |
mode "resize" { |
163 |
165 |
# left will shrink the containers width |
164 |
166 |
# right will grow the containers width |
165 |
167 |
# up will shrink the containers height |
166 |
168 |
# down will grow the containers height |
167 |
169 |
bindsym $left resize shrink width 10 px or 10 ppt |
168 |
170 |
bindsym $down resize grow height 10 px or 10 ppt |
169 |
171 |
bindsym $up resize shrink height 10 px or 10 ppt |
170 |
172 |
bindsym $right resize grow width 10 px or 10 ppt |
171 |
173 |
|
172 |
174 |
# ditto, with arrow keys |
173 |
175 |
bindsym Left resize shrink width 10 px or 10 ppt |
174 |
176 |
bindsym Down resize grow height 10 px or 10 ppt |
175 |
177 |
bindsym Up resize shrink height 10 px or 10 ppt |
176 |
178 |
bindsym Right resize grow width 10 px or 10 ppt |
177 |
179 |
|
178 |
180 |
# return to default mode |
179 |
181 |
bindsym Return mode "default" |
180 |
182 |
bindsym Escape mode "default" |
181 |
183 |
} |
182 |
184 |
bindsym $mod+r mode "resize" |
183 |
185 |
|
184 |
186 |
# |
185 |
- | # Status Bar: |
186 |
- | # |
187 |
- | # Read `man 5 sway-bar` for more information about this section. |
188 |
- | bar { |
189 |
- | position top |
190 |
- | colors { |
191 |
- | statusline #ffffff |
192 |
- | background #323232 |
193 |
- | inactive_workspace #32323200 #32323200 #5c5c5c |
194 |
- | } |
195 |
- | } |
196 |
- | |
197 |
- | # You may want this: |
198 |
- | # |
199 |
- | # include ~/.config/sway/conf.d/* |
200 |
- | # |
201 |
- | # Protip: |
202 |
- | # |
203 |
- | # include ~/.config/sway/`hostname`/* |
204 |
- | |
+ |
187 |
exec yabar # Starts the status bar |
+ |
188 |
|
205 |
189 |
# Makes my FN buttons work properly. |
206 |
190 |
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +1% |
207 |
- | bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -1% |
208 |
- | bindsym XF86AudioToggle exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle |
+ |
191 |
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute |
+ |
192 |
bindsym XF86AudioToggle exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle |
209 |
193 |
bindsym XF86MonBrightnessDown exec light -U 1 |
+ |
194 |
bindsym XF86MonBrightnessDown exec light -U 1 |
210 |
195 |
bindsym XF86MonBrightnessUp exec light -A 1 |
211 |
196 |
bindsym Print exec scrot # Printscreen button |
+ |
197 |
bindsym $mod+Print exec scrot -s # scrot, but click for window, or drag for rectangle screenshot. |
+ |
198 |
bindsym $mod+Print exec scrot -s # scrot, but click for window, or drag for rectangle screenshot. |
install.sh ¶
12 additions and 3 deletions.
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 |
5 |
5 |
|
+ |
6 |
|
6 |
7 |
# Firefox: |
7 |
8 |
#sudo pacman -S --noconfirm firefox |
8 |
9 |
# Uncomment next line for Dutch firefox translations. |
9 |
10 |
#sudo pacman -S --noconfirm firefox-i18n-nl |
10 |
11 |
# I've ditched Firefox in favor of Chromium, because Chromium doesn't vomit when confronted with XWayland. |
11 |
12 |
sudo pacman -S --noconfirm chromium |
12 |
13 |
|
13 |
14 |
# Sound handling (Don't forget to unmute using alsamixer!) |
14 |
15 |
sudo pacman -S --noconfirm alsa-utils pulseaudio pulseaudio-jack pulseaudio-bluetooth |
15 |
16 |
|
16 |
17 |
# Comment next line to stop the usual window manager from being installed. |
17 |
- | sudo pacman -S --noconfirm sway |
18 |
- | |
19 |
- | # To easily make use of the AUR, I'll first install Pacaur, which needs some |
20 |
18 |
# special treatment up front: |
21 |
19 |
cd ~/Downloads |
22 |
20 |
wget https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz |
23 |
21 |
tar -x -f pacaur.tar.gz |
24 |
22 |
cd pacaur |
25 |
23 |
makepkg -sri --noconfirm |
26 |
24 |
cd .. |
27 |
25 |
rm -r pacaur |
28 |
26 |
cd ~ |
29 |
27 |
|
30 |
28 |
# Making a directory in which to store all repositories. It's basically a |
31 |
29 |
# repository for repositories =3 |
32 |
30 |
mkdir Repositories |
33 |
31 |
|
34 |
32 |
# Making some common aliases for some pieces of software |
35 |
33 |
alias vi nvim |
36 |
34 |
alias vim nvim |
37 |
35 |
|
38 |
36 |
# Some Python dependencies that need to be installed |
39 |
37 |
pip install paramiko |
40 |
38 |
|
41 |
39 |
# Collecting software from the AUR: |
42 |
40 |
pacaur -S vim-youcompleteme-git |
43 |
41 |
pacaur -S clojure leiningen # Clojure's 'project manager' thingy + Clojure |
44 |
42 |
|
+ |
43 |
# Yabar-git instead of Yabar, because that has a battery block. |
+ |
44 |
pacaur -S i3-gaps feh compton yabar-git rofi |
+ |
45 |
|
+ |
46 |
# Now, assuming I'm using the my standard setup for Yabar, I need the JSON |
+ |
47 |
# parser to correctly output my workspace name: |
+ |
48 |
pacaur -S --noconfirm jq |
+ |
49 |
|
+ |
50 |
# Uncomment when there is a driver for the Validity VFS495 138a:003f figerprint |
+ |
51 |
# reader, and still working on that gorgeous laptop: |
+ |
52 |
#pacaur -S --noconfirm fprintd |
+ |
53 |
termite.conf ¶
2 additions and 0 deletions.
yabar.conf ¶
151 additions and 0 deletions.
View changes Hide changes
+ |
1 |
|
+ |
2 |
topbar: { |
+ |
3 |
// List of all blocks |
+ |
4 |
block-list: ["workspaces", "space", "title", "space", "battery", "cpu", "memory", "network", "date"]; |
+ |
5 |
|
+ |
6 |
// Font (considering using an Icon Font - like Material Icons) |
+ |
7 |
font: "FontAwesome 12"; |
+ |
8 |
// Only on first monitor |
+ |
9 |
monitor: "eDP1"; |
+ |
10 |
|
+ |
11 |
position: "top"; |
+ |
12 |
height: 35; |
+ |
13 |
|
+ |
14 |
background-color-argb: 0xD0212121; |
+ |
15 |
// background-color-nowindow-argb: 0x00000000; |
+ |
16 |
underline-size: 6; |
+ |
17 |
overline-size: 0; |
+ |
18 |
slack-size: 0; |
+ |
19 |
|
+ |
20 |
workspaces: { |
+ |
21 |
// I'm not using YABAR_WORKSPACES, because it kinda breaks on i3. |
+ |
22 |
exec: "i3-msg -t get_workspaces | jq '.[] | select(.focused).name'" |
+ |
23 |
// I'm assigning subject names to my workspaces, instead of ambiguous |
+ |
24 |
// symbols. |
+ |
25 |
//internal-option1: "COMPN Philosophy Physics OOP2 Math * Leisure" |
+ |
26 |
|
+ |
27 |
align: "left"; |
+ |
28 |
justify: "center"; |
+ |
29 |
type: "persist"; |
+ |
30 |
fixed-size: 100; |
+ |
31 |
|
+ |
32 |
background-color-rgb: 0xC62828; |
+ |
33 |
underline-color-rgb: 0xB71C1C; |
+ |
34 |
|
+ |
35 |
// underline-color-rgb: 0xC62828; |
+ |
36 |
} |
+ |
37 |
|
+ |
38 |
space: { |
+ |
39 |
exec: "echo"; |
+ |
40 |
|
+ |
41 |
align: "left"; |
+ |
42 |
fixed-size: 20; |
+ |
43 |
// Normally, this should be "once" and without interval, but when |
+ |
44 |
// leaving full screen things (like a movie on VLC), it stays black. |
+ |
45 |
// Remove when fixed. |
+ |
46 |
type: "periodic"; |
+ |
47 |
interval: 10; |
+ |
48 |
|
+ |
49 |
background-color-rgb: 0x7B1FA2; |
+ |
50 |
underline-color-rgb: 0x4A148C |
+ |
51 |
} |
+ |
52 |
|
+ |
53 |
title: { |
+ |
54 |
exec: "YABAR_TITLE"; |
+ |
55 |
|
+ |
56 |
align: "left"; |
+ |
57 |
justify: "center"; |
+ |
58 |
fixed-size: 640; |
+ |
59 |
type: "persist"; |
+ |
60 |
variable-size: false; // Save some space...; |
+ |
61 |
|
+ |
62 |
background-color-rgb: 0x7B1FA2; |
+ |
63 |
underline-color-rgb: 0x4A148C |
+ |
64 |
} |
+ |
65 |
|
+ |
66 |
battery: { |
+ |
67 |
exec: "YABAR_BATTERY"; |
+ |
68 |
internal-option1: "BAT0"; |
+ |
69 |
internal-option2: " "; |
+ |
70 |
internal-suffix: "%"; |
+ |
71 |
internal-spacing: true; |
+ |
72 |
|
+ |
73 |
align: "right"; |
+ |
74 |
fixed-size: 100; |
+ |
75 |
type: "periodic"; |
+ |
76 |
interval: 5; |
+ |
77 |
|
+ |
78 |
background-color-rgb: 0x689F38; |
+ |
79 |
underline-color-rgb: 0x33691E; |
+ |
80 |
} |
+ |
81 |
|
+ |
82 |
cpu: { |
+ |
83 |
exec: "YABAR_CPU"; |
+ |
84 |
internal-prefix: " "; |
+ |
85 |
internal-suffix: "%"; |
+ |
86 |
internal-spacing: false; |
+ |
87 |
|
+ |
88 |
align: "right"; |
+ |
89 |
fixed-size: 160; |
+ |
90 |
type: "periodic"; |
+ |
91 |
interval: 2; |
+ |
92 |
|
+ |
93 |
background-color-rgb: 0xF57C00; |
+ |
94 |
underline-color-rgb: 0xEF6C00; |
+ |
95 |
|
+ |
96 |
// underline-color-rgb: 0xF57C00; |
+ |
97 |
} |
+ |
98 |
|
+ |
99 |
memory: { |
+ |
100 |
exec: "YABAR_MEMORY"; |
+ |
101 |
internal-prefix: " "; |
+ |
102 |
internal-suffix: "B"; // Adds "B" to "M" to get "MB" |
+ |
103 |
internal-spacing: false; |
+ |
104 |
|
+ |
105 |
align: "right"; |
+ |
106 |
fixed-size: 200; |
+ |
107 |
type: "periodic"; |
+ |
108 |
interval: 1; |
+ |
109 |
|
+ |
110 |
background-color-rgb: 0xEF6C00; |
+ |
111 |
underline-color-rgb: 0xE65100; |
+ |
112 |
|
+ |
113 |
// underline-color-rgb: 0xEF6C00; |
+ |
114 |
} |
+ |
115 |
|
+ |
116 |
network: { |
+ |
117 |
exec: "YABAR_BANDWIDTH"; |
+ |
118 |
internal-prefix: " "; |
+ |
119 |
internal-spacing: true; |
+ |
120 |
//internal-option1: "wlp58s0"; |
+ |
121 |
internal-option1: "wlp2s0"; |
+ |
122 |
internal-option2: " "; |
+ |
123 |
|
+ |
124 |
align: "right"; |
+ |
125 |
fixed-size: 280; |
+ |
126 |
type: "periodic"; |
+ |
127 |
interval: 1; |
+ |
128 |
|
+ |
129 |
background-color-rgb: 0x0097A7; |
+ |
130 |
underline-color-rgb: 0x00838F; |
+ |
131 |
|
+ |
132 |
// underline-color-rgb: 0x0097A7; |
+ |
133 |
} |
+ |
134 |
|
+ |
135 |
date: { |
+ |
136 |
exec: "YABAR_DATE"; |
+ |
137 |
internal-option1: "%a %d %b, %I:%M:%S"; |
+ |
138 |
internal-prefix: " "; |
+ |
139 |
|
+ |
140 |
align: "right"; |
+ |
141 |
fixed-size: 400; |
+ |
142 |
type: "periodic"; |
+ |
143 |
interval: 1; |
+ |
144 |
|
+ |
145 |
background-color-rgb: 0x00838F; |
+ |
146 |
underline-color-rgb: 0x006064; |
+ |
147 |
|
+ |
148 |
// underline-color-rgb: 0x00838F; |
+ |
149 |
} |
+ |
150 |
} |
+ |
151 |
} |