1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Merge branch 'master' into surface

This commit is contained in:
2018-03-31 11:09:42 +01:00
13 changed files with 194 additions and 76 deletions

View File

@@ -11,7 +11,7 @@ shadow-opacity = 0.65; # The translucency for shadows. (default .75)
# shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
#shadow-exclude = [ "n:e:Notification" ]; # Exclude conditions for shadows.
shadow-exclude = [ "class_g = 'slop'" ]; # Exclude conditions for shadows.
shadow-ignore-shaped = false; # Avoid drawing shadow on all shaped windows
# (see also: --detect-rounded-corners)
@@ -22,6 +22,9 @@ active-opacity = 1.0; # Default opacity for active windows. (0.0 - 1.0)
frame-opacity = 1.0; # Opacity of window titlebars and borders. (0.1 - 1.0)
inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
# value of _NET_WM_OPACITY. Bad choice.
opacity-rule = [
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
# it may result in less X resource usage,
# Yet f ading may look bad.
@@ -51,10 +54,10 @@ backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typical
# much faster but depends on a sane driver.
mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
use-ewmh-active-win = true; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
use-ewmh-active-win = true; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
# instead of using FocusIn/Out events. Usually more reliable but
# depends on a EWMH-compliant WM.
detect-rounded-corners = false; # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true; # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
# managers not passing _NET_WM_OPACITY of client windows to frame windows.
refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.

View File

@@ -1,32 +1,57 @@
[user]
name = Joe Groocock
email = frebib@gmail.com
email = me@frebib.net
signingkey = CFBB6A86
[core]
autocrlf = input
excludesfile = $HOME/.config/git/gitignore
pager = diff-so-fancy | less
[commit]
gpgsign = true
[color]
ui = auto
[push]
default = upstream
[pull]
rebase = true
[rebase]
autoStash = true
[log]
date = relative
[format]
pretty = format:%h %Cblue%ad%Creset %ae %Cgreen%s%Creset
[alias]
verbs = !git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr
pushall = !git remote | xargs -L1 git push
[rebase]
autoStash = true
[push]
default = upstream
count = !echo $(pwd) && git rev-list HEAD --count
unpushed = !git log --oneline @{u}..HEAD
[advice]
statusHints = false
pushUpdateRejected = false
[pull]
rebase = true
[core]
autocrlf = input
excludesfile = /home/frebib/.config/git/gitignore
[sendemail]
from = Joe Groocock <me@frebib.net>
smtpserver = smtp.zoho.com
smtpuser = me@frebib.net
smtpencryption = ssl
smtpserverport = 465
suppresscc = self
[diff]
algorithm = patience
[sendemail]
from = Joe Groocock <frebib@gmail.com>
smtpserver = smtp.gmail.com
smtpuser = frebib@gmail.com
smtpencryption = tls
smtpserverport = 587
suppresscc = self
[interactive]
diffFilter = diff-so-fancy --patch-mode
[color]
ui = true
[color "diff"]
meta = cyan
frag = magenta
commit = yellow
old = red
new = green
whitespace = red 88 reverse
[color "diff-highlight"]
oldNormal = red
oldHighlight = red 88
newNormal = green
newHighlight = green 22
[diff-so-fancy]
changeHunkIndicators = false
# vim: noet

View File

@@ -51,6 +51,12 @@ LOCIP=$(ip addr show $IF | perl -n -e "/$AF ([^\/]+).* scope global/ && print \$
#------------------------------------------------------------------------
case $BLOCK_BUTTON in
1) curl -s https://api.ipify.org;;
*) echo "$LOCIP";;
1) curl -s https://api.ipify.org;
break;;
2) curl -s https://api.ipify.org | tee >(xclip -i);
break;;
0|3) echo "$LOCIP" | tee >(xclip -i);
break;;
*) echo "$LOCIP"
break;;
esac

View File

@@ -1,7 +1,7 @@
#!/bin/bash
set -e
for p in pacaur yaourt pacman; do
for p in trizen pacaur yaourt pacman; do
if $p --version &>/dev/null; then
PAC="$p"
break;
@@ -13,7 +13,7 @@ if [ -z "$PAC" ]; then
fi
if [ "$BLOCK_BUTTON" == 1 ]; then
nohup i3-sensible-terminal -r i3blocks-update-term -e "sh -c '$PAC -Syu; pkill -RTMIN+5 i3blocks'" &>/dev/null &
nohup i3-sensible-terminal -r i3blocks-update-term -e "sh -c '$PAC -Syu || exec zsh; pkill -RTMIN+5 i3blocks'" &>/dev/null &
disown
fi

View File

@@ -153,7 +153,8 @@ bindsym $mod+Shift+e exec rofi-emoji
bindsym --release Print exec imgur-screenshot
bindsym --release $mod+Print exec imgur-screenshot -f
bindsym $mod+Mod1+space exec --no-startup-id ~/.config/i3/cycleaudio.py && pkill -RTMIN+10 i3blocks
bindsym $mod+numbersign exec "termite -e 'sh -c xclip\ -o\ |\ gpg\ --decrypt\ 2>&1\ &&\ read'"
bindsym $mod+numbersign exec "termite -e 'sh -c xclip\ -o\ |\ gpg\ --decrypt\ 2>&1\ \;\ $SHELL'"
bindsym $mod+r exec "bash -c 'pwgen -nc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i'"
bindsym $mod+g exec "LINK=$(gist -PRpc); notify-send -c transfer \\"<a href=\\\\"$LINK\\\\">$LINK</a>\\""
# Media player controls

View File

