about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-09-15 14:01:27 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-09-15 14:01:27 +0700
commit3030db8ff09ab6da0f1f941518ef5c071053c5f8 (patch)
treeea946ecc72079826f9bb86912babc18c0be1c768
parent434ebf0d707b4ea08455da42f14c742bf8081dc4 (diff)
downloaddotfiles-3030db8ff09ab6da0f1f941518ef5c071053c5f8.tar.gz
Update 2019-09-15
-rw-r--r--awesome/.config/awesome/rc.lua7
-rw-r--r--debian/.bashrc1
-rw-r--r--fedora/.bashrc6
-rw-r--r--vim/.vim/scripts.vim55
-rwxr-xr-xvim/.vim/vimrc1
5 files changed, 69 insertions, 1 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua
index b7ad733..2aa8d00 100644
--- a/awesome/.config/awesome/rc.lua
+++ b/awesome/.config/awesome/rc.lua
@@ -53,6 +53,7 @@ local pulsemixer = terminal .. " -e pulsemixer"
 local ranger = terminal .. " -e ranger"
 local python3 = terminal .. " -e python3"
 local perl6 = terminal .. " -e perl6"
+local octave = terminal .. " -e octave"
 local guile = terminal .. " -e guile"
 local slock_suspend = "slock systemctl --ignore-inhibitors suspend"
 
@@ -483,13 +484,17 @@ local globalkeys = awful.util.table.join(
             {description = "open Moodle Desktop", group = "launcher"}),
   awful.key({modkey}, "r", spawner(ranger),
             {description = "open ranger file manager", group = "launcher"}),
+  awful.key({modkey, "Shift"}, "r", spawner(ranger .. " Documents/B2"),
+            {description = "open Riboflavin", group = "launcher"}),
   awful.key({modkey}, "p", spawner(python3),
             {description = "open Python 3 interpreter", group = "launcher"}),
   awful.key({modkey, "Shift"}, "p", spawner(perl6),
             {description = "open Perl 6", group = "launcher"}),
   awful.key({modkey}, "g", spawner(guile),
             {description = "open Guile interpreter", group = "launcher"}),
-  awful.key({modkey}, "o", spawner"geogebra-classic",
+  awful.key({modkey}, "o", spawner(octave),
+            {description = "open Octave", group = "launcher"}),
+  awful.key({modkey, "Shift"}, "o", spawner"geogebra-classic",
             {description = "open GeoGebra", group = "launcher"}),
   awful.key({modkey}, "z", spawner"zathura",
             {description = "open zathura document viewer", group = "launcher"}),
diff --git a/debian/.bashrc b/debian/.bashrc
index d370ba7..f5a91aa 100644
--- a/debian/.bashrc
+++ b/debian/.bashrc
@@ -90,6 +90,7 @@ alias la='ls -A'
 # You may want to put all your additions into a separate file like
 # ~/.bash_aliases, instead of adding them here directly.
 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
+alias l='$(fc -ln -1) | less'
 alias r=ranger
 alias gcc='gcc -Wall -Wextra -O2 -lm'
 alias g++='g++ -Wall -Wextra -O2 -lm'
diff --git a/fedora/.bashrc b/fedora/.bashrc
index bf6ad6c..23e034a 100644
--- a/fedora/.bashrc
+++ b/fedora/.bashrc
@@ -15,3 +15,9 @@ alias g++='g++ -Wall -Werror -O2 -lm'
 alias fpc='fpc -O1 -XS -gl'
 alias raku='rlwrap perl6'
 alias backup='rsync -avh --delete /home/ /data/Home/'
+
+PATH="/home/436e58/perl5/bin${PATH:+:${PATH}}"; export PATH;
+PERL5LIB="/home/436e58/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
+PERL_LOCAL_LIB_ROOT="/home/436e58/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
+PERL_MB_OPT="--install_base \"/home/436e58/perl5\""; export PERL_MB_OPT;
+PERL_MM_OPT="INSTALL_BASE=/home/436e58/perl5"; export PERL_MM_OPT;
diff --git a/vim/.vim/scripts.vim b/vim/.vim/scripts.vim
new file mode 100644
index 0000000..6221c55
--- /dev/null
+++ b/vim/.vim/scripts.vim
@@ -0,0 +1,55 @@
+" Additional scripts' filetype detections
+
+" This file is called by an autocommand for every file that has just been
+" loaded into a buffer.  It checks if the type of file can be recognized by
+" the file contents.  The autocommand is in $VIMRUNTIME/filetype.vim.
+"
+" Note that the pattern matches are done with =~# to avoid the value of the
+" 'ignorecase' option making a difference.  Where case is to be ignored use
+" =~? instead.  Do not use =~ anywhere.
+
+" Only do the rest when the FileType autocommand has not been triggered yet.
+if did_filetype()
+  finish
+endif
+
+" Line continuation is used here, remove 'C' from 'cpoptions'
+let s:cpo_save = &cpo
+set cpo&vim
+
+let s:line1 = getline(1)
+if s:line1 =~# "^#!"
+  " A script that starts with "#!".
+  " Check for a line like "#!/usr/bin/env VAR=val bash".  Turn it into
+  " "#!/usr/bin/bash" to make matching easier.
+  if s:line1 =~# '^#!\s*\S*\<env\s'
+    let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g')
+    let s:line1 = substitute(s:line1, '\<env\s\+', '', '')
+  endif
+
+  " Get the program name.
+  " Only accept spaces in PC style paths: "#!c:/program files/perl [args]".
+  " If the word env is used, use the first word after the space:
+  " "#!/usr/bin/env perl [path/args]"
+  " If there is no path use the first word: "#!perl [path/args]".
+  " Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]".
+  if s:line1 =~# '^#!\s*\a:[/\\]'
+    let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
+  elseif s:line1 =~# '^#!.*\<env\>'
+    let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
+  elseif s:line1 =~# '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
+    let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
+  else
+    let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
+  endif
+
+  " GNU Octave
+  if s:name =~# 'octave'
+    set ft=octave
+  endif
+  unlet s:name
+endif
+
+" Restore 'cpoptions'
+let &cpo = s:cpo_save
+unlet s:cpo_save s:line1
diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc
index e93cb2b..b8c5ed3 100755
--- a/vim/.vim/vimrc
+++ b/vim/.vim/vimrc
@@ -16,6 +16,7 @@ set omnifunc=syntaxcomplete#Complete
 set diffopt+=algorithm:patience
 autocmd BufWinEnter * let w:m1=matchadd('ColorColumn', '\%<81v.\%>80v', -1)
 autocmd BufNewFile,BufRead *.PAS setlocal filetype=pascal
+autocmd BufNewFile,BufRead *.m setlocal filetype=octave
 autocmd FileType c,h,go,glsl setlocal cindent cinoptions=(0 noexpandtab shiftwidth=8
 autocmd FileType rst setlocal shiftwidth=3
 autocmd FileType css,javascript,python,perl6 setlocal shiftwidth=4