guest@dotshare [~/groups/wms/i3] $ ls GrayNito/ | cat

GrayNito (scrot)

vegangaro Jul 20, 2017 (wms/i3)

i3config(raw, dl)

SCROT

  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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# Author: VeganGaro
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

#reload duntrc
# bindsym $mod+Shift+d --release exec --no-startup-id killall dunst;notify-send foo
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal

# kill focused window
bindsym $mod+Shift+q kill

#default
#bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
# bindsym $mod+p exec --no-startup-id dmenu_run -b  -fn '-*-fixed-*-*-*-*-10-*-*-*-*-*-*-*' -nb '#111111' -nf '#555555' -sb '#111111' -sf '#aadb0f'

# default menu
bindsym $mod+shift+d exec dmenu_run

# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop

# Focus container on the left, bottom, top, right
bindsym $mod+h focus left
bindsym $mod+k focus down
bindsym $mod+j focus up
bindsym $mod+l focus right

# focus the parent container
bindsym $mod+u focus parent

# Focus last floating/tiling container
bindsym $mod+space focus mode_toggle

# Focus the output right to the current one
bindsym $mod+x focus output right

# focus the child container
# bindsym $mod+shift+d focus child

# 4.21. Focus follows mouse
# focus_follows_mouse no

# 4.24. Focus wrapping
# force_focus_wrapping yes

# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right

# 6.2. Splitting containers
bindsym $mod+b split horizontal
bindsym $mod+g split vertical

# Toggle fullscreen
bindsym $mod+f fullscreen toggle

# 6.3. Manipulating layout
bindsym $mod+shift+s layout stacking
bindsym $mod+shift+t layout tabbed
bindsym $mod+e layout toggle split

# Toggle between stacking/tabbed/splith/splitv:
# bindsym $mod+x layout toggle all

# Toggle floating/tiling
bindsym $mod+Shift+space floating toggle

# 6.5. Moving containers

# 6.7.1. Named workspaces
set $WS1   "  Shell "
set $WS2   "  Code "
set $WS3   "  Browser "
set $WS4   "  Tools "
set $WS5   "  Media "
set $WS6   "  Gaming "
set $WS7   "  Settings "

# 6.7.2. Renaming workspaces
# i3-msg 'rename workspace to "8: mail"'

# switch to workspace
bindsym $mod+1 workspace $WS1
bindsym $mod+2 workspace $WS2
bindsym $mod+3 workspace $WS3
bindsym $mod+4 workspace $WS4
bindsym $mod+5 workspace $WS5
bindsym $mod+6 workspace $WS6
bindsym $mod+7 workspace $WS7

# Force apps to open in an determined workspace
assign [class="(?i)urxvt|xterm"]$WS1
assign [class="(?i)st|clion|xfce4-terminal|lxterminal|emacs|codelite|qtcreator|codeblocks|gvim"]$WS2
assign [class="(?i)firefox|chromium|google-chrome-stable|google-chrome"]$WS3
assign [class="(?i)ranger|virtualbox|libreoffice"]$WS4
assign [class="(?i)mpv|feh|mpd|spotify"]$WS5
assign [class="(?i)steam"]$WS6
assign [title="OpenGL"] $ws6
for_window [class="Steam"] move to workspace $WS6
assign [class="(?i)qbittorrent"]$WS7


set $mode_launcher Launch: [c]hromium [f]irefox [g]vim [l]xterminal [s]potify [u]rxvt [v]irtualbox x[t]erm [x]fce4-terminal
bindsym $mod+o mode "$mode_launcher"

mode "$mode_launcher"
{
    bindsym c exec chromium
    bindsym f exec firefox
    bindsym g exec gvim
    bindsym l exec lxterminal
    bindsym q exec qtcreator
    bindsym s exec spotify
    bindsym u exec urxvt
    bindsym v exec virtualbox
    bindsym x exec xfce4-terminal
    bindsym t exec xterm

    bindsym Esc mode "default"
    bindsym Return mode "default"
}

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $WS1
bindsym $mod+Shift+2 move container to workspace $WS2
bindsym $mod+Shift+3 move container to workspace $WS3
bindsym $mod+Shift+4 move container to workspace $WS4
bindsym $mod+Shift+5 move container to workspace $WS5
bindsym $mod+Shift+6 move container to workspace $WS6
bindsym $mod+Shift+7 move container to workspace $WS7

# 6.7. switch to the next and previous workspace
bindsym Mod4+a workspace prev
bindsym Mod4+d workspace next

# 4.26. Automatic back-and-forth when switching to the current workspace
bindsym Mod4+c workspace back_and_forth

# 6.11. Resizing containers/windows
# for_window [class="urxvt"] resize set 640 480

# Automatically starting applications on i3 startup
# exec firefox
exec chromium
exec chromium-browser
# exec_always ~/my_script.sh

# Execute the terminal emulator urxvt, which is not yet startup-notification aware.
exec --no-startup-id urxvt
exec --no-startup-id steam
exec --no-startup-id spotify
exec --no-startup-id dropbox
exec --no-startup-id xset r rate 300 75 &
# exec --no-startup-id urxvtd -q -f -o &
# exec --no-startup-id compton -bc &
# exec --no-startup-id compton --config ~/.compton.conf
# exec --no-startup-id nm-applet
# exec --no-startup-id dunst &
# Launch the VirtualBox guest services
# exec --no-startup-id VBoxClient-all &
# exec --no-startup-id feh --bg-fill ~/dotfiles/Images/Walls/gorilla.jpg

#Spotify tweaks
for_window [class="Spotify"] move to workspace $WS5

# Remove the titlebar.
for_window [class="mpv|URxvt|Chromium|Firefox"] border pixel 1

# if you want to kill all windows which have the class Firefox, use:
# bindsym $mod+x [class="Firefox"] kill

# set floating mode when applications started
 for_window [class="urxvt"]                     floating enable
for_window [class="feh|mpv|mumble|pavucontrol|spotify"] floating enable
# for_window [class="Gcolor2"]                        floating enable
# for_window [class="Gkamus"]                         floating enable
# https://github.com/ValveSoftware/steam-for-linux/issues/1040
for_window [class="^Steam$" title="^Friends$"] floating enable
for_window [class="^Steam$" title="Steam - News"] floating enable
for_window [class="^Steam$" title=".* - Chat"] floating enable
for_window [class="^Steam$" title="^Settings$"] floating enable
for_window [class="^Steam$" title=".* - event started"] floating enable
for_window [class="^Steam$" title=".* CD key"] floating enable
for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
for_window [title="^Steam Keyboard$"] floating enable

# shortcut applications
# bindsym $mod+F1                 exec urxvt
# bindsym $mod+F2 workspace $WS2; exec
# bindsym $mod+F3 workspace $WS3; exec firefox
# bindsym $mod+F4 workspace $WS3; exec chromium-browser

# 4.18. Automatically putting workspaces on specific screens
# workspace 1 output LVDS1
# workspace 5 output VGA1
# workspace "2: vim" output VGA1

# class                 border  backgr. text    indicator
client.focused          #849492 #849492 #ffffff #2e9ef4
client.focused_inactive #6e686f #6e686f #ffffff #484e50
client.unfocused        #6e686f #6e686f #888888 #292d2e
client.urgent           #e9e6e6 #BFB8B0 #ffffff #900000
client.placeholder      #000000 #0c0c0c #ffffff #000000
# client.background       #ffffff

# window border settings
new_window pixel    0
new_float normal    0
hide_edge_borders  none

# Volume controls
bindsym Mod4+s exec amixer set Master -q 5%-
bindsym Mod4+w exec amixer set Master -q 5%+
bindsym Mod4+q exec amixer set Master -q 100%-

# The middle button and a modifer over any part of the window kills the window
bindsym --release button2 kill
# bindsym --whole-window button2 kill

# # shortcut to change window border
# bindsym Mod4+t border normal    0
# bindsym Mod4+y border pixel     1
# bindsym Mod4+u border none

# The right button toggles floating
# bindsym button3 floating toggle
# bindsym $mod+button3 floating toggle

# # The side buttons move the window around
# bindsym button9 move left
# bindsym button8 move right

# Press $mod+o followed by either f, g, Esc or Return to launch firefox,
# # gvim or return to the default mode, respectively.


