Merge branch 'master' of github.com:lucic71/voidrice

This commit is contained in:
Lucian Popescu 2022-04-07 09:35:16 +03:00
commit b6cb14e470
20 changed files with 1954 additions and 1962 deletions

View File

@ -1,48 +1,27 @@
# Luke's lf settings
# Note on Image Previews
# For those wanting image previews, like this system, there are four steps to
# set it up. These are done automatically for LARBS users, but I will state
# them here for others doing it manually.
#
# 1. ueberzug must be installed.
# 2. The scope file (~/.config/lf/scope for me), must have a command similar to
# mine to generate ueberzug images.
# 3. A `set cleaner` line as below is a cleaner script.
# 4. lf should be started through a wrapper script (~/.local/bin/lfub for me)
# that creates the environment for ueberzug. This command can be be aliased
# in your shellrc (`alias lf="lfub") or if set to a binding, should be
# called directly instead of normal lf.
# Basic vars
set shell bash
set shellopts '-eu'
set ifs "\n"
set scrolloff 10
set icons
set period 1
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
set cleaner '~/.config/lf/cleaner'
set previewer '~/.config/lf/scope'
# Vars that depend on environmental variables
$lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope"
# cmds/functions
cmd open ${{
case $(file --mime-type "$(readlink -f $f)" -b) in
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
text/*|application/json|inode/x-empty) $EDITOR $fx;;
image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f evince $fx >/dev/null 2>&1 ;;
text/*) $EDITOR $fx;;
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
setsid -f sxiv -aio 2>/dev/null | while read -r file; do
[ -z "$file" ] && continue
lf -remote "send select \"$file\""
lf -remote "send toggle"
done &
;;
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | setsid -f sxiv -aio 2>/dev/null | lf-select & ;;
audio/*) mpv --audio-display=no $f ;;
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
application/pdf|application/vnd*|application/epub*) setsid -f evince $fx >/dev/null 2>&1 ;;
application/pgp-encrypted) $EDITOR $fx ;;
*) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
esac
@ -114,8 +93,8 @@ map O $mimeopen --ask $f
map A rename # at the very end
map c push A<c-u> # new rename
map I push A<c-a> # at the very beginning
map i push A<a-b><a-b><a-f> # before extention
map a push A<a-b> # after extention
map i push A<a-b><a-b><a-f> # before extension
map a push A<a-b> # after extension
map B bulkrename
map b $setbg $f
@ -125,7 +104,5 @@ map V push :!nvim<space>
map W $setsid -f $TERMINAL >/dev/null 2>&1
map Y $printf "%s" "$fx" | xclip -selection clipboard
# Source Bookmarks
source "~/.config/lf/shortcutrc"

View File

@ -1,44 +1,58 @@
#!/bin/sh
#!/bin/bash
# File preview handler for lf.
set -C -f
set -C -f -u
#IFS=$'\n'
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
image() {
if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG"
else
mediainfo "$1"
fi
# ANSI color codes are supported.
# STDIN is disabled, so interactive scripts won't work properly
# This script is considered a configuration file and must be updated manually.
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | Display stdout as preview
# 1 | no preview | Display no preview at all
# 2 | plain text | Display the plain content of the file
# Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
HEIGHT="${2}"
#FILE_EXTENSION="${FILE_PATH##*.}"
#FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
# Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=8
HIGHLIGHT_STYLE='pablo'
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
text/html) w3m -dump "${FILE_PATH}" ;;
text/troff) man ./ "${FILE_PATH}" | col -b ;;
text/* | */xml)
if [ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]; then
exit 2
fi
if [ "$( tput colors )" -ge 256 ]; then
local highlight_format='xterm256'
else
local highlight_format='ansi'
fi
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" ;;
application/zip) atool --list -- "${FILE_PATH}" ;;
image/*) chafa --fill=block --symbols=block -c 256 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
video/* | audio/*|application/octet-stream) mediainfo "${FILE_PATH}" || exit 1;;
*/pdf) pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - ;;
*opendocument*) odt2txt "${FILE_PATH}" ;;
esac
}
ifub() {
[ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1
}
# Note that the cache file name is a function of file information, meaning if
# an image appears in multiple places across the machine, it will not have to
# be regenerated once seen.
case "$(file --dereference --brief --mime-type -- "$1")" in
image/*) image "$1" "$2" "$3" "$4" "$5" ;;
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
text/troff) man ./ "$1" | col -b ;;
text/* | */xml | application/json) bat --terminal-width "$4" -f "$1" ;;
application/zip) atool --list -- "$1" ;;
audio/* | application/octet-stream) mediainfo "$1" || exit 1;;
video/* )
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" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
image "$CACHE" "$2" "$3" "$4" "$5"
;;
*/pdf)
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" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
image "$CACHE.jpg" "$2" "$3" "$4" "$5"
;;
*opendocument*) odt2txt "$1" ;;
application/pgp-encrypted) gpg -d -- "$1" ;;
esac
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
handle_mime "${MIMETYPE}"
exit 1

