summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2017-11-30 22:18:41 +0100
committerUrbain Vaes <urbain@vaes.uk>2017-11-30 22:18:41 +0100
commit34a998e35634a4a7d2d57c47ecd32dea181be878 (patch)
treeacd9967af03d8537df0051daf17ebee720af0d61
parentb8e547dec5d0f388d4dfd8c1c97d389a3b045d59 (diff)
Various changes
-rwxr-xr-xbin/bin/workspace4
-rw-r--r--git/.gitconfig2
-rw-r--r--i3/.config/i3/config43
-rw-r--r--mutt/.mutt/muttrc1
-rw-r--r--qutebrowser/.config/qutebrowser/config.py23
-rw-r--r--vim/.vim/.gitignore3
-rw-r--r--vim/.vimrc19
-rw-r--r--zsh/.zshrc3
8 files changed, 60 insertions, 38 deletions
diff --git a/bin/bin/workspace b/bin/bin/workspace
index 51c488a..3bf9ea9 100755
--- a/bin/bin/workspace
+++ b/bin/bin/workspace
@@ -20,8 +20,8 @@ act_on_container() {
# If new workspace has to be created
if [[ ! $target = [0-9]* ]]; then
- # Add number to workspace name
- new_number=$(echo "$workspaces" | awk '$1!=p+1{exit;}{p=$1} END {print p+1}')
+ # Add number to workspace name (start at 1, but allow 0)
+ new_number=$(echo "$workspaces" | awk '$1!=p+1 && $1!=0 {exit;}{p=$1} END {print p+1}')
target=$new_number:$target
fi
diff --git a/git/.gitconfig b/git/.gitconfig
index 382259b..2b1388b 100644
--- a/git/.gitconfig
+++ b/git/.gitconfig
@@ -13,3 +13,5 @@
yolo = !git commit -am "Update" && git push origin master
[core]
fileMode = false
+[http]
+ sslverify = false
diff --git a/i3/.config/i3/config b/i3/.config/i3/config
index 7383331..28d5133 100644
--- a/i3/.config/i3/config
+++ b/i3/.config/i3/config
@@ -156,20 +156,27 @@ bar {
bindsym $mod+m bar mode toggle
-# Workspaces
-bindsym $mod+Tab workspace back_and_forth
-bindsym $mod+comma workspace prev
-bindsym $mod+period workspace next
-bindsym $mod+x move workspace to output left
+# Move focus
+bindsym $mod+x focus output left
+bindsym $mod+n exec $HOME/bin/workspace gw
+bindsym $mod+comma workspace prev
+bindsym $mod+period workspace next
+bindsym $mod+Tab workspace back_and_forth
+
+# Move workspace
bindsym $mod+Shift+comma exec $HOME/bin/workspace mw p
bindsym $mod+Shift+period exec $HOME/bin/workspace mw n
-bindsym $mod+n exec $HOME/bin/workspace gw
+bindsym $mod+Control+x move workspace to output left; focus output left
+
+# Move container
bindsym $mod+Shift+n exec $HOME/bin/workspace mc
+bindsym $mod+Shift+x move to output left; focus output left
-# Programs shortcuts
-bindsym $mod+b exec --no-startup-id qutebrowser
-bindsym $mod+i exec $HOME/bin/vimin
-bindsym Print exec xfce4-screenshooter
+# Programs and commands
+bindsym $mod+b exec --no-startup-id qutebrowser
+bindsym Print exec --no-startup-id xfce4-screenshooter
+bindsym $mod+Escape exec --no-startup-id i3lock -c 000000 && systemctl suspend
+bindsym $mod+Shift+w exec --no-startup-id feh --bg-fill --randomize /usr/share/backgrounds
# Sound
bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+
@@ -179,25 +186,21 @@ bindsym XF86AudioMute exec amixer -D pulse sset Master 0%
# Display
bindsym XF86MonBrightnessUp exec light -A 10
bindsym XF86MonBrightnessDown exec light -U 10
-bindsym Shift+XF86AudioRaiseVolume exec light -A 10
-bindsym Shift+XF86AudioLowerVolume exec light -U 10
+bindsym Shift+XF86AudioRaiseVolume exec light -A 10
+bindsym Shift+XF86AudioLowerVolume exec light -U 10
-# Change wallpaper
-bindsym F11 exec --no-startup-id feh --bg-fill --randomize /usr/share/backgrounds
+# Tmux sessions
+bindsym $mod+Shift+m exec --no-startup-id "urxvt -e tmuxinator start email"
+bindsym $mod+y exec --no-startup-id "urxvt -e tmuxinator start notes"
-# Custom scripts
-bindsym XF86AudioPlay exec --no-startup-id $HOME/bin/touchpad
+# Launch scripts
bindsym $mod+semicolon exec --no-startup-id $HOME/bin/run
bindsym $mod+e exec --no-startup-id $HOME/bin/tmux_attach
bindsym $mod+o exec --no-startup-id $HOME/bin/references
-bindsym $mod+Escape exec --no-startup-id "i3lock -c 000000 && systemctl suspend"
-bindsym $mod+y exec --no-startup-id "urxvt -e tmuxinator start notes"
# bindsym $mod+z
# bindsym $mod+'
-
# Gaps
-# workspace 1 gaps inner 5
smart_gaps on
gaps inner 5
gaps outer 5
diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc
index c7a051f..2348835 100644
--- a/mutt/.mutt/muttrc
+++ b/mutt/.mutt/muttrc
@@ -20,7 +20,6 @@ set from = "Urbain Vaes"
set reverse_alias
set sort = reverse-date
set weed
-set fcc_clear
unset markers
set sleep_time = 0
set wait_key = no
diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py
index c75298f..bdd980d 100644
--- a/qutebrowser/.config/qutebrowser/config.py
+++ b/qutebrowser/.config/qutebrowser/config.py
@@ -2,24 +2,31 @@
# qute://help/configuring.html
# qute://help/settings.html
+c.downloads.location.prompt = False
c.editor.command = ['urxvt', '-e', 'vim', '-f', '{}']
c.hints.chars = 'aoeuidhtns'
c.hints.uppercase = True
c.tabs.favicons.show = False
-c.url.default_page = 'about:blank'
-c.url.start_pages = ['about:blank']
c.tabs.show = 'multiple'
c.tabs.tabs_are_windows = True
+c.url.default_page = 'about:blank'
+c.url.start_pages = ['about:blank']
# Bindings for normal mode
-config.bind("o", 'set-cmd-text -s :spawn --userscript url-from-surfraw')
-config.bind("t", 'set-cmd-text -s :spawn --userscript url-from-surfraw -t')
-config.bind(",p", 'spawn --userscript explorer')
-config.bind(",t", 'spawn --userscript explorer -t')
-config.bind(",h", 'spawn --userscript explorer -h')
config.bind(",b", 'spawn --userscript explorer -b')
config.bind(",d", 'spawn --userscript dictionary-search')
-config.bind('f', 'hint all current')
+config.bind(",h", 'spawn --userscript explorer -h')
+config.bind(",p", 'spawn --userscript explorer')
+config.bind(",t", 'spawn --userscript explorer -t')
+config.bind(",v", 'spawn mpv {url}')
+config.bind(",V", 'hint links spawn mpv {hint-url}')
+config.bind("]d", 'set downloads.location.prompt True')
+config.bind("[d", 'set downloads.location.prompt False')
+config.unbind("d")
+config.bind("do", 'download-open')
+config.bind("o", 'set-cmd-text -s :spawn --userscript url-from-surfraw')
+config.bind("t", 'set-cmd-text -s :spawn --userscript url-from-surfraw -t')
+config.bind("f", 'hint all current')
# Bindings for insert mode
config.bind("<Ctrl-A>", 'fake-key <Home>', mode='insert')
diff --git a/vim/.vim/.gitignore b/vim/.vim/.gitignore
index 55aa2a4..58ba36e 100644
--- a/vim/.vim/.gitignore
+++ b/vim/.vim/.gitignore
@@ -1,4 +1,5 @@
.init.vim-*
.netrwhist
plugged
-vimundo/*
+view
+vimundo
diff --git a/vim/.vimrc b/vim/.vimrc
index c0a2172..4f7cdc3 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -23,6 +23,7 @@ Plug 'holomorph/vim-freefem'
Plug 'honza/vim-snippets'
Plug 'inkarkat/vim-SpellCheck'
Plug 'inkarkat/vim-ingo-library'
+Plug 'kopischke/vim-stay'
Plug 'jamessan/vim-gnupg'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
@@ -86,6 +87,7 @@ call plug#end()
" Toggles
nnoremap cpg :GitGutterToggle<cr>
+nnoremap cpr :IronRepl<cr>
nnoremap cpn :NERDTreeToggle<cr>
nnoremap cpt :TagbarToggle<cr>
nnoremap cpu :GundoToggle<cr>
@@ -123,9 +125,10 @@ nnoremap <Leader>gd :Gdiff<cr>
" Iron
let g:iron_map_defaults=0
+let g:iron_repl_open_cmd='edit'
nmap yr <Plug>(iron-send-motion)
-nmap yrr VR
xmap R <Plug>(iron-send-motion)
+nmap yrr VR
" Easy align
xmap ga <Plug>(EasyAlign)
@@ -287,6 +290,9 @@ endif
"" Mappings
+nmap n nzz
+nmap N Nzz
+
nnoremap <silent> <Plug>AddWhiteSpaceAfter a <Esc>h:silent call repeat#set("\<Plug>AddWhiteSpaceAfter")<cr>
nnoremap <silent> <Plug>AddWhiteSpaceBefore i <Esc>l:silent call repeat#set("\<Plug>AddWhiteSpaceBefore")<cr>
@@ -336,13 +342,15 @@ cnoremap <up> <c-p>
cnoremap <down> <c-n>
nmap <silent> <b :BufSurfBack<cr>
-nmap <silent> <B :BufSurfBack<cr>:bd! #<cr>
nmap <silent> >b :BufSurfForward<cr>
-nmap <silent> <B :BufSurfForward<cr>:bd! #<cr>
+nmap <silent> <B :BufSurfBack<cr>:bd! #<cr>
+nmap <silent> >B :BufSurfForward<cr>:bd! #<cr>
+nmap <silent> [B [b:bd! #<cr>
+nmap <silent> ]B ]b:bd! #<cr>
if has("nvim")
- nnoremap goh :lcd %:h \| terminal<cr>
- tnoremap <c-d> <c-\><c-n><c-^>:bd! #<cr>
+ nnoremap goh :let @a=getcwd() \| lcd %:h \| terminal<cr>:execute 'lcd '.@a<cr>A
+ tnoremap <c-x> <c-\><c-n><c-^>:bd! #<cr>
nnoremap <c-_> :b # \| norm A<cr>
tnoremap <c-_> <c-\><c-n><c-^>
endif
@@ -387,4 +395,5 @@ augroup vimrc
\ if !isdirectory(expand('<afile>:p:h')) |
\ call mkdir(expand('<afile>:p:h'), 'p') |
\ endif
+ au BufWritePost *vimrc :source %
augroup END
diff --git a/zsh/.zshrc b/zsh/.zshrc
index d236096..4f63ef2 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -3,11 +3,12 @@ export EDITOR=vim
export HISTSIZE=1000000
-source /home/urbain/.nix-profile/etc/profile.d/nix.sh
+# source /home/urbain/.nix-profile/etc/profile.d/nix.sh
# Guix stuff
export PATH="/home/urbain/.guix-profile/bin${PATH:+:}$PATH"
export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
+export GUIX_PACKAGE_PATH=$HOME/Dropbox/projects/guix-packages
export GUILE_LOAD_PATH=$HOME/.guix-profile/share/guile/site/2.2:$GUILE_LOAD_PATH
export GUILE_LOAD_COMPILED_PATH=$HOME/.guix-profile/lib/guile/2.2/site-ccache:$GUILE_LOAD_COMPILED_PATH
export CPATH="/home/urbain/.guix-profile/include${CPATH:+:}$CPATH"