# Shutdown, reboot, lock screen
set $Locker i3lock && sleep 1
set $mode_system System (l) lock, (e) logout, (r) reboot, (s) shutdown, (shift+s) suspend, (shift+h) hibernate
mode "$mode_system" {
    bindsym l exec --no-startup-id $Locker, mode "default"
    bindsym e exec --no-startup-id i3-msg exit, mode "default"
    bindsym shitf+s exec --no-startup-id $Locker && systemctl suspend, mode "default"
    bindsym shift-h exec --no-startup-id $Locker && systemctl hibernate, mode "default"
    bindsym r exec --no-startup-id systemctl reboot, mode "default"
    bindsym s exec --no-startup-id systemctl poweroff -i, mode "default"

    # back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

bindsym $mod+Pause mode "$mode_system"

# scrot & gpicview - root
bindsym Print exec "scrot -e 'mv $f ~/dotfiles/Images/Terminalscreen/ && feh ~/dotfiles/Images/Terminalscreen/$f'"
# scrot & gpicview - select window or rectangle
bindsym $mod+Print exec "scrot -u -e 'mv $f ~/dotfiles/Images/Terminalscreen/ && feh ~/dotfiles/Images/Terminalscreen/$f'"

# reload the configuration file
bindsym $mod+Shift+w reload

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
# 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'"

# Exit without confirmation
bindsym $mod+Shift+e exec i3-msg exit

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym semicolon resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
bar {

    id bar-1
    position top
    font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
    font pango:DejaVu Sans Mono 11

    # 5.12. Workspace buttons
    # workspace_buttons no
    # strip_workspace_numbers yes

    #Show no icon on Status bar of active pacakges
    # tray_output none

    # Workspace bar options
    status_command i3blocks
    # status_command i3status
    # status_command ~/.conky-i3.sh

    # For dash(1) users who want signal handling to work:
    # status_command exec ~/.bin/my_status_command

    # 5.11. Custom separator symbol
    # separator_symbol ":|:"

    # Status i3 bar colors
    colors {
        background #242424
        statusline #bfbdbd
        # separator #666666

        focused_workspace #242424 #D5D5D5 #242424
        active_workspace   #333333 #5f676a #ffffff
        inactive_workspace #242424 #282828 #CCCACA
        urgent_workspace   #2A1A1A #858774 #1b1b1b
        binding_mode       #2f343a #900000 #ffffff
    }

# Hide i3bar. Show up i3bar when pressing $mod
    mode hide
    hidden_state hide
    modifier $Mod
}

CLICK TO VIEW

x

vimrc(raw, dl)

  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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
" Highly based on amix/vimrc : https://github.com/amix/vimrc

" Sections:
"    -> General
"    -> VIM user interface
"    -> Colors and Fonts
"    -> Files and backups
"    -> Text, tab and indent related
"    -> Visual mode related
"    -> Moving around, tabs and buffers
"    -> Status line
"    -> Editing mappings
"    -> vimgrep searching and cope displaying
"    -> Spell checking
"    -> Misc
"    -> Helper functions
"
"{{{ OS specifics commands

" if has("win64") || has("win32") || has("win16")

"     "{{{ Windows
"
"     source $VIMRUNTIME/vimrc_example.vim
"     source $VIMRUNTIME/mswin.vim
"     behave mswin
"
"     set diffexpr=MyDiff()
"     function! MyDiff()
"         let opt = '-a --binary '
"         if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
"         if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
"         let arg1 = v:fname_in
"         if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
"         let arg2 = v:fname_new
"         if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
"         let arg3 = v:fname_out
"         if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
"         if $VIMRUNTIME =~ ' '
"             if &sh =~ '\<cmd'
"                 if empty(&shellxquote)
"                     let l:shxq_sav = ''
"                     set shellxquote&
"                 endif
"                 let cmd = '"' . $VIMRUNTIME . '\diff"'
"             else
"                 let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
"             endif
"         else
"             let cmd = $VIMRUNTIME . '\diff'
"         endif
"         silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
"         if exists('l:shxq_sav')
"             let &shellxquote=l:shxq_sav
"         endif
"     endfunction
"
"     " Turn persistent undo on
"     try
"         set undodir=%userprofile%\Vim\vimfiles\undodir
"         set undofile
"     catch
"     endtry
"
"     "= CPP compile and run commands
"
"     augroup CppBuild
"         autocmd!
"         autocmd filetype cpp nnoremap <c-d> :w <bar> exec '!g++ -std=c++14 -Wall -Wextra -pedantic '.shellescape('%').' -o '.shellescape('%:r').' && '.shellescape('%:r')<CR>
"         autocmd filetype cpp nnoremap <c-f> :w <bar> exec '!clang++ -std=c++14 -Wall -pedantic -Werror '.shellescape('%').' -o '.shellescape('%:r').' && .\'.shellescape('%:r')<CR>
"     augroup END
"
"
"     " Vim default font on gvim
"     set guifont=Hack:h18
"
"     "}}}
"
" else
"
"     " {{{ Linux
"
"Turn persistent undo on means that you can undo even when you close a buffer/VIM
try
    set undodir=~/.vim/undodir
    set undofile
catch
endtry

" CPP compile and run commands
augroup CppBuild
    autocmd!
    autocmd filetype cpp nnoremap <leader>d :w <bar> exec '!g++ -std=c++14 -Wall -Wextra -pedantic '.shellescape('%').' -o '.shellescape('%:r').' && ./'.shellescape('%:r')<CR>
    autocmd filetype cpp nnoremap <leader>f :w <bar> exec '!clang++ -std=c++14 -stdlib=libc++ -Wall -pedantic -Werror '.shellescape('%').' -o '.shellescape('%:r').' && ./'.shellescape('%:r')<CR>
augroup END


"     "}}}
"     "
" endif
"
"}}}

" {{{ Plugin Handlers Begin"

" Specify a directory for plugins (for Neovim: ~/.local/share/nvim/plugged)
call plug#begin('~/.vim/plugged')

set nocompatible              " be iMproved, required
"filetype off                  " required

" set the runtime path to include Vundle and initialize
"set rtp+=~/.vim/bundle/Vundle.vim
"call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
" Plugin 'VundleVim/Vundle.vim

" }}}

" {{{ Plugins

Plug 'valloric/youcompleteme'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-repeat'
Plug 'majutsushi/tagbar'
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'easymotion/vim-easymotion'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'ervandew/supertab'
Plug 'xolox/vim-easytags'
Plug 'xolox/vim-misc'
Plug 'myusuf3/numbers.vim'
Plug 'scrooloose/syntastic'
Plug 'zhou13/vim-easyescape'
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'scrooloose/nerdtree'
Plug 'terryma/vim-multiple-cursors'
Plug 'mhinz/vim-startify' " The fancy start screen for Vim.
Plug 'christoomey/vim-tmux-navigator'
Plug 'airblade/vim-gitgutter'

" session management

Plug 'tpope/vim-obsession' " Autosave Session.vim
Plug 'dhruvasagar/vim-prosession'
Plug 'gikmx/ctrlp-obsession'

"  Airline Plugins

Plug 'itchyny/lightline.vim'
" Plug 'bling/vim-airline'

" ColorScheme Plugins
Plug 'tomasr/molokai'
Plug 'morhetz/gruvbox'
Plug 'NLKNguyen/papercolor-theme'
Plug 'sonph/onehalf', {'rtp': 'vim/'}
Plug 'dikiaap/minimalist'
Plug 'vegangaro/graynito'

" Unused but interesting Plugins

Plug 'vim-airline/vim-airline-themes'
" Plug 'xuhdev/singlecompile'
" Plug 'Yggdroot/indentLine'
" Plug 'tpope/vim-commentary'
" Plug 'benmills/vimux'
" Plug 'tomtom/tcomment_vim'
" Plug 'ctrlpvim/ctrlp.vim'
" Plug 'wincent/command-t'
" Plug 'godlygeek/tabular' " align text

" }}}

" {{{ Plugin Handlers End

" Initialize plugin system
call plug#end()

"Vundle things
" All of your Plugins must be added before the following line
"  call vundle#end()            " required
" filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on

" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

" }}}

" {{{ General

" Sets how many lines of history VIM has to remember
set history=500

" Enable filetype plugins
filetype plugin on
filetype indent on

" Set to auto read when a file is changed from the outside
set autoread

" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","

" Write and quit with c-s and c-q
nnoremap <c-s> :w <cr>
nnoremap <c-q> :q <cr>

" Cut/Copy/Paste to work using the standard hotkeys
vmap <leader>u "+yy
vmap <leader>y "*yy
" vmap <C-v> c<ESC>"+p
" imap <C-v> <C-r><C-o>+
"
" Yanked words to clipboard
vnoremap <leader>k "*y
vnoremap <leader>j "+y
 
"
" :W sudo saves the files " (useful for handling the permission-denied error)
" command W w !sudo tee % > /dev/null

" A simple mapping to break the line at the cursor by pressing Ctrl+Enter:
" nmap <c-cr> i[Ctrl+V][Enter][Ctrl+V][Esc][Enter]

" }}}

" {{{ VIM user interface

" set 7 lines to the cursor - when moving vertically using j/k
set so=7

" Turn on the WiLd menu
set wildmenu

" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
    set wildignore+=.git\*,.hg\*,.svn\*
else
    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif

"Always show current position
set ruler


" Height of the command bar
set cmdheight=2

" A buffer becomes hidden when it is abandoned
set hid

" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l

" Ignore case when searching
set ignorecase

" When searching try to be smart about cases
set smartcase

" Highlight search results
set hlsearch

" Makes search act like search in modern browsers
set incsearch

" Don't redraw while executing macros (good performance config)
set lazyredraw

" For regular expressions turn magic on
set magic

" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2

" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500

" Properly disable sound on errors on MacVim
if has("gui_macvim")
    autocmd GUIEnter * set vb t_vb=
endif

" *****************************

" Add a bit extra margin to the left
set foldcolumn=1
setl foldmethod=marker
" Tweak the color of the fold display column
" au ColorScheme * hi FoldColumn cterm=bold ctermbg=233 ctermfg=146

set nowrap       "Don't wrap lines
set linebreak    "Wrap lines at convenient points

" call alias inside vim
set shell=/bin/bash\ -i

" }}}

" {{{ colors

" enable syntax highlighting
syntax enable

" set utf8 as standard encoding and en_us as the standard language
set encoding=utf8

" use unix as the standard file type
set ffs=unix,dos,mac

" let g:xxxx_original = 1
"
colorscheme onehalfdark

" status line
set laststatus=2
 
" lightline themes : :h g:lightline.colorscheme
let g:lightline = {
      \ 'colorscheme': 'graynito',
      \ 'active': {
      \   'left': [ [ 'mode', 'paste' ],
      \             [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
      \ },
      \ 'component_function': {
      \   'gitbranch': 'fugitive#head'
      \ },
      \ }

" "airlines themes
" let g:airline_theme='zenburn'
" let g:airline_powerline_fonts = 1
" 
" 256 colors
" set t_ut=
" set termguicolors
" set background=light
" set background=dark
set t_co=256

" }}}

" {{{ Files, backups and undo
"
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile

" }}}

" {{{ Text, tab and indent related

" Use spaces instead of tabs
set expandtab

" Be smart when using tabs ;)
set smarttab

" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4

" Linebreak on 500 characters
set lbr
set tw=500

set ai "Auto indent
set si "Smart indent
set wrap "Wrap line

"*****************************

"Fix indentation
nnoremap <silent> <F6> mzgg=G`z

" if has('gui_running')
"   set list listchars=tab:▶‒,nbsp:∙,trail:∙,extends:▶,precedes:◀
"     let &showbreak = '↳'
" else
"       set list listchars=tab:>-,nbsp:.,trail:.,extends:>,precedes:<
"         let &showbreak = '^'
"     endif
"
"
"
" set showbreak=\\

" }}}

" {{{ Visual mode related

" Visual mode pressing * or # searches for the current selection
" Super useful! From an idea by Michael Naumann
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR

" }}}

" {{{ Moving around, tabs, windows and buffers

" " Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
" map <space> /
" map <c-space> ?
"
" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>
" 
" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l

" Close the current buffer
map <leader>bd :Bclose<cr>:tabclose<cxr>gT

" Close all the buffers
map <leader>ba :bufdo bd<cr>

map <leader>l :bnext<cr>
map <leader>h :bprevious<cr>

" Useful mappings for managing tabs
    map <leader>tn :tabnew<cr>
    map <leader>to :tabonly<cr>
    map <leader>tc :tabclose<cr>
    map <leader>tm :tabmove
    map <leader>t<leader> :tabnext

    " Let 'tl' toggle between this and the last accessed tab
    let g:lasttab = 1
    nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
    au TabLeave * let g:lasttab = tabpagenr()

    " Opens a new tab with the current buffer's path
    " Super useful when editing files in the same directory
    map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/

    " Switch CWD to the directory of the open buffer
    map <leader>cd :cd %:p:h<cr>:pwd<cr>

    " Specify the behavior when switching between buffers
    try
        set switchbuf=useopen,usetab,newtab
        set stal=2
    catch
    endtry

    " Return to last edit position when opening files (You want this!)
    au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif

    " }}}

    " {{{ Editing mappings

    " Remap VIM 0 to first non-blank character
    " map 0 ^

    " Delete trailing white space on save, useful for some filetypes ;)
    fun! CleanExtraSpaces()
        let save_cursor = getpos(".")
        let old_query = getreg('/')
        silent! %s/\s\+$//e
        call setpos('.', save_cursor)
        call setreg('/', old_query)
    endfun

    if has("autocmd")
        autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee :call CleanExtraSpaces()
    endif

    " mapping F5 to remove whitespace trailing
    nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
    " Manually Remove whitespace traling  by typing command: / $

    " Fix indentation
    map <F7> mzgg=G`z

    " }}}

    " {{{ Spell checking

    " Set spell check for en and br
    set spelllang=en,br

    " Pressing ,ss will toggle and untoggle spell checking
    map <leader>ss :setlocal spell!<cr>

    " Shortcuts using <leader>
    map <leader>sn ]s
    map <leader>sp [s
    map <leader>sa zg
    map <leader>s? z=


    " }}}

    " {{{ Misc

    " Remove the Windows ^M - when the encodings gets messed up
    noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm

    " Quickly open a buffer for scribble
    map <leader>q :e ~/buffer<cr>

    " Quickly open a markdown buffer for scribble
    map <leader>x :e ~/buffer.md<cr>

    " Toggle paste mode on and off
    " map <leader>pp :setlocal paste!<cr>

    " Toggle auto-indenTING FOR CODE PAste
    set pastetoggle=<F2>

    " }}}

    " {{{ Fast editing and reloading of vimrc configs

    nnoremap <leader>e :tabedit $MYVIMRC <cr>

    " }}}

    " {{{ GUI related Fonts GVIM

    " Set font according to system
    if has("mac") || has("macunix")
        set gfn=Hack:h14,Source\ Code\ Pro:h15,Menlo:h15
    elseif has("win16") || has("win32")
        set gfn=Hack:h14,Source\ Code\ Pro:h12,Bitstream\ Vera\ Sans\ Mono:h11
    elseif has("gui_gtk2")
        set gfn=Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11
    elseif has("linux")
        set gfn=Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11
    elseif has("unix")
        set gfn=Monospace\ 11
    endif

    " Disable scrollbars (real hackers don't use scrollbars for navigation!)
    :set guioptions-=m  "remove menu bar
    :set guioptions-=T  "remove toolbar
    :set guioptions-=r  "remove right-hand scroll bar
    :set guioptions-=L  "remove left-hand scroll bar

       " }}}

    " {{{ Vim Plugins Specify

    "Auto-Reload Your Vimrc
    " augroup reload_vimrc " {
    "     autocmd!
    "     autocmd BufWritePost $MYVIMRC source $MYVIMRC
    " augroup END " }
    "
    " Start interactive EasyAlign in visual mode (e.g. vipga)
    xmap ga <Plug>(EasyAlign)

    " Start interactive EasyAlign for a motion/text object (e.g. gaip)
    nmap ga <Plug>(EasyAlign)

    " vim-multiple-cursors
    let g:multi_cursor_next_key="\<C-e>"

    "vim-cpp
    let g:cpp_class_scope_highlight = 1 "Highlighting of class scope is disabled by default. To enable set
    let g:cpp_member_variable_highlight = 1 "Highlighting of member variables is disabled by default. To enable set
    let g:cpp_experimental_simple_template_highlight = 1 "There are two ways to hightlight template functions. Either
    "let g:cpp_experimental_template_highlight = 1 "which is a faster implementation but has some corner cases where it doesn't work.
    let g:cpp_concepts_highlight = 1 "Highlighting of library concepts is enabled by
    let c_no_curly_error=1 "Braces inside square brackets shown as error

    " Tagbar keybinding to F8
    nmap <f8> :TagbarOpenAutoClose<cr>

    " NERDTree keybinding to CTRL + n
        map <leader><tab> :NERDTreeToggle<CR>

" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1

" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs = 1

" Align line-wise comment delimiters flush left instead of following code indentation
let g:NERDDefaultAlign = 'left'

" Set a language to use its alternate delimiters by default
let g:NERDAltDelims_java = 1

" Add your own custom formats or override the defaults
let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }

" Allow commenting and inverting empty lines (useful when commenting a region)
let g:NERDCommentEmptyLines = 1

" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingwhitespace = 1

" syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

"syntastic c++11/14/17
let g:syntastic_cpp_compiler = 'g++'
let g:syntastic_cpp_compiler_options = '-std=c++14'
let g:syntastic_cpp_checkers = ['gcc']
" let g:syntastic_cpp_compiler = 'clang++'
" let g:syntastic_cpp_compiler_options = '-std=c++14 -stdlib=libc++'
" let g:syntastic_cpp_checkers = ['clang_check', 'gcc']

" youcompleteme C- family
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"

" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"


let g:tmux_navigator_no_mappings = 1

nnoremap <silent> {c-h} :TmuxNavigateLeft<cr>
nnoremap <silent> {c-k} :TmuxNavigateDown<cr>
nnoremap <silent> {c-j} :TmuxNavigateUp<cr>
nnoremap <silent> {c-l} :TmuxNavigateRight<cr>
nnoremap <silent> {c-p} :TmuxNavigatePrevious<cr>

"vim-gitgutter
" let g:gitgutter_override_sign_column_highlight = 0

" And then either update your colorscheme's SignColumn highlight group or set it in your vimrc:
" highlight SignColumn ctermbg=whatever    " terminal Vim


"EasyMotion
" map <Leader> <Plug>(easymotion-prefix)

"CtrlP
" let g:ctrlp_map = '<c-p>'
" let g:ctrlp_cmd = 'CtrlP'


" }}}
 

x

bashrc(raw, dl)

 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
source ~/.aliases
[ -f ~/.fzf.bash ] && source ~/.fzf.bash

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

# History completion
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'

#Shorter history
export HISTCONTROL=ignoredups

# Mimic Zsh run-help ability
bind '"\eh": "\C-a\eb\ed\C-y\e#man \C-y\C-m\C-p\C-p\C-a\C-d\C-e"'

export DISPLAY=:0.0

# Define some colors first: Capitals denote bold

red='\e[0;31m'
RED='\e[1;31m'
WHITE='\e[0;37m'
green='\e[0;32m'
GREEN='\e[1;32m'
yellow='\e[0;33m'
YELLOW='\e[1;33m'
blue='\e[0;34m'
BLUE='\e[1;34m'
magenta='\e[0;35m'
MAGENTA='\e[1;35m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
NC='\e[0m'              # No Color

# Taken from http://www.opinionatedprogrammer.com/2011/01/colorful-bash-prompt-reflecting-git-status/
function _git_prompt() {
local git_status="`git status -unormal 2>&1`"
    if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
        if [[ "$git_status" =~ nothing\ to\ commit ]]; then
            local ansi=$WHITE
        elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
            local ansi=$RED
        else
            local ansi=$YELLOW
        fi
        if [[ "$git_status" =~ On\ branch\ ([^[:space:]]+) ]]; then
            branch=${BASH_REMATCH[1]}
        #test "$branch" != master || branch=' '
        else
            # Detached HEAD.  (branch=HEAD is a faster alternative.)
            branch="(`git describe --all --contains --abbrev=4 HEAD 2> /dev/null ||
        echo HEAD`)"
        fi
        echo -n '[\['"$ansi"'\]'"$branch"'\[\e[0m\]]'
    fi
}

function report_status() {
    RET_CODE=$?
    if [[ $RET_CODE -ne 0 ]] ; then
    echo -ne "[\[$RED\]$RET_CODE\[$NC\]]"
    fi
}

export _PS1="\[$NC\]\u (\W) "
export PS2="\[$NC\]> "
export PROMPT_COMMAND='_status=$(report_status);export PS1="${_PS1}$(_git_prompt)${_status} \$ ";unset _status;'
 

x

tmux.conf(raw, dl)

  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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
# cat << EOF > /dev/null
# https://github.com/gpakosz/.tmux
# (‑●‑●)> released under the WTFPL v2 license, by Gregory Pakosz (@gpakosz)
# /!\ do not edit this file
#     instead, override settings in ~/.tmux.conf.local


# -- general -------------------------------------------------------------------

set -g default-terminal "screen-256color" # colors!
setw -g xterm-keys on
set -s escape-time 10                     # faster command sequences
set -sg repeat-time 600                   # increase repeat timeout
set -s focus-events on

set -g prefix2 C-a                        # GNU-Screen compatible prefix
bind C-a send-prefix -2

set -q -g status-utf8 on                  # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on

set -g history-limit 5000                 # boost history

# edit configuration
bind e new-window -n '~/.tmux.conf.local' "sh -c '\${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'"

# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'

# set-option -g default-shell "/bin/zsh"

# -- display -------------------------------------------------------------------

set -g base-index 1         # start windows numbering at 1
setw -g pane-base-index 1   # make pane numbering consistent with windows

setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on  # renumber windows when a window is closed

set -g set-titles on                        # set terminal title
set -g set-titles-string '#h ❐ #S ● #I #W'

set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000      # slightly longer status messages display time

set -g status-interval 10     # redraw status line every 10 seconds

# clear both screen and history
bind -n C-l send-keys C-l \; run 'sleep 0.05 && tmux clear-history'

# activity
set -g monitor-activity on
set -g visual-activity off


# -- navigation ----------------------------------------------------------------

# create session
bind C-c new-session

# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'

# split current window horizontally
bind - split-window -v
# split current window vertically
bind _ split-window -h

# pane navigation
bind -r h select-pane -L  # move left
bind -r j select-pane -D  # move down
bind -r k select-pane -U  # move up
bind -r l select-pane -R  # move right
bind > swap-pane -D       # swap current pane with the next one
bind < swap-pane -U       # swap current pane with the previous one

# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2

# window navigation
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window     # select next window
bind Tab last-window        # move to last active window

# toggle mouse
bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse"


# -- urlview -------------------------------------------------------------------

bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}"


# -- facebook pathpicker -------------------------------------------------------

bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id}"


# -- list choice (tmux < 2.4) --------------------------------------------------

# vi-choice is gone in tmux >= 2.4
run -b 'tmux bind -t vi-choice h tree-collapse 2> /dev/null || true'
run -b 'tmux bind -t vi-choice l tree-expand 2> /dev/null || true'
run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null || true'
run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null || true'
run -b 'tmux bind -t vi-choice H tree-collapse-all 2> /dev/null || true'
run -b 'tmux bind -t vi-choice L tree-expand-all 2> /dev/null || true'
run -b 'tmux bind -t vi-choice Escape cancel 2> /dev/null || true'


# -- edit mode (tmux < 2.4) ----------------------------------------------------

# vi-edit is gone in tmux >= 2.4
run -b 'tmux bind -ct vi-edit H start-of-line 2> /dev/null || true'
run -b 'tmux bind -ct vi-edit L end-of-line 2> /dev/null || true'
run -b 'tmux bind -ct vi-edit q cancel 2> /dev/null || true'
run -b 'tmux bind -ct vi-edit Escape cancel 2> /dev/null || true'


# -- copy mode -----------------------------------------------------------------

bind Enter copy-mode # enter copy mode

run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true'
run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true'
run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi y send -X copy-selection-and-cancel 2> /dev/null || true'
run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true'
run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'

# copy to Mac OSX clipboard
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
# copy to X11 clipboard
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'
if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
# copy to Windows clipboard
if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'
if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'


# -- buffers -------------------------------------------------------------------

bind b list-buffers  # list paste buffers
bind p paste-buffer  # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from


# -- user defined overrides ----------------------------------------------------

if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'


# -- 8< ------------------------------------------------------------------------

run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'


# EOF
#
# # exit the script if any statement returns a non-true return value
# set -e
#
# __newline='
# '
#
# _is_enabled() {
#   ( ([ x"$1" = x"enabled" ] || [ x"$1" = x"true" ] || [ x"$1" = x"yes" ] || [ x"$1" = x"1" ]) && return 0 ) || return 1
# }
#
# _circled_digit() {
#   circled_digits='⓪ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳'
#   if [ "$1" -le 20 ] 2>/dev/null; then
#     i=$(( $1 + 1 ))
#     eval set -- "$circled_digits"
#     eval echo "\${$i}"
#   else
#     echo "$1"
#   fi
# }
#
# _maximize_pane() {
#   current_session=${1:-$(tmux display -p '#{session_name}')}
#   current_pane=${2:-$(tmux display -p '#{pane_id}')}
#
#   dead_panes=$(tmux list-panes -s -t "$current_session" -F '#{pane_dead} #{pane_id} #{pane_start_command}' | grep -o '^1 %.\+maximized.\+$' || true)
#   restore=$(echo "$dead_panes" | sed -n -E -e "s/^1 $current_pane .+maximized.+(%[0-9]+)$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t $current_pane/p" -e "s/^1 (%[0-9]+) .+maximized.+$current_pane$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t \1/p" )
#
#   if [ -z "$restore" ]; then
#     [ "$(tmux list-panes -t "$current_session:" | wc -l | sed 's/^ *//g')" -eq 1 ] && tmux display "Can't maximize with only one pane" && return
#     window=$(tmux new-window -t "$current_session:" -P "exec maximized... 2> /dev/null & tmux setw -t $current_session: remain-on-exit on; printf 'Pane has been maximized, press <prefix>+ to restore. %s' \\$current_pane")
#     window=${window%.*}
#
#     guard=10
#     while [ x"$(tmux list-panes -t "$window" -F '#{session_name}:#{window_index} #{pane_dead}' 2>/dev/null)" != x"$window 1" ] && [ "$guard" -ne 0 ]; do
#       sleep 0.01
#       guard=$((guard - 1))
#     done
#     if [ "$guard" -eq 0 ]; then
#       tmux display 'Unable to maximize pane'
#     fi
#
#     new_pane=$(tmux display -p '#{pane_id}')
#     tmux setw -t "$window" remain-on-exit off \; swap-pane -s "$current_pane" -t "$new_pane"
#   else
#     $restore || tmux kill-pane
#   fi
# }
#
# _toggle_mouse() {
#   if tmux show -g -w | grep -q mode-mouse; then
#     old=$(tmux show -g -w | grep mode-mouse | cut -d' ' -f2)
#     new=""
#
#     if [ "$old" = "on" ]; then
#       new="off"
#     else
#       new="on"
#     fi
#
#     tmux set -g mode-mouse $new \;\
#          set -g mouse-resize-pane $new \;\
#          set -g mouse-select-pane $new \;\
#          set -g mouse-select-window $new \;\
#          display "mouse: $new"
#   else
#     old=$(tmux show -g | grep mouse | head -n 1 | cut -d' ' -f2)
#     new=""
#
#     if [ "$old" = "on" ]; then
#       new="off"
#     else
#       new="on"
#     fi
#
#     tmux set -g mouse $new \;\
#          display "mouse: $new"
#   fi
# }
#
# _battery() {
#   charge=0
#   uname_s=$(uname -s)
#   case "$uname_s" in
#     *Darwin*)
#       while IFS= read -r line; do
#         if [ x"$discharging" != x"true" ]; then
#           discharging=$(printf '%s' "$line" | grep -qi "discharging" && echo "true" || echo "false")
#         fi
#         percentage=$(printf '%s' "$line" | grep -E -o '[0-9]+%')
#         charge=$(awk -v charge="$charge" -v percentage="${percentage%%%}" 'BEGIN { print charge + percentage / 100 }')
#         count=$((count + 1))
#       done  << EOF
# $(pmset -g batt | grep 'InternalBattery')
# EOF
#       ;;
#     *Linux*)
#       while IFS= read -r batpath; do
#         if [ x"$discharging" != x"true" ]; then
#           discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false")
#         fi
#         bat_capacity="$batpath/capacity"
#         if [ -r "$bat_capacity" ]; then
#           charge=$(awk -v charge="$charge" -v capacity="$(cat "$bat_capacity")" 'BEGIN { print charge + capacity / 100 }')
#         else
#           bat_energy_full="$batpath/energy_full"
#           bat_energy_now="$batpath/energy_now"
#           if [ -r "$bat_energy_full" ] && [ -r "$bat_energy_now" ]; then
#             charge=$(awk -v charge="$charge" -v energy_now="$(cat "$bat_energy_now")" -v energy_full="$(cat "$bat_energy_full")" 'BEGIN { print charge + energy_now / energy_full }')
#           fi
#         fi
#         count=$((count + 1))
#       done  << EOF
# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*')
# EOF
#       ;;
#     *CYGWIN*|*MSYS*|*MINGW*)
#       while IFS= read -r line; do
#         [ -z "$line" ] && continue
#         if [ x"$discharging" != x"true" ]; then
#           discharging=$(printf '%s' "$line" | awk '{ s = ($1 == 1) ? "true" : "false"; print s }')
#         fi
#         charge=$(printf '%s' "$line" | awk -v charge="$charge" '{ print charge + $2 / 100 }')
#         count=$((count + 1))
#       done  << EOF
# $(wmic path Win32_Battery get BatteryStatus, EstimatedChargeRemaining | tr -d '\r' | tail -n +2)
# EOF
#       ;;
#     *OpenBSD*)
#       for batid in 0 1 2; do
#         sysctl -n "hw.sensors.acpibat$batid.raw0" 2>&1 | grep -q 'not found' && continue
#         if [ x"$discharging" != x"true" ]; then
#           discharging=$(sysctl -n "hw.sensors.acpibat$batid.raw0" | grep -q 1 && echo "true" || echo "false")
#         fi
#         if sysctl -n "hw.sensors.acpibat$batid" | grep -q amphour; then
#           charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.amphour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.amphour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }')
#         else
#           charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.watthour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.watthour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }')
#         fi
#         count=$((count + 1))
#       done
#       ;;
#   esac
#   charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }')
#   if [ "$charge" -eq 0 ]; then
#     tmux  set -ug '@battery_status'  \;\
#           set -ug '@battery_bar'     \;\
#           set -ug '@battery_hbar'    \;\
#           set -ug '@battery_vbar'    \;\
#           set -ug '@battery_percentage'
#     return
#   fi
#
#   variables=$(tmux  show -gqv '@battery_bar_symbol_full' \;\
#                     show -gqv '@battery_bar_symbol_empty' \;\
#                     show -gqv '@battery_bar_length' \;\
#                     show -gqv '@battery_bar_palette' \;\
#                     show -gqv '@battery_hbar_palette' \;\
#                     show -gqv '@battery_vbar_palette' \;\
#                     show -gqv '@battery_status_charging' \;\
#                     show -gqv '@battery_status_discharging')
#   # shellcheck disable=SC2086
#   { set -f; IFS="$__newline"; set -- $variables; unset IFS; set +f; }
#
#   battery_bar_symbol_full=$1
#   battery_bar_symbol_empty=$2
#   battery_bar_length=$3
#   battery_bar_palette=$4
#   battery_hbar_palette=$5
#   battery_vbar_palette=$6
#   battery_status_charging=$7
#   battery_status_discharging=$8
#
#   if [ x"$battery_bar_length" = x"auto" ]; then
#     columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80)
#     if [ "$columns" -ge 80 ]; then
#       battery_bar_length=10
#     else
#       battery_bar_length=5
#     fi
#   fi
#
#   if [ x"$discharging" = x"true" ]; then
#     battery_status="$battery_status_discharging"
#   else
#     battery_status="$battery_status_charging"
#   fi
#
#   if echo "$battery_bar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then
#     # shellcheck disable=SC2086
#     { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; }
#     palette_style=$1
#     battery_bg=${2:-none}
#     [ x"$palette_style" = x"gradient" ] && \
#       palette="196 202 208 214 220 226 190 154 118 82 46"
#     [ x"$palette_style" = x"heat" ] && \
#       palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196"
#
#     palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }')
#     eval set -- "$palette"
#
#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")
#     battery_bar="#[bg=$battery_bg]"
#     # shellcheck disable=SC2046
#     [ "$full" -gt 0 ] && \
#       battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_full" $(echo "$palette" | cut -d' ' -f1-"$full"))"
#     # shellcheck disable=SC2046
#     empty=$((battery_bar_length - full))
#     # shellcheck disable=SC2046
#     [ "$empty" -gt 0 ] && \
#       battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_empty" $(echo "$palette" | cut -d' ' -f$((full + 1))-$((full + empty))))"
#       eval battery_bar="$battery_bar#[fg=colour\${$((full == 0 ? 1 : full))}]"
#   elif echo "$battery_bar_palette" | grep -q -E '^(([#a-z0-9]{7,9}|none),?){3}$'; then
#     # shellcheck disable=SC2086
#     { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; }
#     battery_full_fg=$1
#     battery_empty_fg=$2
#     battery_bg=$3
#
#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")
#     [ x"$battery_bg" != x"none" ] && \
#       battery_bar="#[bg=$battery_bg]"
#     #shellcheck disable=SC2046
#     [ "$full" -gt 0 ] && \
#       battery_bar="$battery_bar#[fg=$battery_full_fg]$(printf "%0.s$battery_bar_symbol_full" $(seq 1 "$full"))"
#     empty=$((battery_bar_length - full))
#     #shellcheck disable=SC2046
#     [ "$empty" -gt 0 ] && \
#       battery_bar="$battery_bar#[fg=$battery_empty_fg]$(printf "%0.s$battery_bar_symbol_empty" $(seq 1 "$empty"))" && \
#       battery_bar="$battery_bar#[fg=$battery_empty_fg]"
#   fi
#
#   if echo "$battery_hbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then
#     # shellcheck disable=SC2086
#     { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; }
#     palette_style=$1
#     [ x"$palette_style" = x"gradient" ] && \
#       palette="196 202 208 214 220 226 190 154 118 82 46"
#     [ x"$palette_style" = x"heat" ] && \
#       palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196"
#
#     palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }')
#     eval set -- "$palette"
#
#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")
#     eval battery_hbar_fg="colour\${$((full == 0 ? 1 : full))}"
#   elif echo "$battery_hbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then
#     # shellcheck disable=SC2086
#     { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; }
#
#     # shellcheck disable=SC2046
#     eval $(awk "BEGIN { printf \"battery_hbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }")
#   fi
#
#   eval set -- "▏ ▎ ▍ ▌ ▋ ▊ ▉ █"
#   # shellcheck disable=SC2046
#   eval $(awk "BEGIN { printf \"battery_hbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }")
#   battery_hbar="#[fg=${battery_hbar_fg?}]${battery_hbar_symbol?}"
#
#   if echo "$battery_vbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then
#     # shellcheck disable=SC2086
#     { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; }
#     palette_style=$1
#     [ x"$palette_style" = x"gradient" ] && \
#       palette="196 202 208 214 220 226 190 154 118 82 46"
#     [ x"$palette_style" = x"heat" ] && \
#       palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196"
#
#     palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }')
#     eval set -- "$palette"
#
#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")
#     eval battery_vbar_fg="colour\${$((full == 0 ? 1 : full))}"
#   elif echo "$battery_vbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then
#     # shellcheck disable=SC2086
#     { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; }
#
#     # shellcheck disable=SC2046
#     eval $(awk "BEGIN { printf \"battery_vbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }")
#   fi
#
#   eval set -- "▁ ▂ ▃ ▄ ▅ ▆ ▇ █"
#   # shellcheck disable=SC2046
#   eval $(awk "BEGIN { printf \"battery_vbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }")
#   battery_vbar="#[fg=${battery_vbar_fg?}]${battery_vbar_symbol?}"
#
#   battery_percentage="$(awk "BEGIN { printf \"%.0f%%\", ($charge) * 100 }")"
#
#   tmux  set -g '@battery_status' "$battery_status" \;\
#         set -g '@battery_bar' "$battery_bar" \;\
#         set -g '@battery_hbar' "$battery_hbar" \;\
#         set -g '@battery_vbar' "$battery_vbar" \;\
#         set -g '@battery_percentage' "$battery_percentage"
# }
#
# _username() {
#   tty=${1:-$(tmux display -p '#{pane_tty}')}
#   ssh_only=$2
#   # shellcheck disable=SC2039
#   if [ x"$OSTYPE" = x"cygwin" ]; then
#     pid=$(ps -a | awk -v tty="${tty##/dev/}" '$5 == tty && /ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { print $1 }')
#     [ -n "$pid" ] && ssh_parameters=$(tr '\0' ' ' < "/proc/$pid/cmdline" | sed 's/^ssh //')
#   else
#     ssh_parameters=$(ps -t "$tty" -o command= | awk '/ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { $1=""; print $0; exit }')
#   fi
#   if [ -n "$ssh_parameters" ]; then
#     # shellcheck disable=SC2086
#     username=$(ssh -G $ssh_parameters 2>/dev/null | awk 'NR > 2 { exit } ; /^user / { print $2 }')
#     # shellcheck disable=SC2086
#     [ -z "$username" ] && username=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" $ssh_parameters 2>&1 | awk '/^%username% / { print $2; exit }')
#   else
#     if ! _is_enabled "$ssh_only"; then
#       # shellcheck disable=SC2039
#       if [ x"$OSTYPE" = x"cygwin" ]; then
#         username=$(whoami)
#       else
#         username=$(ps -t "$tty" -o user= -o pid= -o ppid= -o command= | awk '
#           !/ssh/ { user[$2] = $1; ppid[$3] = 1 }
#           END {
#             for (i in user)
#               if (!(i in ppid))
#               {
#                 print user[i]
#                 exit
#               }
#           }
#         ')
#       fi
#     fi
#   fi
#
#   echo "$username"
# }
#
# _hostname() {
#   tty=${1:-$(tmux display -p '#{pane_tty}')}
#   ssh_only=$2
#   # shellcheck disable=SC2039
#   if [ x"$OSTYPE" = x"cygwin" ]; then
#     pid=$(ps -a | awk -v tty="${tty##/dev/}" '$5 == tty && /ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { print $1 }')
#     [ -n "$pid" ] && ssh_parameters=$(tr '\0' ' ' < "/proc/$pid/cmdline" | sed 's/^ssh //')
#   else
#     ssh_parameters=$(ps -t "$tty" -o command= | awk '/ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { $1=""; print $0; exit }')
#   fi
#   if [ -n "$ssh_parameters" ]; then
#     # shellcheck disable=SC2086
#     hostname=$(ssh -G $ssh_parameters 2>/dev/null | awk 'NR > 2 { exit } ; /^hostname / { print $2 }')
#     # shellcheck disable=SC2086
#     [ -z "$hostname" ] && hostname=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%hostname%% %h >&2'" $ssh_parameters 2>&1 | awk '/^%hostname% / { print $2; exit }')
#     #shellcheck disable=SC1004
#     hostname=$(echo "$hostname" | awk '\
#     { \
#       if ($1~/^[0-9.:]+$/) \
#         print $1; \
#       else \
#         split($1, a, ".") ; print a[1] \
#     }')
#   else
#     if ! _is_enabled "$ssh_only"; then
#       hostname=$(command hostname -s)
#     fi
#   fi
#
#   echo "$hostname"
# }
#
# _root() {
#   tty=${1:-$(tmux display -p '#{pane_tty}')}
#   username=$(_username "$tty" false)
#
#   if [ x"$username" = x"root" ]; then
#     tmux show -gqv '@root'
#   else
#     echo ""
#   fi
# }
#
# _uptime() {
#   case $(uname -s) in
#     *Darwin*)
#       boot=$(sysctl -q -n kern.boottime | awk -F'[ ,:]+' '{ print $4 }')
#       now=$(date +%s)
#       ;;
#     *Linux*|*CYGWIN*|*MSYS*|*MINGW*)
#       now=$(cut -d' ' -f1 < /proc/uptime)
#       ;;
#     *OpenBSD*)
#       boot=$(sysctl -n kern.boottime)
#       now=$(date +%s)
#   esac
#   # shellcheck disable=SC1004
#   awk -v boot="$boot" -v now="$now" '
#     BEGIN {
#       uptime = now - boot
#       d = int(uptime / 86400)
#       h = int(uptime / 3600) % 24
#       m = int(uptime / 60) % 60
#       s = int(uptime) % 60
#
#       system("tmux  set -g @uptime_d " d + 0 " \\; " \
#                    "set -g @uptime_h " h + 0 " \\; " \
#                    "set -g @uptime_m " m + 0 " \\; " \
#                    "set -g @uptime_s " s + 0)
#     }'
# }
#
# _loadavg() {
#   case $(uname -s) in
#     *Darwin*)
#       tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f2)"
#       ;;
#     *Linux*)
#       tmux set -g @loadavg "$(cut -d' ' -f1 < /proc/loadavg)"
#       ;;
#     *OpenBSD*)
#       tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f1)"
#       ;;
#   esac
# }
#
# _split_window() {
#   tty=${1:-$(tmux display -p '#{pane_tty}')}
#   shift
#   # shellcheck disable=SC2039
#   if [ x"$OSTYPE" = x"cygwin" ]; then
#     pid=$(ps -a | sort -d | awk -v tty="${tty##/dev/}" '$5 == tty && /ssh/ && !/-W/ { print $1; exit 0 }')
#     [ -n "$pid" ] && ssh=$(tr '\0' ' ' < "/proc/$pid/cmdline")
#   else
#     ssh=$(ps -t "$tty" -o command= | sort -d | awk '/ssh/ && !/-W/ { print $0; exit 0 }')
#   fi
#   if [ -n "$ssh" ]; then
#     # shellcheck disable=SC2046
#     tmux split-window "$@" $(echo "$ssh" | sed -e "s/;/\\\\;/g")
#   else
#     tmux split-window "$@"
#   fi
# }
#
# _apply_overrides() {
#   tmux_conf_theme_24b_colour=${tmux_conf_theme_24b_colour:-false}
#   if _is_enabled "$tmux_conf_theme_24b_colour"; then
#   case "$TERM" in
#     screen-*|tmux-*)
#       ;;
#     *)
#       tmux set-option -ga terminal-overrides ",$TERM:Tc"
#       ;;
#   esac
#   fi
# }
#
# _apply_bindings() {
#   line=$(tmux list-keys | grep new-window | head -1)
#   prefix=${line%new-window*}
#   column=${#prefix}
#
#   tmux_conf_new_window_retain_current_path=${tmux_conf_new_window_retain_current_path:-false}
#   while IFS= read -r line; do
#     [ -z "$line" ] && continue
#     left=$(printf '%s' "$line" | cut -c-"$column" | sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g')
#     if _is_enabled "$tmux_conf_new_window_retain_current_path"; then
#       right=$(printf '%s' "$line" | cut -c"$column-" | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/new-window$/new-window -c "#{pane_current_path}"/g')
#     else
#       right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/-c[ \t]+"#\{pane_current_path\}"$//g')
#     fi
#     eval "tmux $left $right" 2>/dev/null || true
#   done  << EOF
# $(tmux list-keys 2>/dev/null | grep -e 'new-window\(\s\+-c\s\+"#{pane_current_path}\|$\)')
# EOF
#
#   tmux_conf_new_pane_retain_current_path=${tmux_conf_new_pane_retain_current_path:-true}
#   while IFS= read -r line; do
#     [ -z "$line" ] && continue
#     left=$(printf '%s' "$line" | cut -c-"$column" | sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g')
#     if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then
#       right=$(printf '%s' "$line" | cut -c"$column-" | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/split-window([ \t]+-(h|v))?$/& -c "#{pane_current_path}"/g')
#     else
#       right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/-c[ \t]+"#\{pane_current_path\}"$//g')
#     fi
#     eval "tmux $left $right" 2>/dev/null || true
#   done  << EOF
# $(tmux list-keys 2>/dev/null | grep -e 'split\(-\|_\)window')
# EOF
#
#   tmux_conf_new_pane_reconnect_ssh=${tmux_conf_new_pane_reconnect_ssh:-false}
#   while IFS= read -r line; do
#     [ -z "$line" ] && continue
#     left=$(printf '%s' "$line" | cut -c-"$column" | sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g')
#     if _is_enabled "$tmux_conf_new_pane_reconnect_ssh"; then
#       right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/split-window([^;]+)/run-shell "cut -c3- ~\/\.tmux\.conf | sh -s _split_window #{pane_tty}\1"/g')
#     else
#       right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/run-shell "cut -c3- ~\/\.tmux\.conf \| sh -s _split_window #\{pane_tty\}([^;]+)"/split-window\1/g' -e 's/#\{.+\}/\"&\"/g')
#     fi
#     eval "tmux $left $right" 2>/dev/null || true
#   done  << EOF
# $(tmux list-keys 2>/dev/null | grep -e 'split\(-\|_\)window')
# EOF
#
#   tmux_conf_new_session_prompt=${tmux_conf_new_session_prompt:-false}
#   while IFS= read -r line; do
#     [ -z "$line" ] && continue
#     left=$(printf '%s' "$line" | cut -c-"$column" | sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g')
#     if _is_enabled "$tmux_conf_new_session_prompt"; then
#       right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/new-session$/command-prompt -p new-session \"new-session -s %%\"/g')
#     else
#       right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }'| sed -E -e 's/command-prompt -p new-session[^;]+/new-session/g')
#     fi
#     eval "tmux $left $right" 2>/dev/null || true
#   done  << EOF
# $(tmux list-keys 2>/dev/null | grep -e 'new-session')
# EOF
#
#   tmux_conf_copy_to_os_clipboard=${tmux_conf_copy_to_os_clipboard:-false}
#   command -v pbcopy > /dev/null 2>&1 && command='pbcopy'
#   command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy'
#   command -v xsel > /dev/null 2>&1 && command='xsel -i -b'
#   ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1'
#   command -v clip.exe > /dev/null 2>&1 && command='clip\.exe'
#   [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard'
#
#   if [ -n "$command" ]; then
#     # shellcheck disable=SC2086
#     for table in "" "-t emacs-copy" "-t vi-copy"; do
#       line=$(tmux list-keys $table 2>/dev/null | grep -e 'copy-selection\|copy-pipe' | head -1)
#       prefix=${line%copy-*}
#       column=${#prefix}
#       [ -z "$line" ] && continue
#
#       while IFS= read -r line; do
#         [ -z "$line" ] && continue
#         left=$(printf '%s' "$line" | cut -c-"$column" | sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g')
#         if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then
#           right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e "s/copy-selection(-and-cancel)?$/copy-pipe\1 \"$command\"/g")
#         else
#           right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e "s/copy-pipe(-and-cancel)? \"$command\"$/copy-selection\1/g")
#         fi
#         eval "tmux $left $right" 2>/dev/null || true
#       done  << EOF
# $(tmux list-keys $table 2>/dev/null | grep -e 'copy-selection\|copy-pipe')
# EOF
#     done
#  fi
# }
#
# _apply_theme() {
#
#   # -- panes -------------------------------------------------------------
#
#   tmux_conf_theme_window_fg=${tmux_conf_theme_window_fg:-default}
#   tmux_conf_theme_window_bg=${tmux_conf_theme_window_bg:-default}
#   tmux_conf_theme_highlight_focused_pane=${tmux_conf_theme_highlight_focused_pane:-false}
#   tmux_conf_theme_focused_pane_fg=${tmux_conf_theme_focused_pane_fg:-'default'} # default
#   tmux_conf_theme_focused_pane_bg=${tmux_conf_theme_focused_pane_bg:-'#0087d7'} # light blue
#
#   # tmux 1.9 doesn't really like set -q
#   if tmux show -g -w | grep -q window-style; then
#     tmux setw -g window-style "fg=$tmux_conf_theme_window_fg,bg=$tmux_conf_theme_window_bg"
#
#     if _is_enabled "$tmux_conf_theme_highlight_focused_pane"; then
#       tmux setw -g window-active-style "fg=$tmux_conf_theme_focused_pane_fg,bg=$tmux_conf_theme_focused_pane_bg"
#     else
#       tmux setw -g window-active-style default
#     fi
#   fi
#
#   tmux_conf_theme_pane_border_style=${tmux_conf_theme_pane_border_style:-thin}
#   tmux_conf_theme_pane_border=${tmux_conf_theme_pane_border:-'#444444'}               # light gray
#   tmux_conf_theme_pane_active_border=${tmux_conf_theme_pane_active_border:-'#00afff'} # light blue
#   tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-$tmux_conf_theme_pane_border}
#   tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-$tmux_conf_theme_pane_active_border}
#   case "$tmux_conf_theme_pane_border_style" in
#     fat)
#       tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-$tmux_conf_theme_pane_border_fg}
#       tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-$tmux_conf_theme_pane_active_border_fg}
#       ;;
#     thin|*)
#       tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-'default'}
#       tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-'default'}
#       ;;
#   esac
#   tmux setw -g pane-border-style "fg=$tmux_conf_theme_pane_border_fg,bg=$tmux_conf_theme_pane_border_bg" \; set -g pane-active-border-style "fg=$tmux_conf_theme_pane_active_border_fg,bg=$tmux_conf_theme_pane_active_border_bg"
#
#   tmux_conf_theme_pane_indicator=${tmux_conf_theme_pane_indicator:-'#00afff'}               # light blue
#   tmux_conf_theme_pane_active_indicator=${tmux_conf_theme_pane_active_indicator:-'#00afff'} # light blue
#
#   tmux set -g display-panes-colour "$tmux_conf_theme_pane_indicator" \; set -g display-panes-active-colour "$tmux_conf_theme_pane_active_indicator"
#
#   # -- status line -------------------------------------------------------
#
#   tmux_conf_theme_left_separator_main=${tmux_conf_theme_left_separator_main-''}
#   tmux_conf_theme_left_separator_sub=${tmux_conf_theme_left_separator_sub-'|'}
#   tmux_conf_theme_right_separator_main=${tmux_conf_theme_right_separator_main-''}
#   tmux_conf_theme_right_separator_sub=${tmux_conf_theme_right_separator_sub-'|'}
#
#   tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-'#000000'}   # black
#   tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-'#ffff00'}   # yellow
#   tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-'bold'}
#   tmux set -g message-style "fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr"
#
#   tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-'#ffff00'} # yellow
#   tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-'#000000'} # black
#   tmux_conf_theme_message_command_attr=${tmux_conf_theme_message_command_attr:-'bold'}
#   tmux set -g message-command-style "fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_command_attr"
#
#   tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-'#000000'} # black
#   tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-'#ffff00'} # yellow
#   tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-'bold'}
#   tmux setw -g mode-style "fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr"
#
#   tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-'#8a8a8a'} # white
#   tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-'#080808'} # dark gray
#   tmux_conf_theme_status_attr=${tmux_conf_theme_status_attr:-'none'}
#   tmux  set -g status-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr"        \;\
#         set -g status-left-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr"   \;\
#         set -g status-right-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr"
#
#   tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-'#8a8a8a'} # white
#   tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-'#080808'} # dark gray
#   tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-'none'}
#   tmux_conf_theme_window_status_format=${tmux_conf_theme_window_status_format:-'#I #W'}
#
#   tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-'#000000'} # black
#   tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-'#00afff'} # light blue
#   tmux_conf_theme_window_status_current_attr=${tmux_conf_theme_window_status_current_attr:-'bold'}
#   tmux_conf_theme_window_status_current_format=${tmux_conf_theme_window_status_current_format:-'#I #W'}
#   if [ x"$(tmux show -g -v status-justify)" = x"right" ]; then
#     tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_window_status_bg]$tmux_conf_theme_right_separator_main#[fg=default,bg=default,default] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_right_separator_main"
#   else
#     tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg]$tmux_conf_theme_left_separator_main#[fg=default,bg=default,default] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_left_separator_main"
#   fi
#
#   tmux_conf_theme_window_status_format=$(echo "$tmux_conf_theme_window_status_format" | sed 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #I)%g')
#   tmux_conf_theme_window_status_current_format=$(echo "$tmux_conf_theme_window_status_current_format" | sed 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #I)%g')
#
#   tmux  setw -g window-status-style "fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr" \;\
#         setw -g window-status-format "$tmux_conf_theme_window_status_format" \;\
#         setw -g window-status-current-style "fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr" \;\
#         setw -g window-status-current-format "$tmux_conf_theme_window_status_current_format"
#
#   tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-'default'}
#   tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-'default'}
#   tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-'underscore'}
#   tmux setw -g window-status-activity-style "fg=$tmux_conf_theme_window_status_activity_fg,bg=$tmux_conf_theme_window_status_activity_bg,$tmux_conf_theme_window_status_activity_attr"
#
#   tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-'#ffff00'} # yellow
#   tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-'default'}
#   tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-'blink,bold'}
#   tmux setw -g window-status-bell-style "fg=$tmux_conf_theme_window_status_bell_fg,bg=$tmux_conf_theme_window_status_bell_bg,$tmux_conf_theme_window_status_bell_attr"
#
#   tmux_conf_theme_window_status_last_fg=${tmux_conf_theme_window_status_last_fg:-'#00afff'} # light blue
#   tmux_conf_theme_window_status_last_bg=${tmux_conf_theme_window_status_last_bg:-'default'}
#   tmux_conf_theme_window_status_last_attr=${tmux_conf_theme_window_status_last_attr:-'none'}
#   tmux setw -g window-status-last-style "fg=$tmux_conf_theme_window_status_last_fg,bg=$tmux_conf_theme_window_status_last_bg,$tmux_conf_theme_window_status_last_attr"
#
#   # -- indicators
#
#   tmux_conf_theme_pairing=${tmux_conf_theme_pairing:-'
 

x

i3status.conf(raw, dl)

  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
###############################################################################
# ceerious i3 status config
# see "man i3status" for documentation.
#
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
###############################################################################

general {
    interval 		= 1
        colors 			= true
        color_good      = '#88b090'
        color_degraded  = '#ccdc90'
        color_bad       = '#baa781'
}

order += "disk /"
order += "disk /home"
order += "disk /data"
order += "volume master"
#order += "run_watch DHCP"
#order += "ipv6"
#order += "run_watch VPN"
order += "wireless wlp4s0"
order += "ethernet enp0s25"
order += "battery 0"
order += "cpu_temperature 0"
order += "cpu_usage 0"
order += "load"
order += "tztime local"

wireless wlp4s0 {
    format_up = "%quality  %essid %ip"
        format_down = ""
}

ethernet enp0s25 {
#if you use %speed, i3status requires root privileges
    format_up = "%ip (%speed)"
        format_down = ""
}

battery 0 {
    format = "%status %percentage %remaining"
        format_down = ""
        last_full_capacity = true
        integer_battery_capacity = true
        low_threshold = 11
        threshold_type = percentage
        hide_seconds = true
        status_chr = " "
        status_bat = " "
        status_unk = " "
        status_full = " "
}

run_watch DHCP {
    pidfile = "/var/run/dhclient*.pid"
}

run_watch VPN {
    pidfile = "/var/run/vpnc/pid"
}

tztime local {
    format = "%V  %A %e.%B  %H:%M:%S"
}

load {
    format = " %1min"
}

cpu_usage {
    format = " %usage"
}

cpu_temperature 0 {
    format = " %degrees°C"
}

disk "/" {
    format = " %avail"
        prefix_type	= custom
        low_threshold = 20
        threshold_type = percentage_avail
}

disk "/home" {
    format = " %avail"
        prefix_type	= custom
        low_threshold = 20
        threshold_type = percentage_avail
}


disk "/data" {
    format = " %avail"
        prefix_type	= custom
        low_threshold = 20
        threshold_type = percentage_avail
}


volume master {
    format = " %volume"
        format_muted = " %volume"
        device = "default"
        mixer = "Master"
        mixer_idx = 0
}
 

x

i3blocks.conf(raw, dl)

 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
# i3blocks config file

# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks

# List of valid properties:

# align
# color
# command
# full_text
# instance
# interval
# label
# min_width
# name
# separator
# separator_block_width
# short_text
# signal
# urgent

# Global properties
separator_block_width=16

[pacman]
label=:
command=~/.i3-blocks-contrib/pacman
signal=once
interval=1

[apt]
command=~/.i3-blocks-contrib-vivien/apt-upgrades/apt-upgrades
signal=once
interval=1

[disk-home]
label=
command=/usr/lib/i3blocks/disk $HOME
interval=30

[disk-root]
command=~/.i3-blocks-contrib/disk
interval=30

[volume]
label=
command=/usr/lib/i3blocks/volume 
interval=1

[weather]
command=~/.i3-blocks-contrib/weather
interval=3

[memory]
command=~/.i3-blocks-contrib/memory
interval=3
label=

[cpu-temp]
label=
command=/usr/lib/i3blocks/temperature
interval=30

[cpu]
label=
align=right
command=~/.i3-blocks-contrib/cpu
interval=1
interval=10

[gpu]
label=
command=nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader
interval=1

[date]
label=
command=date '+%d/%m/%Y'
interval=3600

[time]
label=
command=date '+%H:%M:%S' # | sed 's/:/h/'
interval=1

# [dunst]
# command=~/.i3blocks_dunst_notify
# signal=12
 

x

xinitrc(raw, dl)

 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
#! /bin/sh

# Load Xresources
xrdb ~/.Xresources

# hide mouse coursor when it isn't used
unclutter -root -visible &

# composition manager
compton &

# background
feh --bg-scale --randomize ~/dotfiles/Images/Walls/* &
# [ -e ~/.fehbg ] && source ~/.fehbg

# notification
dunst -config ~/.dunstrc &

# disks automounting
udiskie &

# Network Manager applet
>> /dev/null which nm-applet && nm-applet &
>> /dev/null which blueman-applet && blueman-applet &

# Start MPD on login
[ ! -s ~/.mpd/pid ] && mpd

# Start Moc on login
[ ! -s ~/.moc/config ] && moc

# Launch the VirtualBox guest services
VBoxClient-all &

# Here Xfce is kept as default
session=${1:-i3}

case $session in
    i3|i3wm           ) exec i3;;
    kde               ) exec startkde;;
    xfce|xfce4        ) exec startxfce4;;
    # No known session, try to run it as command
    *                 ) exec $1;;
esac

# exec i3
# i3-regenerate
 

x

.conkyrc(raw, dl)

 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
out_to_x no
out_to_console yes
total_run_times 0
if_up_strictness address
update_interval 10
cpu_avg_samples 2
net_avg_samples 4
short_units yes
#format_human_redable yes
override_utf8_locale no
use_xft yes
double_buffer yes
TEXT
[
      { "full_text": "CPU1", "color" : "\#00FF80", "separator" : false, "separator_block_width" : 3 },\
      {
          "full_text":"${cpu cpu0}%" 
          ${if_match ${cpu cpu0} > 50}, "color" : "\#CE4FF7"${endif}
      },\
      { "full_text": "CPU2", "color" : "\#00FF80", "separator" : false, "separator_block_width" : 3 },\
      {
          "full_text":"${cpu cpu1}%" 
          ${if_match ${cpu cpu1} > 50}, "color" : "\#CE4FF7"${endif}
      },\
      { "full_text": "CPU3", "color" : "\#00FF80", "separator" : false, "separator_block_width" : 3 },\
      {
          "full_text":"${cpu cpu2}%" 
          ${if_match ${cpu cpu2} > 50}, "color" : "\#CE4FF7"${endif}
      },\
      { "full_text": "CPU4", "color" : "\#00FF80", "separator" : false, "separator_block_width" : 3 },\
      {
          "full_text":"${cpu cpu3}%" 
          ${if_match ${cpu cpu3} > 50}, "color" : "\#CE4FF7"${endif}
      },\
      {
          "full_text": "T: ${acpitemp}°"
          ${if_match ${acpitemp} > 80}, "color" : "\#FF0000"${endif}
      },\
      { "full_text": "RAM", "conky_build_archlor" : "\#00F80", "separator" : false, "separator_block_width" : 3 },\
      {   "full_text": "${mem}"
          ${if_match ${memperc} > 80}, "color" : "\#CE4FF7"${endif}
      },\
      {
          "full_text": "${if_up wlp2s0}W: ${addr wlp2s0}", "color" : "\#40FF00",
          "short_text": ""
      },
      {
          "full_text": "${if_up enp3s0}E: ${addr enp3s0}", "color" : "\#40FF00",
          "short_text": ""
      },
      { "full_text" : " ${battery} ${battery_time}" , "color" : ${if_match ${battery_percent}>16}"\#4C7899"${else}"\#FF0000"${endif} },\
      {
          "full_text": "${time %D}",
          "short_text": ""
      },\
      {
          "full_text": "${time %H:%M}",
          "short_text": ""
      }\
],\
 

x

dunstrc(raw, dl)

  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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
[global]
    font = Monospace 12
    
    # Allow a small subset of html markup:
    #   <b>bold</b>
    #   <i>italic</i>
    #   <s>strikethrough</s>
    #   <u>underline</u>
    # 
    # For a complete reference see
    # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
    # If markup is not allowed, those tags will be stripped out of the
    # message.
    allow_markup = yes
    
    # The format of the message.  Possible variables are:
    #   %a  appname
    #   %s  summary
    #   %b  body
    #   %i  iconname (including its path)
    #   %I  iconname (without its path)
    #   %p  progress value if set ([  0%] to [100%]) or nothing
    # Markup is allowed
    format = "<b>%s</b>\n%b"
    
    # Sort messages by urgency.
    sort = yes
    
    # Show how many messages are currently hidden (because of geometry).
    indicate_hidden = yes
    
    # Alignment of message text.
    # Possible values are "left", "center" and "right".
    alignment = right
    
    # The frequency with wich text that is longer than the notification
    # window allows bounces back and forth.
    # This option conflicts with "word_wrap".
    # Set to 0 to disable.
    bounce_freq = 0
    
    # Show age of message if message is older than show_age_threshold
    # seconds.
    # Set to -1 to disable.
    show_age_threshold = 60
    
    # Split notifications into multiple lines if they don't fit into
    # geometry.
    word_wrap = yes
    
    # Ignore newlines '\n' in notifications.
    ignore_newline = no
    
    
    # The geometry of the window:
    #   [{width}]x{height}[+/-{x}+/-{y}]
    # The geometry of the message window.
    # The height is measured in number of notifications everything else
    # in pixels.  If the width is omitted but the height is given
    # ("-geometry x2"), the message window expands over the whole screen
    # (dmenu-like).  If width is 0, the window expands to the longest
    # message displayed.  A positive x is measured from the left, a
    # negative from the right side of the screen.  Y is measured from
    # the top and down respectevly.
    # The width can be negative.  In this case the actual width is the
    # screen width minus the width defined in within the geometry option.
    geometry = "1200x5-30+20"
    
    # Shrink window if it's smaller than the width.  Will be ignored if
    # width is 0.
    shrink = no
    
    # The transparency of the window.  Range: [0; 100].
    # This option will only work if a compositing windowmanager is
    # present (e.g. xcompmgr, compiz, etc.).
    transparency = 1
    
    # Don't remove messages, if the user is idle (no mouse or keyboard input)
    # for longer than idle_threshold seconds.
    # Set to 0 to disable.
    idle_threshold = 120
    
    # Which monitor should the notifications be displayed on.
    monitor = 0
    
    # Display notification on focused monitor.  Possible modes are:
    #   mouse: follow mouse pointer
    #   keyboard: follow window with keyboard focus
    #   none: don't follow anything
    # 
    # "keyboard" needs a windowmanager that exports the
    # _NET_ACTIVE_WINDOW property.
    # This should be the case for almost all modern windowmanagers.
    # 
    # If this option is set to mouse or keyboard, the monitor option
    # will be ignored.
    follow = mouse
    
    # Should a notification popped up from history be sticky or timeout
    # as if it would normally do.
    sticky_history = yes
    
    # Maximum amount of notifications kept in history
    history_length = 20
    
    # Display indicators for URLs (U) and actions (A).
    show_indicators = yes
    
    # The height of a single line.  If the height is smaller than the
    # font height, it will get raised to the font height.
    # This adds empty space above and under the text.
    line_height = 0
    
    # Draw a line of "separatpr_height" pixel height between two
    # notifications.
    # Set to 0 to disable.
    separator_height = 2
    
    # Padding between text and separator.
    padding = 8
    
    # Horizontal padding.
    horizontal_padding = 8
    
    # Define a color for the separator.
    # possible values are:
    #  * auto: dunst tries to find a color fitting to the background;
    #  * foreground: use the same color as the foreground;
    #  * frame: use the same color as the frame;
    #  * anything else will be interpreted as a X color.
    separator_color = frame
    
    # Print a notification on startup.
    # This is mainly for error detection, since dbus (re-)starts dunst
    # automatically after a crash.
    startup_notification = false
    
    # dmenu path.
    dmenu = /usr/bin/dmenu -p dunst:
    
    # Browser for opening urls in context menu.
    browser = /usr/bin/firefox -new-tab

    # Align icons left/right/off
    icon_position = left

    # Paths to default icons.
    icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/

[frame]
    width = 3
    color = "#aaaaaa"

[shortcuts]

    # Shortcuts are specified as [modifier+][modifier+]...key
    # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
    # "mod3" and "mod4" (windows-key).
    # Xev might be helpful to find names for keys.
    
    # Close notification.
    close = ctrl+space
    
    # Close all notifications.
    close_all = ctrl+shift+space
    
    # Redisplay last message(s).
    # On the US keyboard layout "grave" is normally above TAB and left
    # of "1".
    history = ctrl+grave
    
    # Context menu.
    context = ctrl+shift+period

[urgency_low]
    # IMPORTANT: colors have to be defined in quotation marks.
    # Otherwise the "#" and following would be interpreted as a comment.
    background = "#222222"
    foreground = "#888888"
    timeout = 10

[urgency_normal]
    background = "#6d6d6d"
    foreground = "#ffffff"
    timeout = 10

[urgency_critical]
    background = "#ada998"
    foreground = "#ffffff"
    timeout = 0


# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
#   script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
# 
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.

#[espeak]
#    summary = "*"
#    script = dunst_espeak.sh

#[script-test]
#    summary = "*script*"
#    script = dunst_test.sh

#[ignore]
#    # This notification will not be displayed
#    summary = "foobar"
#    format = ""

#[signed_on]
#    appname = Pidgin
#    summary = "*signed on*"
#    urgency = low
#
#[signed_off]
#    appname = Pidgin
#    summary = *signed off*
#    urgency = low
#
#[says]
#    appname = Pidgin
#    summary = *says*
#    urgency = critical
#
#[twitter]
#    appname = Pidgin
#    summary = *twitter.com*
#    urgency = normal
#
# vim: ft=cfg

[spotify]
    appname = *Spotify*
    new_icon = spotify-client
    urgency = low

#[i3blocks]
#    summary = "*"
#    script = ~/.i3blocks_dunst_notify
 

x

mpd_conf(raw, dl)

  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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# # An example configuration file for MPD.
# # Read the user manual for documentation: http://www.musicpd.org/doc/user/
# 
# 
# # Files and directories #######################################################
# #
# # This setting controls the top directory which MPD will search to discover the
# # available audio files and add them to the daemon's online database. This
# # setting defaults to the XDG directory, otherwise the music directory will be
# # be disabled and audio files will only be accepted over ipc socket (using
# # file:// protocol) or streaming files over an accepted protocol.
# #
music_directory		"~/music"
# #
# # This setting sets the MPD internal playlist directory. The purpose of this
# # directory is storage for playlists created by MPD. The server will use
# # playlist files not created by the server but only if they are in the MPD
# # format. This setting defaults to playlist saving being disabled.
# #
playlist_directory		"~/.mpd/playlists"
# #
# # This setting sets the location of the MPD database. This file is used to
# # load the database at server start up and store the database while the
# # server is not up. This setting defaults to disabled which will allow
# # MPD to accept files over ipc socket (using file:// protocol) or streaming
# # files over an accepted protocol.
# #
db_file			"~/.mpd/database"
# #
# # These settings are the locations for the daemon log files for the daemon.
# # These logs are great for troubleshooting, depending on your log_level
# # settings.
# #
# # The special value "syslog" makes MPD use the local syslog daemon. This
# # setting defaults to logging to syslog, otherwise logging is disabled.
# #
log_file			"~/.mpd/log"
# #
# # This setting sets the location of the file which stores the process ID
# # for use of mpd --kill and some init scripts. This setting is disabled by
# # default and the pid file will not be stored.
# #
pid_file			"~/.mpd/pid"
# #
# # This setting sets the location of the file which contains information about
# # most variables to get MPD back into the same general shape it was in before
# # it was brought down. This setting is disabled by default and the server
# # state will be reset on server start up.
# #
# # state_file			"~/.mpd/state"
# #
# # The location of the sticker database.  This is a database which
# # manages dynamic information attached to songs.
# #
# # sticker_file			"~/.mpd/sticker.sql"
# #
# ###############################################################################
# 
# 
# # General music daemon options ################################################
# #
# # This setting specifies the user that MPD will run as. MPD should never run as
# # root and you may use this setting to make MPD change its user ID after
# # initialization. This setting is disabled by default and MPD is run as the
# # current user.
# #
# #user				"nobody"
# #
# # This setting specifies the group that MPD will run as. If not specified
# # primary group of user specified with "user" setting will be used (if set).
# # This is useful if MPD needs to be a member of group such as "audio" to
# # have permission to use sound card.
# #
# #group				"nogroup"
# #
# # This setting sets the address for the daemon to listen on. Careful attention
# # should be paid if this is assigned to anything other then the default, any.
# # This setting can deny access to control of the daemon. Not effective if
# # systemd socket activiation is in use.
# #
# # For network
# #bind_to_address		"any"
# #
# # And for Unix Socket
# #bind_to_address		"~/.mpd/socket"
# #
# # This setting is the TCP port that is desired for the daemon to get assigned
# # to.
# #
# #port				"6600"
# #
# # This setting controls the type of information which is logged. Available
# # setting arguments are "default", "secure" or "verbose". The "verbose" setting
# # argument is recommended for troubleshooting, though can quickly stretch
# # available resources on limited hardware storage.
# #
# #log_level			"default"
# #
# # If you have a problem with your MP3s ending abruptly it is recommended that
# # you set this argument to "no" to attempt to fix the problem. If this solves
# # the problem, it is highly recommended to fix the MP3 files with vbrfix
# # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# # point gapless MP3 playback can be enabled.
# #
# #gapless_mp3_playback			"yes"
# #
# # Setting "restore_paused" to "yes" puts MPD into pause mode instead
# # of starting playback after startup.
# #
# #restore_paused "no"
# #
# # This setting enables MPD to create playlists in a format usable by other
# # music players.
# #
# #save_absolute_paths_in_playlists	"no"
# #
# # This setting defines a list of tag types that will be extracted during the
# # audio file discovery process. The complete list of possible values can be
# # found in the user manual.
# #metadata_to_use	"artist,album,title,track,name,genre,date,composer,performer,disc"
# #
# # This setting enables automatic update of MPD's database when files in
# # music_directory are changed.
# #
# #auto_update	"yes"
# #
# # Limit the depth of the directories being watched, 0 means only watch
# # the music directory itself.  There is no limit by default.
# #
# #auto_update_depth "3"
# #
# ###############################################################################
# 
# 
# # Symbolic link behavior ######################################################
# #
# # If this setting is set to "yes", MPD will discover audio files by following
# # symbolic links outside of the configured music_directory.
# #
# #follow_outside_symlinks	"yes"
# #
# # If this setting is set to "yes", MPD will discover audio files by following
# # symbolic links inside of the configured music_directory.
# #
# #follow_inside_symlinks		"yes"
# #
# ###############################################################################
# 
# 
# # Zeroconf / Avahi Service Discovery ##########################################
# #
# # If this setting is set to "yes", service information will be published with
# # Zeroconf / Avahi.
# #
# #zeroconf_enabled		"yes"
# #
# # The argument to this setting will be the Zeroconf / Avahi unique name for
# # this MPD server on the network.
# #
# #zeroconf_name			"Music Player"
# #
# ###############################################################################
# 
# 
# # Permissions #################################################################
# #
# # If this setting is set, MPD will require password authorization. The password
# # setting can be specified multiple times for different password profiles.
# #
# #password                        "password@read,add,control,admin"
# #
# # This setting specifies the permissions a user has who has not yet logged in.
# #
# #default_permissions             "read,add,control,admin"
# #
# ###############################################################################
# 
# 
# # Database #######################################################################
# #
# 
# #database {
# #       plugin "proxy"
# #       host "other.mpd.host"
# #       port "6600"
# #}
# 
# # Input #######################################################################
# #
# 
# input {
#         plugin "curl"
# #       proxy "proxy.isp.com:8080"
# #       proxy_user "user"
# #       proxy_password "password"
# }
# 
# #
# ###############################################################################
# 
# # Audio Output ################################################################
# #
# # MPD supports various audio output types, as well as playing through multiple
# # audio outputs at the same time, through multiple audio_output settings
# # blocks. Setting this block is optional, though the server will only attempt
# # autodetection for one sound card.
# #
# # An example of an ALSA output:
# #
audio_output {
    type		"alsa"
    name		"My ALSA Device"
    device		"hw:0,0"	# optional
    mixer_type      "hardware"	# optional
# ##	mixer_device	"default"	# optional
# ##	mixer_control	"PCM"		# optional
# ##	mixer_index	"0"		# optional
}
# #
# # An example of an OSS output:
# #
# #audio_output {
# #	type		"oss"
# #	name		"My OSS Device"
# ##	device		"/dev/dsp"	# optional
# ##	mixer_type      "hardware"	# optional
# ##	mixer_device	"/dev/mixer"	# optional
# ##	mixer_control	"PCM"		# optional
# #}
# #
# # An example of a shout output (for streaming to Icecast):
# #
# #audio_output {
# #	type		"shout"
# #	encoder		"vorbis"		# optional
# #	name		"My Shout Stream"
# #	host		"localhost"
# #	port		"8000"
# #	mount		"/mpd.ogg"
# #	password	"hackme"
# #	quality		"5.0"
# #	bitrate		"128"
# #	format		"44100:16:1"
# ##	protocol	"icecast2"		# optional
# ##	user		"source"		# optional
# ##	description	"My Stream Description"	# optional
# ##	url		"http://example.com"	# optional
# ##	genre		"jazz"			# optional
# ##	public		"no"			# optional
# ##	timeout		"2"			# optional
# ##	mixer_type      "software"		# optional
# #}
# #
# # An example of a recorder output:
# #
# #audio_output {
# #	type		"recorder"
# #	name		"My recorder"
# #	encoder		"vorbis"		# optional, vorbis or lame
# #	path		"/var/lib/mpd/recorder/mpd.ogg"
# ##	quality		"5.0"			# do not define if bitrate is defined
# #	bitrate		"128"			# do not define if quality is defined
# #	format		"44100:16:1"
# #}
# #
# # An example of a httpd output (built-in HTTP streaming server):
# #
# #audio_output {
# #	type		"httpd"
# #	name		"My HTTP Stream"
# #	encoder		"vorbis"		# optional, vorbis or lame
# #	port		"8000"
# #	bind_to_address	"0.0.0.0"		# optional, IPv4 or IPv6
# ##	quality		"5.0"			# do not define if bitrate is defined
# #	bitrate		"128"			# do not define if quality is defined
# #	format		"44100:16:1"
# #	max_clients	"0"			# optional 0=no limit
# #}
# #
# # An example of a pulseaudio output (streaming to a remote pulseaudio server)
# #
# #audio_output {
# #	type		"pulse"
# #	name		"My Pulse Output"
# ##	server		"remote_server"		# optional
# ##	sink		"remote_server_sink"	# optional
# #}
# #
# # An example of a winmm output (Windows multimedia API).
# #
# #audio_output {
# #	type		"winmm"
# #	name		"My WinMM output"
# ##	device		"Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
# #		or
# ##	device		"0"		# optional
# ##	mixer_type	"hardware"	# optional
# #}
# #
# # An example of an openal output.
# #
# #audio_output {
# #	type		"openal"
# #	name		"My OpenAL output"
# ##	device		"Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
# #}
# #
# # An example of an sndio output.
# #
# #audio_output {
# #	type		"sndio"
# #	name		"sndio output"
# #	mixer_type	"software"
# #}
# #
# # An example of an OS X output:
# #
# #audio_output {
# #	type		"osx"
# #	name		"My OS X Device"
# ##	device		"Built-in Output"	# optional
# ##	channel_map      "-1,-1,0,1"	# optional
# #}
# #
# ## Example "pipe" output:
# #
# #audio_output {
# #	type		"pipe"
# #	name		"my pipe"
# #	command		"aplay -f cd 2>/dev/null"
# ## Or if you're want to use AudioCompress
# #	command		"AudioCompress -m | aplay -f cd 2>/dev/null"
# ## Or to send raw PCM stream through PCM:
# #	command		"nc example.org 8765"
# #	format		"44100:16:2"
# #}
# #
# ## An example of a null output (for no audio output):
# #
# #audio_output {
# #	type		"null"
# #	name		"My Null Output"
# #	mixer_type      "none"			# optional
# #}
# #
# ###############################################################################
# 
# 
# # Normalization automatic volume adjustments ##################################
# #
# # This setting specifies the type of ReplayGain to use. This setting can have
# # the argument "off", "album", "track" or "auto". "auto" is a special mode that
# # chooses between "track" and "album" depending on the current state of
# # random playback. If random playback is enabled then "track" mode is used.
# # See <http://www.replaygain.org> for more details about ReplayGain.
# # This setting is off by default.
# #
# #replaygain			"album"
# #
# # This setting sets the pre-amp used for files that have ReplayGain tags. By
# # default this setting is disabled.
# #
# #replaygain_preamp		"0"
# #
# # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# # By default this setting is disabled.
# #
# #replaygain_missing_preamp	"0"
# #
# # This setting enables or disables ReplayGain limiting.
# # MPD calculates actual amplification based on the ReplayGain tags
# # and replaygain_preamp / replaygain_missing_preamp setting.
# # If replaygain_limit is enabled MPD will never amplify audio signal
# # above its original level. If replaygain_limit is disabled such amplification
# # might occur. By default this setting is enabled.
# #
# #replaygain_limit		"yes"
# #
# # This setting enables on-the-fly normalization volume adjustment. This will
# # result in the volume of all playing audio to be adjusted so the output has
# # equal "loudness". This setting is disabled by default.
# #
# #volume_normalization		"no"
# #
# ###############################################################################
# 
# # Character Encoding ##########################################################
# #
# # If file or directory names do not display correctly for your locale then you
# # may need to modify this setting.
# #
# #filesystem_charset		"UTF-8"
# #
# ###############################################################################
 

x

LightLine_Graynito(raw, dl)

 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
" =============================================================================
" Filename: autoload/lightline/colorscheme/graynito.vim
" Author: VeganGaro
" License: MIT License
" Last Change: 2017-07-20
" =============================================================================

let s:red = '#df0000'
let s:green = '#008700'
let s:blue = '#9e927e'

let s:pink = '#afdf00'
let s:olive = '#dfaf5f'
let s:navy = '#df875f'

let s:tenne = '#d75f00'
let s:purple = '#8959a8'
let s:aqua = '#3e999f'

" Basics:
let s:foreground = '#d0d0d0'
let s:background = '#444444'
let s:window = '#efefef'
let s:status = '#c6c6c6'
let s:error = '#5f0000'

" Tabline:
let s:tabline_bg = '#3a3a3a'
let s:tabline_active_fg = '#1c1c1c'
let s:tabline_active_bg = '#9e927e'
let s:tabline_inactive_fg = '#c6c6c6'
let s:tabline_inactive_bg = '#585858'

" Statusline:
let s:statusline_active_fg = '#1c1c1c'
let s:statusline_active_bg = '#878787'
let s:statusline_inactive_fg = '#c6c6c6'
let s:tenne = '#444444'

" Visual:
let s:visual_fg = '#000000'
let s:visual_bg = '#bfb89a'

let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ s:foreground, s:background ], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ]
let s:p.normal.right = [ [ s:foreground, s:background ], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ]
let s:p.normal.middle = [ [ s:statusline_active_fg, s:statusline_active_bg ]]
let s:p.inactive.right = [ [ s:foreground, s:background ], [ s:foreground, s:background ] ]
let s:p.inactive.left = [ [ s:foreground, s:background ], [ s:foreground, s:background ] ]
let s:p.inactive.middle = [ [ s:foreground, s:background ], ]
let s:p.insert.left = [ [ s:background, s:blue], [ s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ]
let s:p.replace.left = [ [ s:background, s:pink ], [s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ]
let s:p.visual.left = [ [ s:visual_fg, s:visual_bg ], [s:statusline_active_fg, s:status ], [ s:statusline_active_fg, s:statusline_active_bg ] ]
let s:p.tabline.left = [ [s:tabline_inactive_fg, s:tabline_inactive_bg ]]
let s:p.tabline.tabsel = [ [s:tabline_active_fg, s:tabline_active_bg ] ]
let s:p.tabline.middle = [ [s:tabline_bg, s:tabline_bg]]
let s:p.tabline.right = copy(s:p.normal.right)
let s:p.normal.error = [ [ s:background, s:error ] ]

let g:lightline#colorscheme#graynito_dark#palette = lightline#colorscheme#fill(s:p)
 

x

Notes

VeganGaro dotfiles

[ Arch Linux - i3 - URxvt - Vim - Tmux - C++ - Shell ]

Apps and tools I made:

Vim LighLine ColorScheme |

dots:

Xresource |
Bashrc |
Zsh |
Tmux |
Vimrc |

Wm & DE

i3 config |
i3status |
i3lock |
i3blocks |
xinitrc |
Conky |
rofi |

Apps

dunstrc |
mpd |

Arch Linux i3

Minimal Install |
After Install i3 |


colorschemes & fonts:

i3 : GrayNito

Vim ColorScheme: onehalfdark

Vim LightLine Theme: Graynito

Oh my Tmux Theme: GrayNito

Fonts ProFont

Icons Menda-Circle

Arc Theme


Comments

Dobbie03 said about 3 months ago

Most excellent set up.

vegangaro said about 3 months ago

haha. Still working on it!

edited about 3 months ago