• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

kasper/phoenix: A lightweight macOS window and app manager scriptable with JavaS ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

kasper/phoenix

开源软件地址(OpenSource Url):

https://github.com/kasper/phoenix

开源编程语言(OpenSource Language):

Objective-C 91.9%

开源软件介绍(OpenSource Introduction):

Phoenix

Build Status

Phoenix

A lightweight macOS window and app manager scriptable with JavaScript. You can also easily use languages which compile to JavaScript such as TypeScript. Phoenix aims for efficiency and a very small footprint. If you like the idea of scripting your own window or app management toolkit with JavaScript, Phoenix is probably going to give you the things you want. With Phoenix you can bind keyboard shortcuts and system events, and use these to interact with macOS.

  • Current version: 3.0.0 (Changelog)
  • Requires: macOS 10.11 or higher

Note: the default master branch will always be stable.

Key Features

  • highly customisable, write your own configuration
  • bind keyboard shortcuts and system events to your callback functions
  • control and interact with your screens, spaces, mouse, apps and windows
  • log messages, deliver notifications, display content or ask input with modals
  • run external commands

Install

To install, extract the downloaded archive and just drag-and-drop Phoenix to your Applications folder. When you run Phoenix for the first time, you will be asked to allow it to control your UI. macOS will ask you to open Security & Privacy in System Preferences. Once open, go to the Accessibility section and click the checkbox next to Phoenix to enable control. An admin account is required to accomplish this.

Alternatively, if you have Homebrew installed, you can simply run brew install --cask phoenix.

Uninstall

To uninstall Phoenix, delete the app from your Applications folder. The configuration file created by Phoenix itself is located in your home folder. Delete ~/.phoenix.js and any related configurations if desired. For developers, you may also need to delete ~/.phoenix.debug.js.

Application preferences are stored in ~/Library/Preferences/org.khirviko.Phoenix.plist. For developers, in ~/Library/Preferences/org.khirviko.Phoenix.debug.plist.

If you have used the storage, also delete the file ~/Library/Application Support/Phoenix/storage.json. Again for developers, you may also need to delete ~/Library/Application Support/Phoenix/storage.debug.json.

Usage

Phoenix lives on your status bar (or as a background daemon) and can be scripted in JavaScript (or languages which compile to JavaScript such as TypeScript).

Screenshot of Phoenix

See the documentation to get started with your script. Your script should reside in ~/.phoenix.js — the file will be created when you launch Phoenix for the first time. Alternatively — if you prefer — you may also have your script in ~/Library/Application Support/Phoenix/phoenix.js or ~/.config/phoenix/phoenix.js. For ideas, see what other people have built in their configurations in the Wiki. Feel free to add your own configuration to the Wiki to show other people the nice things you can do. Previous configurations (<= 1.5) are not compatible with 2.0, see Changelog for what changes are needed.

Development

You will need some basic knowledge about installing the required languages and tools. If you need help, do not hesitate to ask! To get started, you will need:

  1. Git
  2. Xcode 13 or higher
  3. Xcode command line tools

First clone the repository from a terminal:

git clone https://github.com/kasper/phoenix.git
cd phoenix

To develop Phoenix, open Phoenix.xcworkspace in Xcode. Install Xcode from the App Store, if you do not already have it installed. You will also need Xcode command line tools — you will be prompted for this. Everything else should work as is — you can develop, debug, test, build and run Phoenix straight from Xcode.

To install Phoenix from the source, you will need to build the workspace from a terminal:

xcodebuild -workspace Phoenix.xcworkspace \
           -scheme Phoenix \
           -configuration Release \
           SYMROOT="$PWD/build/" \
           clean build

Once complete, you will find a newly built Phoenix app in build/Release/. After this, you can follow the normal install guide.

For a debug build, change the -configuration flag to Debug in the above command. This will place a debug build of the app in build/Debug.

Phoenix manages dependencies with CocoaPods. Note that you do not need CocoaPods for basic development. However, if you want to install new pods or update existing ones, you will also need:

  1. Ruby (3.1.1 or higher), it is recommended that you manage Ruby versions with for instance rbenv
  2. Bundler
  3. CocoaPods

Install Bundler, if you do not already have it installed. To install CocoaPods and its dependencies, use Bundler inside the phoenix directory to install the required Ruby gems according to the Gemfile. Once complete, you can install the pods listed in the Podfile with CocoaPods.

gem install bundler
bundle install
pod install

In addition to the Objective-C core, Phoenix also uses a JavaScript-based (5.1) library to implement additional features to the API. The minified library is included in the repository in Phoenix/phoenix-min.js so that everything works as is. However, if you want to develop features for this library, you will also need:

  1. Node.js (17.9.0 or higher)

Install the development packages listed in package.json.

npm install

To build phoenix-min.js from the source, run the command npm run build in the root directory. NPM will then build the source from library/src/ and install the new library to Phoenix/phoenix-min.js. For convenience, this is also handled automatically by Xcode when you build Phoenix.

Documentation

The documentation for Phoenix is built from the docs/ directory using Docusaurus. To develop the documentation locally, navigate to the directory and run the following:

npm install
npm start

Contributing

Feel free to contribute to this project by creating issues, pull requests and editing the Wiki. See the guidelines.

Contact

If you have any questions, feedback or just want to say hi, you can open an issue, start a discussion, email or tweet.

Thanks

Phoenix is currently being developed by Kasper Hirvikoski (@kasper) with the generous help of contributions made by many individuals. It was originally authored by Steven Degutis (@sdegutis). As it stands now, it has been rewritten from the ground up by Kasper Hirvikoski.

License

Released under the MIT License. See license.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap