summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2021-01-07 21:46:47 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2021-01-07 21:46:47 -0500
commit4a73f6b7c560a53a7f6fe3bff54a06671fea6109 (patch)
treeff9cbb37b1f41f2d50d4510a6ed5f9ddf560719d
parent4dc06b2e8d8cfc5a363555a8ae7bc1f7aac2d7e9 (diff)
linkhandler uses mpv with the sponsorblock plugin
-rw-r--r--.config/mimeapps.list31
-rw-r--r--.config/newsboat/urls1
-rwxr-xr-x.config/nvim/init.vim33
-rw-r--r--.config/sxhkd/sxhkdrc5
-rw-r--r--.config/vifm/vifmrc2
-rwxr-xr-x.local/bin/dmenuprint15
-rwxr-xr-x.local/bin/dwmbar/dwmb-debarque29
-rwxr-xr-x.local/bin/linkhandler3
8 files changed, 82 insertions, 37 deletions
diff --git a/.config/mimeapps.list b/.config/mimeapps.list
index 6c7c2fe..487fece 100644
--- a/.config/mimeapps.list
+++ b/.config/mimeapps.list
@@ -1,8 +1,4 @@
[Default Applications]
-
-# xdg-open will use these settings to determine how to open filetypes.
-# These .desktop entries can also be seen and changed in ~/.local/share/applications/
-
text/x-shellscript=text.desktop;
x-scheme-handler/magnet=torrent.desktop;
application/x-bittorrent=torrent.desktop;
@@ -17,6 +13,31 @@ application/rss+xml=rss.desktop
video/x-matroska=video.desktop
x-scheme-handler/lbry=lbry.desktop
inode/directory=file.desktop
-x-scheme-handler/kite=kite-copilot.desktop
application/x-osptracker=tracker.desktop
x-scheme-handler/msteams=teams.desktop
+x-scheme-handler/http=firefox.desktop
+x-scheme-handler/https=firefox.desktop
+x-scheme-handler/ftp=firefox.desktop
+x-scheme-handler/chrome=firefox.desktop
+text/html=firefox.desktop
+application/x-extension-htm=firefox.desktop
+application/x-extension-html=firefox.desktop
+application/x-extension-shtml=firefox.desktop
+application/xhtml+xml=firefox.desktop
+application/x-extension-xhtml=firefox.desktop
+application/x-extension-xht=firefox.desktop
+x-scheme-handler/kite=kite-copilot.desktop
+
+[Added Associations]
+x-scheme-handler/http=firefox.desktop;
+x-scheme-handler/https=firefox.desktop;
+x-scheme-handler/ftp=firefox.desktop;
+x-scheme-handler/chrome=firefox.desktop;
+text/html=firefox.desktop;
+application/x-extension-htm=firefox.desktop;
+application/x-extension-html=firefox.desktop;
+application/x-extension-shtml=firefox.desktop;
+application/xhtml+xml=firefox.desktop;
+application/x-extension-xhtml=firefox.desktop;
+application/x-extension-xht=firefox.desktop;
+text/plain=nvim.desktop;
diff --git a/.config/newsboat/urls b/.config/newsboat/urls
index d124fbb..e1ef743 100644
--- a/.config/newsboat/urls
+++ b/.config/newsboat/urls
@@ -44,6 +44,7 @@ https://www.archlinux.org/feeds/news/ "Website" "~Website: Arch
https://chausse.xyz/rss.xml "Website" "~Website: My personal Blog"
# https://www.ledevoir.com/rss/section/societe/science.xml "Website" "~Website: Le Devoir Sciences"
# https://spacenews.com/feed/ "Website" "~Website: SpaceNews"
+https://www.macleans.ca/feed/ "Website" "~Website: Macleans"
# #---Facebook---# #
https://rss-bridge.bb8.fun/?action=display&bridge=Facebook&context=User&u=LaDebarqueEscalade&media_type=all&limit=-1&format=Atom "Facebook" "~Facebook: La Debarque"
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 2dc3db4..3df54ba 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -125,10 +125,8 @@ set linebreak
" #---Plugin Preferences---# "
" Emmet Expansion
let g:user_emmet_leader_key=','
-" Enable kite autocompletion
-" let g:kite_auto_complete=1
" MarkdownPreview
-" let g:mkdp_browser = 'surf'
+let g:mkdp_browser = 'firefox'
" Bracey
let g:bracey_browser_command = "firefox"
" Grammalecte path
@@ -148,20 +146,22 @@ let g:Hexokinase_highlighters = ['virtual']
let g:vimtex_view_general_viewer = 'open'
let g:vimtex_view_general_options = '-a zathura'
let g:tex_flavor = 'latex'
+" Vimtex TOC
+nnoremap <C-n> :VimtexTocToggle<cr>
" #---Document Compilation/Visualisation---# "
" Compile document, be it groff/LaTeX/markdown/etc.
-map <leader>c :w! \| AsyncRun compiler <c-r>%<CR><CR>
+nnoremap <leader>c :w! \| AsyncRun compiler <c-r>%<CR><CR>
autocmd InsertLeave,TextChanged *.gd,*.ms,*.mom :w! | :execute 'silent AsyncRun compiler %'
" autocmd InsertLeave *.rmd,*.rnw,*.tex :w! | :execute 'silent AsyncRun compiler %; todotable % TODO FIXME CHANGED XXX IDEA HACK NOTE REVIEW NB BUG QUESTION COMBAK'
-map <leader>x :w! \| AsyncRun todotable <c-r>% TODO FIXME CHANGED XXX IDEA HACK NOTE REVIEW NB BUG QUESTION COMBAK TEMP<CR><CR>
+nnoremap <leader>x :w! \| AsyncRun todotable <c-r>% TODO FIXME CHANGED XXX IDEA HACK NOTE REVIEW NB BUG QUESTION COMBAK TEMP<CR><CR>
" Have dwmblocks automatically recompile and run when you edit this file in
autocmd BufWritePost ~/Compilation/dwmblocks/config.h !cd ~/Compilation/dwmblocks/; make && sudo make install && { killall -q dwmblocks;setsid dwmblocks & }
autocmd BufWritePost ~/.Xresources !xrdb -load %
" Open corresponding .pdf/.html or preview
- map <leader>p :! opout <c-r>%<CR><CR>
+ nnoremap <leader>p :! opout <c-r>%<CR><CR>
" Open corresponding .pdf/.html or preview
- map <leader>o :! tdout <c-r>%<CR><CR>
+ nnoremap <leader>o :! tdout <c-r>%<CR><CR>
" Spaces are superior to tabs
set tabstop=2
set shiftwidth=2
@@ -178,14 +178,11 @@ call matchadd('ColorColumn', '\%81v', 100)
map <Right> <Esc>:vertical<Space>resize<Space>+3<CR>
map <C-_> <Esc>:split<CR>
map <C-\> <Esc>:vsplit<CR>
-" Ninja python execution
- map <F5> <Esc>:Codi!!<CR>
- map <F6> <Esc>:QuickRun<CR>
" Shortcutting split navigation, saving a keypress:
- map <C-h> <C-w>h
- map <C-j> <C-w>j
- map <C-k> <C-w>k
- map <C-l> <C-w>l
+ nnoremap <C-h> <C-w>h
+ nnoremap <C-j> <C-w>j
+ nnoremap <C-k> <C-w>k
+ nnoremap <C-l> <C-w>l
" Easily escape terminal mode
tnoremap <Esc> <C-\><C-n>
" Space is my leader
@@ -225,7 +222,7 @@ autocmd BufWritePre * %s/\s\+$//e
" Soft Tabs
filetype plugin indent on
" Nvim-R send line
-nmap <C-Enter> <leader>l
+" nmap <C-Enter> <leader>l
" Nvim-R match colorscheme
let rout_follow_colorscheme = 0
" Nvim-R folding
@@ -276,11 +273,11 @@ nnoremap >s :call QuickFixSpell(1)<cr>
" Markdown Heading underline
function! UnderlineHeading(level)
if a:level == 1
- normal! yypVr=
+ execute "normal! yypVr=k$"
elseif a:level == 2
- normal! yypVr-
+ execute "normal! yypVr-k$"
else
- normal! I###<space>
+ execute "normal! I### \e$"
endif
endfunction
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index 0b917b5..ea9de01 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -131,9 +131,6 @@ super + w
## TUI Email Client (neomutt)
super + e
killall neomutt || $TERMINAL -e neomutt && mw -Y
-## TUI Calendar (calcurse)
-super + shift + e
- killall calcurse || $TERMINAL -t dropdown_calendar -e calcurse
## TUI RSS Reader (newsboat)
super + n
killall newsboat || $TERMINAL -e newsboat ; kill -37 $(pidof dwmblocks)
@@ -156,7 +153,7 @@ super + shift + a
dropdowntoggle shell tmux-shell
## TUI Youtube (youtube-viewer)
super + v
- killall youtube-viewer || $TERMINAL -c youtube -t YouTube -e youtube-viewer
+ killall youtube-viewer || $TERMINAL -c youtube -t YouTube -e youtube-viewer -SV
## TUI Hacker News
super + shift + v
killall hacker-news || dropdowntoggle hacker-news tmux-hn
diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc
index 10296bb..16ea457 100644
--- a/.config/vifm/vifmrc
+++ b/.config/vifm/vifmrc
@@ -228,7 +228,7 @@ fileviewer * file -b %c
"{{{ Key mappings
" Easily quit vifm by hitting q
-nmap q ZQ
+nmap q :q<cr>
" Use comma to enter command mode
nnoremap , :
diff --git a/.local/bin/dmenuprint b/.local/bin/dmenuprint
new file mode 100755
index 0000000..cfcd179
--- /dev/null
+++ b/.local/bin/dmenuprint
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+choice="$(lpstat -p -d | sed 's/.*default.*//g;
+ s/[^ ]* //;
+ s/is\sidle.//g
+ s/.*disabled.*//g' |
+ dmenu -p "Which printer?" |
+ sed 's/\s.*//g' )"
+
+lpr -P $choice "$@"
+
+# printer Canon_iP110_series is idle. enabled since Tue 10 Nov 2020 04:22:34 PM
+# printer HP_OfficeJet_Pro_9010 is idle. enabled since Wed 09 Dec 2020 01:57:06 AM
+# printer HP_OfficeJet_Pro_9010_fax is idle. enabled since Tue 27 Oct 2020 08:40:56 PM
+# system default destination: HP_OfficeJet_Pro_9010
diff --git a/.local/bin/dwmbar/dwmb-debarque b/.local/bin/dwmbar/dwmb-debarque
index a5c0e21..79fc346 100755
--- a/.local/bin/dwmbar/dwmb-debarque
+++ b/.local/bin/dwmbar/dwmb-debarque
@@ -1,13 +1,26 @@
#!/bin/sh
-count="$(curl https://www.ladebarque.com/achalandage |
- grep -i 'il y a ' |
- sed 's/.*il\sy\sa\sen\sce\smoment\s//; s/\([0-9]*\).*/\1/')"
+# count="$(curl https://www.ladebarque.com/achalandage |
+ # grep 'il y a' |
+ # sed 's/.*il\sy\sa\sen\sce\smoment\s//; s/\sgrimpeurs.*//')"
-echo "  $count "
+count="$(curl -L ladebarque.com/achalandage |
+ grep -i 'moment' |
+ sed 's/\s//g;
+ s/Maximum.*//;
+ s/^.*moment//;
+ s/\([0-9]\+\).*/\1/')"
-case $BLOCK_BUTTON in
- 1) $BROWSER https://www.ladebarque.com/achalandage ;;
- 2) notify-send -a " La Débarque" "Syncing..." && kill -51 $(pidof dwmblocks) && notify-send -a " La Débarque" "Done!" ;;
- 3) notify-send -a "La Débarque" "This block shows the number of people currently climbing at my local gym." ;;
+# curl https://www.ladebarque.com/achalandage > ~/asdf.html
+
+sep=","
+date="$(TZ='America/Toronto' date +"%Y-%m-%d$sep%R")"
+entry=""$date"$sep"$count""
+
+case "$1" in
+ write) echo "$entry" >> $HOME/.cache/debarque.csv ;;
+ *) echo "  $count " ;;
esac
+
+
+# echo "$entry"
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
index c7c5e75..0beb361 100755
--- a/.local/bin/linkhandler
+++ b/.local/bin/linkhandler
@@ -11,7 +11,8 @@
case "$1" in
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*video.twimg.com*)
- mpv --no-config "$1" ;;
+ mpv "$1" ;;
+ # mpv --no-config "$1" ;;
# setsid -f mpv --no-config "$1" ;;
*png|*jpg|*jpe|*jpeg|*gif|*.webp)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;