Compare commits

...

11 Commits

Author SHA1 Message Date
appeasementPolitik
5bd595d216
Merge ba070c3d79bcff466412da06fc46d901b6bfbcd7 into c95a16916d5c71288e5e49a78d0621943c89a682 2024-05-24 00:28:18 +02: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
appeasementPolitik
ba070c3d79
Make weath a separate script 2023-11-25 09:46:48 +00:00
appeasementPolitik
7bf7b73a4e
Give weath 'cp' option to copy forecast as plain text for sharing 2023-08-24 14:20:23 +00:00
appeasementPolitik
c389d429bb
Merge branch 'LukeSmithxyz:master' into weath 2023-08-24 14:10:48 +00:00
appeasementPolitik
fc1cd24557
Remove retry and make max time lower because it is interactive 2023-05-14 07:59:18 +00:00
appeasementPolitik
236b082078
weath: Add option to get forecast from a different location 2023-05-13 14:43:12 +00:00
6 changed files with 33 additions and 17 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

@ -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

@ -16,7 +16,7 @@ done; unset command
se() {
choice="$(find ~/.local/bin -mindepth 1 -printf '%P\n' | fzf)"
[ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice"
;}
}
# Verbosity and settings that you pretty much just always are going to want.
alias \
@ -58,4 +58,3 @@ alias \
lf="lfub" \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
weath="less -S ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" \

View File

@ -7,6 +7,7 @@
# 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
"a selected area") maim -u -s pic-selected-"${output}" ;;
@ -15,4 +16,5 @@ case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area
"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

25
.local/bin/weath Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
#
# Get the weather on the terminal. You can pass an alternative location as a parameter,
# and/or use the 'cp' option to copy the forecast as plaintext to the clipboard.
report="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
if [ "$1" = 'cp' ]; then
# shellcheck disable=SC2015
[ -z "$2" ] && sed 's/\x1b\[[^m]*m//g' "$report" | xclip -selection clipboard &&
notify-send "Weather forecast for '${LOCATION:-$(head -n 1 "$report" | cut -d' ' -f3-)}' copied to clipboard." ||
{ data="$(curl -sfm 5 "${WTTRURL:-wttr.in}/$2?T")" &&
notify-send "Weather forecast for '$2' copied to clipboard." &&
echo "$data" | xclip -selection clipboard ||
notify-send 'Failed to get weather forecast!' 'Check your internet connection and the supplied location.'; }
else
[ -n "$2" ] &&
notify-send "Invalid option '$1'! The only valid option is 'cp'." &&
exit 1
# shellcheck disable=SC2015
[ -z "$1" ] && less -S "$report" ||
data="$(curl -sfm 5 "${WTTRURL:-wttr.in}/$1")" && echo "$data" | less -S ||
notify-send 'Failed to get weather forecast!' 'Check your internet connection and the supplied location.'
fi