View File

@ -32,7 +32,7 @@ color article white default bold
browser linkhandler
macro , open-in-browser
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler
macro w set browser "lynx" ; open-in-browser ; set browser linkhandler
macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler

View File

@ -23,7 +23,7 @@ set title
set bg=light
set go=a
set mouse=a
set nohlsearch
set hlsearch
set clipboard+=unnamedplus
set noshowmode
set noruler
@ -149,8 +149,3 @@ function! ToggleHiddenAll()
endif
endfunction
nnoremap <leader>h :call ToggleHiddenAll()<CR>
" Load command shortcuts generated from bm-dirs and bm-files via shortcuts script.
" Here leader is ";".
" So ":vs ;cfz" will expand into ":vs /home/<user>/.config/zsh/.zshrc"
" if typed fast without the timeout.
source ~/.config/nvim/shortcuts.vim

View File

@ -18,7 +18,7 @@ alias \
rm="rm -vI" \
bc="bc -ql" \
mkd="mkdir -pv" \
yt="yt-dlp --embed-metadata -i" \
yt="youtube-dl --add-metadata -i" \
yta="yt -x -f bestaudio/best" \
ffmpeg="ffmpeg -hide_banner"
@ -27,8 +27,7 @@ alias \
ls="ls -hN --color=auto --group-directories-first" \
grep="grep --color=auto" \
diff="diff --color=auto" \
ccat="highlight --out-format=ansi" \
ip="ip -color=auto"
ccat="highlight --out-format=ansi"
# These common commands are just too long! Abbreviate them.
alias \
@ -46,7 +45,6 @@ alias \
z="zathura"
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_DATA_HOME:-$HOME/.local/share}/weatherreport" \

View File

@ -1 +1,15 @@
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

View File

@ -75,3 +75,29 @@ bindkey '^e' edit-command-line
# Load syntax highlighting; should be last.
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
$HOME/.local/bin/jp-quote
# Enable reverse search
bindkey -v
bindkey '^R' history-incremental-search-backward
# Access last parameter from the previous command using Alt + .
bindkey '\e.' insert-last-word
_alarm() {
( \speaker-test --frequency $1 --test sine )&
pid=$!
\sleep ${2}s
\kill -9 $pid
}
function countdown(){
date1=$((`date +%s` + $1));
while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
_alarm 1000 3
}

View File

@ -4,13 +4,13 @@
# some choice programs to use to open it.
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}"
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | dmenu -i -p "Open it with?")" in
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in
"Copy URL") echo "$feed" | xclip -selection clipboard ;;
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
"mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;;
"mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;;
"queue yt-dlp") qndl "$feed" >/dev/null 2>&1 ;;
"queue yt-dlp audio") qndl "$feed" 'yt-dlp --embed-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;;
"queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;;
"queue yt-dl audio") qndl "$feed" 'youtube-dl --add-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;;
"queue download") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;;
PDF) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;

