Description:

A contextual menu for coloring the folders so fast, also has the ability to color a selected set of folders.

Supports Plasma 5 and KDE4

### INSTALLATION ###
You just need to run the script. 'Install.sh' with a click and restart dolphin.

[es]
Un menu contextual para colorear la carpetas de forma rapida, tambien tiene la posibilidad de colorear un conjunto de carpetas seleccionada.

### INSTALACION ###
Solo hace falta correr el script 'Install.sh' con un click y reiniciar dolphin.

### NOTE ###
If you want added a new language, please contact with me.

If you like this script maybe you like this: http://kde-apps.org/content/show.php/PlayBar?content=165396
Last changelog:

Version 1.9 3 months ago

* option --caption removed of the scripts
* generator of random color improved

MoonDragon

2 months ago

so damn convenient it makes me laugh! thanks for the effort!

Report

steinhmor

6 months ago

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"


Report

steinhmor

6 months ago

ok. installation worked but the file dolphin-folder-color.sh can't be found ...
maybe the path changed...

Report

morine01

10 months ago

Apply for valid international English Language Test eg.IELTS,TOEFL,ESOL,CELTA,DELTA.


We deal and specialize in the production of registered TOEFL, IELTS, ESOL, CELTA/DELTA & other English Language Certificates. Please note that Our IELTS & TOEFL,Certificates are Original and registered in the data base and Can be verified.After your order is placed it takes just few days for us to get your details in the system

Once your details are imputed in the system it will be in the IELTS or TOEFL web sites/system once for ever and will appear real, legit and verifiable for ever. WE can also help you to get valid Work permits,Driver’s license ,second p***port and Visas to European ,USA,Canada and Australia . below are additional documents that we offer Adoption Certificates Baptism Certificates Birth Certificates Death Certificates Divorce Certificates Marriage Certificates Custom Certificates prostitution certificate High
School Diplomas G.E.D. Diplomas Home School Diplomas College Degrees University Degrees Trade Skill Certificates Social Security Validate SSN Number Driver License Travel documents(passports, visas etc)for more information

General Support ( realdocumentationservices@gmail.com )

call us on +237697737461(whatsapp)

Skype: newdreams.documentation1

Once you place your order with us,you just need to stay back because you will not be required to take the test in person as we have veterans who are specialised in taking the test and will take the test for you accompanied with our invigilators and the collaborations we have with the British Council .

https://vimeo.com/185729397

Report

wachin

1 year ago

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

Report

audoban

1 year ago

Thank you very much! :)
I'm an atheist, not bless me

Report

grheavy

1 year ago

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

Report

audoban

1 year ago

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

Report

grheavy

1 year ago

Qt: 4.8.6
Plataforma de desarrollo de KDE: 4.14.6
Dolphin: 14.12.3

Report

grheavy

1 year ago

¿Hay alguna manera para solucionarlo o tengo que actualizar mi versión de Dolphin? Si es así dime como podría hacerlo.

Report

audoban

1 year ago

Prueba esta y me comentas si te funciona.
https://github.com/audoban/dolphin-folder-color/archive/master.zip

Report

grheavy

1 year ago

¡Éste sí funciona! ¡Muchas gracias!

Report

LandoR

2 years ago

install successfull but not working.
arch linux, plasma-desktop 5.2.1-2

Report

audoban

2 years ago

tell me please, what is your version of Dolphin?
The dolphin-folder-color appears in the contextual menu of dolphin?

$ dolphin --version
$ kiconfinder --version
$ kf5-config --path data
$ kf5-config --path services

Report

LandoR

2 years ago

~  dolphin --version
Qt: 4.8.6
KDE Development Platform: 4.14.6
Dolphin: 14.12.3
~  kiconfinder --version
Qt: 4.8.6
KDE Development Platform: 4.14.6
Icon Finder: 4.14.6
~  kf5-config --path data
/home/roland/.local/share/:/usr/share/:/usr/local/share/
~  kf5-config --path services
/home/roland/.local/share/kservices5/:/usr/share/kservices5/

Report

audoban

2 years ago

Thanks a lot, I already know what's going on.

Report

roozbeh2020

2 years ago

Hi
I run install.sh script in manjaro linux successful but when I close dophin and open it again nothing happen

Report

audoban

2 years ago

which version of kde do you use?

Report

Jamesjon

2 years ago

Simple, útil y funcional, gracias por el proyecto :D

Report

Helmy

2 years ago

running the script directly i got the following error:

./dolphin-folder-color.sh: line 82: /.directory-16230: Permission denied
cat: /.directory-16230: No such file or directory
rm: cannot remove ‘/.directory-16230’: No such file or directory

It seems that LMDE and Linux Mint (thus Debian/Ubuntu) do not automatically create the $TMPDIR variable used in dolphin-folder-color.sh line 28

it worked when i replaced
tmp=$TMPDIR/$desktopEntry-$PPID
with
tmp=/tmp/$desktopEntry-$PPID

Report

audoban

2 years ago

Thanks for your feedback.
I'll fix in the next days

Report

MichauSm

2 years ago

The same error with openSUSE 13.1. Creating this directory solves the problem and install is succesfull.

Report

audoban

2 years ago

:(, What I will review more thoroughly.
Please tell me if the variable $ TMPDIR exists and value of this

Report

lupin492

3 years ago

I was missing this feature.
Thanks, and best regards!

Report

audoban

3 years ago

Glad you find it useful

Report

Version 1.9 3 months ago

* option --caption removed of the scripts
* generator of random color improved

version 1.7 1 year ago

* Added a desktop entry for random color

1 year ago

- version 1.6

* Fixed script install and uninstall
* Added color Magenta

- version 1.5

* Added support for Plasma 5
* Fixed $TMPDIR variable without setting up

- version 1.4

* Added [pt_br] translation, by Bruno Goní§alves Araujo
* Fixed auto-reload and improved script

- version 1.3

* Added initial support for Plasma5

- version 1.2

* Code revised and improved.
* Fixed problem when choosing icons that are not system.

- version 1.1.1

* Added 'deinstall' script
* Improved 'install' script
* Improved 'dolphin-folder-color' script
* Added translations: French, Italian, Portuguese and German.

- version 1.1

* Fixed Install script
* Improved 'dolphin-folder-color' script

- version 1.0

product-maker MoonDragon Jul 25 2017

so damn convenient it makes me laugh! thanks for the effort!

product-maker AnalisaLogika Jun 15 2017

product-maker rewqtz Nov 09 2016

product-maker chips Sep 03 2016

product-maker Psifidotos Aug 23 2016

product-maker Dmitry1 Aug 19 2016

product-maker rosenrot Aug 16 2016

product-maker audoban Aug 15 2016

product-maker xxmlud Jan 28 2016

product-maker PeterKabin Nov 19 2015

product-maker FallenX Nov 03 2015

product-maker mirkogennari Oct 28 2015

product-maker houston4444 Jul 05 2015

product-maker MichauSm Mar 13 2015

product-maker anespor Jan 18 2015

product-maker nicola07127 Aug 25 2014

product-maker nicola07125 Aug 25 2014

product-maker nicola07124 Aug 25 2014

product-maker nicola07123 Aug 25 2014

product-maker Anfang May 30 2014

product-maker frag May 30 2014

product-maker OdinEidolon May 03 2014

product-maker eticre Mar 19 2014

product-maker lionhater Mar 18 2014

product-maker avlas Mar 18 2014

product-maker 6 6

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
1.9
updated Jul 25 2017
added Mar 05 2014
downloads today
0
page views today 0