Skip to content

Tina-otoge/Crescent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌔 Crescent

Linux Desktop entries generator

What are Desktop entries?

Specification: freedesktop.org
Information: ArchWiki/Desktop_entries

Why generating them?

I like to add a lot of entries which are not actual applications. Writting them by hand is tiring. Quite often, lots of them are similar. But having them helps me launch programs faster using my application launcher.

How does this solve the problem?

Crescent adds the ability to define user-land apps in a more maintanable fashion. It parses a JSON-formatted list and will ensure your applications folder is in sync with what's in the list.

You can also define application templates which solves the problem of creating similar entries.

How does it work?

Crescent reads 2 configuration files. apps.json and templates.json. The names are explicit.

apps.json example:

{
	"TweetDeck": {
		"template": "Chromeapp",
		"templating": {
			"url": "https://tweetdeck.twitter.com"
		}
	}
}

templates.json example:

{
	"Chromeapp": {
		"Icon": "google-chrome",
		"Terminal": false,
		"templating": {
			"Exec": "google-chrome --app=\"{url}\""
		}
	}
}

Generated TweetDeck.desktop file:

[Desktop Entry]
Type=Application
Name=TweetDeck
Exec=google-chrome --app="https://tweetdeck.twitter.com"
Icon=google-chrome
Terminal=false

How to use it?

USAGE:
crescent COMMAND

COMMANDS:
update  - Run clean, write and call update-desktop-database (in order)
clean   - Remove any .desktop which would not be generated by Crescent
write   - Generate Desktop Entries and write them to files
path    - Write Crescent's Directory Entries folder path to stdout
config  - Write Crescent's config folder path to stdout

How to install it?

Linux

Head to the Releases page and download the latest crescent-linux-compressed-python-executable, rename it to something more convenient (e.g., crescent) and place it somewhere in your PATH (e.g.,~/.local/bin)

Cross-platform

I don't think this makes any sense since Desktop Entries are probably a Linux only thing... but Crescent should be able to write the generated files on any platform.

Download the latest stable version of the source code from the Releases page, run it with python3 path/to/the/source/folder.

How to help?

Spotted an issue? Let me now by opening one here on GitHub!

Want to ask for a new feature? Well, open an issue too.

Want to fix a bug or add a feature yourself? Fork this repository and submit a Pull Request!