mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
Compare commits
11 Commits
d52eb228ba
...
905d0e140e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
905d0e140e | ||
|
|
475e4abb40 | ||
|
|
c95a16916d | ||
|
|
28eff887e0 | ||
|
|
441d26b75d | ||
|
|
db6ee8f819 | ||
|
|
487be9193c | ||
|
|
a984022d37 | ||
|
|
a8447849ea | ||
|
|
54f4b8718d | ||
|
|
9c26507b01 |
@ -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
|
||||
|
||||
@ -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" ;;
|
||||
|
||||
@ -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"
|
||||
@ -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(".")
|
||||
|
||||
@ -1 +0,0 @@
|
||||
.config/gtk-2.0/gtkrc-2.0
|
||||
@ -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
|
||||
|
||||
@ -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."
|
||||
;;
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
thiemeyer_road_to_samarkand.jpg
|
||||
Loading…
x
Reference in New Issue
Block a user