diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/guide/typescript/faq.md | 30 | ||||
-rw-r--r-- | docs/package.json | 2 | ||||
-rw-r--r-- | docs/public/showcase/aylur.png | bin | 3202086 -> 0 bytes | |||
-rw-r--r-- | docs/public/showcase/aylur.webp | bin | 0 -> 59972 bytes | |||
-rw-r--r-- | docs/public/showcase/tokyob0t.webp (renamed from docs/public/showcase/tokyob0t-super-duper-hiper-mega-ultra-contribution.webp) | bin | 122412 -> 122412 bytes | |||
-rw-r--r-- | docs/public/vitepress-logo-large.webp | bin | 33980 -> 0 bytes | |||
-rw-r--r-- | docs/showcases/showcases.ts | 6 |
7 files changed, 34 insertions, 4 deletions
diff --git a/docs/guide/typescript/faq.md b/docs/guide/typescript/faq.md index 1d08824..132900a 100644 --- a/docs/guide/typescript/faq.md +++ b/docs/guide/typescript/faq.md @@ -269,3 +269,33 @@ class MyWidget extends Widget.Box { } } ``` + +## How do I register keybindings? + +If you want global keybindings use your compositor. +Only **focused** windows can capture events. To make a window +focusable set its keymode. + +::: code-group +```tsx [gtk3] +<window + keymode={Astal.Keymode.ON_DEMAND} + onKeyPressEvent={(self, event: Gdk.Event) => { + if (event.get_keyval()[1] === Gdk.KEY_Escape) { + self.hide() + } + }} +/> +``` + +```tsx [gtk4] +<window + keymode={Astal.Keymode.ON_DEMAND} + onKeyPressed={(self, keyval) => { + if (keyval === Gdk.KEY_Escape) { + self.hide() + } + }} +/> +``` +::: diff --git a/docs/package.json b/docs/package.json index ad76c9a..e01b189 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "vue": "^3.4.38" }, "scripts": { - "dev": "vitepress dev", + "dev": "vitepress dev --open", "build": "vitepress build", "preview": "vitepress preview", "vitepress": "vitepress", diff --git a/docs/public/showcase/aylur.png b/docs/public/showcase/aylur.png Binary files differdeleted file mode 100644 index 5dc5dd7..0000000 --- a/docs/public/showcase/aylur.png +++ /dev/null diff --git a/docs/public/showcase/aylur.webp b/docs/public/showcase/aylur.webp Binary files differnew file mode 100644 index 0000000..7f89e04 --- /dev/null +++ b/docs/public/showcase/aylur.webp diff --git a/docs/public/showcase/tokyob0t-super-duper-hiper-mega-ultra-contribution.webp b/docs/public/showcase/tokyob0t.webp Binary files differindex 94f6080..94f6080 100644 --- a/docs/public/showcase/tokyob0t-super-duper-hiper-mega-ultra-contribution.webp +++ b/docs/public/showcase/tokyob0t.webp diff --git a/docs/public/vitepress-logo-large.webp b/docs/public/vitepress-logo-large.webp Binary files differdeleted file mode 100644 index 2e47b15..0000000 --- a/docs/public/vitepress-logo-large.webp +++ /dev/null diff --git a/docs/showcases/showcases.ts b/docs/showcases/showcases.ts index 2aea04a..e207b8a 100644 --- a/docs/showcases/showcases.ts +++ b/docs/showcases/showcases.ts @@ -12,14 +12,14 @@ type Grid<T> = T | [T, T] export default [ { - image: "/astal/showcase/aylur.png", + image: "/astal/showcase/aylur.webp", url: "https://github.com/Aylur/dotfiles", icon: "devicon-typescript-plain", - description: "Placeholder (this is an ags v1 screenshot)", + title: "Marble Shell", author: "Aylur", }, { - image: "/astal/showcase/tokyob0t-super-duper-hiper-mega-ultra-contribution.webp", + image: "/astal/showcase/tokyob0t.webp", url: "https://github.com/tokyob0t/dotfiles", icon: "devicon-lua-plain", title: "Tokyob0t's Desktop", |