Volutions - ID | News | Gadget | Tutorial | Freeware | Template | Etc.: script
Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

'Directory Cleaner And Files Organizer' Updated With Command Line Version

A while back we've posted about a script called "Directory Cleaner And Files Organizer" that helps you keep various folders clean (such as your Desktop) by automatically moving the files by extension into folders such as Pictures, Documents and so on.

If you remember, I've mentioned it would be nice if it had a command line version so you could automatically run it at startup or in a cron job. Well, an update today brings a command line version of the Directory Cleaner And Files Organizer script.

To use, download the script, extract it and open "cmd_cleaner" and starting with line 28 of the script you should see something like this:

picdir="/home/$USER/Pictures"
musicdir="/home/$USER/Music"
docdir="/home/$USER/Documents"
videodir="/home/$USER/Videos"
archdir="/home/$USER/Archives"
progdir="/home/$USER/Scripts"

These are the folders where your files will be moved upon cleaning - change them to whatever you want (or leave them as they are). Then make the script executable:
chmod +x /path/to/cmd_cleaner

Then, to clean a folder, use:
/path/to/cmd_cleaner a /home/andrei/Desktop

Of course, change /home/andrei/Desktop in the command above with the path to the folder you want to clean (I've used an exact path because I'm not sure if relative paths / variables work in Cron). "a" stands for advanced cleaning and "s" for simple (so you can replace "a" in the above command with "s") - we've already explained what these do in the previous post.


Now you're ready to add it to a cron job (for a GUI you can use Gnome Schedule) or to your startup applications (System > Preferences > Startup applications - simply add the command like I've explained above).


Note: if you get a bunch of errors when running the script, don't worry about it, the script works but the errors are displayed because it checks multiple times (so this is only a display error which will be fixed soon). The author explanation:

The cleaning is working without problem, the error are the second checking result, when the document is already moved. The same is also in the classic cleaner. I will look at this later and will to rewrite it for output without errors.

Download Directory Cleaner And Files Organizer

Hide / Show Desktop Icons In Linux Using A Simple Script [Gnome]

I was reading a post on Lifehacker about hiding/showing your Desktop icons in Mac OSX using a script and though: "hey, I bet this can be done easier in Linux". And so it is: EnLi has created a very small script that does just that: it can toggle your desktop icons on/off using a click for a distraction-free desktop.

You can either use it as a Nautilus script or assign it a keyboard shortcut.

a) To use it as a Nautilus script, copy/paste the following commands in a terminal window:
cd ~/.gnome2/nautilus-scripts
wget http://enli.co.cc/files/Scripts/Toggle-Desktop.sh
chmod +x Toggle-Desktop.sh

Then simply right click in Nautilus and select Scripts > Toggle-Desktop. Please note that when you turn off the icons on the desktop, you can't right click the desktop so you'll have to open a Nautilus window to be able to run the script.


b) To assign a keyboard shortcut to the script:


Download the script and place it anywhere you want, then make it executable:
chmod +x /path/to/Toggle-Desktop.sh

Then assing a keyboard shortcut: under System > Preferences > Keyboard Shortcuts, click "Add", enter a name for your custom keyboard shortcut and under "Command", enter the full path to where you've saved the script. And finally, assign a new keyboard shortcut for the newly created action.