18
.local/bin/jp-quote Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
quotes=(
"Tell the truth."
"Pay attention."
"Don't be to civilized."
"Be precise in your speech."
"Promote the best in people."
"Do not do things that you hate."
"Don't let bullies get away with it."
"Nothing well done is insignificant."
"Dress like the person you want to be."
"Be grateful in spite of your suffering."
"Maintain your connections with people."
)
selectedQuote=${quotes[$RANDOM % ${#quotes[@]}]}
echo $selectedQuote

9
.local/bin/lf-select Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
# Reads file names from stdin and selects them in lf.
while read -r file; do
[ -z "$file" ] && continue
lf -remote "send select \"$file\""
lf -remote "send toggle"
done

View File

@ -5,7 +5,7 @@
base="$(basename "$1")"
notify-send "⏳ Queuing $base..."
cmd="$2"
[ -z "$cmd" ] && cmd="yt-dlp --embed-metadata -ic"
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata -ic"
idnum="$(tsp $cmd "$1")"
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
tsp -D "$idnum" mv "$base" "$realname"

View File

@ -4,9 +4,9 @@
# Increase key speed via a rate change
xset r rate 300 50
# Map the caps lock key to super...
setxkbmap -option caps:super
#setxkbmap -option caps:super
# But when it is pressed only once, treat it as escape.
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
#killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
# Map the menu button to right super as well.
xmodmap -e 'keycode 135 = Super_R'
# Turn off the caps lock if on since there is no longer a key for it.

View File

@ -7,7 +7,7 @@
# If wal is installed, also generates a colorscheme.
# Location of link to wallpaper link.
bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/bg"
bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg"
# Configuration files of applications that have their themes changed by pywal.
dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"

View File

@ -7,14 +7,13 @@ bmfiles="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files"
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
vim_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/shortcuts.vim"
ranger_shortcuts="/dev/null"
qute_shortcuts="/dev/null"
fish_shortcuts="/dev/null"
vifm_shortcuts="/dev/null"
# Remove, prepare files
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" 2>/dev/null
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
@ -28,8 +27,7 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ;
printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ;
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
# Format the `files` file in the correct syntax and sent it to both configs.
eval "echo \"$(cat "$bmfiles")\"" | \
@ -39,5 +37,4 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
printf(\"map %s :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ;
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"

View File

@ -1,248 +1,194 @@
#!/bin/sh
# Show a Doppler RADAR of a user's preferred location.
# Show a Doppler RADAR of an American user's preferred location.
secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds.
radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar"
doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif"
pickloc() { chosen="$(echo "US: Northeast
US: Southeast
US: PacNorthWest
US: PacSouthWest
US: UpperMissVly
US: SouthMissVly
US: SouthPlains
US: NorthRockies
US: SouthRockies
US: Alaska
US: Carib
US: Hawaii
US: CentGrLakes
US: Conus-Large
US: KABR: Aberdeen, SD
US: KBIS: Bismarck, ND
US: KFTG: Denver/Boulder, CO
US: KDMX: Des Moines, IA
US: KDTX: Detroit, MI
US: KDDC: Dodge City, KS
US: KDLH: Duluth, MN
US: KCYS: Cheyenne, WY
US: KLOT: Chicago, IL
US: KGLD: Goodland, KS
US: KUEX: Hastings, NE
US: KGJX: Grand Junction, CO
US: KGRR: Grand Rapids, MI
US: KMVX: Fargo/Grand Forks, ND
US: KGRB: Green Bay, WI
US: KIND: Indianapolis, IN
US: KJKL: Jackson, KY
US: KARX: La Crosse, WI
US: KILX: Lincoln/Central Illinois, IL
US: KLVX: Louisville, KY
US: KMQT: Marquette
US: KMKX: Milwaukee, WI
US: KMPX: Minneapolis, MN
US: KAPX: Gaylord/Alpena, MI
US: KLNX: North Platte, NE
US: KIWX: N. Webster/Northern, IN
US: KOAX: Omaha, NE
US: KPAH: Paducah, KY
US: KEAX: Pleasant Hill, MO
US: KPUX: Pueblo, CO
US: KDVN: Quad Cities, IA
US: KUDX: Rapid City, SD
US: KRIW: Riverton, WY
US: KSGF: Springfield, MO
US: KLSX: St. LOUIS, MO
US: KFSD: Sioux Falls, IA
US: KTWX: Topeka, KS
US: KICT: Wichita, KS
US: KVWX: Paducah, KY
US: ICAO: Responsible Wfo
US: KLTX: WILMINGTON, NC
US: KCCX: State College/Central, PA
US: KLWX: Sterling, VA
US: KFCX: Blacksburg/Roanoke, VA
US: KRAX: Raleigh/Durham, NC
US: KGYX: Portland, ME
US: KDIX: Mt Holly/Philadelphia, PA
US: KPBZ: Pittsburgh, PA
US: KAKQ: Wakefield, VA
US: KMHX: Morehead City, NC
US: KGSP: Greer/Greenville/Sprtbg, SC
US: KILN: Wilmington/Cincinnati, OH
US: KCLE: Cleveland, OH
US: KCAE: Columbia, SC
US: KBGM: Binghamton, NY
US: KENX: Albany, NY
US: KBUF: Buffalo, NY
US: KCXX: Burlington, VT
US: KCBW: Caribou, ME
US: KBOX: Boston /Taunton, MA
US: KOKX: New York City, NY
US: KCLX: Charleston, SC
US: KRLX: Charleston, WV
US: ICAO: Responsible WFO
US: KBRO: Brownsville, TX
US: KABX: Albuquerque, NM
US: KAMA: Amarillo, TX
US: KFFC: Peachtree City/Atlanta, GA
US: KEWX: Austin/Sanantonio, TX
US: KBMX: Birmingham, AL
US: KCRP: Corpus Christi, TX
US: KFWS: Dallas / Ft. Worth, TX
US: KEPZ: El Paso, TX
US: KHGX: Houston/ Galveston, TX
US: KJAX: Jacksonville, FL
US: KBYX: Key West, FL
US: KMRX: Morristown/knoxville, TN
US: KLBB: Lubbock, TX
US: KLZK: Little Rock, AR
US: KLCH: Lake Charles, LA
US: KOHX: Nashville, TN
US: KMLB: Melbourne, FL
US: KNQA: Memphis, TN
US: KAMX: Miami, FL
US: KMAF: Midland/odessa, TX
US: KTLX: Norman, OK
US: KHTX: Huntsville, AL
US: KMOB: Mobile, AL
US: KTLH: Tallahassee, FL
US: KTBW: Tampa Bay Area, FL
US: KSJT: San Angelo, TX
US: KINX: Tulsa, OK
US: KSRX: Tulsa, OK
US: KLIX: New Orleans/slidell, LA
US: KDGX: Jackson, MS
US: KSHV: Shreveport, LA
US: ICAO: Responsible WFO
US: KLGX: Seattle / Tacoma, WA
US: KOTX: Spokane, WA
US: KEMX: Tucson, AZ
US: KYUX: Phoenix, AZ
US: KNKX: San Diego, CA
US: KMUX: Monterey/san Francisco, CA
US: KHNX: San Joaquin/hanford, CA
US: KSOX: San Diego, CA
US: KATX: Seattle / Tacoma, WA
US: KIWA: Phoenix, AZ
US: KRTX: Portland, OR
US: KSFX: Pocatello, ID
US: KRGX: Reno, NV
US: KDAX: Sacramento, CA
US: KMTX: Salt Lake City, UT
US: KPDT: Pendleton, OR
US: KMSX: Missoula, MT
US: KESX: Las Vegas, NV
US: KVTX: Los Angeles, CA
US: KMAX: Medford, OR
US: KFSX: Flagstaff, AZ
US: KGGW: Glasgow, MT
US: KLRX: Elko, NV
US: KBHX: Eureka, CA
US: KTFX: Great Falls, MT
US: KCBX: Boise, ID
US: KBLX: Billings, MT
US: KICX: Salt Lake City, UT
US: ICAO: Responsible Wfo W/ MSCF
US: PABC: Anchorage, AK
US: PAPD: Fairbanks, AK
US: PHKM: Honolulu, HI
US: PAHG: Anchorage, AK
US: PAKC: Anchorage, AK
US: PAIH: Anchorage, AK
US: PHMO: Honolulu, HI
US: PAEC: Fairbanks, AK
US: TJUA: San Juan, PR
US: PACG: Juneau, AK
US: PHKI: Honolulu, HI
US: PHWA: Honolulu, HI
US: ICAO: Responsible Wfo W/ MSCF
US: KFDR: Norman, OK
US: PGUA: Guam
US: KBBX: Sacramento, CA
US: KFDX: Albuquerque, NM
US: KGWX: Jackson, MS
US: KDOX: Wakefield, VA
US: KDYX: San Angelo, TX
US: KEYX: Las Vegas, NV
US: KEVX: Mobile, AL
US: KHPX: Paducah, KY
US: KTYX: Burlington, VT
US: KGRK: Dallas / Ft. Worth, TX
US: KPOE: Lake Charles, LA
US: KEOX: Tallahassee, FL
US: KHDX: El Paso, TX
US: KDFX: San Antonio, TX
US: KMXX: Birmingham, AL
US: KMBX: Bismarck, ND
US: KVAX: Jacksonville, FL
US: KJGX: Peachtree City/atlanta, GA
US: KVNX: Norman, OK
US: KVBX: Vandenberg Afb: Orcutt, CA
EU: Europe
EU: GB: Great Brittain
EU: SCAN: Scandinavia
EU: ALPS: The Alps
EU: NL: The Netherlands
EU: DE: Germany
EU: SP: Spain
EU: FR: France
EU: IT: Italy
EU: PL: Poland
EU: GR: Greece
EU: TU: Turkey
EU: RU: Russia
EU: BA: Bahrain
EU: BC: Botswana
EU: SE: Republic of Seychelles
EU: HU: Hungary
EU: UK: Ukraine
AF: AF: Africa
AF: WA: West Africa
AF: ZA: South Africa
AF: DZ: Algeria
AF: CE: Canary Islands
AF: NG: Nigeria
AF: TD: Chad
AF: CG: Democratic Republic of Congo
AF: EG: Egypt
AF: ET: Ethiopia
AF: CM: Cameroon
AF: IS: Israel
AF: LY: Libya
AF: MG: Madagascar
AF: MO: Morocco
AF: BW: Namibia
AF: SA: Saudi Arabia
AF: SO: Somalia
AF: SD: Sudan
AF: TZ: Tanzania
AF: TN: Tunisia
AF: ZM: Zambia
AF: KE: Kenya
AF: AO: Angola" | dmenu -r -i -l 50 -p "Select a radar to use as default:" | tr "[:lower:]" "[:upper:]")"
# Set continent code and radar code.
continentcode=$(echo "$chosen" | sed "s/:.*//")
radarcode=$(echo "$chosen" | sed "s/..: // ; s/:.*//")
pickloc() { chosen="$(echo "Northeast
Southeast
PacNorthWest
PacSouthWest
UpperMissVly
SouthMissVly
SouthPlains
NorthRockies
SouthRockies
Alaska
Carib
Hawaii
CentGrLakes
Conus-Large
KABR: Aberdeen, SD
KBIS: Bismarck, ND
KFTG: Denver/Boulder, CO
KDMX: Des Moines, IA
KDTX: Detroit, MI
KDDC: Dodge City, KS
KDLH: Duluth, MN
KCYS: Cheyenne, WY
KLOT: Chicago, IL
KGLD: Goodland, KS
KUEX: Hastings, NE
KGJX: Grand Junction, CO
KGRR: Grand Rapids, MI
KMVX: Fargo/Grand Forks, ND
KGRB: Green Bay, WI
KIND: Indianapolis, IN
KJKL: Jackson, KY
KARX: La Crosse, WI
KILX: Lincoln/Central Illinois, IL
KLVX: Louisville, KY
KMQT: Marquette
KMKX: Milwaukee, WI
KMPX: Minneapolis, MN
KAPX: Gaylord/Alpena, MI
KLNX: North Platte, NE
KIWX: N. Webster/Northern, IN
KOAX: Omaha, NE
KPAH: Paducah, KY
KEAX: Pleasant Hill, MO
KPUX: Pueblo, CO
KDVN: Quad Cities, IA
KUDX: Rapid City, SD
KRIW: Riverton, WY
KSGF: Springfield, MO
KLSX: St. LOUIS, MO
KFSD: Sioux Falls, IA
KTWX: Topeka, KS
KICT: Wichita, KS
KVWX: Paducah, KY
ICAO: Responsible Wfo
KLTX: WILMINGTON, NC
KCCX: State College/Central, PA
KLWX: Sterling, VA
KFCX: Blacksburg/Roanoke, VA
KRAX: Raleigh/Durham, NC
KGYX: Portland, ME
KDIX: Mt Holly/Philadelphia, PA
KPBZ: Pittsburgh, PA
KAKQ: Wakefield, VA
KMHX: Morehead City, NC
KGSP: Greer/Greenville/Sprtbg, SC
KILN: Wilmington/Cincinnati, OH
KCLE: Cleveland, OH
KCAE: Columbia, SC
KBGM: Binghamton, NY
KENX: Albany, NY
KBUF: Buffalo, NY
KCXX: Burlington, VT
KCBW: Caribou, ME
KBOX: Boston /Taunton, MA
KOKX: New York City, NY
KCLX: Charleston, SC
KRLX: Charleston, WV
ICAO: Responsible WFO
KBRO: Brownsville, TX
KABX: Albuquerque, NM
KAMA: Amarillo, TX
KFFC: Peachtree City/Atlanta, GA
KEWX: Austin/Sanantonio, TX
KBMX: Birmingham, AL
KCRP: Corpus Christi, TX
KFWS: Dallas / Ft. Worth, TX
KEPZ: El Paso, TX
KHGX: Houston/ Galveston, TX
KJAX: Jacksonville, FL
KBYX: Key West, FL
KMRX: Morristown/knoxville, TN
KLBB: Lubbock, TX
KLZK: Little Rock, AR
KLCH: Lake Charles, LA
KOHX: Nashville, TN
KMLB: Melbourne, FL
KNQA: Memphis, TN
KAMX: Miami, FL
KMAF: Midland/odessa, TX
KTLX: Norman, OK
KHTX: Huntsville, AL
KMOB: Mobile, AL
KTLH: Tallahassee, FL
KTBW: Tampa Bay Area, FL
KSJT: San Angelo, TX
KINX: Tulsa, OK
KSRX: Tulsa, OK
KLIX: New Orleans/slidell, LA
KDGX: Jackson, MS
KSHV: Shreveport, LA
ICAO: Responsible WFO
KLGX: Seattle / Tacoma, WA
KOTX: Spokane, WA
KEMX: Tucson, AZ
KYUX: Phoenix, AZ
KNKX: San Diego, CA
KMUX: Monterey/san Francisco, CA
KHNX: San Joaquin/hanford, CA
KSOX: San Diego, CA
KATX: Seattle / Tacoma, WA
KIWA: Phoenix, AZ
KRTX: Portland, OR
KSFX: Pocatello, ID
KRGX: Reno, NV
KDAX: Sacramento, CA
KMTX: Salt Lake City, UT
KPDT: Pendleton, OR
KMSX: Missoula, MT
KESX: Las Vegas, NV
KVTX: Los Angeles, CA
KMAX: Medford, OR
KFSX: Flagstaff, AZ
KGGW: Glasgow, MT
KLRX: Elko, NV
KBHX: Eureka, CA
KTFX: Great Falls, MT
KCBX: Boise, ID
KBLX: Billings, MT
KICX: Salt Lake City, UT
ICAO: Responsible Wfo W/ MSCF
PABC: Anchorage, AK
PAPD: Fairbanks, AK
PHKM: Honolulu, HI
PAHG: Anchorage, AK
PAKC: Anchorage, AK
PAIH: Anchorage, AK
PHMO: Honolulu, HI
PAEC: Fairbanks, AK
TJUA: San Juan, PR
PACG: Juneau, AK
PHKI: Honolulu, HI
PHWA: Honolulu, HI
ICAO: Responsible Wfo W/ MSCF
KFDR: Norman, OK
PGUA: Guam
KBBX: Sacramento, CA
KFDX: Albuquerque, NM
KGWX: Jackson, MS
KDOX: Wakefield, VA
KDYX: San Angelo, TX
KEYX: Las Vegas, NV
KEVX: Mobile, AL
KHPX: Paducah, KY
KTYX: Burlington, VT
KGRK: Dallas / Ft. Worth, TX
KPOE: Lake Charles, LA
KEOX: Tallahassee, FL
KHDX: El Paso, TX
KDFX: San Antonio, TX
KMXX: Birmingham, AL
KMBX: Bismarck, ND
KVAX: Jacksonville, FL
KJGX: Peachtree City/atlanta, GA
KVNX: Norman, OK
KVBX: Vandenberg Afb: Orcutt, CA" | dmenu -r -i -l 50 -p "Select a National Weather Service radar to use as default:" | sed "s/:.*//" | tr "[:lower:]" "[:upper:]")"
# Sanity check of selection and ensure user did not escape.
echo "$radarcode" | grep -q "^[A-Z]\+$" && printf "%s,%s\\n" "$continentcode" "$radarcode" > "$radarloc" ;}
echo "$chosen" | grep -q "^[A-Z]\+$" && echo "$chosen" > "$radarloc" ;}
getdoppler() {
cont="$(sed "s/,.*//" "$radarloc")"
loc="$(cut -c 4- "$radarloc")"
loc="$(cat "$radarloc")"
notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc."
if [ "$cont" = "US" ] ; then
curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;
elif [ "$cont" = "EU" ] ; then
curl -sL "https://api.sat24.com/animated/${loc}/rainTMC/2/" > "$doppler" ;
elif [ "$cont" = "AF" ] ; then
curl -sL "https://api.sat24.com/animated/${loc}/rain/2/" > "$doppler" ;
fi
}
curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;}
showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;}
@ -252,7 +198,7 @@ case $BLOCK_BUTTON in
showdoppler ;;
2) pickloc && getdoppler && showdoppler ;;
3) notify-send "🗺️ Doppler RADAR module" "\- Left click for local Doppler RADAR.
- Middle click to update RADAR location.
- Middle click to update change RADAR location.
After $secs seconds, new clicks will also automatically update the doppler RADAR." ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac

