diff --git a/install.sh b/install.sh index ece7fd4..6a1ca80 100755 --- a/install.sh +++ b/install.sh @@ -36,6 +36,7 @@ readonly DEPENDENCIES=( "curl" "imagemagick" "xclip" + "wl-clipboard" ) # Load functions for console read/write diff --git a/lib/plugin_api.sh b/lib/plugin_api.sh index 0b1a8fd..7e76471 100644 --- a/lib/plugin_api.sh +++ b/lib/plugin_api.sh @@ -48,6 +48,17 @@ function apply_plugin() { fi } +# Function that checks if zplug oh-my-zsh lib is loaded or not +# and then adds the lib to the .zshrc +# +# @param $1 The lib to add to the .zshrc +function apply_ohmyzsh_lib() { + zplug_lib="$1" + if ! grep -q "zplug \"lib/${zplug_lib}\", from:oh-my-zsh" "${ZSHRC_PATH}" ; then + write_zshrc "zplug \"lib/${zplug_lib}\", from:oh-my-zsh" + fi +} + # Function that checks if zplug oh-my-zsh plugin is loaded or not # and then adds the plugin to the .zshrc # diff --git a/plugins/copypath/plugin.sh b/plugins/clipboard-enhancements/plugin.sh similarity index 90% rename from plugins/copypath/plugin.sh rename to plugins/clipboard-enhancements/plugin.sh index 2eb93ec..ec71c6d 100644 --- a/plugins/copypath/plugin.sh +++ b/plugins/clipboard-enhancements/plugin.sh @@ -24,4 +24,7 @@ # Email : P.Zarrad@outlook.de #================================================================== +apply_ohmyzsh_lib "clipboard" apply_ohmyzsh_plugin "copypath" +apply_ohmyzsh_plugin "copybuffer" +apply_ohmyzsh_plugin "copyfile"