9My great developer friend. Your complement has been helpful to me for years! However, unfortunately, the Garuda I use updated Plasma to version 6. Therefore, its plasmoid broke. Because it is no longer compatible. But your palmoid is more important to me than Plasma 6. I would love to have it working again. Thank you very much if you do this. Don't let this wonderful work be forgotten in the past.
For those getting the error:
./install.sh: line 157: kde-cp: command not found
Open the install.sh file in a text editor and find and replace all instances of "kde-cp" with "kdecp5".
Doing that got it to install correctly for me.
I wasn't able to install this on KDE Neon with Plasma 5.9.3
There seemed to be "old" commands in the install.sh (geometry and cation).
I edited the install.sh and it worked ...
this is my new version:
#!/bin/bash
# Copyright (C) 2014 Smith AR
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#
# INSTALL: Only run this script
shopt -s extglob
shopt -s expand_aliases
shopt -s extdebug
cd $(dirname $0)
${exit:=$1}
exit=${exit:-"continue"}
declare title='Folder Color'
declare user=$(basename $HOME)
declare combobox0=('⚫ Select your version of Dolphin:' 'Plasma 5' 'KDE4')
declare combobox1=('⚫ Install on:' 'root' $user)
declare rect='330x130'
declare prefix='/usr'
declare foldercolorDE='dolphin-folder-color.desktop'
declare foldercolorSH='dolphin-folder-color.sh'
declare pathService='ServiceMenus'
declare pathExec='/usr/bin'
setPathSH() {
export tmp='.tmp'
pattern='dolphin-folder-color\.sh'
str="$pathExec/$foldercolorSH"
str=${str//+(\/)/\\/}
sed "s/$pattern/$str/" $foldercolorDE > $tmp
}
mk_directory() {
if ! [ -e $1 ] ; then
mkdir "$1"
fi
}
authorize() {
if [ `which kdesu` ] ; then
kdesu -i folder-red -n -d -c $0 finish "$choice" & disown -h
elif [ `which kdesudo` ] ; then
kdesudo -i folder-red -n -d -c $0 finish "$choice" & disown -h
else
kdialog --title ' ' --title dolphin-folder-color --error 'kdesu not found.'
exit 1
fi
}
if [ $exit == 'continue' ] ; then
choice=$(kdialog --title Dolphin \
--title "$title" \
--combobox "${combobox0[@]}" \
--default "${combobox0[1]}")
else
choice=$2
fi
if [ -z "$choice" ]
then exit 0
elif [ "$choice" == "Plasma 5" ] ; then
foldercolorDE='plasma5-folder-color.desktop'
pathService=""
export kde_config_services=`kf5-config --path services`
else
export kde_config_services=`kde4-config --path services`
fi
if [ $exit != "finish" ] && [ $UID != 0 ] ; then
kdg=$(kdialog --title Dolphin \
--title "$title" \
--combobox "${combobox1[@]}" \
--default $user)
if [ -z "$kdg" ]
then exit 0
elif [[ "$kdg" = "$user" ]]
then prefix=$HOME
fi
fi
if [[ $prefix = '/usr' ]] ; then
declare -r RootInstall=true
else
declare -r RootInstall=false
fi
chmod +x ./$foldercolorSH
chmod +x ./$foldercolorDE
succesInstall=true
if $RootInstall ; then
if [[ $UID != 0 ]] ; then
authorize
exit
else
IFS=":"
for p in $kde_config_services ; do
if [ -z ${p/\/usr\/*/} ] ; then
pathService="$p/$pathService"
fi
done
setPathSH
mk_directory $pathService
mk_directory $pathExec
kde-cp --overwrite ./$foldercolorSH "$pathExec/$foldercolorSH"
kde-cp --overwrite ./$tmp "$pathService/$foldercolorDE"
if [ $? != 0 ] ; then
succesInstall=false
fi
rm -r $tmp
fi
else
IFS=":"
for p in $kde_config_services ; do
if ! [ -d "$p" ]
then mkdir "$p"
fi
if [ -w "$p" ] ; then
pathService="$p/$pathService"
pathExec="$pathService"
break
fi
done
setPathSH
mk_directory $pathService
kde-cp --overwrite ./$foldercolorSH "$pathService/$foldercolorSH"
kde-cp --overwrite ./$tmp "$pathService/$foldercolorDE"
if [[ $? != 0 ]] ; then
succesInstall=false
fi
rm $tmp
fi
if $succesInstall ; then
msg="Installed successfully.
\nPlease restart Dolphin to update the Service Menus."
else
msg="Installation failed!"
fi
kdialog --title Dolphin --title "$title" --msgbox "$msg"
I use this from UbuntuStudio 14.04. Now I install 15.10, I chose the option for KDE 4 that is for dolphin4 that come in repositories, Very great job. God Bless
La instalación fué bien después de haber instalado kdialog, pero la opción de color no aparece en las carpetas.
Kubuntu 15.04
KDE PLasma 5.2.2
Qt 5.4.1
Kernel 3.19.0-31-generic
SO 64 bits
Lo revisare de nuevo :(, al parecer algunos usuarios usan Plasma5 con dolphin de KDE4 y eso es un problema para mi. Podrias decirme tu version Dolphin. Desde la terminal: $ dolphin --version
Ratings & Comments
48 Comments
9 My great developer friend. Your complement has been helpful to me for years! However, unfortunately, the Garuda I use updated Plasma to version 6. Therefore, its plasmoid broke. Because it is no longer compatible. But your palmoid is more important to me than Plasma 6. I would love to have it working again. Thank you very much if you do this. Don't let this wonderful work be forgotten in the past.
9 9 excellent
9 9 excellent
10 10 the best
10 Great. This should be a default feature lol
10 10 the best
It doesn't work. KDE Plasma 5.18.5 Qt 5.14.2 Dolphin 20.04.0
kde-cp package 'changed' to 'kdecp5' 1) Open 'install.sh' and replace 'kde-cp' to 'kdecp5' 2) Save and run again
10 10 the best It's really good!!!
And thank you nprime, I just used your advice and it did install without a problem on manjaro.
7 That makes it much faster to change the folder colours, thank you!
For those getting the error: ./install.sh: line 157: kde-cp: command not found Open the install.sh file in a text editor and find and replace all instances of "kde-cp" with "kdecp5". Doing that got it to install correctly for me.
10 10 the best
some colors (like magenta, violet, brown) don't work properly (the default folder colour doesn't change at all).. I run KDE Plasma 5
I've got this error when running install.sh on Fedora 29: ./install.sh: line 157: kde-cp: command not found
9 +
Gracias, funciona perfectamente en Kubuntu 18.04 con Dolphin 17.12.3 y KDE 5.
Does not work with latest KDE Neon.
9 so damn convenient it makes me laugh! thanks for the effort!
I wasn't able to install this on KDE Neon with Plasma 5.9.3 There seemed to be "old" commands in the install.sh (geometry and cation). I edited the install.sh and it worked ... this is my new version: #!/bin/bash # Copyright (C) 2014 Smith AR
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
#
# INSTALL: Only run this script
shopt -s extglob
shopt -s expand_aliases
shopt -s extdebug
cd $(dirname $0)
${exit:=$1}
exit=${exit:-"continue"}
declare title='Folder Color'
declare user=$(basename $HOME)
declare combobox0=('⚫ Select your version of Dolphin:' 'Plasma 5' 'KDE4')
declare combobox1=('⚫ Install on:' 'root' $user)
declare rect='330x130'
declare prefix='/usr'
declare foldercolorDE='dolphin-folder-color.desktop'
declare foldercolorSH='dolphin-folder-color.sh'
declare pathService='ServiceMenus'
declare pathExec='/usr/bin'
setPathSH() {
export tmp='.tmp'
pattern='dolphin-folder-color\.sh'
str="$pathExec/$foldercolorSH"
str=${str//+(\/)/\\/}
sed "s/$pattern/$str/" $foldercolorDE > $tmp
}
mk_directory() {
if ! [ -e $1 ] ; then
mkdir "$1"
fi
}
authorize() {
if [ `which kdesu` ] ; then
kdesu -i folder-red -n -d -c $0 finish "$choice" & disown -h
elif [ `which kdesudo` ] ; then
kdesudo -i folder-red -n -d -c $0 finish "$choice" & disown -h
else
kdialog --title ' ' --title dolphin-folder-color --error 'kdesu not found.'
exit 1
fi
}
if [ $exit == 'continue' ] ; then
choice=$(kdialog --title Dolphin \
--title "$title" \
--combobox "${combobox0[@]}" \
--default "${combobox0[1]}")
else
choice=$2
fi
if [ -z "$choice" ]
then exit 0
elif [ "$choice" == "Plasma 5" ] ; then
foldercolorDE='plasma5-folder-color.desktop'
pathService=""
export kde_config_services=`kf5-config --path services`
else
export kde_config_services=`kde4-config --path services`
fi
if [ $exit != "finish" ] && [ $UID != 0 ] ; then
kdg=$(kdialog --title Dolphin \
--title "$title" \
--combobox "${combobox1[@]}" \
--default $user)
if [ -z "$kdg" ]
then exit 0
elif [[ "$kdg" = "$user" ]]
then prefix=$HOME
fi
fi
if [[ $prefix = '/usr' ]] ; then
declare -r RootInstall=true
else
declare -r RootInstall=false
fi
chmod +x ./$foldercolorSH
chmod +x ./$foldercolorDE
succesInstall=true
if $RootInstall ; then
if [[ $UID != 0 ]] ; then
authorize
exit
else
IFS=":"
for p in $kde_config_services ; do
if [ -z ${p/\/usr\/*/} ] ; then
pathService="$p/$pathService"
fi
done
setPathSH
mk_directory $pathService
mk_directory $pathExec
kde-cp --overwrite ./$foldercolorSH "$pathExec/$foldercolorSH"
kde-cp --overwrite ./$tmp "$pathService/$foldercolorDE"
if [ $? != 0 ] ; then
succesInstall=false
fi
rm -r $tmp
fi
else
IFS=":"
for p in $kde_config_services ; do
if ! [ -d "$p" ]
then mkdir "$p"
fi
if [ -w "$p" ] ; then
pathService="$p/$pathService"
pathExec="$pathService"
break
fi
done
setPathSH
mk_directory $pathService
kde-cp --overwrite ./$foldercolorSH "$pathService/$foldercolorSH"
kde-cp --overwrite ./$tmp "$pathService/$foldercolorDE"
if [[ $? != 0 ]] ; then
succesInstall=false
fi
rm $tmp
fi
if $succesInstall ; then
msg="Installed successfully.
\nPlease restart Dolphin to update the Service Menus."
else
msg="Installation failed!"
fi
kdialog --title Dolphin --title "$title" --msgbox "$msg"
ok. installation worked but the file dolphin-folder-color.sh can't be found ... maybe the path changed...
I use this from UbuntuStudio 14.04. Now I install 15.10, I chose the option for KDE 4 that is for dolphin4 that come in repositories, Very great job. God Bless
Thank you very much! :) I'm an atheist, not bless me
La instalación fué bien después de haber instalado kdialog, pero la opción de color no aparece en las carpetas. Kubuntu 15.04 KDE PLasma 5.2.2 Qt 5.4.1 Kernel 3.19.0-31-generic SO 64 bits
Lo revisare de nuevo :(, al parecer algunos usuarios usan Plasma5 con dolphin de KDE4 y eso es un problema para mi. Podrias decirme tu version Dolphin. Desde la terminal: $ dolphin --version