View File

@ -26,4 +26,4 @@ update() {
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx $tx)
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)

View File

@ -14,7 +14,7 @@ i3 (old window manager) https://videos.lukesmith.xyz/videos/watch/b861525c-7ada-
neomutt (email) https://videos.lukesmith.xyz/videos/watch/83122e83-52d9-4278-ae1a-7d1beeb50c8e
ncmpcpp (music player) https://videos.lukesmith.xyz/videos/watch/b5ac6f0d-a220-4433-88e3-e98fc791dc0a
newsboat (RSS reader) https://videos.lukesmith.xyz/videos/watch/bd2c3fff-40fa-47ea-aa98-5b1ec0c903b6
lf (file manager) https://videos.lukesmith.xyz/w/rKeHsF5ZHDNDbR1buUKB1c
ranger (file manager) https://videos.lukesmith.xyz/videos/watch/785d914f-8cbd-4a3d-a1f6-d75675fc7549
zathura (pdf viewer) https://videos.lukesmith.xyz/videos/watch/c780f75a-11f6-48a9-a191-d079ebc36ea4
gpg keys https://videos.lukesmith.xyz/videos/watch/040f5530-4830-4583-9ddc-2080b421531b
calcurse (calendar) https://videos.lukesmith.xyz/videos/watch/4b937e8b-7654-46e3-8d01-79392ec5b3d1

