Compare commits

..

1 Commits

4 changed files with 21 additions and 23 deletions

View File

@ -50,7 +50,7 @@ cmd open ${{
esac esac
}} }}
cmd mkdir $mkdir -p "$@" cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
cmd extract ${{ cmd extract ${{
clear; tput cup $(($(tput lines)/3)); tput bold clear; tput cup $(($(tput lines)/3)); tput bold
@ -139,7 +139,7 @@ map D delete
map E extract map E extract
map C copyto map C copyto
map M moveto map M moveto
map <c-n> push :mkdir<space>""<left> map <c-n> push :mkdir<space>
map <c-r> reload map <c-r> reload
map <c-s> set hidden! map <c-s> set hidden!
map <enter> shell map <enter> shell

View File

@ -13,6 +13,10 @@ image() {
fi fi
} }
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 # 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 # an image appears in multiple places across the machine, it will not have to
# be regenerated once seen. # be regenerated once seen.
@ -28,7 +32,7 @@ case "$(file --dereference --brief --mime-type -- "$1")" in
image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;; image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;;
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
text/troff) man ./ "$1" | col -b ;; text/troff) man ./ "$1" | col -b ;;
text/* | */xml | application/json | application/x-ndjson) bat -p --theme ansi --terminal-width "$(($4-2))" -f "$1" ;; text/* | */xml | application/json | application/x-ndjson) bat --terminal-width "$(($4-2))" -f "$1" ;;
audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;;
video/* ) 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)" 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)"

View File

@ -67,14 +67,6 @@ set noshowcmd
nm <leader>i :call ToggleIPA()<CR> nm <leader>i :call ToggleIPA()<CR>
imap <leader>i <esc>:call ToggleIPA()<CR>a imap <leader>i <esc>:call ToggleIPA()<CR>a
nm <leader>q :call ToggleProse()<CR> nm <leader>q :call ToggleProse()<CR>
" vim-airline
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.colnr = ' C:'
let g:airline_symbols.linenr = ' L:'
let g:airline_symbols.maxlinenr = '☰ '
" Shortcutting split navigation, saving a keypress: " Shortcutting split navigation, saving a keypress:
map <C-h> <C-w>h map <C-h> <C-w>h

View File

@ -1,12 +1,14 @@
#!/bin/sh #!/bin/zsh
# shellcheck disable=SC2155
# Profile file, runs on login. Environmental variables are set here. # profile file. Runs on login. Environmental variables are set here.
# Add all directories in `~/.local/bin` to $PATH # If you don't plan on reverting to bash, you can remove the link in ~/.profile
export PATH="$PATH:$(find ~/.local/bin -type d | paste -sd ':' -)" # to clean up.
unsetopt PROMPT_SP 2>/dev/null # Adds `~/.local/bin` to $PATH
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
unsetopt PROMPT_SP
# Default programs: # Default programs:
export EDITOR="nvim" export EDITOR="nvim"
@ -50,7 +52,7 @@ export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
export DICS="/usr/share/stardict/dic/" export DICS="/usr/share/stardict/dic/"
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass" export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%" export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS="R" export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')" export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')" export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')" export LESS_TERMCAP_me="$(printf '%b' '')"
@ -59,15 +61,15 @@ export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')" export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')" export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null" export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme. export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2=1 # Mozilla smooth scrolling/touchpads. export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
[ ! -f "$XDG_CONFIG_HOME/shell/shortcutrc" ] && setsid -f shortcuts >/dev/null 2>&1 [ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && setsid shortcuts >/dev/null 2>&1
# Start graphical server on user's current tty if not already running. # Start graphical server on user's current tty if not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
# Switch escape and caps if tty and no passwd required: # Switch escape and caps if tty and no passwd required:
sudo -n loadkeys "$XDG_DATA_HOME/larbs/ttymaps.kmap" 2>/dev/null sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null