Extension for Caja to hide files without renaming them.
Adapted from Nautilus Hide, copyright (C) 2015 Bruno Nova brunomb.nova@gmail.com https://bitbucket.org/brunonova/nautilus-hide/src#clone, and Nemo Hide, copyright (C) 2015 KDB2 (Emmanuel) https://github.com/KDB2/Nemo-hide.
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.
Caja Hide is a simple Python extension for the Caja file manager that adds options to the right-click menu to hide or unhide files.
The extension hides the files without renaming them (i.e. without prefixing a
dot ('.') or suffixing a tilde ('~')).
It does that by adding their names to the folder's .hidden
file, which
Caja reads to hide the listed files the next time you open or refresh the
folder.
In Linux, and other UNIX-like systems, a file with a name that starts by a dot ('.') is considered a hidden file. Some file managers also hide files that end with a tilde ('~'), which are considered backup files.
To hide an existing file, you would have to rename it. That's not always feasible or desirable.
Some file managers, like Caja, offer an alternative way of hiding files:
you create a text file that lists, line-by-line, the names of all the files you
want to hide in a particular folder (directory) and save it in that folder with the name .hidden
. The next time
you open or refresh that folder, those files will not be visible.
This extension simply uses that .hidden
file to hide files. When you choose to
hide a file, its name is added to the folder's .hidden
file. When you choose
to unhide it, the name is removed.
Caja will automatically refresh upon hiding or unhiding a file so that the file will either disappear or re-appear.
Please note that Caja Hide can also be used to hide folders.
Install these first.
- caja
- python 2.7
- python-caja (the python 2 version. Depending on your distro it may be called
python2-caja
) - xautomation
a) Download source code
git clone https://github.com/Fred-Barclay/Caja-Hide.git
cd Caja-Wipe
dpkg-buildpackage
cd .. && sudo dpkg -i install caja-hide_0.8.9_all.deb
b) Restart caja
caja -q
mkdir -p ~/.local/share/caja-python/extensions/
git clone https://github.com/Fred-Barclay/Caja-Hide.git
cd Caja-Hide/src
cp caja-hide.py ~/.local/share/caja-python/extensions/caja-hide.py
Restart Caja
caja -q