Credits for the script: EnLi`s Blog

Keep Your Desktop Clean With Directory Cleaner And Files Organizer

Directory cleaner and files organizer

In my search for a clean Desktop (because I got tired of cleaning it manually), I came across "Directory cleaner and files organizer", a script (with Zenity for a GUI) that automatically cleans any directory (and thus the Desktop folder) by moving the files to various folders such as all the pictures into ~/Pictures, the archives into ~/Archives, documents into ~/Documents and so on.

The script recognizes more than 470 extensions and the directories where it moves the files can be customized in the settings. Also, I'm using it for organizing my Desktop but you can use it for any other folder such as the ~/Downloads folder and so on.

Directory cleaner and files organizer has 2 options for cleaning: "Start-Cleaning" which moves all the files in the selected directory to the directories you've set in its settings, overwriting any existing files, and "Advanced-Cleaning" which is a smart way of moving the files:
  • if the file that's going to be moved already exists in the destination folder, a new folder with its extension is created and the file is moved into that folder.
  • if that folder also has a file with the same name, the file is renamed using the date and time so the file never gets overwritten


Installation

Before proceeding with the installation, remember to always check the source of any script you run on your computer!

Directory cleaner and files organizer only depends on Zenity which should already be installed. To install Directory cleaner and files organizer, download if from HERE, extract it and double click the "install.sh" file.

Once installed you can find it under Accessories > Files-Oraganizer.


Configuring Directory cleaner and files organizer

Directory cleaner and files organizer clean paths can be configured. By default, selecting "Edit-Settings" will pop up the following configuration:

Edit path's for your files with exact order
-----------------------------------------------------
/home/YOUR_USERNAME/Pictures
/home/YOUR_USERNAME/Music
/home/YOUR_USERNAME/Documents
/home/YOUR_USERNAME/Videos
/home/YOUR_USERNAME/Archives
/home/YOUR_USERNAME/Scripts

You can get an idea on what each folder is for (therefore I won't get into detail here since it's obvious), so you can easily modify it to point to some other location.


Directory cleaner and files organizer is not 100% automated as you have to run it and select the folder you want it to clean. But if you know a bit of Bash, you can always tweak it so you can launch it via command line (without Zenity) and then add it to an hourly cron job.

Install Compiz 0.8.x Experimental Plugins In Ubuntu

Compiz experimental plugins

Compiz 0.8.x has some very cool plugins which are marked as "experimental" and thus are not available in the Ubuntu repositories. Johnnyg posted instructions about installing these plugins @ Gnome Look - I gave it a try and everything seems to be working (though I've only tested 3-4 plugins so far).

Among the experimental plugins are: Static Windows, Anaglyph, Animatons Plus, the famous Cube 3D Models, Cube Snow Globe, Cube Atlantis, Photowheel, Wizard, Window Previews (not the KDE Plasma thumbnails!), Workspace Naming, Toggle Decoration, Put Plus, Snap Windows and more.

If you want to install these plugins (remember, they are experimental so use them at your own risk!), all you have to do is run the commands below (for both Ubuntu 32bit and 64bit - only if you run Compiz 0.8.x, preferably 0.8.6!):


1. Close CCSM (if open) and run the following commands to install the required dependencies and download the build script:

sudo apt-get install compiz-fusion-bcop compizconfig-settings-manager compiz-dev build-essential libtool libglu1-mesa-dev libxss-dev libcairo2-dev git-core
cd && git clone git://anongit.compiz.org/users/soreau/scripts compizexperimental
cd compizexperimental/
chmod +x compiz-addons

2. Now run the script:

a) To selectively install the plugins, use the following command:
cd ~/compizexperimental/
./compiz-addons


Compiz building git plugins

At this point you will be asked what to do about each plugin. Here, enter "i" and then press the ENTER key for each plugin you want to install.


b) To install all the plugins at once, with no prompt:
cd ~/compizexperimental/
./compiz-addons install all


2. Restart Compiz: press ALT + F2 and enter:
compiz --replace

Then go to System > Preferences > CompizConfig Settings Manager and enable some new plugins.

Uninstall all the experimental Compiz 0.8.x plugins

If you want to remove all the plugins installed by the instructions above, use the following commands:
cd ~/compizexperimental
./compiz-addons uninstall all

Then restart Compiz (see step 2 above).


Note: I've tested it on Ubuntu 10.10 Maverick Meerkat 32bit.


Thanks to johnnyg for the instructions and Scott Moreau for the experimental Compiz plugins build script!
 
Support By Blogger