Code Monkey home page Code Monkey logo

icon-pycon's Introduction

 

Icons_pycons

A pair of function definitions for saving and restoring the preferred spatial positions of the set of all current desktop icons.

Hopefully useful in case one's cherished handcrafted desktop layout has been accidentally deleted, e.g. by clicking the inexplicable contextual menu option "Organize Desktop by Name", which naturally can't be undone...

The names of icons' corresponding files must have no leading or trailing spaces.

Tested on Ubuntu Mate 20.04, using the Caja file manager and python3. Requires gio and egrep.

Based on a rather more elaborate script provided by RockDoctor.

By moof-moof 2021-01-20.

 

To make a backup of the names and positions of the desktop icons:

  1. Open a terminal in the directory "1-SAVING".

  2. Issue python3 SAVE_desktop_layout.py.

  3. Note terminal output and the newly created pickle (*.p-YYYY-MM-DD) file in the configured backup directory.

 

To later restore all the desktop icons to their saved positions:

  1. Copy desired pickled file w/o date suffix to the configured backup directory.

  2. Open a terminal in the directory "2-RESTORING".

  3. Issue python3 RESTORE_desktop_layout.py.

  4. Note terminal output (which should ideally present none or very few returncode=1 messages).

  5. Update filemanager by clicking the desktop while hitting F5.

icon-pycon's People

Contributors

moof-moof avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.