@@ -1,17 +1,18 @@
#!/bin/bash
option=$(echo " lock| logout| sleep| power off| reboot| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -lines 6 -location 3 -tokenize false -matching normal | xargs)
option=$(echo " lock| logout| sleep| hibernate| power off| reboot| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -lines 6 -location 3 -tokenize false -matching normal | xargs)
case $option in
lock) ./lock.sh;;
logout) i3-msg exit;;
sleep) systemctl suspend;;
hibernate) systemctl hibernate;;
power\ off) systemctl poweroff;;
reboot) systemctl reboot;;
windows)
windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4`
sudo efibootmgr -n $windows
systemctl reboot;;
sudo hibereboot;;
esac
exit 0

View File

@@ -1,6 +1,6 @@
[options]
font = SauceCodePro 9.8
scrollback_lines = 100000
scrollback_lines = 1000000
cursor_blink = off
size_hints = true
@@ -10,30 +10,34 @@ foreground = #ECEFF1
background = rgba(56, 60, 74, 0.95)
highlight = #5294E2
# black
# Colour order:
# black
# red
# green
# yellow
# blue
# magenta
# cyan
# white/gray
# Normal colours
color0 = #333638
# white
color15 = #eceff1
# gray
color7 = #8b9396
color8 = #475760
# red
color1 = #ff3f00
color9 = #ef5345
# green
color1 = #f41f1c
color2 = #8bc34a
color10 = #9ccc65
# yellow
color3 = #ffc107
color11 = #ffa000
# blue
color4 = #0266f4
color12 = #81b3f9
# magenta
color5 = #cc17cc
color13 = #a56ecc
# cyan
color6 = #10aeba
color7 = #8b9396
# Bright colours
color8 = #475760
color9 = #e53727
color10 = #9ccc65
color11 = #ffa000
color12 = #81b3f9
color13 = #a56ecc
color14 = #5ddae2
color15 = #eceff1
# vim: ft=dosini cms=#%s

View File

@@ -2,5 +2,6 @@
/spell/
/swapfiles/
/viminfo
/viminf*.tmp
/vim-latex
/.netrwhist

View File

@@ -32,10 +32,16 @@ set autoread
set showmatch
set scrolloff=6
set nojoinspaces
set updatetime=500 " reduce delay from 4s default
" Autosave settings
function! SaveIfExist()
if @% != "" && filereadable(@%) && !&readonly
write
endif
endfunction
set autowrite
autocmd InsertLeave * save
autocmd CursorHold,CursorHoldI,InsertLeave,FocusLost * call SaveIfExist()
" Search options
set hlsearch
@@ -49,7 +55,13 @@ set guioptions=
" Whitespace highlight settings
set list
set listchars=eol:$,space:.,tab:>-,trail:~,extends:>,precedes:<
highlight SpecialKey ctermfg=7
highlight SpecialKey ctermfg=8
if exists('+colorcolumn')
highlight ColorColumn ctermbg=8
autocmd filetype c,h,cpp,hpp set colorcolumn=81
autocmd filetype c,h,cpp,hpp match ErrorMsg '\%>80v.\+'
endif
" set the runtime path to include Vundle and initialize
@@ -60,14 +72,20 @@ call vundle#rc('~/.config/vim/bundle')
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-sensible'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-rhubarb'
Plugin 'tpope/vim-abolish'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-commentary'
Plugin 'majutsushi/tagbar'
Plugin 'airblade/vim-gitgutter'
Plugin 'ryanoasis/vim-devicons'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'chr4/nginx.vim'
Plugin 'PotatoesMaster/i3-vim-syntax'
Plugin 'lervag/vimtex'
Plugin 'JamshedVesuna/vim-markdown-preview'
@@ -79,6 +97,15 @@ let g:use_dvorak = 1
" YouCompleteMe config
let g:ycm_confirm_extra_conf = 0
if !exists('g:ycm_semantic_triggers')
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme
"let g:vimtex_view_method='zathura'
let g:tex_flavor='latex'
autocmd FileType tex silent VimtexCompile
autocmd FileType tex setlocal spell
autocmd FileType tex TagbarOpen
" Vim-Airline config
let g:Powerline_symbols = 'fancy'
@@ -92,12 +119,30 @@ let vim_markdown_preview_browser='Chromium'
let vim_markdown_preview_use_xdg_open=1
let vim_markdown_preview_github=1
" Syntastic configuration
let g:syntastic_enable_highlighting = 1
let g:syntastic_enable_signs=1
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
" Tagbar configuration
let g:tagbar_width = 50
let g:tagbar_compact = 1
let g:tagbar_show_linenumbers = 1
let g:tagbar_singleclick = 1
let g:tagbar_autopreview = 1
" Disable mouse
set mouse=nicr
nnoremap <LeftMouse> <nop>
nnoremap <RightMouse> <nop>
" Remap completion
inoremap <C-Space> <C-x><C-o>
inoremap <C-@> <C-Space>
let mapleader="\<space>"
" Unbind arrow keys
for prefix in ['n', 'v']
@@ -106,6 +151,10 @@ for prefix in ['n', 'v']
endfor
endfor
" Source: https://github.com/ChrisLane/dotfiles/blob/1f5efd44e1b78224568645eaec2e6e243959c0a9/.vimrc#L66
" Remove whitespace at end of lines with F5
:nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
" Dvorak Hackery
" Source: https://github.com/sporkbox/vimrc/blob/master/vimrc
if (exists("g:use_dvorak") && g:use_dvorak == 1)
@@ -186,13 +235,12 @@ endif
" Save aliases.
noremap <Leader>q :wq<CR>
com W w
com Q q
com Wq wq
com WQ wq
com! W w
com! Q q
com! Wq wq
com! WQ wq
" Write with sudo
cmap w!! w !sudo tee > /dev/null %
autocmd FileType markdown setlocal ts=2 sts=2 sw=2 et
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 et
autocmd FileType tex silent VimtexCompile