mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Merge branch 'master' of https://github.com/LukeSmithxyz/voidrice into LukeSmithxyz-master
This commit is contained in:
commit
32bf38e6c6
4
.config/lf/cleaner
Executable file
4
.config/lf/cleaner
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ -n "$FIFO_UEBERZUG" ]; then
|
||||||
|
printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
|
||||||
|
fi
|
||||||
@ -1,58 +1,44 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -C -f -u
|
# File preview handler for lf.
|
||||||
#IFS=$'\n'
|
|
||||||
|
set -C -f
|
||||||
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
|
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
|
||||||
|
|
||||||
# ANSI color codes are supported.
|
image() {
|
||||||
# STDIN is disabled, so interactive scripts won't work properly
|
if [ -f "$1" ] && [ -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"
|
||||||
# This script is considered a configuration file and must be updated manually.
|
else
|
||||||
|
mediainfo "$6"
|
||||||
# Meanings of exit codes:
|
fi
|
||||||
# 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
ifub() {
|
||||||
handle_mime "${MIMETYPE}"
|
[ -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" "$1" ;;
|
||||||
|
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-2))" -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 | cut -d' ' -f1)"
|
||||||
|
[ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
|
||||||
|
image "$CACHE" "$2" "$3" "$4" "$5" "$1"
|
||||||
|
;;
|
||||||
|
*/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 | cut -d' ' -f1)"
|
||||||
|
[ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
|
||||||
|
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
|
||||||
|
;;
|
||||||
|
*opendocument*) odt2txt "$1" ;;
|
||||||
|
application/pgp-encrypted) gpg -d -- "$1" ;;
|
||||||
|
esac
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -32,7 +32,7 @@ color article white default bold
|
|||||||
browser linkhandler
|
browser linkhandler
|
||||||
macro , open-in-browser
|
macro , open-in-browser
|
||||||
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
|
macro t set browser "qndl" ; 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 a set browser "tsp yt-dlp --embed-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 v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler
|
||||||
macro w set browser "lynx" ; 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
|
macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler
|
||||||
|
|||||||
@ -2,6 +2,6 @@ https://lukesmith.xyz/rss.xml
|
|||||||
https://notrelated.xyz/rss
|
https://notrelated.xyz/rss
|
||||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)"
|
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)"
|
||||||
https://landchad.net/rss.xml
|
https://landchad.net/rss.xml
|
||||||
https://based.cooking/rss.xml
|
https://based.cooking/index.xml
|
||||||
https://artixlinux.org/feed.php "tech"
|
https://artixlinux.org/feed.php "tech"
|
||||||
https://www.archlinux.org/feeds/news/ "tech"
|
https://www.archlinux.org/feeds/news/ "tech"
|
||||||
|
|||||||
@ -152,3 +152,8 @@ function! ToggleHiddenAll()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <leader>h :call ToggleHiddenAll()<CR>
|
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
|
||||||
|
|||||||
@ -21,7 +21,7 @@ alias \
|
|||||||
rm="rm -vI" \
|
rm="rm -vI" \
|
||||||
bc="bc -ql" \
|
bc="bc -ql" \
|
||||||
mkd="mkdir -pv" \
|
mkd="mkdir -pv" \
|
||||||
yt="youtube-dl --add-metadata -i" \
|
yt="yt-dlp --embed-metadata -i" \
|
||||||
yta="yt -x -f bestaudio/best" \
|
yta="yt -x -f bestaudio/best" \
|
||||||
ffmpeg="ffmpeg -hide_banner"
|
ffmpeg="ffmpeg -hide_banner"
|
||||||
|
|
||||||
@ -30,7 +30,8 @@ alias \
|
|||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
diff="diff --color=auto" \
|
diff="diff --color=auto" \
|
||||||
ccat="highlight --out-format=ansi"
|
ccat="highlight --out-format=ansi" \
|
||||||
|
ip="ip -color=auto"
|
||||||
|
|
||||||
# These common commands are just too long! Abbreviate them.
|
# These common commands are just too long! Abbreviate them.
|
||||||
alias \
|
alias \
|
||||||
@ -48,6 +49,7 @@ alias \
|
|||||||
z="zathura"
|
z="zathura"
|
||||||
|
|
||||||
alias \
|
alias \
|
||||||
|
lf="lfub" \
|
||||||
magit="nvim -c MagitOnly" \
|
magit="nvim -c MagitOnly" \
|
||||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
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" \
|
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
while read file
|
while read -r file
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"w") setbg "$file" & ;;
|
"w") setbg "$file" & ;;
|
||||||
@ -20,7 +20,7 @@ do
|
|||||||
"f")
|
"f")
|
||||||
convert -flop "$file" "$file" ;;
|
convert -flop "$file" "$file" ;;
|
||||||
"y")
|
"y")
|
||||||
echo -n "$file" | tr -d '\n' | xclip -selection clipboard &&
|
printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||||
notify-send "$file copied to clipboard" & ;;
|
notify-send "$file copied to clipboard" & ;;
|
||||||
"Y")
|
"Y")
|
||||||
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
|
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||||
|
|||||||
@ -11,7 +11,7 @@ remaps & # run the remaps script, switching caps/esc and more; check it
|
|||||||
autostart="mpd xcompmgr dunst unclutter"
|
autostart="mpd xcompmgr dunst unclutter"
|
||||||
|
|
||||||
for program in $autostart; do
|
for program in $autostart; do
|
||||||
pidof -s "$program" || setsid -f "$program"
|
pidof -s "$program" || "$program" &
|
||||||
done >/dev/null 2>&1
|
done >/dev/null 2>&1
|
||||||
|
|
||||||
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||||
|
|||||||
@ -4,7 +4,7 @@ export ZSH="$HOME/.config/zsh/oh-my-zsh"
|
|||||||
# History in cache directory:
|
# History in cache directory:
|
||||||
HISTSIZE=10000000
|
HISTSIZE=10000000
|
||||||
SAVEHIST=10000000
|
SAVEHIST=10000000
|
||||||
HISTFILE=~/.cache/zsh/history
|
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
|
||||||
|
|
||||||
ZSH_THEME="agnoster"
|
ZSH_THEME="agnoster"
|
||||||
DEFAULT_USER=$(whoami)
|
DEFAULT_USER=$(whoami)
|
||||||
|
|||||||
1
.gtkrc-2.0
Symbolic link
1
.gtkrc-2.0
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
.config/gtk-2.0/gtkrc-2.0
|
||||||
@ -1,46 +1,43 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Requires ffmpeg (audio splitting) and my `tag` wrapper script.
|
# Requires ffmpeg
|
||||||
|
|
||||||
[ ! -f "$2" ] && printf "The first file should be the audio, the second should be the timecodes.\\n" && exit
|
[ ! -f "$2" ] && printf "The first file should be the audio, the second should be the timecodes.\\n" && exit
|
||||||
|
|
||||||
echo "Enter the album/book title:"; read -r booktitle
|
echo "Enter the album/book title:"; read -r booktitle
|
||||||
|
|
||||||
echo "Enter the artist/author:"; read -r author
|
echo "Enter the artist/author:"; read -r author
|
||||||
|
|
||||||
echo "Enter the publication year:"; read -r year
|
echo "Enter the publication year:"; read -r year
|
||||||
|
|
||||||
inputaudio="$1"
|
inputaudio="$1"
|
||||||
|
ext="${1#*.}"
|
||||||
|
|
||||||
# Get a safe file name from the book.
|
# Get a safe file name from the book.
|
||||||
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||||
|
|
||||||
! mkdir -p "$escbook" && echo "Do you have write access in this directory?" && exit 1
|
! mkdir -p "$escbook" &&
|
||||||
|
echo "Do you have write access in this directory?" &&
|
||||||
# As long as the extension is in the tag script, it'll work.
|
exit 1
|
||||||
ext="opus"
|
|
||||||
#ext="${1#*.}"
|
|
||||||
|
|
||||||
# Get the total number of tracks from the number of lines.
|
# Get the total number of tracks from the number of lines.
|
||||||
total="$(wc -l < "$2")"
|
total="$(wc -l < "$2")"
|
||||||
|
|
||||||
|
cmd="ffmpeg -i \"$inputaudio\" -nostdin -y"
|
||||||
|
|
||||||
while read -r x;
|
while read -r x;
|
||||||
do
|
do
|
||||||
end="$(echo "$x" | cut -d' ' -f1)"
|
end="$(echo "$x" | cut -d' ' -f1)"
|
||||||
|
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
|
||||||
[ -n "$start" ] &&
|
if [ -n "$start" ]; then
|
||||||
echo "From $start to $end; $track $title"
|
cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" "
|
||||||
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
|
fi
|
||||||
[ -n "$start" ] && echo "Splitting \"$title\"..." &&
|
title="$(echo "$x" | cut -d' ' -f2-)"
|
||||||
ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -to "$end" -vn -c copy "$file" &&
|
esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||||
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file"
|
track="$((track+1))"
|
||||||
title="$(echo "$x" | cut -d' ' -f 2-)"
|
start="$end"
|
||||||
esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
|
||||||
track="$((track+1))"
|
|
||||||
start="$end"
|
|
||||||
done < "$2"
|
done < "$2"
|
||||||
# The last track must be done outside the loop.
|
|
||||||
echo "From $start to the end: $title"
|
# Last track must be added out of the loop.
|
||||||
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
|
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
|
||||||
echo "Splitting \"$title\"..." && ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -vn -c copy "$file" &&
|
cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -ss \"$start\" -vn -c copy \"$file\""
|
||||||
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file"
|
|
||||||
|
eval "$cmd"
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# have this script run via vim.
|
# have this script run via vim.
|
||||||
#
|
#
|
||||||
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent
|
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent
|
||||||
# presentations. Runs scripts based on extention or shebang.
|
# presentations. Runs scripts based on extension or shebang.
|
||||||
#
|
#
|
||||||
# Note that .tex files which you wish to compile with XeLaTeX should have the
|
# Note that .tex files which you wish to compile with XeLaTeX should have the
|
||||||
# string "xelatex" somewhere in a comment/command in the first 5 lines.
|
# string "xelatex" somewhere in a comment/command in the first 5 lines.
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
# some choice programs to use to open it.
|
# some choice programs to use to open it.
|
||||||
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}"
|
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-dl\\nqueue yt-dl 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-dlp\\nqueue yt-dlp audio" | dmenu -i -p "Open it with?")" in
|
||||||
"Copy URL") echo "$feed" | xclip -selection clipboard ;;
|
"Copy URL") echo "$feed" | xclip -selection clipboard ;;
|
||||||
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
|
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
|
||||||
"mpv loop") setsid -f mpv -quiet --loop "$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 ;;
|
"mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;;
|
||||||
"queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;;
|
"queue yt-dlp") 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 yt-dlp audio") qndl "$feed" 'yt-dlp --embed-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;;
|
||||||
"queue download") qndl "$feed" 'curl -LO' >/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 ;;
|
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 ;;
|
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 ;;
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
#!/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
|
|
||||||
24
.local/bin/lfub
Executable file
24
.local/bin/lfub
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This is a wrapper script for lb that allows it to create image previews with
|
||||||
|
# ueberzug. This works in concert with the lf configuration file and the
|
||||||
|
# lf-cleaner script.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
exec 3>&-
|
||||||
|
rm "$FIFO_UEBERZUG"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||||
|
lf "$@"
|
||||||
|
else
|
||||||
|
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
|
||||||
|
export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$"
|
||||||
|
mkfifo "$FIFO_UEBERZUG"
|
||||||
|
ueberzug layer -s <"$FIFO_UEBERZUG" -p json &
|
||||||
|
exec 3>"$FIFO_UEBERZUG"
|
||||||
|
trap cleanup HUP INT QUIT TERM PWR EXIT
|
||||||
|
lf "$@" 3>&-
|
||||||
|
fi
|
||||||
@ -1,7 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# torrent peertube videos, requires the transadd script
|
# torrent peertube videos, requires the transadd script
|
||||||
# first argument is the video link, second is the quality (480 or 1080)
|
# first argument is the video link, second is the quality (360, 480 or 1080)
|
||||||
# 13/07/20 - Arthur Bais
|
# 13/07/20 - Arthur Bais
|
||||||
|
|
||||||
link="$(echo "$1" | sed "s/w/download\/torrents/")""-$2.torrent"
|
instance=$(echo "$1" | sed "s/\/w.\+//")
|
||||||
|
vidid=$(echo "$1" | sed "s/.\+\///")
|
||||||
|
link=$(curl -s "$instance/api/v1/videos/$vidid" | grep -o "$instance/download/torrents/.\{37\}$2.torrent")
|
||||||
transadd "$link"
|
transadd "$link"
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
base="$(basename "$1")"
|
base="$(basename "$1")"
|
||||||
notify-send "⏳ Queuing $base..."
|
notify-send "⏳ Queuing $base..."
|
||||||
cmd="$2"
|
cmd="$2"
|
||||||
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata -ic"
|
[ -z "$cmd" ] && cmd="yt-dlp --embed-metadata -ic"
|
||||||
idnum="$(tsp $cmd "$1")"
|
idnum="$(tsp $cmd "$1")"
|
||||||
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
|
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
|
||||||
tsp -D "$idnum" mv "$base" "$realname"
|
tsp -D "$idnum" mv "$base" "$realname"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Podboat sucks. This script replaces it.
|
# Podboat sucks. This script replaces it.
|
||||||
# It reads the newsboat queue, queuing downloads with taskspooler.
|
# It reads the newsboat queue, queuing downloads with taskspooler.
|
||||||
# It also removes the junk from extentions.
|
# It also removes the junk from extensions.
|
||||||
queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue"
|
queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue"
|
||||||
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This script is called on startup to remap keys.
|
# This script is called on startup to remap keys.
|
||||||
# Increase key speed via a rate change
|
# Decrease key repeat delay to 300ms and increase key repeat rate to 50 per second.
|
||||||
xset r rate 300 50
|
xset r rate 300 50
|
||||||
# Map the caps lock key to super...
|
# Map the caps lock key to super, and map the menu key to right super.
|
||||||
setxkbmap -option caps:super
|
setxkbmap -option caps:super,altwin:menu_win
|
||||||
# But when it is pressed only once, treat it as escape.
|
# When caps lock 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.
|
# Turn off caps lock if on since there is no longer a key for it.
|
||||||
xmodmap -e 'keycode 135 = Super_R'
|
|
||||||
# Turn off the caps lock if on since there is no longer a key for it.
|
|
||||||
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
|
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
# If wal is installed, also generates a colorscheme.
|
# If wal is installed, also generates a colorscheme.
|
||||||
|
|
||||||
# Location of link to wallpaper link.
|
# 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.
|
# Configuration files of applications that have their themes changed by pywal.
|
||||||
dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
||||||
|
|||||||
@ -7,13 +7,14 @@ bmfiles="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files"
|
|||||||
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
|
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
|
||||||
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
|
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
|
||||||
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
|
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
|
||||||
|
vim_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/shortcuts.vim"
|
||||||
ranger_shortcuts="/dev/null"
|
ranger_shortcuts="/dev/null"
|
||||||
qute_shortcuts="/dev/null"
|
qute_shortcuts="/dev/null"
|
||||||
fish_shortcuts="/dev/null"
|
fish_shortcuts="/dev/null"
|
||||||
vifm_shortcuts="/dev/null"
|
vifm_shortcuts="/dev/null"
|
||||||
|
|
||||||
# Remove, prepare files
|
# Remove, prepare files
|
||||||
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" 2>/dev/null
|
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null
|
||||||
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
|
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
|
||||||
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
|
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
|
||||||
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
|
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
|
||||||
@ -27,7 +28,8 @@ 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(\"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(\"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 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(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
|
||||||
|
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
|
||||||
|
|
||||||
# Format the `files` file in the correct syntax and sent it to both configs.
|
# Format the `files` file in the correct syntax and sent it to both configs.
|
||||||
eval "echo \"$(cat "$bmfiles")\"" | \
|
eval "echo \"$(cat "$bmfiles")\"" | \
|
||||||
@ -37,4 +39,5 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
|||||||
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
|
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 :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
|
||||||
printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_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(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
|
||||||
|
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
|
||||||
|
|||||||
@ -1,194 +1,248 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Show a Doppler RADAR of an American user's preferred location.
|
# Show a Doppler RADAR of a user's preferred location.
|
||||||
|
|
||||||
secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds.
|
secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds.
|
||||||
radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar"
|
radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar"
|
||||||
doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif"
|
doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif"
|
||||||
|
|
||||||
pickloc() { chosen="$(echo "Northeast
|
pickloc() { chosen="$(echo "US: Northeast
|
||||||
Southeast
|
US: Southeast
|
||||||
PacNorthWest
|
US: PacNorthWest
|
||||||
PacSouthWest
|
US: PacSouthWest
|
||||||
UpperMissVly
|
US: UpperMissVly
|
||||||
SouthMissVly
|
US: SouthMissVly
|
||||||
SouthPlains
|
US: SouthPlains
|
||||||
NorthRockies
|
US: NorthRockies
|
||||||
SouthRockies
|
US: SouthRockies
|
||||||
Alaska
|
US: Alaska
|
||||||
Carib
|
US: Carib
|
||||||
Hawaii
|
US: Hawaii
|
||||||
CentGrLakes
|
US: CentGrLakes
|
||||||
Conus-Large
|
US: Conus-Large
|
||||||
KABR: Aberdeen, SD
|
US: KABR: Aberdeen, SD
|
||||||
KBIS: Bismarck, ND
|
US: KBIS: Bismarck, ND
|
||||||
KFTG: Denver/Boulder, CO
|
US: KFTG: Denver/Boulder, CO
|
||||||
KDMX: Des Moines, IA
|
US: KDMX: Des Moines, IA
|
||||||
KDTX: Detroit, MI
|
US: KDTX: Detroit, MI
|
||||||
KDDC: Dodge City, KS
|
US: KDDC: Dodge City, KS
|
||||||
KDLH: Duluth, MN
|
US: KDLH: Duluth, MN
|
||||||
KCYS: Cheyenne, WY
|
US: KCYS: Cheyenne, WY
|
||||||
KLOT: Chicago, IL
|
US: KLOT: Chicago, IL
|
||||||
KGLD: Goodland, KS
|
US: KGLD: Goodland, KS
|
||||||
KUEX: Hastings, NE
|
US: KUEX: Hastings, NE
|
||||||
KGJX: Grand Junction, CO
|
US: KGJX: Grand Junction, CO
|
||||||
KGRR: Grand Rapids, MI
|
US: KGRR: Grand Rapids, MI
|
||||||
KMVX: Fargo/Grand Forks, ND
|
US: KMVX: Fargo/Grand Forks, ND
|
||||||
KGRB: Green Bay, WI
|
US: KGRB: Green Bay, WI
|
||||||
KIND: Indianapolis, IN
|
US: KIND: Indianapolis, IN
|
||||||
KJKL: Jackson, KY
|
US: KJKL: Jackson, KY
|
||||||
KARX: La Crosse, WI
|
US: KARX: La Crosse, WI
|
||||||
KILX: Lincoln/Central Illinois, IL
|
US: KILX: Lincoln/Central Illinois, IL
|
||||||
KLVX: Louisville, KY
|
US: KLVX: Louisville, KY
|
||||||
KMQT: Marquette
|
US: KMQT: Marquette
|
||||||
KMKX: Milwaukee, WI
|
US: KMKX: Milwaukee, WI
|
||||||
KMPX: Minneapolis, MN
|
US: KMPX: Minneapolis, MN
|
||||||
KAPX: Gaylord/Alpena, MI
|
US: KAPX: Gaylord/Alpena, MI
|
||||||
KLNX: North Platte, NE
|
US: KLNX: North Platte, NE
|
||||||
KIWX: N. Webster/Northern, IN
|
US: KIWX: N. Webster/Northern, IN
|
||||||
KOAX: Omaha, NE
|
US: KOAX: Omaha, NE
|
||||||
KPAH: Paducah, KY
|
US: KPAH: Paducah, KY
|
||||||
KEAX: Pleasant Hill, MO
|
US: KEAX: Pleasant Hill, MO
|
||||||
KPUX: Pueblo, CO
|
US: KPUX: Pueblo, CO
|
||||||
KDVN: Quad Cities, IA
|
US: KDVN: Quad Cities, IA
|
||||||
KUDX: Rapid City, SD
|
US: KUDX: Rapid City, SD
|
||||||
KRIW: Riverton, WY
|
US: KRIW: Riverton, WY
|
||||||
KSGF: Springfield, MO
|
US: KSGF: Springfield, MO
|
||||||
KLSX: St. LOUIS, MO
|
US: KLSX: St. LOUIS, MO
|
||||||
KFSD: Sioux Falls, IA
|
US: KFSD: Sioux Falls, IA
|
||||||
KTWX: Topeka, KS
|
US: KTWX: Topeka, KS
|
||||||
KICT: Wichita, KS
|
US: KICT: Wichita, KS
|
||||||
KVWX: Paducah, KY
|
US: KVWX: Paducah, KY
|
||||||
ICAO: Responsible Wfo
|
US: ICAO: Responsible Wfo
|
||||||
KLTX: WILMINGTON, NC
|
US: KLTX: WILMINGTON, NC
|
||||||
KCCX: State College/Central, PA
|
US: KCCX: State College/Central, PA
|
||||||
KLWX: Sterling, VA
|
US: KLWX: Sterling, VA
|
||||||
KFCX: Blacksburg/Roanoke, VA
|
US: KFCX: Blacksburg/Roanoke, VA
|
||||||
KRAX: Raleigh/Durham, NC
|
US: KRAX: Raleigh/Durham, NC
|
||||||
KGYX: Portland, ME
|
US: KGYX: Portland, ME
|
||||||
KDIX: Mt Holly/Philadelphia, PA
|
US: KDIX: Mt Holly/Philadelphia, PA
|
||||||
KPBZ: Pittsburgh, PA
|
US: KPBZ: Pittsburgh, PA
|
||||||
KAKQ: Wakefield, VA
|
US: KAKQ: Wakefield, VA
|
||||||
KMHX: Morehead City, NC
|
US: KMHX: Morehead City, NC
|
||||||
KGSP: Greer/Greenville/Sprtbg, SC
|
US: KGSP: Greer/Greenville/Sprtbg, SC
|
||||||
KILN: Wilmington/Cincinnati, OH
|
US: KILN: Wilmington/Cincinnati, OH
|
||||||
KCLE: Cleveland, OH
|
US: KCLE: Cleveland, OH
|
||||||
KCAE: Columbia, SC
|
US: KCAE: Columbia, SC
|
||||||
KBGM: Binghamton, NY
|
US: KBGM: Binghamton, NY
|
||||||
KENX: Albany, NY
|
US: KENX: Albany, NY
|
||||||
KBUF: Buffalo, NY
|
US: KBUF: Buffalo, NY
|
||||||
KCXX: Burlington, VT
|
US: KCXX: Burlington, VT
|
||||||
KCBW: Caribou, ME
|
US: KCBW: Caribou, ME
|
||||||
KBOX: Boston /Taunton, MA
|
US: KBOX: Boston /Taunton, MA
|
||||||
KOKX: New York City, NY
|
US: KOKX: New York City, NY
|
||||||
KCLX: Charleston, SC
|
US: KCLX: Charleston, SC
|
||||||
KRLX: Charleston, WV
|
US: KRLX: Charleston, WV
|
||||||
ICAO: Responsible WFO
|
US: ICAO: Responsible WFO
|
||||||
KBRO: Brownsville, TX
|
US: KBRO: Brownsville, TX
|
||||||
KABX: Albuquerque, NM
|
US: KABX: Albuquerque, NM
|
||||||
KAMA: Amarillo, TX
|
US: KAMA: Amarillo, TX
|
||||||
KFFC: Peachtree City/Atlanta, GA
|
US: KFFC: Peachtree City/Atlanta, GA
|
||||||
KEWX: Austin/Sanantonio, TX
|
US: KEWX: Austin/Sanantonio, TX
|
||||||
KBMX: Birmingham, AL
|
US: KBMX: Birmingham, AL
|
||||||
KCRP: Corpus Christi, TX
|
US: KCRP: Corpus Christi, TX
|
||||||
KFWS: Dallas / Ft. Worth, TX
|
US: KFWS: Dallas / Ft. Worth, TX
|
||||||
KEPZ: El Paso, TX
|
US: KEPZ: El Paso, TX
|
||||||
KHGX: Houston/ Galveston, TX
|
US: KHGX: Houston/ Galveston, TX
|
||||||
KJAX: Jacksonville, FL
|
US: KJAX: Jacksonville, FL
|
||||||
KBYX: Key West, FL
|
US: KBYX: Key West, FL
|
||||||
KMRX: Morristown/knoxville, TN
|
US: KMRX: Morristown/knoxville, TN
|
||||||
KLBB: Lubbock, TX
|
US: KLBB: Lubbock, TX
|
||||||
KLZK: Little Rock, AR
|
US: KLZK: Little Rock, AR
|
||||||
KLCH: Lake Charles, LA
|
US: KLCH: Lake Charles, LA
|
||||||
KOHX: Nashville, TN
|
US: KOHX: Nashville, TN
|
||||||
KMLB: Melbourne, FL
|
US: KMLB: Melbourne, FL
|
||||||
KNQA: Memphis, TN
|
US: KNQA: Memphis, TN
|
||||||
KAMX: Miami, FL
|
US: KAMX: Miami, FL
|
||||||
KMAF: Midland/odessa, TX
|
US: KMAF: Midland/odessa, TX
|
||||||
KTLX: Norman, OK
|
US: KTLX: Norman, OK
|
||||||
KHTX: Huntsville, AL
|
US: KHTX: Huntsville, AL
|
||||||
KMOB: Mobile, AL
|
US: KMOB: Mobile, AL
|
||||||
KTLH: Tallahassee, FL
|
US: KTLH: Tallahassee, FL
|
||||||
KTBW: Tampa Bay Area, FL
|
US: KTBW: Tampa Bay Area, FL
|
||||||
KSJT: San Angelo, TX
|
US: KSJT: San Angelo, TX
|
||||||
KINX: Tulsa, OK
|
US: KINX: Tulsa, OK
|
||||||
KSRX: Tulsa, OK
|
US: KSRX: Tulsa, OK
|
||||||
KLIX: New Orleans/slidell, LA
|
US: KLIX: New Orleans/slidell, LA
|
||||||
KDGX: Jackson, MS
|
US: KDGX: Jackson, MS
|
||||||
KSHV: Shreveport, LA
|
US: KSHV: Shreveport, LA
|
||||||
ICAO: Responsible WFO
|
US: ICAO: Responsible WFO
|
||||||
KLGX: Seattle / Tacoma, WA
|
US: KLGX: Seattle / Tacoma, WA
|
||||||
KOTX: Spokane, WA
|
US: KOTX: Spokane, WA
|
||||||
KEMX: Tucson, AZ
|
US: KEMX: Tucson, AZ
|
||||||
KYUX: Phoenix, AZ
|
US: KYUX: Phoenix, AZ
|
||||||
KNKX: San Diego, CA
|
US: KNKX: San Diego, CA
|
||||||
KMUX: Monterey/san Francisco, CA
|
US: KMUX: Monterey/san Francisco, CA
|
||||||
KHNX: San Joaquin/hanford, CA
|
US: KHNX: San Joaquin/hanford, CA
|
||||||
KSOX: San Diego, CA
|
US: KSOX: San Diego, CA
|
||||||
KATX: Seattle / Tacoma, WA
|
US: KATX: Seattle / Tacoma, WA
|
||||||
KIWA: Phoenix, AZ
|
US: KIWA: Phoenix, AZ
|
||||||
KRTX: Portland, OR
|
US: KRTX: Portland, OR
|
||||||
KSFX: Pocatello, ID
|
US: KSFX: Pocatello, ID
|
||||||
KRGX: Reno, NV
|
US: KRGX: Reno, NV
|
||||||
KDAX: Sacramento, CA
|
US: KDAX: Sacramento, CA
|
||||||
KMTX: Salt Lake City, UT
|
US: KMTX: Salt Lake City, UT
|
||||||
KPDT: Pendleton, OR
|
US: KPDT: Pendleton, OR
|
||||||
KMSX: Missoula, MT
|
US: KMSX: Missoula, MT
|
||||||
KESX: Las Vegas, NV
|
US: KESX: Las Vegas, NV
|
||||||
KVTX: Los Angeles, CA
|
US: KVTX: Los Angeles, CA
|
||||||
KMAX: Medford, OR
|
US: KMAX: Medford, OR
|
||||||
KFSX: Flagstaff, AZ
|
US: KFSX: Flagstaff, AZ
|
||||||
KGGW: Glasgow, MT
|
US: KGGW: Glasgow, MT
|
||||||
KLRX: Elko, NV
|
US: KLRX: Elko, NV
|
||||||
KBHX: Eureka, CA
|
US: KBHX: Eureka, CA
|
||||||
KTFX: Great Falls, MT
|
US: KTFX: Great Falls, MT
|
||||||
KCBX: Boise, ID
|
US: KCBX: Boise, ID
|
||||||
KBLX: Billings, MT
|
US: KBLX: Billings, MT
|
||||||
KICX: Salt Lake City, UT
|
US: KICX: Salt Lake City, UT
|
||||||
ICAO: Responsible Wfo W/ MSCF
|
US: ICAO: Responsible Wfo W/ MSCF
|
||||||
PABC: Anchorage, AK
|
US: PABC: Anchorage, AK
|
||||||
PAPD: Fairbanks, AK
|
US: PAPD: Fairbanks, AK
|
||||||
PHKM: Honolulu, HI
|
US: PHKM: Honolulu, HI
|
||||||
PAHG: Anchorage, AK
|
US: PAHG: Anchorage, AK
|
||||||
PAKC: Anchorage, AK
|
US: PAKC: Anchorage, AK
|
||||||
PAIH: Anchorage, AK
|
US: PAIH: Anchorage, AK
|
||||||
PHMO: Honolulu, HI
|
US: PHMO: Honolulu, HI
|
||||||
PAEC: Fairbanks, AK
|
US: PAEC: Fairbanks, AK
|
||||||
TJUA: San Juan, PR
|
US: TJUA: San Juan, PR
|
||||||
PACG: Juneau, AK
|
US: PACG: Juneau, AK
|
||||||
PHKI: Honolulu, HI
|
US: PHKI: Honolulu, HI
|
||||||
PHWA: Honolulu, HI
|
US: PHWA: Honolulu, HI
|
||||||
ICAO: Responsible Wfo W/ MSCF
|
US: ICAO: Responsible Wfo W/ MSCF
|
||||||
KFDR: Norman, OK
|
US: KFDR: Norman, OK
|
||||||
PGUA: Guam
|
US: PGUA: Guam
|
||||||
KBBX: Sacramento, CA
|
US: KBBX: Sacramento, CA
|
||||||
KFDX: Albuquerque, NM
|
US: KFDX: Albuquerque, NM
|
||||||
KGWX: Jackson, MS
|
US: KGWX: Jackson, MS
|
||||||
KDOX: Wakefield, VA
|
US: KDOX: Wakefield, VA
|
||||||
KDYX: San Angelo, TX
|
US: KDYX: San Angelo, TX
|
||||||
KEYX: Las Vegas, NV
|
US: KEYX: Las Vegas, NV
|
||||||
KEVX: Mobile, AL
|
US: KEVX: Mobile, AL
|
||||||
KHPX: Paducah, KY
|
US: KHPX: Paducah, KY
|
||||||
KTYX: Burlington, VT
|
US: KTYX: Burlington, VT
|
||||||
KGRK: Dallas / Ft. Worth, TX
|
US: KGRK: Dallas / Ft. Worth, TX
|
||||||
KPOE: Lake Charles, LA
|
US: KPOE: Lake Charles, LA
|
||||||
KEOX: Tallahassee, FL
|
US: KEOX: Tallahassee, FL
|
||||||
KHDX: El Paso, TX
|
US: KHDX: El Paso, TX
|
||||||
KDFX: San Antonio, TX
|
US: KDFX: San Antonio, TX
|
||||||
KMXX: Birmingham, AL
|
US: KMXX: Birmingham, AL
|
||||||
KMBX: Bismarck, ND
|
US: KMBX: Bismarck, ND
|
||||||
KVAX: Jacksonville, FL
|
US: KVAX: Jacksonville, FL
|
||||||
KJGX: Peachtree City/atlanta, GA
|
US: KJGX: Peachtree City/atlanta, GA
|
||||||
KVNX: Norman, OK
|
US: 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:]")"
|
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/:.*//")
|
||||||
|
|
||||||
# Sanity check of selection and ensure user did not escape.
|
# Sanity check of selection and ensure user did not escape.
|
||||||
echo "$chosen" | grep -q "^[A-Z]\+$" && echo "$chosen" > "$radarloc" ;}
|
echo "$radarcode" | grep -q "^[A-Z]\+$" && printf "%s,%s\\n" "$continentcode" "$radarcode" > "$radarloc" ;}
|
||||||
|
|
||||||
getdoppler() {
|
getdoppler() {
|
||||||
loc="$(cat "$radarloc")"
|
cont="$(sed "s/,.*//" "$radarloc")"
|
||||||
|
loc="$(cut -c 4- "$radarloc")"
|
||||||
notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc."
|
notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc."
|
||||||
curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;}
|
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
|
||||||
|
}
|
||||||
|
|
||||||
showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;}
|
showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;}
|
||||||
|
|
||||||
@ -198,7 +252,7 @@ case $BLOCK_BUTTON in
|
|||||||
showdoppler ;;
|
showdoppler ;;
|
||||||
2) pickloc && getdoppler && showdoppler ;;
|
2) pickloc && getdoppler && showdoppler ;;
|
||||||
3) notify-send "🗺️ Doppler RADAR module" "\- Left click for local Doppler RADAR.
|
3) notify-send "🗺️ Doppler RADAR module" "\- Left click for local Doppler RADAR.
|
||||||
- Middle click to update change RADAR location.
|
- Middle click to update RADAR location.
|
||||||
After $secs seconds, new clicks will also automatically update the doppler RADAR." ;;
|
After $secs seconds, new clicks will also automatically update the doppler RADAR." ;;
|
||||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@ -26,4 +26,4 @@ update() {
|
|||||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||||
|
|
||||||
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx $tx)
|
||||||
|
|||||||
@ -1,14 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# A dmenu wrapper script for system functions.
|
# A dmenu wrapper script for system functions.
|
||||||
|
export WM="dwm"
|
||||||
case "$(readlink -f /sbin/init)" in
|
case "$(readlink -f /sbin/init)" in
|
||||||
*systemd*) ctl='systemctl' ;;
|
*systemd*) ctl='systemctl' ;;
|
||||||
*) ctl='loginctl' ;;
|
*) ctl='loginctl' ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$(printf "🔒 lock\n🚪 leave dwm\n♻️ renew dwm\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in
|
wmpid(){ # This function is needed if there are multiple instances of the window manager.
|
||||||
|
tree="$(pstree -ps $$)"
|
||||||
|
tree="${tree#*$WM(}"
|
||||||
|
echo "${tree%%)*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in
|
||||||
'🔒 lock') slock ;;
|
'🔒 lock') slock ;;
|
||||||
'🚪 leave dwm') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;;
|
"🚪 leave $WM") kill -TERM "$(wmpid)" ;;
|
||||||
'♻️ renew dwm') kill -HUP "$(pgrep -u "$USER" "\bdwm$")" ;;
|
"♻️ renew $WM") kill -HUP "$(wmpid)" ;;
|
||||||
'🐻 hibernate') slock $ctl hibernate ;;
|
'🐻 hibernate') slock $ctl hibernate ;;
|
||||||
'💤 sleep') slock $ctl suspend -i ;;
|
'💤 sleep') slock $ctl suspend -i ;;
|
||||||
'🔃 reboot') $ctl reboot -i ;;
|
'🔃 reboot') $ctl reboot -i ;;
|
||||||
|
|||||||
@ -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
|
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
|
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
|
newsboat (RSS reader) https://videos.lukesmith.xyz/videos/watch/bd2c3fff-40fa-47ea-aa98-5b1ec0c903b6
|
||||||
ranger (file manager) https://videos.lukesmith.xyz/videos/watch/785d914f-8cbd-4a3d-a1f6-d75675fc7549
|
lf (file manager) https://videos.lukesmith.xyz/w/rKeHsF5ZHDNDbR1buUKB1c
|
||||||
zathura (pdf viewer) https://videos.lukesmith.xyz/videos/watch/c780f75a-11f6-48a9-a191-d079ebc36ea4
|
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
|
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
|
calcurse (calendar) https://videos.lukesmith.xyz/videos/watch/4b937e8b-7654-46e3-8d01-79392ec5b3d1
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=File Manager
|
Name=File Manager
|
||||||
Exec=/usr/local/bin/st -e lf %u
|
Exec=/usr/local/bin/st -e lfub %u
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +0,0 @@
|
|||||||
_ __ __ _ _ __ __ _ ___ _ __
|
|
||||||
| '__/ _` | '_ \ / _` |/ _ \ '__|
|
|
||||||
| | | (_| | | | | (_| | __/ |
|
|
||||||
|_| \__,_|_| |_|\__, |\___|_|
|
|
||||||
|___/
|
|
||||||
|
|
||||||
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
|
|
||||||
Loading…
x
Reference in New Issue
Block a user