Code Monkey home page Code Monkey logo

pyscript-desktop's Introduction

Desktop Environment in PyScript

This project creates a web-based desktop environment using PyScript. Users can launch and interact with various web applications in draggable, resizable windows.

Screenshot of the Desktop Environment

Features

  • Draggable and Resizable Windows
  • Window Controls: Minimize, maximize, and close buttons.
  • Application Icons: Clickable icons to open applications.
  • Embedded Iframes: Applications are opened in iframes within the windows.

Setup and Usage

  1. Clone the Repository:

    git clone https://github.com/kwstasg/pyscript-desktop.git
    cd pyscript-desktop
  2. Start the Server:

    • Option 1: Using Python's HTTP server:

      python3 -m http.server

      Open your browser and navigate to http://localhost:8000.

    • Option 2: Using Live Server in VS Code:

      • Install the Live Server extension in VS Code.
      • Right-click index.html and select Open with Live Server.

Adding Applications

To add new applications, modify the apps list in python/main.py:

# Add Apps Here
apps = [
    {"id": 1, "name": "Paint", "icon": "fas fa-paint-roller", "src": "https://jspaint.app/"},
    {"id": 2, "name": "Diablo", "icon": "fas fa-gamepad", "src": "https://d07riv.github.io/diabloweb/"},
    {"id": 3, "name": "Visual Studio Code", "icon": "fas fa-code", "src": "https://emupedia.net/emupedia-app-vscode/"},
    {"id": 4, "name": "Python Console", "icon": "fa-brands fa-python", "src": "https://pyodide.org/en/stable/console.html"},
    # Add more apps here
]

Attributes of apps

Each application in the apps list is represented by a dictionary with the following keys:

  • id (int): A unique identifier for the application.
  • name (str): The display name of the application.
  • icon (str): The FontAwesome class for the application's icon. (https://fontawesome.com/search?o=r&m=free)
  • src (str): The URL to be loaded in an iframe when the application is opened.

File Structure

pyscript-desktop/
├── css/
│   └── styles.css
├── plugins/
│   └── fontawesome/
│   └── pyscript/
├── python/
│   └── main.py
├── .gitignore
├── index.html
└── README.md

pyscript-desktop's People

Contributors

kwstasg 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.