diff --git a/home/.chezmoiscripts/run_once_after_51-finalize-latex.sh.tmpl b/home/.chezmoiscripts/run_once_after_50-finalize-latex.sh.tmpl similarity index 100% rename from home/.chezmoiscripts/run_once_after_51-finalize-latex.sh.tmpl rename to home/.chezmoiscripts/run_once_after_50-finalize-latex.sh.tmpl diff --git a/home/.chezmoiscripts/run_once_after_50-finalize-ranger.sh.tmpl b/home/.chezmoiscripts/run_once_after_50-finalize-ranger.sh.tmpl deleted file mode 100644 index 9d8ee1e..0000000 --- a/home/.chezmoiscripts/run_once_after_50-finalize-ranger.sh.tmpl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# Logging function -log() { - printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)\n" "$1" -} - -inf() { - printf "$(tput setaf 2)╚═══ᐳ $(tput sgr 0 1)$(tput setaf 2)%s$(tput sgr0)\n" "$1" -} - - -# Environment variables -COMMAND_FILE=${HOME}/.config/ranger/commands.py - - - -log "Begin ranger finalization" - -case $(grep -Fx "from plugins.ranger_udisk_menu.mounter import mount" "${COMMAND_FILE}" ) in - 0) - # found, do nothing - inf "Modification not needed." - ;; - 1) - # not found, add it - sed -i '10 i from plugins.ranger_udisk_menu.mounter import mount' ${COMMAND_FILE} - inf "Add line for mount plugin." - ;; - *) - # an error occurred - inf "An error occured." - ;; -esac - -log "Finish ranger finalization" - diff --git a/home/dot_config/ranger/commands.py b/home/dot_config/ranger/commands.py index 38108f6..9913a30 100644 --- a/home/dot_config/ranger/commands.py +++ b/home/dot_config/ranger/commands.py @@ -7,6 +7,7 @@ # Last Modified By : Jeff Lance from ranger.api.commands import Command +from plugins.ranger_udisk_menu.mounter import mount class mkcd(Command):