GithubHelp home page GithubHelp logo

dcendents / desktop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robxu9/desktop

0.0 1.0 0.0 454 KB

Extends Java && Golang with Desktop related functionality. This library allows you to get user specific directories functions (Home, Documents, Downloads) and Sys Tray Icon classes or power events.

License: GNU Lesser General Public License v3.0

Go 32.87% C 0.85% Java 66.28%

desktop's Introduction

Desktop

Java && Go Desktop functions. Have you tried to find user default Download folder using java? It is very complicated. If so, you would find this library very helpful.

Using this library you can use Java or Go language to write a desktop applications and services, without a restriction to be console only or limited Swing/AWT application.

Script nature of Java or Go now not limited by system programming working with sockets and system files. But extened to desktop features like working with user desktop objects. Now you can write a http server which have status systray icon and can download a file into Download folder without hacking.

Go check Java Docs or Go Docs

Features

  • Cross platform user specific folders: Download folder, Home folder, Documents folder, etc ...
  • Cross platform SysTray Icon
  • Cross platform Open Browser URL
  • Cross platform Browser Pop SysTray Window
  • Cross platform Power Events (control reboot, logout, suspend)
  • Register URL handlers (open an application from a browser)
  • Sound and Volume control

Example Desktop Folders

Java:

package com.github.axet.desktop;

public class DesktopTest {
    public static void main(String[] args) {
        System.out.println("Home: " + Desktop.getHomeFolder());
        System.out.println("Documents: " + Desktop.getDocumentsFolder());
        System.out.println("AppFolder: " + Desktop.getAppDataFolder());
        System.out.println("Desktop: " + Desktop.getDesktopFolder());
        System.out.println("Downloads: " + Desktop.getDownloadsFolder());
    }
}

Go:

package main

import (
  "github.com/axet/desktop/go"
)

func main() {
  fmt.Println("Home:", desktop.GetHomeFolder())
  fmt.Println("Documents:" desktop.GetDocumentsFolder())
  fmt.Println("AppFolder:" desktop.GetAppDataFolder())
  fmt.Println("Desktop:" desktop.GetDesktopFolder())
  fmt.Println("Downloads:" desktop.GetDownloadsFolder())
}

desktop's People

Contributors

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