summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xresources/.Xresources/base3
-rwxr-xr-xbin/bin/email2
-rw-r--r--git/.gitconfig2
-rw-r--r--mutt/.mutt/muttrc2
-rw-r--r--qutebrowser/.config/qutebrowser/keys.conf21
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/dictionary-search2
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/explorer15
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/history10
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/quickmarks10
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu7
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/tab-switch6
-rwxr-xr-xqutebrowser/.local/share/qutebrowser/userscripts/tabs14
-rw-r--r--vim/.vim/compiler/gmsh.vim12
-rw-r--r--vim/.vim/ftplugin/gmsh.vim1
-rw-r--r--vim/.vim/indent/gmsh.vim59
15 files changed, 145 insertions, 21 deletions
diff --git a/Xresources/.Xresources/base b/Xresources/.Xresources/base
index 71bd329..0afa832 100644
--- a/Xresources/.Xresources/base
+++ b/Xresources/.Xresources/base
@@ -30,3 +30,6 @@ URxvt.resize-font.bigger: C-plus
URxvt*font: xft:monaco:size=11.5
URxvt*scrollBar: false
URxvt*internalBorder: 0
+
+rofi.kb-mode-next: Tab
+rofi.kb-mode-previous: Shift+Tab
diff --git a/bin/bin/email b/bin/bin/email
index b4fe9fa..c2f9998 100755
--- a/bin/bin/email
+++ b/bin/bin/email
@@ -10,7 +10,7 @@ new_mails=$(find $HOME/.mail -path '*/new/*' -type f -not -path '*/rss/*')
if [[ ! -z ${new_mails} ]]; then
subjects=$(cat $(echo -e ${new_mails/'\n'/' '}) | grep "^Subject: " | sed "s/^Subject: //g")
- /usr/bin/notify-send -t 3 "New mail(s)!" "${subjects}"
+ DISPLAY=:0 /usr/bin/notify-send -t 3 "New mail(s)!" "${subjects}"
fi
echo "Email last checked on $(date)".
diff --git a/git/.gitconfig b/git/.gitconfig
index 15a64c3..382259b 100644
--- a/git/.gitconfig
+++ b/git/.gitconfig
@@ -11,3 +11,5 @@
submodulesummary = 1
[alias]
yolo = !git commit -am "Update" && git push origin master
+[core]
+ fileMode = false
diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc
index 4f91cf6..67d9918 100644
--- a/mutt/.mutt/muttrc
+++ b/mutt/.mutt/muttrc
@@ -90,7 +90,7 @@ folder-hook 'Work*' 'source ~/.mutt/id_work'
folder-hook 'Personal*' 'source ~/.mutt/id_personal'
macro index,pager gr "<change-folder> +Misc/rss<enter>"
-folder-hook 'Misc/rss' 'unset trash'
+folder-hook 'Misc/rss' 'unset trash; unset from'
# Source mutt solarized
`[[ "$COLORSCHEME" = "solarized" && "$BACKGROUND" = "light" ]] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-light-16.muttrc || echo set`
diff --git a/qutebrowser/.config/qutebrowser/keys.conf b/qutebrowser/.config/qutebrowser/keys.conf
index 8fd0d48..c7555a1 100644
--- a/qutebrowser/.config/qutebrowser/keys.conf
+++ b/qutebrowser/.config/qutebrowser/keys.conf
@@ -55,8 +55,17 @@ set-cmd-text -s :spawn --userscript url-from-surfraw
set-cmd-text -s :spawn --userscript url-from-surfraw -t
t
-spawn --userscript tab-switch
- T
+spawn --userscript explorer -b
+ eb
+
+spawn --userscript explorer -h
+ eh
+
+spawn --userscript explorer -t
+ et
+
+spawn --userscript explorer
+ b
spawn mpv {url}
y
@@ -260,9 +269,6 @@ set-cmd-text -s :quickmark-load -w
bookmark-add
M
-spawn --userscript quickmarks-dmenu
- b
-
set-cmd-text -s :bookmark-load -t
gB
@@ -460,6 +466,9 @@ forward -w
fullscreen
<f11>
+set-cmd-text -s :quickmark-load
+ xxb
+
[insert]
# Keybindings for insert mode.
# Since normal keypresses are passed through, only special keys are
@@ -716,6 +725,8 @@ scroll up
scroll right
L
+[caret,normal]
+
spawn --userscript dictionary-search
gD
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/dictionary-search b/qutebrowser/.local/share/qutebrowser/userscripts/dictionary-search
index 3155c91..cb9ad7d 100755
--- a/qutebrowser/.local/share/qutebrowser/userscripts/dictionary-search
+++ b/qutebrowser/.local/share/qutebrowser/userscripts/dictionary-search
@@ -1,3 +1,3 @@
#!/bin/bash
-echo "open -t http://dictionary.cambridge.org/dictionary/english/$QUTE_SELECTED_TEXT" >> "$QUTE_FIFO"
+echo "open -t http://dictionary.cambridge.org/dictionary/english/$QUTE_SELECTED_TEXT" > "$QUTE_FIFO"
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/explorer b/qutebrowser/.local/share/qutebrowser/userscripts/explorer
new file mode 100755
index 0000000..f134aa5
--- /dev/null
+++ b/qutebrowser/.local/share/qutebrowser/userscripts/explorer
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+scripts_dir="$HOME/.local/share/qutebrowser/userscripts"
+rofi_modi="quickmarks:$scripts_dir/quickmarks,tabs:$scripts_dir/tabs,history:$scripts_dir/history"
+rofi_comand="rofi -combi-modi $rofi_modi -modi $rofi_modi -show"
+
+if [[ "$1" = "-t" ]]; then
+ $rofi_comand tabs
+elif [[ "$1" = "-b" ]]; then
+ $rofi_comand quickmarks
+elif [[ "$1" = "-h" ]]; then
+ $rofi_comand history
+else
+ $rofi_comand combi
+fi
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/history b/qutebrowser/.local/share/qutebrowser/userscripts/history
new file mode 100755
index 0000000..2122666
--- /dev/null
+++ b/qutebrowser/.local/share/qutebrowser/userscripts/history
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [ -n "$1" ]
+then
+ echo "open $(echo $1 | awk '{print $NF}')" >> $QUTE_FIFO
+ exit;
+fi
+
+# List history
+cat ~/.local/share/qutebrowser/history | awk '{print $3 ": " $2}'
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks b/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks
new file mode 100755
index 0000000..a55b23b
--- /dev/null
+++ b/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [ -n "$1" ]
+then
+ echo "open $(echo $1 | awk '{print $NF}')" >> $QUTE_FIFO
+ exit;
+fi
+
+# List of marks
+cat ~/.config/qutebrowser/quickmarks
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu b/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu
deleted file mode 100755
index 354b398..0000000
--- a/qutebrowser/.local/share/qutebrowser/userscripts/quickmarks-dmenu
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-url=$(cat ~/.config/qutebrowser/quickmarks | dmenu -i -l 15 | awk '{print $NF}')
-
-[ -z ${url} ] && exit
-
-echo "open $url" >> "$QUTE_FIFO"
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/tab-switch b/qutebrowser/.local/share/qutebrowser/userscripts/tab-switch
deleted file mode 100755
index b82ed36..0000000
--- a/qutebrowser/.local/share/qutebrowser/userscripts/tab-switch
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-
-tabs=$(i3-msg -t get_tree | grep -o '"window":[0-9]*[^{]*{[^}]*qutebrowser[^}]*}')
-selected_title=$(echo "$tabs" | sed 's/^.*title":"\(.*\) - qutebrowser.*/\1/g' | dmenu)
-selected_id=$(echo "$tabs" | grep "$selected_title" | sed 's/^.*window":\([0-9]*\).*$/\1/')
-i3-msg "[id=$selected_id] focus"
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/tabs b/qutebrowser/.local/share/qutebrowser/userscripts/tabs
new file mode 100755
index 0000000..7f9e226
--- /dev/null
+++ b/qutebrowser/.local/share/qutebrowser/userscripts/tabs
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+# List of tabs
+tabs=$(i3-msg -t get_tree | grep -o '"window":[0-9]*[^{]*{[^}]*qutebrowser[^}]*}')
+
+if [ -n "$1" ]
+then
+ selected_id=$(echo "$tabs" | grep "$@" | sed 's/^.*window":\([0-9]*\).*$/\1/')
+ i3-msg "[id=$selected_id] focus" > /dev/null 2>&1
+ exit;
+fi
+
+# Sanitized List of tabs
+echo "$tabs" | sed 's/^.*title":"\(.*\) - qutebrowser.*/\1/g'
diff --git a/vim/.vim/compiler/gmsh.vim b/vim/.vim/compiler/gmsh.vim
new file mode 100644
index 0000000..70148e8
--- /dev/null
+++ b/vim/.vim/compiler/gmsh.vim
@@ -0,0 +1,12 @@
+if exists("current_compiler")
+ finish
+endif
+
+let current_compiler = "gmsh"
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+setlocal errorformat=Error\ \ \ :\ \'%f\'\\,\ line\ %l\ :\ %m
+setlocal makeprg=gmsh\ %\ -\\|&\ grep\ Error
diff --git a/vim/.vim/ftplugin/gmsh.vim b/vim/.vim/ftplugin/gmsh.vim
new file mode 100644
index 0000000..ec58378
--- /dev/null
+++ b/vim/.vim/ftplugin/gmsh.vim
@@ -0,0 +1 @@
+compiler gmsh
diff --git a/vim/.vim/indent/gmsh.vim b/vim/.vim/indent/gmsh.vim
new file mode 100644
index 0000000..845b668
--- /dev/null
+++ b/vim/.vim/indent/gmsh.vim
@@ -0,0 +1,59 @@
+" Vim indent file
+
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal indentexpr=GetGeoIndent()
+setlocal indentkeys&
+setlocal autoindent
+setlocal commentstring=//%s
+
+if exists("*GetGeoIndent")
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+let s:skip_syntax = '\%(Comment\|String\)$'
+
+function! GetGeoIndent()
+
+ let lnum = prevnonblank(v:lnum - 1)
+
+ if lnum == 0
+ return 0
+ endif
+
+ let ind = indent(lnum)
+ let last_line = getline(lnum)
+ let current_line = getline(v:lnum)
+
+ if last_line =~ '\(^\/\/\|^\/\*\)'
+ return ind
+ endif
+
+ if last_line =~ '\(\<If\>\|\<For\>\|\<Macro\>\)'
+ let ind += &shiftwidth
+ endif
+
+ if last_line =~ '\({[^}]*$\)'
+ let ind += &shiftwidth
+ endif
+
+ if current_line =~ '\(^[^{]*}\)'
+ let ind -= &shiftwidth
+ endif
+
+ if current_line =~ '\(\<EndIf\>\|\<EndFor\>\|\<Return\>\)$'
+ let ind -= &shiftwidth
+ endif
+
+ return ind
+
+endfunction
+
+let &cpo = s:cpo_save
+unlet s:cpo_save