mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
Compare commits
11 Commits
6a2d292fa7
...
5bd595d216
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bd595d216 | ||
|
|
c95a16916d | ||
|
|
28eff887e0 | ||
|
|
441d26b75d | ||
|
|
db6ee8f819 | ||
|
|
487be9193c | ||
|
|
ba070c3d79 | ||
|
|
7bf7b73a4e | ||
|
|
c389d429bb | ||
|
|
fc1cd24557 | ||
|
|
236b082078 |
@ -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
|
||||
|
||||
@ -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(".")
|
||||
|
||||
@ -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" \
|
||||
|
||||
@ -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
25
.local/bin/weath
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user