Add some pdf ncie to haves in vim and scripts
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -4,3 +4,6 @@
|
|||||||
[submodule "dotfiles/zsh/ohmyzsh"]
|
[submodule "dotfiles/zsh/ohmyzsh"]
|
||||||
path = dotfiles/zsh/ohmyzsh
|
path = dotfiles/zsh/ohmyzsh
|
||||||
url = https://github.com/ohmyzsh/ohmyzsh
|
url = https://github.com/ohmyzsh/ohmyzsh
|
||||||
|
[submodule "dotfiles/scripts/randomwallpaper"]
|
||||||
|
path = dotfiles/scripts/randomwallpaper
|
||||||
|
url = https://github.com/CramMK/randomwallpaper
|
||||||
|
|||||||
11
config.yaml
11
config.yaml
@@ -6,7 +6,7 @@ actions:
|
|||||||
font-cache: fc-cache -f -v
|
font-cache: fc-cache -f -v
|
||||||
xresources-reload: xrdb ~/.Xresources
|
xresources-reload: xrdb ~/.Xresources
|
||||||
config:
|
config:
|
||||||
backup: true
|
backup: false
|
||||||
create: true
|
create: true
|
||||||
dotpath: dotfiles
|
dotpath: dotfiles
|
||||||
dotfiles:
|
dotfiles:
|
||||||
@@ -78,6 +78,9 @@ dotfiles:
|
|||||||
f_dir_colors:
|
f_dir_colors:
|
||||||
src: dir_colors/dir_colors
|
src: dir_colors/dir_colors
|
||||||
dst: ~/.dir_colors
|
dst: ~/.dir_colors
|
||||||
|
d_scripts:
|
||||||
|
src: scripts
|
||||||
|
dst: ~/scripts
|
||||||
|
|
||||||
profiles:
|
profiles:
|
||||||
laptop:
|
laptop:
|
||||||
@@ -96,6 +99,7 @@ profiles:
|
|||||||
- neofetch
|
- neofetch
|
||||||
- ranger
|
- ranger
|
||||||
- dir_colors
|
- dir_colors
|
||||||
|
- scripts
|
||||||
sub-win:
|
sub-win:
|
||||||
include:
|
include:
|
||||||
- zsh
|
- zsh
|
||||||
@@ -104,6 +108,7 @@ profiles:
|
|||||||
- ranger
|
- ranger
|
||||||
- neofetch
|
- neofetch
|
||||||
- dir_colors
|
- dir_colors
|
||||||
|
- scripts
|
||||||
work:
|
work:
|
||||||
include:
|
include:
|
||||||
- zsh
|
- zsh
|
||||||
@@ -114,6 +119,7 @@ profiles:
|
|||||||
- compton
|
- compton
|
||||||
- tmux
|
- tmux
|
||||||
- dir_colors
|
- dir_colors
|
||||||
|
- scripts
|
||||||
dev:
|
dev:
|
||||||
include:
|
include:
|
||||||
- vim
|
- vim
|
||||||
@@ -171,3 +177,6 @@ profiles:
|
|||||||
dir_colors:
|
dir_colors:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_dir_colors
|
- f_dir_colors
|
||||||
|
scripts:
|
||||||
|
dotfiles:
|
||||||
|
- d_scripts
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ bindsym $mod+space exec "rofi -show"
|
|||||||
bindsym $mod+c exec "rofi -show ssh"
|
bindsym $mod+c exec "rofi -show ssh"
|
||||||
|
|
||||||
# dmenu
|
# dmenu
|
||||||
bindsym $mod+d exec "dmenu_run -fn 'InconsolataLGC Nerd Font Mono' -nb '#2E3440' -sb '#2E3440' -nf '#ECEFF4' -sf '#A3BE8C' -p 'ﰌ' -l 3"
|
bindsym $mod+d exec "dmenu_run -fn 'InconsolataLGC Nerd Font Mono' -nb '#2E3440' -sb '#2E3440' -nf '#ECEFF4' -sf '#A3BE8C' -p 'ﰌ'"
|
||||||
|
|
||||||
# change focus
|
# change focus
|
||||||
bindsym $mod+h focus left
|
bindsym $mod+h focus left
|
||||||
|
|||||||
11
dotfiles/scripts/open-pdf
Executable file
11
dotfiles/scripts/open-pdf
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# opout: "open output": A general handler for opening a file's intended output.
|
||||||
|
# I find this useful especially running from vim.
|
||||||
|
# Stolen from BrodieRobertson
|
||||||
|
|
||||||
|
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
*.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid zathura "$basename".pdf >/dev/null 2>&1 & ;;
|
||||||
|
*.html) setsid "$BROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;;
|
||||||
|
esac
|
||||||
23
dotfiles/scripts/pandoc-comp
Executable file
23
dotfiles/scripts/pandoc-comp
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# General handler for compiling files
|
||||||
|
# stolen from BrodieRobertson
|
||||||
|
|
||||||
|
file=$(readlink -f "$1")
|
||||||
|
base=$(echo "$file" | sed 's/\..*//')
|
||||||
|
|
||||||
|
handlebang() {
|
||||||
|
bang=$(head -n 1 "$file")
|
||||||
|
case "$bang" in
|
||||||
|
*!/bin/sh|*!/bin/bash|*!/bin/zsh) "$file" ;;
|
||||||
|
*!/bin/perl) perl "$file" ;;
|
||||||
|
*!/bin/python) python "$file" ;;
|
||||||
|
*) echo "Can't compile" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
*.md) pandoc "$file" -o "$base".pdf ;;
|
||||||
|
*.py) python "$file" ;;
|
||||||
|
*.perl) perl "$file" ;;
|
||||||
|
*) handlebang ;;
|
||||||
|
esac
|
||||||
1
dotfiles/scripts/randomwallpaper
Submodule
1
dotfiles/scripts/randomwallpaper
Submodule
Submodule dotfiles/scripts/randomwallpaper added at 0a973cafe8
@@ -31,7 +31,7 @@ let g:pear_tree_pairs = {
|
|||||||
\ '"': {'closer': '"'},
|
\ '"': {'closer': '"'},
|
||||||
\ '<': {'closer': '>'}
|
\ '<': {'closer': '>'}
|
||||||
\ }
|
\ }
|
||||||
"
|
|
||||||
" Vimwiki
|
" Vimwiki
|
||||||
let g:vimwiki_list = [{'path': '~/vimwiki/',
|
let g:vimwiki_list = [{'path': '~/vimwiki/',
|
||||||
\ 'syntax': 'markdown', 'ext': '.md'}]
|
\ 'syntax': 'markdown', 'ext': '.md'}]
|
||||||
@@ -98,7 +98,6 @@ set foldmethod=indent
|
|||||||
map <C-f> :Ex <CR>
|
map <C-f> :Ex <CR>
|
||||||
|
|
||||||
let g:netrw_winsize = 25
|
let g:netrw_winsize = 25
|
||||||
let g:netrw_browse_split = 4 " open in previous window
|
|
||||||
let g:netrw_liststyle = 3 " Tree-like structure
|
let g:netrw_liststyle = 3 " Tree-like structure
|
||||||
let g:netrw_banner = 0 " Remove useless banner at the top of netrw
|
let g:netrw_banner = 0 " Remove useless banner at the top of netrw
|
||||||
|
|
||||||
@@ -113,3 +112,8 @@ if has("autocmd")
|
|||||||
au BufReadPost * if line("' f\"") > 0 && line("'\"") <= line("$")
|
au BufReadPost * if line("' f\"") > 0 && line("'\"") <= line("$")
|
||||||
\| exe "normal! g'\"" | endif
|
\| exe "normal! g'\"" | endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" ------------------------------------- Pandoc ---------------------------------
|
||||||
|
map <leader>c :w! \| !~/scripts/pandoc-comp <c-r>%<CR><CR>
|
||||||
|
map <leader>o :!~/scripts/open-pdf <c-r>%<CR><CR>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user