Merge branch 'master' of github.com:LukeSmithxyz/voidrice
This commit is contained in:
commit
1e5c4ee91f
7 changed files with 18 additions and 10 deletions
|
@ -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
|
||||||
|
|
|
@ -149,3 +149,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
|
||||||
|
|
|
@ -18,7 +18,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"
|
||||||
|
|
||||||
|
|
|
@ -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 ;;
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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\" }"
|
||||||
|
|
Loading…
Reference in a new issue