From 34a998e35634a4a7d2d57c47ecd32dea181be878 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 30 Nov 2017 22:18:41 +0100 Subject: Various changes --- bin/bin/workspace | 4 +-- git/.gitconfig | 2 ++ i3/.config/i3/config | 43 +++++++++++++++++-------------- mutt/.mutt/muttrc | 1 - qutebrowser/.config/qutebrowser/config.py | 23 +++++++++++------ vim/.vim/.gitignore | 3 ++- vim/.vimrc | 19 ++++++++++---- zsh/.zshrc | 3 ++- 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("", 'fake-key ', 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 +nnoremap cpr :IronRepl nnoremap cpn :NERDTreeToggle nnoremap cpt :TagbarToggle nnoremap cpu :GundoToggle @@ -123,9 +125,10 @@ nnoremap gd :Gdiff " Iron let g:iron_map_defaults=0 +let g:iron_repl_open_cmd='edit' nmap yr (iron-send-motion) -nmap yrr VR xmap R (iron-send-motion) +nmap yrr VR " Easy align xmap ga (EasyAlign) @@ -287,6 +290,9 @@ endif "" Mappings +nmap n nzz +nmap N Nzz + nnoremap AddWhiteSpaceAfter a h:silent call repeat#set("\AddWhiteSpaceAfter") nnoremap AddWhiteSpaceBefore i l:silent call repeat#set("\AddWhiteSpaceBefore") @@ -336,13 +342,15 @@ cnoremap cnoremap nmap -nmap :bd! # nmap >b :BufSurfForward -nmap :bd! # +nmap :bd! # +nmap >B :BufSurfForward:bd! # +nmap [B [b:bd! # +nmap ]B ]b:bd! # if has("nvim") - nnoremap goh :lcd %:h \| terminal - tnoremap :bd! # + nnoremap goh :let @a=getcwd() \| lcd %:h \| terminal:execute 'lcd '.@aA + tnoremap :bd! # nnoremap :b # \| norm A tnoremap endif @@ -387,4 +395,5 @@ augroup vimrc \ if !isdirectory(expand(':p:h')) | \ call mkdir(expand(':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" -- cgit v1.2.3