View File

@ -1,4 +1,4 @@
[Desktop Entry]
Type=Application
Name=File Manager
Exec=/usr/local/bin/st -e lfub %u
Exec=/usr/local/bin/st -e lf %u

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
_ __ __ _ _ __ __ _ ___ _ __
| '__/ _` | '_ \ / _` |/ _ \ '__|
| | | (_| | | | | (_| | __/ |
|_| \__,_|_| |_|\__, |\___|_|
|___/
ranger is the file manager.
j/k - Down/up
h - Left/higher in directory structure
l - Right/open/lower in directory structure
gg - Go to top
G - Go to bottom
cw - Rename file
I - Rename file, with cursor at beginning
A - Rename file, with cursor at end
aa - Rename file, with cursor right before extension
mkd - Make directory
bg - Change background/wallpaper to selected file
X - Extract archive
Z - Compress into tar.gz
Space - Highlight/select file
va - Highlight/(de)select all
vs - Toggle visual selection mode
uv - Deselect all
dd - Cut file(s)
yy - Yank/copy file(s)
pp - Paste cut/copied file(s)
po - Paste cut/copied file(s), overwriting originals
cW - Rename all selected files in text editor
D - Delete file(s) (press enter to confirm)
dD - Delete file(s) (press enter to confirm)
ctrl-f - Fuzzy find (fzf)
ctrl-l - Search via mlocate
q - Quit
Q - Immediate quit