Compare commits

...

11 Commits

Author SHA1 Message Date
Jane42070
905d0e140e
Merge a984022d372c72f15c2d4446f0be887f297932ab into 475e4abb4084008198f1d9a23de6450e02b074a9 2024-06-12 23:24:34 +00:00
venatio
475e4abb40
(lf,maimpick) added preview for .xcf files, fixed OCR selection in dmenu script (#1420) 2024-06-02 20:40:47 +00:00
Zmole Cristian
c95a16916d
Add OCR to maimpick (#1415)
Sometimes you just need to grab some text from a video
2024-05-23 17:25:19 +00:00
Luke Smith
28eff887e0
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2024-05-23 13:03:55 -04:00
Luke Smith
441d26b75d
for legacy vim colorscheme 2024-05-23 13:03:41 -04:00
Ryan F
db6ee8f819
map gh fix (#1414)
map gh doesn't do anything because it doesn't recognize multi-letter commands. mapping H to cd to ~
2024-05-23 16:42:08 +00:00
Luke Smith
487be9193c
remove default rss feeds 2024-05-17 09:13:07 -04:00
Jane42070
a984022d37 update 2023-08-14 20:32:00 +08:00
Jane42070
a8447849ea add *officedocument* application/msword preview support 2023-03-30 20:25:34 +08:00
Jane42070
54f4b8718d mounter mount ext* filesystem param does not support uid,gid fix 2023-03-25 20:12:11 +08:00
Jane42070
9c26507b01 add msdocx xlsx like doc preview support 2023-03-25 19:04:08 +08:00
10 changed files with 23 additions and 21 deletions

View File

@ -139,7 +139,7 @@ cmd bulkrename ${{
# Bindings
map <c-f> $lf -remote "send $id select \"$(fzf)\""
map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
map gh
map H cd ~
map g top
map D delete
map E extract

View File

@ -30,6 +30,11 @@ image/svg+xml)
[ ! -f "$CACHE" ] && inkscape --convert-dpi-method=none -o "$CACHE.png" --export-overwrite -D --export-png-color-mode=RGBA_16 "$1"
image "$CACHE.png" "$2" "$3" "$4" "$5" "$1"
;;
image/x-xcf)
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
[ ! -f "$CACHE.jpg" ] && convert "$1[0]" "$CACHE.jpg"
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
;;
image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;;
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
text/troff) man ./ "$1" | col -b ;;
@ -50,6 +55,14 @@ image/svg+xml)
[ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg"
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
;;
*officedocument* | application/msword)
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
[ ! -f "$CACHE.jpg" ] && libreoffice --convert-to jpg "$1" --outdir "$CACHE" >/dev/null
# 将绝对路径转换为文件名
tmpfile=$(echo "$1"| rev | cut -f 1 -d"/" | rev | sed -r 's/.[^\.]*$//')
mv $CACHE/$tmpfile.jpg $CACHE.jpg && rmdir $CACHE
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
;;
application/*zip) atool --list -- "$1" ;;
*opendocument*) odt2txt "$1" ;;
application/pgp-encrypted) gpg -d -- "$1" ;;

View File

@ -1,10 +0,0 @@
https://lukesmith.xyz/rss.xml
https://videos.lukesmith.xyz/feeds/videos.xml?videoChannelId=2 "~Luke Smith (Videos)"
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)"
https://lindypress.net/rss
https://notrelated.xyz/rss
https://landchad.net/rss.xml
https://based.cooking/index.xml
https://artixlinux.org/feed.php "tech"
https://www.archlinux.org/feeds/news/ "tech"
https://github.com/LukeSmithxyz/voidrice/commits/master.atom "~LARBS dotfiles"

View File

@ -31,6 +31,7 @@ set noshowmode
set noruler
set laststatus=0
set noshowcmd
colorscheme vim
" Some basics:
nnoremap c "_c
@ -104,10 +105,9 @@ set noshowcmd
cabbrev w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
" Enable Goyo by default for mutt writing
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo 80 | call feedkeys("jk")
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo!\|x!<CR>
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo!\|q!<CR>
" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position
autocmd BufWritePre * let currPos = getpos(".")

View File

@ -1 +0,0 @@
.config/gtk-2.0/gtkrc-2.0

View File

@ -7,12 +7,14 @@
# variables
output="$(date '+%y%m%d-%H%M-%S').png"
xclip_cmd="xclip -sel clip -t image/png"
ocr_cmd="xclip -sel clip"
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\nOCR a selected area (copy)" | dmenu -l 7 -i -p "Screenshot which area?")" in
"a selected area") maim -u -s pic-selected-"${output}" ;;
"current window") maim -B -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;;
"full screen") maim -q -d 0.2 pic-full-"${output}" ;;
"a selected area (copy)") maim -u -s | ${xclip_cmd} ;;
"current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;;
"full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;;
"a selected area (OCR)") tmpfile=$(mktemp /tmp/ocr-XXXXXX.png) && maim -u -s > "$tmpfile" && tesseract "$tmpfile" - -l eng | ${ocr_cmd} && rm "$tmpfile" ;;
esac

View File

@ -80,7 +80,8 @@ case "$chosen" in
chosen="${chosen%% *}"
chosen="${chosen:1}" # This is a bashism.
attemptmount || getmount
sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)"
# ext4 does not support uid,gid
[ $(lsblk -npro "fstype" $chosen) == ext[2-4] ] && sudo -A mount "$chosen" "$mp" -o user="$USER",rw || sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)"
notify-send "💾Drive Mounted." "$chosen mounted to $mp."
;;

View File

@ -1 +0,0 @@
thiemeyer_road_to_samarkand.jpg

View File

@ -1 +0,0 @@
.config/x11/xprofile

View File

@ -1 +0,0 @@
.config/shell/profile