{"id":26437138,"url":"https://github.com/armaldio/electron-command-palette","last_synced_at":"2025-03-18T08:28:09.740Z","repository":{"id":57221583,"uuid":"97887484","full_name":"Armaldio/electron-command-palette","owner":"Armaldio","description":"Easily integrate a command palette inside your Electron aplication","archived":false,"fork":false,"pushed_at":"2019-02-06T04:54:30.000Z","size":452,"stargazers_count":15,"open_issues_count":7,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-03T06:34:09.202Z","etag":null,"topics":["armaldio","command-palette","electron","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Armaldio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-20T23:52:22.000Z","updated_at":"2024-03-15T02:34:03.000Z","dependencies_parsed_at":"2022-08-29T04:01:53.417Z","dependency_job_id":null,"html_url":"https://github.com/Armaldio/electron-command-palette","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armaldio%2Felectron-command-palette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armaldio%2Felectron-command-palette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armaldio%2Felectron-command-palette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armaldio%2Felectron-command-palette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Armaldio","download_url":"https://codeload.github.com/Armaldio/electron-command-palette/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244183388,"owners_count":20412034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["armaldio","command-palette","electron","nodejs"],"created_at":"2025-03-18T08:28:09.093Z","updated_at":"2025-03-18T08:28:09.729Z","avatar_url":"https://github.com/Armaldio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Electron Command Palette \nA nice-looking command palette for Electron\n\n[![npm version](https://badge.fury.io/js/electron-command-palette.svg)](https://badge.fury.io/js/electron-command-palette)\n[![Build Status](https://travis-ci.org/armaldio/electron-command-palette.svg?branch=master)](https://travis-ci.org/armaldio/electron-command-palette)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![Repo Status](https://img.shields.io/badge/status-Maintained-brightgreen.svg)](https://github.com/armaldio/electron-command-palette)\n\n![PRESENTATION GIF](img/Commandpalette.gif)\n\n\n\n## Features\n * Searchable\n * Highly customizable *\n * Show **Title** - **Description** - **Shortcut** and **Category**   \n * Register local shortcuts *\n * Register custom actions on click *\n\n\n\\* *planned feature*\n \n![FEATURE IMAGE](img/Commandpalette.png)\n\n## Installation\n`$ npm install --save electron-command-palette`\n\n## Usage\n\n### Mandatory\n\n**renderer.js** :\n```js\nconst CmdPalette = require(\"electron-command-palette\");\n\nlet palette = new CmdPalette();\n```\n\n### Add commands\n```js\nconst cmds       = require(\"./commands.json\");\n\n//JSON style\npalette.add(cmds);\n\n//inline style\npalette.add({\n    \"title\": \"New project\",\n    \"category\": \"Project\",\n    \"description\": \"Create a new project from scratch\",\n    \"shortcut\": \"CmdOrCtrl+Shift+N\",\n    \"action\": \"newproject\"\n})\n```\n\n**commands.json** :\n```json\n[\n  {\n    \"title\": \"New project\",\n    \"category\": \"Project\",\n    \"description\": \"Create a new project from scratch\",\n    \"shortcut\": \"CmdOrCtrl+Shift+N\",\n    \"action\": \"newproject\"\n  },\n  {\n      \"title\": \"Title\",\n      \"category\": \"Optional categoty\",\n      \"description\": \"optional description\",\n      \"shortcut\": \"Electron accelerator\",\n      \"action\": \"Name of the function previously registered\"\n    }\n]\n```\n\n### Register functions\n**renderer.js**: \n```js\nconst functions  = require(\"./functions\");\n\n//Module style\npalette.register(functions);\n\n//Inline style\npalette.register(\"saveproject\", function() {\n\tProject.save();\n});\n```\n\n**functions.js**:\n```js\nmodule.exports = [\n\t{\n\t\t\"key\"   : \"newproject\",\n\t\t\"action\": function () {\n\t\t\tconsole.log(\"Save project\");\n\t\t}\n\t},\n\t{\n\t\t\"key\"   : \"openproject\",\n\t\t\"action\": function () {\n\t\t\tconsole.log(\"Open project\");\n\t\t}\n\t}\n];\n```\n\n### Display\n```js\npalette.show();\npalette.hide();\n```\n\n## TODO\n * [X] Tidy repo  \n * [X] Register functions\n * [ ] register shortcuts\n * [X] Trigger correct action on click\n * [ ] Fix bad fuzzy search\n * [ ] Customization options (position, CSS classes, themes)\n\n## Contributors\n * [Armaldio](https://github.com/armaldio/)\n\n## License\n\nMIT © [Armaldio](https://armaldio.xyz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmaldio%2Felectron-command-palette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmaldio%2Felectron-command-palette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmaldio%2Felectron-command-palette/lists"}