mirror of
https://github.com/zoriya/astal.git
synced 2026-06-02 18:20:48 +00:00
docs: apps page
also add icons
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import '../../vitepress.theme.css'
|
||||
import DefaultTheme from "vitepress/theme"
|
||||
import "../../vitepress.theme.css"
|
||||
import "devicon/devicon.min.css"
|
||||
|
||||
export default DefaultTheme
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ Hosted at [aylur.github.io/astal](https://aylur.github.io/astal/) and [aylur.git
|
||||
| Command | Action |
|
||||
| :---------------- | :------------------------------------------ |
|
||||
| `npm install` | Installs dependencies |
|
||||
| `npm run dev` | Starts local dev server at `localhost:4321` |
|
||||
| `npm run dev` | Starts local dev server at `localhost:5173` |
|
||||
| `npm run build` | Build your production site to `./dist/` |
|
||||
| `npm run preview` | Preview your build locally |
|
||||
|
||||
|
||||
@@ -21,26 +21,18 @@ nix run github:aylur/ags/v2 -- --help
|
||||
|
||||
:::code-group
|
||||
|
||||
```sh [Arch]
|
||||
```sh [<i class="devicon-archlinux-plain"></i> Arch]
|
||||
sudo pacman -Syu go npm gjs
|
||||
```
|
||||
|
||||
```sh [Fedora]
|
||||
```sh [<i class="devicon-fedora-plain"></i> Fedora]
|
||||
sudo dnf install golang npm gjs
|
||||
```
|
||||
|
||||
```sh [Alpine]
|
||||
sudo apk add go npm gjs
|
||||
```
|
||||
|
||||
```sh [Ubuntu]
|
||||
```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
|
||||
sudo apt install golang-go npm gjs
|
||||
```
|
||||
|
||||
```sh [openSUSE]
|
||||
sudo zypper install go npm gjs
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
3. Clone the repo and Install
|
||||
|
||||
@@ -35,26 +35,18 @@ cd astal/core
|
||||
|
||||
:::code-group
|
||||
|
||||
```sh [Arch]
|
||||
```sh [<i class="devicon-archlinux-plain"></i> Arch]
|
||||
sudo pacman -Syu meson vala gtk3 gtk-layer-shell gobject-introspection
|
||||
```
|
||||
|
||||
```sh [Fedora]
|
||||
sudo dnf install meson gcc valac gtk3-devel gtk-layer-shell-devel
|
||||
```sh [<i class="devicon-fedora-plain"></i> Fedora]
|
||||
sudo dnf install meson gcc valac gtk3-devel gtk-layer-shell-devel gobject-introspection-devel
|
||||
```
|
||||
|
||||
```sh [Alpine]
|
||||
sudo apk add meson g++ vala gtk+3.0-dev gtk-layer-shell-dev gobject-introspection-dev
|
||||
```
|
||||
|
||||
```sh [Ubuntu]
|
||||
```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
|
||||
sudo apt install meson valac libgtk3-dev libgtk-layer-shell-dev gobject-introspection
|
||||
```
|
||||
|
||||
```sh [openSUSE]
|
||||
sudo zypper install gcc meson vala gtk3-devel gtk-layer-shell-devel gobject-introspection-devel
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
3. Build and install with `meson`
|
||||
@@ -64,7 +56,7 @@ meson setup build
|
||||
meson install -C build
|
||||
```
|
||||
|
||||
:::info
|
||||
:::tip
|
||||
Most distros recommend manual installs in `/usr/local`,
|
||||
which is what `meson` defaults to. If you want to install to `/usr`
|
||||
instead which most package managers do, set the `prefix` option:
|
||||
|
||||
@@ -1 +1,96 @@
|
||||
# Apps
|
||||
|
||||
Library and CLI tool for querying and launching
|
||||
applications that have a corresponding `.desktop` file.
|
||||
|
||||
## Installation
|
||||
|
||||
1. install dependencies
|
||||
|
||||
:::code-group
|
||||
|
||||
```sh [<i class="devicon-archlinux-plain"></i> Arch]
|
||||
sudo pacman -Syu meson vala json-glib gobject-introspection
|
||||
```
|
||||
|
||||
```sh [<i class="devicon-fedora-plain"></i> Fedora]
|
||||
sudo dnf install meson gcc valac json-glib-devel gobject-introspection-devel
|
||||
```
|
||||
|
||||
```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
|
||||
sudo apt install meson valac libjson-glib-dev gobject-introspection
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
2. clone repo
|
||||
|
||||
```sh
|
||||
git clone https://github.com/aylur/astal.git
|
||||
cd astal/lib/apps
|
||||
```
|
||||
|
||||
3. clone repo
|
||||
|
||||
```sh
|
||||
meson setup build
|
||||
meson install -C build
|
||||
```
|
||||
|
||||
:::tip
|
||||
Most distros recommend manual installs in `/usr/local`,
|
||||
which is what `meson` defaults to. If you want to install to `/usr`
|
||||
instead which most package managers do, set the `prefix` option:
|
||||
|
||||
```sh
|
||||
meson setup --prefix /usr build
|
||||
meson install -C build
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## Usage
|
||||
|
||||
You can browse the [Apps reference](https://aylur.github.io/libastal/apps).
|
||||
|
||||
### CLI
|
||||
|
||||
```sh
|
||||
astal-apps --help
|
||||
```
|
||||
|
||||
### Library
|
||||
|
||||
:::code-group
|
||||
|
||||
```js [<i class="devicon-javascript-plain"></i> JavaScript]
|
||||
import Apps from "gi://AstalApps"
|
||||
|
||||
const apps = new Apps.Apps({
|
||||
includeEntry: true,
|
||||
includeExecutable: true,
|
||||
})
|
||||
|
||||
print(apps.fuzzy_query("spotify")
|
||||
.map(app => app.name)
|
||||
.join("\n"))
|
||||
```
|
||||
|
||||
```py [<i class="devicon-python-plain"></i> Python]
|
||||
# Not yet documented, contributions are appreciated
|
||||
```
|
||||
|
||||
```lua [<i class="devicon-lua-plain"></i> Lua]
|
||||
-- Not yet documented, contributions are appreciated
|
||||
```
|
||||
|
||||
```vala [<i class="devicon-vala-plain"></i> Vala]
|
||||
// Not yet documented, contributions are appreciated
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::info
|
||||
The fuzzy query uses [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance). I am not a mathematician, but if you know how to reimplement
|
||||
the logic of [fzf](https://github.com/junegunn/fzf) to make it better feel free to open PRs.
|
||||
:::
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# Astal
|
||||
Generated
+8
@@ -5,6 +5,9 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "docs",
|
||||
"dependencies": {
|
||||
"devicon": "^2.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.3.4",
|
||||
"vitepress-plugin-auto-sidebar": "^1.2.0",
|
||||
@@ -1485,6 +1488,11 @@
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/devicon": {
|
||||
"version": "2.16.0",
|
||||
"resolved": "https://registry.npmjs.org/devicon/-/devicon-2.16.0.tgz",
|
||||
"integrity": "sha512-PE5a2HBNeN4av+Iu975OiiWEwS8LJPw5HAvlv0JUHb62jZTdYxTpz4ga+cQyvdtb3x1side2P9Sr1mmOmUkO/g=="
|
||||
},
|
||||
"node_modules/entities": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
||||
|
||||
@@ -11,5 +11,8 @@
|
||||
"build": "vitepress build",
|
||||
"preview": "vitepress preview",
|
||||
"vitepress": "vitepress"
|
||||
},
|
||||
"dependencies": {
|
||||
"devicon": "^2.16.0"
|
||||
}
|
||||
}
|
||||
|
||||
+25
-25
@@ -1,4 +1,4 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import { defineConfig } from "vitepress"
|
||||
|
||||
function github(url = "") {
|
||||
return `https://github.com/aylur/astal${url}`
|
||||
@@ -16,7 +16,7 @@ export default defineConfig({
|
||||
ignoreDeadLinks: true, // FIXME:
|
||||
|
||||
head: [
|
||||
['link', { rel: 'icon', href: '/astal/favicon.ico' }],
|
||||
["link", { rel: "icon", href: "/astal/favicon.ico" }],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
@@ -24,45 +24,45 @@ export default defineConfig({
|
||||
//
|
||||
|
||||
nav: [{
|
||||
text: '0.1.0',
|
||||
text: "0.1.0",
|
||||
items: [
|
||||
{ text: 'Contributing', link: github("/blob/main/CONTRIBUTING.md") },
|
||||
{ text: 'Changelog', link: github("/blob/main/CHANGELOG.md") },
|
||||
{ text: "Contributing", link: github("/blob/main/CONTRIBUTING.md") },
|
||||
{ text: "Changelog", link: github("/blob/main/CHANGELOG.md") },
|
||||
],
|
||||
}],
|
||||
|
||||
sidebar: [
|
||||
{
|
||||
text: 'Getting Started',
|
||||
text: "Getting Started",
|
||||
base: "/getting-started",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: 'Introduction', link: '/introduction' },
|
||||
{ text: 'Installation', link: '/installation' },
|
||||
{ text: 'Supported Languages', link: '/supported-languages' },
|
||||
{ text: "Introduction", link: "/introduction" },
|
||||
{ text: "Installation", link: "/installation" },
|
||||
{ text: "Supported Languages", link: "/supported-languages" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'AGS',
|
||||
text: "AGS",
|
||||
base: "/ags",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: 'Installation', link: '/installation' },
|
||||
{ text: 'First Widgets', link: '/first-widgets' },
|
||||
{ text: 'Theming', link: '/theming' },
|
||||
{ text: 'CLI and App', link: '/cli-app' },
|
||||
{ text: 'Widget', link: '/widget' },
|
||||
{ text: 'Utilities', link: '/utilities' },
|
||||
{ text: 'Variable', link: '/variable' },
|
||||
{ text: 'FAQ', link: '/faq' },
|
||||
{ text: "Installation", link: "/installation" },
|
||||
{ text: "First Widgets", link: "/first-widgets" },
|
||||
{ text: "Theming", link: "/theming" },
|
||||
{ text: "CLI and App", link: "/cli-app" },
|
||||
{ text: "Widget", link: "/widget" },
|
||||
{ text: "Utilities", link: "/utilities" },
|
||||
{ text: "Variable", link: "/variable" },
|
||||
{ text: "FAQ", link: "/faq" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Libraries',
|
||||
text: "Libraries",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'References', link: '/libraries/references' },
|
||||
{ text: "Astal", link: "/libraries/libastal" },
|
||||
{ text: "References", link: "/libraries/references" },
|
||||
{ text: "Astal", link: "https://aylur.github.io/libastal" },
|
||||
{ text: "Apps", link: "/libraries/apps" },
|
||||
{ text: "Auth", link: "/libraries/auth" },
|
||||
{ text: "Battery", link: "/libraries/battery" },
|
||||
@@ -80,17 +80,17 @@ export default defineConfig({
|
||||
],
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: github() },
|
||||
{ icon: 'discord', link: '"https://discord.gg/CXQpHwDuhY"' },
|
||||
{ icon: "github", link: github() },
|
||||
{ icon: "discord", link: "https://discord.gg/CXQpHwDuhY" },
|
||||
],
|
||||
|
||||
editLink: {
|
||||
pattern: github("/edit/main/docs/:path"),
|
||||
text: 'Edit this page on GitHub',
|
||||
text: "Edit this page on GitHub",
|
||||
},
|
||||
|
||||
lastUpdated: {
|
||||
text: 'Last updated',
|
||||
text: "Last updated",
|
||||
},
|
||||
|
||||
search: {
|
||||
|
||||
Reference in New Issue
Block a user