From 9dec1225a493eface0146e4a35d6cf558e875129 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 30 May 2021 20:55:28 -0400 Subject: [PATCH] fix #956 --- .config/lf/lfrc | 1 + .config/shell/aliasrc | 6 +++--- .config/shell/bm-dirs | 1 + .local/bin/shortcuts | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index b7e8a3c..57a80ca 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -23,6 +23,7 @@ cmd open ${{ 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/pgp-encrypted) $EDITOR $fx ;; *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;; esac }} diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 1f048ed..5122d08 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -7,9 +7,9 @@ [ -f "$XINITRC" ] && alias startx="startx $XINITRC" # sudo not required for some system commands -for x in mount umount sv pacman updatedb su ; do - alias $x="sudo $x" -done +for command in mount umount sv pacman updatedb su ; do + alias $command="sudo $command" +done; unset command # Verbosity and settings that you pretty much just always are going to want. alias \ diff --git a/.config/shell/bm-dirs b/.config/shell/bm-dirs index b3807cd..b204215 100644 --- a/.config/shell/bm-dirs +++ b/.config/shell/bm-dirs @@ -4,6 +4,7 @@ cf ${XDG_CONFIG_HOME:-$HOME/.config} D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} d ${XDG_DOCUMENTS_DIR:-$HOME/Documents} dt ${XDG_DATA_HOME:-$HOME/.local/share} +rr ${XDG_DATA_HOME:-$HOME/.local/src} h $HOME m ${XDG_MUSIC_DIR:-$HOME/Music} mn /mnt diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts index 5497345..253aff0 100755 --- a/.local/bin/shortcuts +++ b/.local/bin/shortcuts @@ -21,20 +21,20 @@ printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts" # Format the `directories` file in the correct syntax and sent it to all three configs. eval "echo \"$(cat "$bmdirs")\"" | \ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); - printf(\"%s=\42cd %s && ls -a\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; - printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; - printf(\"abbr %s \42cd %s; and ls -a\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ; - printf(\"map g%s :cd %s\nmap t%s :cd %s\nmap M%s :cd %s:mo\nmap Y%s :cd %s:co \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(\"%s=\42cd %s && ls -a\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; + printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; + printf(\"abbr %s \42cd %s; and ls -a\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ; + printf(\"map g%s :cd %s\nmap t%s :cd %s\nmap M%s :cd %s:mo\nmap Y%s :cd %s:co \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\" }" # Format the `files` file in the correct syntax and sent it to both configs. eval "echo \"$(cat "$bmfiles")\"" | \ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); - printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; - printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; + printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; + printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ; printf(\"map %s :e %s \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(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"