Compare commits
275 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10a5c775be | |||
| c38907ec39 | |||
| 1721651319 | |||
| e4692c456c | |||
| 6ee881c7dc | |||
| 2649ee4b56 | |||
| 4024b9e830 | |||
| 11767c3009 | |||
| c2cd216dac | |||
| 5c245f9c35 | |||
| 54fb71eeae | |||
| 44642960ad | |||
| f8b7f00f44 | |||
| 069139641f | |||
| 17689ac0e8 | |||
| 5581267a73 | |||
| e2fd60187a | |||
| 37ff1af0ed | |||
| 37849dee8f | |||
| fe36f97774 | |||
| e9399cf7bb | |||
| c453e7aa90 | |||
| 5c069beb2b | |||
| 0a555e9e5a | |||
| c7e82042af | |||
| c421ea2cb3 | |||
| 84b008e29c | |||
| 007c3d0bf0 | |||
| 8872abecbd | |||
| 841575d4e3 | |||
| befe9696b0 | |||
| 4b12ae2c12 | |||
| 5227e5f05e | |||
| b8098eac8b | |||
| 5b610643c7 | |||
| 4fce8c955c | |||
| eabb972cb8 | |||
| 688b94c3ad | |||
| d4689d66cd | |||
| e28e3e6207 | |||
| b45b3d60d1 | |||
| 8d2e3cea85 | |||
| 8a42f9bfa2 | |||
| 09916ae68e | |||
| 5b5fa9ad4e | |||
| 814b975533 | |||
| d0a450d4e8 | |||
| 786d5c5fe0 | |||
| 5ba2894101 | |||
| 499bf793b2 | |||
| f1c57b8ecc | |||
| 20cc042b64 | |||
| ae9dcaa074 | |||
| 21b68b1e68 | |||
| fa4929a94b | |||
| 6b4d0e22b1 | |||
| d5615892e7 | |||
| 81d0df6023 | |||
| 9cf14d3b55 | |||
| 06325b09b8 | |||
| 539ec34b4c | |||
| 00d4f101fc | |||
| c9a89cf545 | |||
| 7ba9a65f19 | |||
| 52ced69697 | |||
| 47bbdd9f85 | |||
| 94a57be9f7 | |||
| 9d779269eb | |||
| da61dc869d | |||
| e44cc65f1f | |||
| 0392f8fc0f | |||
| 3c76f0412a | |||
| 627c005fe3 | |||
| 6540bda07a | |||
| a9c73ba9d9 | |||
| 30488edaed | |||
| 8ed711d300 | |||
| a8043a9899 | |||
| aa9ebaf22b | |||
| 2314a17066 | |||
| 7051688fa5 | |||
| 0f4f601a2d | |||
| f38e2ff94f | |||
| 50c5cf945d | |||
| 903da245ac | |||
| 2d15296597 | |||
| 3a619cbf92 | |||
| 530022ee59 | |||
| 5c01a5f806 | |||
| b6f5ad9bcf | |||
| 92dc644ee2 | |||
| ddc39f4928 | |||
| a93d7494d3 | |||
| 706cff40b3 | |||
| e35845099a | |||
| c44ef61cf2 | |||
| ef65f827a2 | |||
| 6b8f415703 | |||
| f7004d9f25 | |||
| 58d5b6cf69 | |||
| c55f70b852 | |||
| 97e02d81af | |||
| a545bb0066 | |||
| 35d51f80df | |||
| d638aa0434 | |||
| 258fc61669 | |||
| 6dc15047d4 | |||
| 0725763b95 | |||
| 29b8f188e9 | |||
| 959732ffd1 | |||
| be3497de77 | |||
| 17d83a53b7 | |||
| 122f3ab070 | |||
| 46a732e8f7 | |||
| 3373ae3b8c | |||
| edd2db313c | |||
| ecfd517a4a | |||
| 25419067d4 | |||
| 36faff6b5f | |||
| ffe516175c | |||
| f58f22cadd | |||
| 7e9faff6d6 | |||
| ffa25045e5 | |||
| 66dcd82952 | |||
| 40013a61d1 | |||
| ee26c0c5c2 | |||
| 02a351768f | |||
| 9539f09e83 | |||
| 25a78f126e | |||
| e0c339785d | |||
| e6f57831b1 | |||
| 4e323d932f | |||
| 64d8ca7ab4 | |||
| 7de17aaeb7 | |||
| 4f0c6a45cf | |||
| a2dbdd78d3 | |||
| e4a76c494c | |||
| 1ee3f01883 | |||
| a89ed00a17 | |||
| 64e671119d | |||
| 7b7955ac29 | |||
| 823a8d8fbc | |||
| 088562cd53 | |||
| e9b8c35b52 | |||
| 5a1811979e | |||
| 274890281c | |||
| 0606ec06f5 | |||
| f22f8da68c | |||
| 409078edf9 | |||
| 2840c9aa70 | |||
| f4aedf7b5e | |||
| f51cc0049a | |||
| c01529a599 | |||
| 121f02c785 | |||
| f6cd98e458 | |||
| cc9f38c71c | |||
| 606a1fec1b | |||
| d3bf33a142 | |||
| 91a6566d68 | |||
| ce0d951a54 | |||
| 106fe9cd9e | |||
| a199569aac | |||
| 80d16ab6ff | |||
| 1c8b72867e | |||
| 9d59b24995 | |||
| e78d07b25b | |||
| a2c11e5cd1 | |||
| 70aceee3ca | |||
| 8e6340e4c7 | |||
| 46a4d7628d | |||
| 2ec9356aca | |||
| 3c19159c23 | |||
| f6afd785fd | |||
| e20a33e132 | |||
| 4683a171b9 | |||
| 4189258def | |||
| 2e8f1ec9ae | |||
| 78c97c5d84 | |||
| 4540dc00e7 | |||
| 294d7a9a98 | |||
| 77dd4b4ca8 | |||
| 7394ab63bf | |||
| 7f851fac73 | |||
| a5a6d9a916 | |||
| 3967a4cd5c | |||
| f684f52d8f | |||
| 1079f62c06 | |||
| 1f460ccc38 | |||
| 8b7f15eddf | |||
| 0750c45111 | |||
| 0db1815665 | |||
| d028b027c5 | |||
| e91f5aa5d6 | |||
| 6105341234 | |||
| 6a362a963f | |||
| 9005bd089a | |||
| 1921545d08 | |||
| 05b463699f | |||
| 6f33358f4a | |||
| 909983d069 | |||
| a259206de8 | |||
| 3f058cbfd3 | |||
| 318fc39b61 | |||
| 6b1c8dec58 | |||
| 3541ec68e7 | |||
| 3a3674670b | |||
| b2c6d72a2f | |||
| b9c68535d4 | |||
| ae5226202a | |||
| 580aee4ad5 | |||
| a8bf678d45 | |||
| 73feae1142 | |||
| b26b870bb2 | |||
| 2d3a6ad33f | |||
| ef9439b92c | |||
| c635f3bfa9 | |||
| 7c3eb71150 | |||
| 4fef18041f | |||
| df3384c667 | |||
| 7a97d7425e | |||
| 73ca687358 | |||
| 88441958d9 | |||
| e59af388b1 | |||
| 39da9176ad | |||
| e4ee9c9dc8 | |||
| feef8452f4 | |||
| c3ff5a58d6 | |||
| a005189aef | |||
| e98f5c2bd7 | |||
| e7f6be4291 | |||
| 4fa7dc3c1a | |||
| 2ccb49f24b | |||
| ec04ebee66 | |||
| 2b2f1c2b66 | |||
| 21f7e53b2b | |||
| 5f09b7b915 | |||
| 688013a6b8 | |||
| 4e7c3ceee8 | |||
| 390874374e | |||
| 7f7a755e32 | |||
| ac6b47449a | |||
| ce5f530ed2 | |||
| 62789224a7 | |||
| 0b849bad4f | |||
| 0022880936 | |||
| 1d5240b7c6 | |||
| 0b0e83f505 | |||
| f4cfa20dea | |||
| d866102fcc | |||
| 921373f049 | |||
| 1c39478650 | |||
| a845e086fd | |||
| b363438f6a | |||
| 7d9da82b6c | |||
| c52c5b5a42 | |||
| 97c49f17e6 | |||
| 134519558a | |||
| 9e5ae7db83 | |||
| a31b3481c3 | |||
| 1c757d1173 | |||
| 89b97c4ba1 | |||
| 2ba627a370 | |||
| 995de3617c | |||
| a477078f16 | |||
| f93eeb5d87 | |||
| 5b0e3767bd | |||
| 51962c424b | |||
| a6ce7ccdce | |||
| 0f0e0e8671 | |||
| c6061e0f12 | |||
| cac0e41a2e | |||
| c4797dd592 | |||
| 8986ad894e | |||
| f127ea8a41 | |||
| bb75cfabaf |
43
README.md
43
README.md
@@ -1,4 +1,45 @@
|
|||||||
# janishutz Hyprland
|
<div id="title" align="center">
|
||||||
|
<img src="https://static.janishutz.com/logo.jpg" width="300">
|
||||||
|
<h1>janishutz Hyprland</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Collection of dotfiles for my personal Hyprland setup, running on Arch Linux.
|
||||||
|
Includes a setup and install script (that one is not complete yet though).
|
||||||
|
For my neovim config, see [here](https://git.janishutz.com/janishutz/nvim)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
I am currently working on redoing my keybinds for Hyprland, in what I call `hyprvim`:
|
||||||
|
They are going to use submaps and will be significantly different, yet still familiar.
|
||||||
|
This will enable me to have many more keybinds with reasonable starter bindings.
|
||||||
|
I will also update Astal to have a mode indicator if `hyprvim` is enabled.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- Astal4 based Status Bar and Quick Actions menu
|
||||||
|
- System info
|
||||||
|
- Hyprland info
|
||||||
|
- Date & Time
|
||||||
|
- Bluetooth picker
|
||||||
|
- some networking settings (more coming later)
|
||||||
|
- Audio and brightness control
|
||||||
|
- battery monitoring
|
||||||
|
- Logout, Reboot, Shutdown, etc
|
||||||
|
- Rofi config for App launcher
|
||||||
|
- Wlogout config
|
||||||
|
- Theming script that generates a GTK theme and theming for bar, Hyprland, etc
|
||||||
|
- Fish config (with some handy aliases, based on one from ohh-my-fish)
|
||||||
|
- Fastfetch config
|
||||||
|
- kitty config with cursor trail
|
||||||
|
- Linter configs (currently only eslint, which is not complete yet)
|
||||||
|
- mpv config
|
||||||
|
- zathura configs
|
||||||
|
- yazi configs with links to various directories I use commonly plus a few plugins and themes that are applied by the script
|
||||||
|
- Astal3 based Notifications (due to be migrated to Astal4)
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
Clone your repo to any folder and adapt what you need. Some folders are still hard-coded, which I will be changing later on, so you will likely run into issues.
|
||||||
|
|
||||||
|
You may then run the `setup` script. That won't install all dependencies though. The `install` script is what serves that purpose, but that is not complete yet
|
||||||
|
|
||||||
|
|
||||||
## Setting up to develop
|
## Setting up to develop
|
||||||
|
|||||||
BIN
assets/screenshot.png
Normal file
BIN
assets/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
744
build/eslint.config.mjs
Normal file
744
build/eslint.config.mjs
Normal file
@@ -0,0 +1,744 @@
|
|||||||
|
import eslint from '@eslint/js';
|
||||||
|
import globals from 'globals';
|
||||||
|
import stylistic from '@stylistic/eslint-plugin';
|
||||||
|
import tseslint from 'typescript-eslint';
|
||||||
|
import typescript from '@typescript-eslint/eslint-plugin';
|
||||||
|
import vue from 'eslint-plugin-vue';
|
||||||
|
|
||||||
|
const style = {
|
||||||
|
'plugins': {
|
||||||
|
'@stylistic': stylistic,
|
||||||
|
'@stylistic/js': stylistic,
|
||||||
|
'@stylistic/ts': stylistic
|
||||||
|
},
|
||||||
|
'files': [
|
||||||
|
'**/*.ts',
|
||||||
|
'**/*.js',
|
||||||
|
'**/*.mjs',
|
||||||
|
'**/*.cjs',
|
||||||
|
'**/*.tsx',
|
||||||
|
'**/*.jsx'
|
||||||
|
],
|
||||||
|
'rules': {
|
||||||
|
'sort-imports': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
'ignoreCase': false,
|
||||||
|
'ignoreDeclarationSort': false,
|
||||||
|
'ignoreMemberSort': false,
|
||||||
|
'memberSyntaxSortOrder': [
|
||||||
|
'none',
|
||||||
|
'all',
|
||||||
|
'multiple',
|
||||||
|
'single'
|
||||||
|
],
|
||||||
|
'allowSeparatedGroups': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// Formatting
|
||||||
|
'@stylistic/array-bracket-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'multiline': false,
|
||||||
|
'minItems': 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/array-bracket-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/array-element-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'consistent': false,
|
||||||
|
'multiline': false,
|
||||||
|
'minItems': 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/arrow-parens': [
|
||||||
|
'error',
|
||||||
|
'as-needed'
|
||||||
|
],
|
||||||
|
'@stylistic/arrow-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': true,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/block-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/brace-style': [
|
||||||
|
'error',
|
||||||
|
'1tbs',
|
||||||
|
{
|
||||||
|
'allowSingleLine': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/comma-dangle': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/comma-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': false,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/comma-style': [
|
||||||
|
'error',
|
||||||
|
'last'
|
||||||
|
],
|
||||||
|
'@stylistic/dot-location': [
|
||||||
|
'error',
|
||||||
|
'property'
|
||||||
|
],
|
||||||
|
'@stylistic/function-call-argument-newline': [
|
||||||
|
'error',
|
||||||
|
'consistent'
|
||||||
|
],
|
||||||
|
'@stylistic/function-call-spacing': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/function-paren-newline': [
|
||||||
|
'error',
|
||||||
|
'multiline-arguments'
|
||||||
|
],
|
||||||
|
'@stylistic/implicit-arrow-linebreak': [
|
||||||
|
'error',
|
||||||
|
'beside'
|
||||||
|
],
|
||||||
|
'@stylistic/indent': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'@stylistic/indent-binary-ops': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'@stylistic/key-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'beforeColon': false,
|
||||||
|
'afterColon': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/keyword-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': true,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/lines-between-class-members': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/max-len': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
'code': 140,
|
||||||
|
'comments': 160,
|
||||||
|
'ignoreComments': false,
|
||||||
|
'ignoreUrls': true,
|
||||||
|
'ignoreStrings': true,
|
||||||
|
'ignoreTemplateLiterals': true,
|
||||||
|
'ignoreRegExpLiterals': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/max-statements-per-line': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'max': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/multiline-ternary': [
|
||||||
|
'error',
|
||||||
|
'always-multiline'
|
||||||
|
],
|
||||||
|
'@stylistic/new-parens': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/newline-per-chained-call': 'error',
|
||||||
|
'@stylistic/no-confusing-arrow': 'error',
|
||||||
|
'@stylistic/no-extra-parens': [
|
||||||
|
'error',
|
||||||
|
'all',
|
||||||
|
{
|
||||||
|
'nestedBinaryExpressions': false,
|
||||||
|
'ternaryOperandBinaryExpressions': false,
|
||||||
|
'ignoreJSX': 'multi-line',
|
||||||
|
'nestedConditionalExpressions': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/no-extra-semi': 'error',
|
||||||
|
'@stylistic/no-floating-decimal': 'error',
|
||||||
|
'@stylistic/no-mixed-operators': 'error',
|
||||||
|
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
||||||
|
'@stylistic/no-multi-spaces': 'error',
|
||||||
|
'@stylistic/no-multiple-empty-lines': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'max': 3,
|
||||||
|
'maxEOF': 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/no-tabs': 'error',
|
||||||
|
'@stylistic/no-trailing-spaces': 'error',
|
||||||
|
'@stylistic/no-whitespace-before-property': 'error',
|
||||||
|
'@stylistic/object-curly-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'multiline': true,
|
||||||
|
'minProperties': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/object-curly-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/object-property-newline': 'error',
|
||||||
|
'@stylistic/one-var-declaration-per-line': 'error',
|
||||||
|
'@stylistic/operator-linebreak': [
|
||||||
|
'error',
|
||||||
|
'before'
|
||||||
|
],
|
||||||
|
'@stylistic/padded-blocks': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'blocks': 'never',
|
||||||
|
'classes': 'always',
|
||||||
|
'switches': 'never'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
// Padding lines. The most in-depth part of this config
|
||||||
|
'@stylistic/padding-line-between-statements': [
|
||||||
|
'error',
|
||||||
|
// Variables, Constants
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'var',
|
||||||
|
'next': 'var'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'let',
|
||||||
|
'next': 'let'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'const',
|
||||||
|
'next': 'const'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'var',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'cjs-import',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'import',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'let',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'cjs-import',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'import',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'const',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'cjs-import',
|
||||||
|
'class',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'import',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// Import
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'import',
|
||||||
|
'next': 'import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'cjs-import',
|
||||||
|
'next': 'cjs-import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
],
|
||||||
|
'next': 'cjs-import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'cjs-import',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
],
|
||||||
|
'next': 'import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'import',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// If
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'if'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'if',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// For
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'for'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'for',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// While
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'while'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'while',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Functions
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'function'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'function',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Block Statements
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'block-like'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'block-like',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Switch
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'switch'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'switch',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Try-Catch
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'try'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'try',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Throw
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'throw'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'throw',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Return
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'return',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'return'
|
||||||
|
},
|
||||||
|
// Export
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'export'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'export',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'cjs-export'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'cjs-export',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Classes
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'class'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'class',
|
||||||
|
'next': '*'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/quote-props': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/quotes': [
|
||||||
|
'error',
|
||||||
|
'single'
|
||||||
|
],
|
||||||
|
'@stylistic/rest-spread-spacing': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/semi': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/semi-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': false,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/semi-style': [
|
||||||
|
'error',
|
||||||
|
'last'
|
||||||
|
],
|
||||||
|
'@stylistic/space-before-blocks': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/space-before-function-paren': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/space-in-parens': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/space-infix-ops': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'int32Hint': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/space-unary-ops': 'error',
|
||||||
|
'@stylistic/spaced-comment': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/switch-colon-spacing': 'error',
|
||||||
|
'@stylistic/template-curly-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/template-tag-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/type-generic-spacing': 'error',
|
||||||
|
'@stylistic/type-named-tuple-spacing': 'error',
|
||||||
|
'@stylistic/wrap-iife': [
|
||||||
|
'error',
|
||||||
|
'inside'
|
||||||
|
],
|
||||||
|
'@stylistic/wrap-regex': 'error',
|
||||||
|
'@stylistic/ts/type-annotation-spacing': 'error'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** @type {import('eslint').Linter.Config} */
|
||||||
|
export default tseslint.config(
|
||||||
|
// Base JavaScript rules
|
||||||
|
eslint.configs.recommended,
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
style,
|
||||||
|
|
||||||
|
// Vue support (including TS and JSX inside SFCs)
|
||||||
|
{
|
||||||
|
'files': [ '**/*.vue' ],
|
||||||
|
'languageOptions': {
|
||||||
|
'sourceType': 'module',
|
||||||
|
'ecmaVersion': 'latest',
|
||||||
|
'globals': globals.browser,
|
||||||
|
'parserOptions': {
|
||||||
|
'parser': tseslint.parser
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'plugins': {
|
||||||
|
'vue': vue,
|
||||||
|
'@stylistic': stylistic,
|
||||||
|
'@stylistic/js': stylistic,
|
||||||
|
'@stylistic/ts': stylistic,
|
||||||
|
'@typescript-eslint': typescript
|
||||||
|
},
|
||||||
|
'extends': [
|
||||||
|
eslint.configs.recommended,
|
||||||
|
...vue.configs['flat/recommended']
|
||||||
|
],
|
||||||
|
'rules': {
|
||||||
|
...typescript.configs.recommended.rules,
|
||||||
|
...style.rules,
|
||||||
|
|
||||||
|
// Vue specific rules
|
||||||
|
'@stylistic/indent': 'off',
|
||||||
|
'vue/html-indent': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'vue/html-comment-indent': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'vue/script-indent': [
|
||||||
|
'error',
|
||||||
|
4,
|
||||||
|
{
|
||||||
|
'baseIndent': 1,
|
||||||
|
'switchCase': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'vue/html-self-closing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'html': {
|
||||||
|
'void': 'never',
|
||||||
|
'normal': 'never',
|
||||||
|
'component': 'always'
|
||||||
|
},
|
||||||
|
'svg': 'always',
|
||||||
|
'math': 'never'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'vue/max-attributes-per-line': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'singleline': 3,
|
||||||
|
'multiline': 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
@@ -1,170 +0,0 @@
|
|||||||
const convert = require( 'color-convert' );
|
|
||||||
const fs = require( 'fs' );
|
|
||||||
const path = require( 'path' );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Recursively find all files with extension in a directory
|
|
||||||
* @param {string} dir The directory to search. Either absolute or relative path
|
|
||||||
* @param {string} extension The file extension to look for
|
|
||||||
* @returns {string[]} returns a list of html files with their full path
|
|
||||||
*/
|
|
||||||
const treeWalker = ( dir, extension, ignoreList ) => {
|
|
||||||
const ls = fs.readdirSync( dir );
|
|
||||||
const fileList = [];
|
|
||||||
for ( let file in ls ) {
|
|
||||||
if ( fs.statSync( path.join( dir, ls[ file ] ) ).isDirectory() ) {
|
|
||||||
// Filter ignored directories
|
|
||||||
if ( ignoreList === undefined || !ignoreList.includes( ls[ file ] ) ) {
|
|
||||||
const newFiles = treeWalker( path.join( dir, ls[ file ] ), extension, ignoreList );
|
|
||||||
for (let file = 0; file < newFiles.length; file++) {
|
|
||||||
fileList.push( newFiles[ file ] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if ( extension == '*' || ls[ file ].includes( extension ) ) {
|
|
||||||
if ( ignoreList === undefined || !ignoreList.includes( ls[ file ] ) ) {
|
|
||||||
fileList.push( path.join( dir, ls[ file ] ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return fileList;
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderColourAsHex = ( colour ) => {
|
|
||||||
return '#' + convert.default.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderColourAsRGB = ( colour ) => {
|
|
||||||
return `rgb(${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] })`
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderColourAsRGBA = ( colour, ambiance ) => {
|
|
||||||
return `rgba(${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] }, ${ ambiance })`
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderColourAsRGBHex = ( colour ) => {
|
|
||||||
const hexCol = convert.default.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
|
||||||
return `rgb(${hexCol})`.toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
function decimalToHex(decimal) {
|
|
||||||
const hexValue = Math.round(decimal * 255);
|
|
||||||
return hexValue.toString(16).padStart(2, '0');
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderColourAsRGBAHex = ( colour, ambiance ) => {
|
|
||||||
const hexCol = convert.default.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
|
||||||
return `rgba(${hexCol}${decimalToHex(ambiance)})`.toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
const removeUselessColours = ( palette ) => {
|
|
||||||
const p = [];
|
|
||||||
for ( let i = 0; i < palette.length; i++ ) {
|
|
||||||
const luminance = calculateLuminance( palette[ i ] );
|
|
||||||
if ( luminance < 215 && luminance > 40 ) {
|
|
||||||
p.push( palette[ i ] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
const calculateLuminance = ( colour ) => {
|
|
||||||
return colour[ 0 ] + colour[ 1 ] + colour[ 2 ] / 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Replace the colours with variable names
|
|
||||||
*/
|
|
||||||
const replacements = {
|
|
||||||
'#0f1011': '@bg',
|
|
||||||
'rgba(9, 9, 10, 0.9)': '@bg_rgba_07',
|
|
||||||
'rgba(26, 28, 30, 0.3)': '@bg_rgba_05',
|
|
||||||
'#000': '@bg_accent',
|
|
||||||
'#000000': '@bg_accent',
|
|
||||||
'rgba(0, 0, 0, 0.7)': '@bg_accent_rgba_07',
|
|
||||||
'rgba(0, 0, 0, 0.6)': '@bg_accent_rgba_06',
|
|
||||||
'rgba(0, 0, 0, 0.5)': '@bg_accent_rgba_05',
|
|
||||||
'rgba(0, 0, 0, 0.4)': '@bg_accent_rgba_04',
|
|
||||||
'rgba(0, 0, 0, 0.3)': '@bg_accent_rgba_03',
|
|
||||||
'rgba(0, 0, 0, 0.12)': '@bg_accent_rgba_015',
|
|
||||||
'rgba(0, 0, 0, 0.08)': '@bg_accent_rgba_01',
|
|
||||||
'rgba(9, 9, 10, 0.9)': '@bg_inactive',
|
|
||||||
'#80868b': '@inactive',
|
|
||||||
'rgba(128, 134, 139, 0.7)': '@inactive_rgba_07',
|
|
||||||
'rgba(128, 134, 139, 0.5)': '@inactive_rgba_05',
|
|
||||||
'rgba(128, 134, 139, 0.3)': '@inactive_rgba_03',
|
|
||||||
'rgba(128, 134, 139, 0.2)': '@inactive_rgba_02',
|
|
||||||
// '#555A': '@shadow_rgba',
|
|
||||||
// '#555': '@shadow',
|
|
||||||
'#387db7': '@accent',
|
|
||||||
'rgba(56, 125, 183, 0.5)': '@accent_rgba_05',
|
|
||||||
'rgba(56, 125, 183, 0.32)': '@accent_rgba_03',
|
|
||||||
'rgba(56, 125, 183, 0.24)': '@accent_rgba_02',
|
|
||||||
'rgba(56, 125, 183, 0.16)': '@accent_rgba_015',
|
|
||||||
'rgba(56, 125, 183, 0.12)': '@accent_rgba_011',
|
|
||||||
'rgba(56, 125, 183, 0.08)': '@accent_rgba_007',
|
|
||||||
'#1a1a1b': '@accent_gradient_5',
|
|
||||||
'#1f1f21': '@accent_gradient_4',
|
|
||||||
'#1a2530': '@accent_gradient_3',
|
|
||||||
'#1c2c3b': '@accent_gradient_2',
|
|
||||||
'#1e3040': '@accent_gradient_1',
|
|
||||||
'#4887bd': '@accent_gradient_inverse_1',
|
|
||||||
'#508dc0': '@accent_gradient_inverse_2',
|
|
||||||
'#5892c3': '@accent_gradient_inverse_3',
|
|
||||||
'#673ab7': '@accent2',
|
|
||||||
'rgba(103, 58, 183, 0.12)': '@accent2_rgba_015',
|
|
||||||
'#fff': '@fg_accent',
|
|
||||||
'rgba(255, 255, 255, 0.7)': '@fg_accent_rgba_07',
|
|
||||||
'rgba(255, 255, 255, 0.6)': '@fg_accent_rgba_06',
|
|
||||||
'rgba(255, 255, 255, 0.5)': '@fg_accent_rgba_05',
|
|
||||||
'rgba(255, 255, 255, 0.3)': '@fg_accent_rgba_03',
|
|
||||||
'rgba(255, 255, 255, 0.2)': '@fg_accent_rgba_02',
|
|
||||||
'#9e9e9e': '@fg',
|
|
||||||
'rgba(158, 158, 158, 0.7)': '@fg_rgba_07',
|
|
||||||
'rgba(158, 158, 158, 0.6)': '@fg_rgba_06',
|
|
||||||
'rgba(158, 158, 158, 0.5)': '@fg_rgba_05',
|
|
||||||
'rgba(158, 158, 158, 0.3)': '@fg_rgba_03',
|
|
||||||
'rgba(158, 158, 158, 0.2)': '@fg_rgba_02',
|
|
||||||
'rgba(158, 158, 158, 0.1168)': '@fg_rgba_01'
|
|
||||||
};
|
|
||||||
const themePreProcessor = ( file, replacement, out ) => {
|
|
||||||
const colours = Object.keys( replacements );
|
|
||||||
let data = '' + fs.readFileSync( file );
|
|
||||||
for (let index = 0; index < colours.length; index++) {
|
|
||||||
const colour = colours[index];
|
|
||||||
data = data.replaceAll(colour, replacements[ colour ]);
|
|
||||||
}
|
|
||||||
|
|
||||||
const outPath = file.replace( replacement, out );
|
|
||||||
try {
|
|
||||||
fs.mkdirSync( path.dirname( outPath ), {
|
|
||||||
recursive: true,
|
|
||||||
} );
|
|
||||||
} catch ( e ) {
|
|
||||||
console.error( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
fs.writeFileSync( outPath, data );
|
|
||||||
}
|
|
||||||
|
|
||||||
const getGradientColour = ( colour, index, multiplier ) => {
|
|
||||||
if ( index === 0 ) {
|
|
||||||
return [ colour[ 0 ] * multiplier, colour[ 1 ] * multiplier, colour[ 2 ] * multiplier ];
|
|
||||||
}
|
|
||||||
const gradient = getGradientColour( colour, index - 1, multiplier );
|
|
||||||
return [ Math.min( 255, gradient[ 0 ] * multiplier ), Math.min( 255, gradient[ 1 ] * multiplier ), Math.min( 255, gradient[ 2 ] * multiplier ) ];
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
treeWalker,
|
|
||||||
renderColourAsHex,
|
|
||||||
renderColourAsRGB,
|
|
||||||
renderColourAsRGBA,
|
|
||||||
renderColourAsRGBHex,
|
|
||||||
renderColourAsRGBAHex,
|
|
||||||
themePreProcessor,
|
|
||||||
getGradientColour,
|
|
||||||
removeUselessColours
|
|
||||||
}
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"author": "janishutz",
|
"author": "janishutz",
|
||||||
"type": "commonjs",
|
"type": "module",
|
||||||
"main": "build.js",
|
"main": "build.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
@@ -19,5 +19,12 @@
|
|||||||
"color-convert": "^3.0.1",
|
"color-convert": "^3.0.1",
|
||||||
"inquirer": "^12.5.0",
|
"inquirer": "^12.5.0",
|
||||||
"mustache": "^4.2.0"
|
"mustache": "^4.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.39.2",
|
||||||
|
"@stylistic/eslint-plugin": "^5.7.1",
|
||||||
|
"@types/node": "^25.2.0",
|
||||||
|
"eslint-plugin-vue": "^10.7.0",
|
||||||
|
"typescript-eslint": "^8.54.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,22 @@
|
|||||||
const util = require( './util' );
|
import {
|
||||||
|
Color
|
||||||
|
} from '../types/colours';
|
||||||
|
import {
|
||||||
|
colours
|
||||||
|
} from '../variables/colors';
|
||||||
|
import {
|
||||||
|
fonts
|
||||||
|
} from '../variables/fonts';
|
||||||
|
import {
|
||||||
|
gradientMultipliers
|
||||||
|
} from '../variables/gradients';
|
||||||
|
import {
|
||||||
|
iconTheme
|
||||||
|
} from '../variables/icons';
|
||||||
|
import util from './util';
|
||||||
|
import {
|
||||||
|
yaziThemes
|
||||||
|
} from '../variables/yazi';
|
||||||
|
|
||||||
const renderColourAsRGB = util.renderColourAsRGB;
|
const renderColourAsRGB = util.renderColourAsRGB;
|
||||||
const renderColourAsRGBA = util.renderColourAsRGBA;
|
const renderColourAsRGBA = util.renderColourAsRGBA;
|
||||||
@@ -9,7 +27,7 @@ const renderColourAsHex = util.renderColourAsHex;
|
|||||||
// │ Theme generator (returns theme as object) │
|
// │ Theme generator (returns theme as object) │
|
||||||
// ╰───────────────────────────────────────────────╯
|
// ╰───────────────────────────────────────────────╯
|
||||||
// ───────────────────────────────────────────────────────────────────
|
// ───────────────────────────────────────────────────────────────────
|
||||||
module.exports.generateTheme = ( theme, wallpaper, lockpaper, palette ) => {
|
export const generateTheme = ( theme: string, wallpaper: string, lockpaper: string, palette: Color[] ) => {
|
||||||
return {
|
return {
|
||||||
'wallpaper-path': wallpaper,
|
'wallpaper-path': wallpaper,
|
||||||
'lockpaper-path': lockpaper,
|
'lockpaper-path': lockpaper,
|
||||||
@@ -154,127 +172,6 @@ module.exports.generateTheme = ( theme, wallpaper, lockpaper, palette ) => {
|
|||||||
// ┌ ┐
|
// ┌ ┐
|
||||||
// │ Path to this repo on disk │
|
// │ Path to this repo on disk │
|
||||||
// └ ┘
|
// └ ┘
|
||||||
'path-to-dotfiles': __dirname.slice(0, __dirname.length - 5),
|
'path-to-dotfiles': __dirname.slice( 0, __dirname.length - 5 )
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
// ───────────────────────────────────────────────────────────────────
|
|
||||||
// ╭───────────────────────────────────────────────╮
|
|
||||||
// │ Theme definitions │
|
|
||||||
// ╰───────────────────────────────────────────────╯
|
|
||||||
// ───────────────────────────────────────────────────────────────────
|
|
||||||
const gradientMultipliers = {
|
|
||||||
'nordic': 0.9,
|
|
||||||
'deep-dark': 0.8,
|
|
||||||
'material': 0.85,
|
|
||||||
'light': 1.1,
|
|
||||||
'bright': 1.15,
|
|
||||||
'test': 0.75
|
|
||||||
}
|
|
||||||
const colours = {
|
|
||||||
foreground: {
|
|
||||||
'nordic': [ 200, 220, 255 ],
|
|
||||||
'deep-dark': [ 230, 230, 230 ],
|
|
||||||
'material': [ 255, 255, 255 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 40, 40, 40 ],
|
|
||||||
'bright': [ 0, 0, 0 ],
|
|
||||||
'test': [ 0, 0, 0 ],
|
|
||||||
},
|
|
||||||
'foreground-accent': {
|
|
||||||
'nordic': [ 255, 255, 255 ],
|
|
||||||
'deep-dark': [ 255, 255, 255 ],
|
|
||||||
'material': [ 200, 200, 200 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 0, 0, 0 ],
|
|
||||||
'bright': [ 50, 50, 50 ],
|
|
||||||
'test': [ 0, 0, 0 ],
|
|
||||||
},
|
|
||||||
background: {
|
|
||||||
'nordic': [ 10, 10, 15 ],
|
|
||||||
'deep-dark': [ 20, 20, 20 ],
|
|
||||||
'material': [ 30, 30, 30 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 230, 230, 230 ],
|
|
||||||
'bright': [ 255, 255, 255 ],
|
|
||||||
'test': [ 255, 255, 255 ],
|
|
||||||
},
|
|
||||||
'background-alternative': {
|
|
||||||
'nordic': [ 20, 20, 25 ],
|
|
||||||
'deep-dark': [ 30, 30, 30 ],
|
|
||||||
'material': [ 40, 40, 40 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 210, 210, 210 ],
|
|
||||||
'bright': [ 230, 230, 230 ],
|
|
||||||
'test': [ 255, 255, 0 ] // brown
|
|
||||||
},
|
|
||||||
'background-tertiary': {
|
|
||||||
'nordic': [ 0, 0, 0 ],
|
|
||||||
'deep-dark': [ 45, 45, 45 ],
|
|
||||||
'material': [ 0, 0, 0 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 180, 180, 180 ],
|
|
||||||
'bright': [ 200, 200, 200 ],
|
|
||||||
'test': [ 255, 0, 255 ] // purple
|
|
||||||
},
|
|
||||||
shadow: {
|
|
||||||
'nordic': [ 0, 0, 2 ],
|
|
||||||
'deep-dark': [ 40, 40, 40 ],
|
|
||||||
'material': [ 30, 30, 30 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 190, 190, 190 ],
|
|
||||||
'bright': [ 150, 150, 150 ],
|
|
||||||
'test': [ 120, 0, 0 ] // dark red
|
|
||||||
},
|
|
||||||
inactive: {
|
|
||||||
'nordic': [ 200, 200, 200 ],
|
|
||||||
'deep-dark': [ 200, 200, 200 ],
|
|
||||||
'material': [ 200, 200, 200 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 65, 65, 65 ],
|
|
||||||
'bright': [ 60, 60, 60 ],
|
|
||||||
'test': [ 150, 150, 150 ]
|
|
||||||
},
|
|
||||||
'inactive-background': {
|
|
||||||
'nordic': [ 0, 0, 0 ],
|
|
||||||
'deep-dark': [ 0, 0, 0 ],
|
|
||||||
'material': [ 255, 255, 255 ], // TODO: Will be calculated by material theme generator
|
|
||||||
'light': [ 80, 80, 80 ],
|
|
||||||
'bright': [ 60, 60, 60 ],
|
|
||||||
'test': [ 60, 60, 60 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const fonts = {
|
|
||||||
'primary': {
|
|
||||||
'nordic': 'Comfortaa',
|
|
||||||
'deep-dark': 'Comfortaa',
|
|
||||||
'material': 'Comfortaa',
|
|
||||||
'light': 'Adwaita Sans',
|
|
||||||
'bright': 'Adwaita Sans Extralight'
|
|
||||||
},
|
|
||||||
'accent': {
|
|
||||||
'nordic': 'Adwaita Sans',
|
|
||||||
'deep-dark': 'Adwaita Sans',
|
|
||||||
'material': 'Adwaita Sans',
|
|
||||||
'light': 'Cantarell',
|
|
||||||
'bright': 'Contarell Thin'
|
|
||||||
},
|
|
||||||
'mono': {
|
|
||||||
'nordic': 'Source Code Pro',
|
|
||||||
'deep-dark': 'Source Code Pro',
|
|
||||||
'material': 'Source Code Pro',
|
|
||||||
'light': 'Jetbrains Mono',
|
|
||||||
'bright': 'Jetbrains Mono',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const iconTheme = {
|
|
||||||
'nordic': 'Candy',
|
|
||||||
'deep-dark': 'Candy',
|
|
||||||
'material': 'Candy',
|
|
||||||
'light': 'Candy',
|
|
||||||
'bright': 'Candy'
|
|
||||||
}
|
|
||||||
|
|
||||||
const yaziThemes = {
|
|
||||||
'nordic': 'tokyo-night',
|
|
||||||
'deep-dark': 'vscode-dark-modern',
|
|
||||||
'material': 'dracula',
|
|
||||||
'light': 'vscode-light-modern',
|
|
||||||
'bright': 'vscode-light-modern',
|
|
||||||
}
|
|
||||||
@@ -1,46 +1,66 @@
|
|||||||
const mustache = require( 'mustache' );
|
import chalk from 'chalk';
|
||||||
const colorThief = require( '@janishutz/colorthief' );
|
import colorThief from '@janishutz/colorthief';
|
||||||
const fs = require( 'fs' );
|
import fs from 'fs';
|
||||||
const path = require( 'path' );
|
import inquirer from 'inquirer';
|
||||||
const util = require( './util' );
|
import mustache from 'mustache';
|
||||||
const generateTheme = require( './generateTheme' );
|
import path from 'path';
|
||||||
const chalk = require( 'chalk' ).default;
|
import util from './util';
|
||||||
const inquirer = require( 'inquirer' ).default;
|
|
||||||
|
|
||||||
const build = ( wallpaper, lockpaper, theme ) => {
|
const build = ( wallpaper: string, lockpaper: string, theme: string ) => {
|
||||||
console.log( '\n=> Extracting colours' );
|
console.log( '\n=> Extracting colours' );
|
||||||
// Extract colour palette from chosen wallpaper using Color-Thief
|
// Extract colour palette from chosen wallpaper using Color-Thief
|
||||||
colorThief.getPalette( wallpaper ).then( palette => {
|
colorThief.getPalette( wallpaper, 20 ).then( palette => {
|
||||||
palette = util.removeUselessColours( palette );
|
palette = util.removeUselessColours( palette );
|
||||||
|
|
||||||
// Define view options (for rendering with mustache)
|
// Define view options (for rendering with mustache)
|
||||||
if ( theme === 'test' ) {
|
if ( theme === 'test' ) {
|
||||||
palette = [ [ 255, 0, 0 ], [ 0, 255, 0 ], [ 0, 0, 255 ] ];
|
palette = [
|
||||||
|
[
|
||||||
|
255,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
255,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
255
|
||||||
|
]
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log( 'The following colours will be used based on your wallpaper: ' );
|
console.log( 'The following colours will be used based on your wallpaper: ' );
|
||||||
let col = palette[ 0 ];
|
let col = palette[ 0 ];
|
||||||
|
|
||||||
console.log( ' => Primary accent colour: ' + chalk.rgb( col[ 0 ], col[ 1 ], col[ 2 ] )( util.renderColourAsHex( col ) ) );
|
console.log( ' => Primary accent colour: ' + chalk.rgb( col[ 0 ], col[ 1 ], col[ 2 ] )( util.renderColourAsHex( col ) ) );
|
||||||
col = palette[ 1 ];
|
col = palette[ 1 ];
|
||||||
console.log( ' => Secondary accent colour: ' + chalk.rgb( col[ 0 ], col[ 1 ], col[ 2 ] )( util.renderColourAsHex( col ) ) );
|
console.log( ' => Secondary accent colour: ' + chalk.rgb( col[ 0 ], col[ 1 ], col[ 2 ] )( util.renderColourAsHex( col ) ) );
|
||||||
col = palette[ 2 ];
|
col = palette[ 2 ];
|
||||||
console.log( ' => Tertiary accent colour: ' + chalk.rgb( col[ 0 ], col[ 1 ], col[ 2 ] )( util.renderColourAsHex( col ) ) );
|
console.log( ' => Tertiary accent colour: ' + chalk.rgb( col[ 0 ], col[ 1 ], col[ 2 ] )( util.renderColourAsHex( col ) ) );
|
||||||
|
|
||||||
inquirer.prompt( [{
|
inquirer.prompt( [ {
|
||||||
type: 'confirm',
|
'type': 'confirm',
|
||||||
name: 'confirm-proceed-build',
|
'name': 'confirm-proceed-build',
|
||||||
message: 'Okay to proceed with these colours?'
|
'message': 'Okay to proceed with these colours?'
|
||||||
} ] ).then( answer => {
|
} ] ).then( answer => {
|
||||||
if ( answer ) proceedWithBuild( wallpaper, lockpaper, theme, palette );
|
if ( answer['confirm-proceed-build'] ) proceedWithBuild( wallpaper, lockpaper, theme, palette );
|
||||||
else {
|
else {
|
||||||
// Have the user pick any other of the extracted colours instead
|
// Have the user pick any other of the extracted colours instead
|
||||||
let counter = -1;
|
let counter = -1;
|
||||||
|
|
||||||
const colourOptions = palette.map( c => {
|
const colourOptions = palette.map( c => {
|
||||||
counter++;
|
counter++;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: chalk.rgb( c[ 0 ], c[ 1 ], c[ 2 ] )( util.renderColourAsHex( c ) ),
|
'name': chalk.rgb( c[ 0 ], c[ 1 ], c[ 2 ] )( util.renderColourAsHex( c ) ),
|
||||||
value: counter
|
'value': counter
|
||||||
}
|
};
|
||||||
} )
|
} );
|
||||||
|
|
||||||
inquirer.prompt( [
|
inquirer.prompt( [
|
||||||
{
|
{
|
||||||
'type': 'list',
|
'type': 'list',
|
||||||
@@ -61,24 +81,31 @@ const build = ( wallpaper, lockpaper, theme ) => {
|
|||||||
'name': 'tertiary'
|
'name': 'tertiary'
|
||||||
}
|
}
|
||||||
] ).then( result => {
|
] ).then( result => {
|
||||||
const p = [ palette[ result.primary ], palette[ result.secondary ], palette[ result.tertiary ] ];
|
const p = [
|
||||||
|
palette[ result.primary ],
|
||||||
|
palette[ result.secondary ],
|
||||||
|
palette[ result.tertiary ]
|
||||||
|
];
|
||||||
|
|
||||||
proceedWithBuild( wallpaper, lockpaper, theme, p );
|
proceedWithBuild( wallpaper, lockpaper, theme, p );
|
||||||
} ).catch( e => {
|
} )
|
||||||
|
.catch( e => {
|
||||||
console.error( e );
|
console.error( e );
|
||||||
process.exit( 1 );
|
process.exit( 1 );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
} ).catch( e => {
|
} )
|
||||||
|
.catch( e => {
|
||||||
console.error( e );
|
console.error( e );
|
||||||
process.exit( 1 );
|
process.exit( 1 );
|
||||||
} );
|
} );
|
||||||
} ).catch( e => {
|
} )
|
||||||
|
.catch( e => {
|
||||||
console.error( e );
|
console.error( e );
|
||||||
console.error( '\n=> Failed to load image or retrieve colour palette from it' );
|
console.error( '\n=> Failed to load image or retrieve colour palette from it' );
|
||||||
process.exit( 1 );
|
process.exit( 1 );
|
||||||
} );
|
} );
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
const proceedWithBuild = ( wallpaper, lockpaper, theme, palette ) => {
|
const proceedWithBuild = ( wallpaper, lockpaper, theme, palette ) => {
|
||||||
@@ -92,9 +119,15 @@ const proceedWithBuild = ( wallpaper, lockpaper, theme, palette ) => {
|
|||||||
|
|
||||||
// recursively index files from config directory -> Maybe add a file to each
|
// recursively index files from config directory -> Maybe add a file to each
|
||||||
// directory to indicate whether or not to index files in it?
|
// directory to indicate whether or not to index files in it?
|
||||||
const fileList = util.treeWalker( path.join( __dirname, '/../../renderable/' ), '*', [ 'node_modules', '@girs', '.gitignore', '.git', 'flavours' ] );
|
const fileList = util.treeWalker( path.join( __dirname, '/../../renderable/' ), '*', [
|
||||||
|
'node_modules',
|
||||||
|
'@girs',
|
||||||
|
'.gitignore',
|
||||||
|
'.git',
|
||||||
|
'flavours'
|
||||||
|
] );
|
||||||
|
|
||||||
for (let index = 0; index < fileList.length; index++) {
|
for ( let index = 0; index < fileList.length; index++ ) {
|
||||||
try {
|
try {
|
||||||
render( fileList[ index ], view );
|
render( fileList[ index ], view );
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
@@ -105,7 +138,7 @@ const proceedWithBuild = ( wallpaper, lockpaper, theme, palette ) => {
|
|||||||
util.themePreProcessor( path.join( __dirname, '/../../gtk-theme/src/gtk-4.0/gtk.css' ), 'src', 'dist' );
|
util.themePreProcessor( path.join( __dirname, '/../../gtk-theme/src/gtk-4.0/gtk.css' ), 'src', 'dist' );
|
||||||
util.themePreProcessor( path.join( __dirname, '/../../gtk-theme/src/gtk-3.0/gtk.css' ), 'src', 'dist' );
|
util.themePreProcessor( path.join( __dirname, '/../../gtk-theme/src/gtk-3.0/gtk.css' ), 'src', 'dist' );
|
||||||
render( path.join( __dirname, '/../../gtk-theme/src/colours.css' ), view, 'src', 'dist' );
|
render( path.join( __dirname, '/../../gtk-theme/src/colours.css' ), view, 'src', 'dist' );
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} templatePath - absolute path to config directory
|
* @param {string} templatePath - absolute path to config directory
|
||||||
@@ -118,15 +151,18 @@ const render = ( templatePath, view, originalDir = 'renderable', newDir = 'confi
|
|||||||
// TODO: Make exclusion better plus copy other files maybe?
|
// TODO: Make exclusion better plus copy other files maybe?
|
||||||
const template = '' + fs.readFileSync( templatePath );
|
const template = '' + fs.readFileSync( templatePath );
|
||||||
const outPath = path.join( templatePath.replace( originalDir, newDir ) );
|
const outPath = path.join( templatePath.replace( originalDir, newDir ) );
|
||||||
|
|
||||||
console.log( '=> Rendering to ' + outPath );
|
console.log( '=> Rendering to ' + outPath );
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fs.mkdirSync( path.dirname( outPath ), {
|
fs.mkdirSync( path.dirname( outPath ), {
|
||||||
recursive: true,
|
'recursive': true
|
||||||
} );
|
} );
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
console.error( e );
|
console.error( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync( outPath, mustache.render( template, view ) );
|
fs.writeFileSync( outPath, mustache.render( template, view ) );
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = build;
|
module.exports = build;
|
||||||
150
build/src/helpers/util.ts
Normal file
150
build/src/helpers/util.ts
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
import {
|
||||||
|
Color
|
||||||
|
} from '../types/colours';
|
||||||
|
import convert from 'color-convert';
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
import {
|
||||||
|
replacements
|
||||||
|
} from '../variables/replacements';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively find all files with extension in a directory
|
||||||
|
* @param {string} dir The directory to search. Either absolute or relative path
|
||||||
|
* @param {string} extension The file extension to look for
|
||||||
|
* @returns {string[]} returns a list of html files with their full path
|
||||||
|
*/
|
||||||
|
const treeWalker = ( dir: string, extension: string, ignoreList: string[] ): string[] => {
|
||||||
|
const ls = fs.readdirSync( dir );
|
||||||
|
const fileList = [];
|
||||||
|
|
||||||
|
for ( const file in ls ) {
|
||||||
|
if ( fs.statSync( path.join( dir, ls[ file ] ) ).isDirectory() ) {
|
||||||
|
// Filter ignored directories
|
||||||
|
if ( ignoreList === undefined || !ignoreList.includes( ls[ file ] ) ) {
|
||||||
|
const newFiles = treeWalker( path.join( dir, ls[ file ] ), extension, ignoreList );
|
||||||
|
|
||||||
|
for ( let file = 0; file < newFiles.length; file++ ) {
|
||||||
|
fileList.push( newFiles[ file ] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ( extension == '*' || ls[ file ].includes( extension ) ) {
|
||||||
|
if ( ignoreList === undefined || !ignoreList.includes( ls[ file ] ) ) {
|
||||||
|
fileList.push( path.join( dir, ls[ file ] ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fileList;
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderColourAsHex = ( colour: Color ) => {
|
||||||
|
return '#' + convert.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderColourAsRGB = ( colour: Color ) => {
|
||||||
|
return `rgb(${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] })`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderColourAsRGBA = ( colour: Color, ambiance: number ) => {
|
||||||
|
return `rgba(${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] }, ${ ambiance })`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderColourAsRGBHex = ( colour: Color ) => {
|
||||||
|
const hexCol = convert.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
||||||
|
|
||||||
|
return `rgb(${ hexCol })`.toLowerCase();
|
||||||
|
};
|
||||||
|
|
||||||
|
function decimalToHex ( decimal: number ) {
|
||||||
|
const hexValue = Math.round( decimal * 255 );
|
||||||
|
|
||||||
|
return hexValue.toString( 16 ).padStart( 2, '0' );
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderColourAsRGBAHex = ( colour: Color, ambiance: number ) => {
|
||||||
|
const hexCol = convert.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
||||||
|
|
||||||
|
return `rgba(${ hexCol }${ decimalToHex( ambiance ) })`.toLowerCase();
|
||||||
|
};
|
||||||
|
|
||||||
|
const removeUselessColours = ( palette: Color[] ) => {
|
||||||
|
const p = [];
|
||||||
|
|
||||||
|
for ( let i = 0; i < palette.length; i++ ) {
|
||||||
|
const el = palette[ i ];
|
||||||
|
const luminance = calculateLuminance( palette[ i ] );
|
||||||
|
|
||||||
|
if ( luminance < 210 && luminance > 40 ) {
|
||||||
|
p.push( palette[ i ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( let j = 0; j < el.length; j++ ) {
|
||||||
|
if ( el[j] > 70 ) {
|
||||||
|
p.push( palette[ i ] );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return p;
|
||||||
|
};
|
||||||
|
|
||||||
|
const calculateLuminance = ( colour: Color ) => {
|
||||||
|
return colour[ 0 ] + colour[ 1 ] + ( colour[ 2 ] / 3 );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const themePreProcessor = ( file: string, replacement: string, out: string ) => {
|
||||||
|
const colours = Object.keys( replacements );
|
||||||
|
|
||||||
|
let data = '' + fs.readFileSync( file );
|
||||||
|
|
||||||
|
for ( let index = 0; index < colours.length; index++ ) {
|
||||||
|
const colour = colours[index];
|
||||||
|
|
||||||
|
data = data.replaceAll( colour, replacements[ colour ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
const outPath = file.replace( replacement, out );
|
||||||
|
|
||||||
|
try {
|
||||||
|
fs.mkdirSync( path.dirname( outPath ), {
|
||||||
|
'recursive': true
|
||||||
|
} );
|
||||||
|
} catch ( e ) {
|
||||||
|
console.error( e );
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync( outPath, data );
|
||||||
|
};
|
||||||
|
|
||||||
|
const getGradientColour = ( colour: Color, index: number, multiplier: number ): Color => {
|
||||||
|
if ( index === 0 ) {
|
||||||
|
return [
|
||||||
|
colour[ 0 ] * multiplier,
|
||||||
|
colour[ 1 ] * multiplier,
|
||||||
|
colour[ 2 ] * multiplier
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
const gradient = getGradientColour( colour, index - 1, multiplier );
|
||||||
|
|
||||||
|
return [
|
||||||
|
Math.min( 255, gradient[ 0 ] * multiplier ),
|
||||||
|
Math.min( 255, gradient[ 1 ] * multiplier ),
|
||||||
|
Math.min( 255, gradient[ 2 ] * multiplier )
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
treeWalker,
|
||||||
|
renderColourAsHex,
|
||||||
|
renderColourAsRGB,
|
||||||
|
renderColourAsRGBA,
|
||||||
|
renderColourAsRGBHex,
|
||||||
|
renderColourAsRGBAHex,
|
||||||
|
themePreProcessor,
|
||||||
|
getGradientColour,
|
||||||
|
removeUselessColours
|
||||||
|
};
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
const fs = require( 'fs' );
|
const fs = require( 'fs' );
|
||||||
|
|
||||||
const path = require( 'path' );
|
const path = require( 'path' );
|
||||||
|
|
||||||
const data = '' + fs.readFileSync( '/usr/share/themes/Material-Black-Blueberry/gtk-4.0/gtk.css' );
|
const data = '' + fs.readFileSync( '/usr/share/themes/Material-Black-Blueberry/gtk-4.0/gtk.css' );
|
||||||
|
|
||||||
let lineNumber = 1;
|
let lineNumber = 1;
|
||||||
|
|
||||||
const indexer = {};
|
const indexer = {};
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
|
for ( let i = 0; i < data.length; i++ ) {
|
||||||
const char = data[i];
|
const char = data[i];
|
||||||
|
|
||||||
if ( char === '\n' ) {
|
if ( char === '\n' ) {
|
||||||
@@ -13,17 +16,22 @@ for (let i = 0; i < data.length; i++) {
|
|||||||
} else if ( char === '#' ) {
|
} else if ( char === '#' ) {
|
||||||
const extract = data.substring( i );
|
const extract = data.substring( i );
|
||||||
const col = extract.slice( 0, extract.indexOf( '\n' ) );
|
const col = extract.slice( 0, extract.indexOf( '\n' ) );
|
||||||
|
|
||||||
if ( !indexer[ col ] ) {
|
if ( !indexer[ col ] ) {
|
||||||
indexer[ col ] = [];
|
indexer[ col ] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
indexer[ col ].push( lineNumber );
|
indexer[ col ].push( lineNumber );
|
||||||
} else if ( char === 'r' ) {
|
} else if ( char === 'r' ) {
|
||||||
const extract = data.substring( i );
|
const extract = data.substring( i );
|
||||||
|
|
||||||
if ( extract.slice( 0, 3 ) === 'rgb' ) {
|
if ( extract.slice( 0, 3 ) === 'rgb' ) {
|
||||||
const col = extract.slice( 0, extract.indexOf( '\n' ) );
|
const col = extract.slice( 0, extract.indexOf( '\n' ) );
|
||||||
|
|
||||||
if ( !indexer[ col ] ) {
|
if ( !indexer[ col ] ) {
|
||||||
indexer[ col ] = [];
|
indexer[ col ] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
indexer[ col ].push( lineNumber );
|
indexer[ col ].push( lineNumber );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -32,7 +40,8 @@ for (let i = 0; i < data.length; i++) {
|
|||||||
|
|
||||||
// Output
|
// Output
|
||||||
const keys = Object.keys( indexer );
|
const keys = Object.keys( indexer );
|
||||||
for (let i = 0; i < keys.length; i++) {
|
|
||||||
|
for ( let i = 0; i < keys.length; i++ ) {
|
||||||
const element = keys[i];
|
const element = keys[i];
|
||||||
|
|
||||||
if ( element.length <= 25 ) {
|
if ( element.length <= 25 ) {
|
||||||
1
build/src/types/colours.d.ts
vendored
Normal file
1
build/src/types/colours.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export type Color = number[];
|
||||||
266
build/src/variables/colors.ts
Normal file
266
build/src/variables/colors.ts
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
import {
|
||||||
|
Color
|
||||||
|
} from '../types/colours';
|
||||||
|
|
||||||
|
export const colours: {
|
||||||
|
[key: string]: {
|
||||||
|
[key: string]: Color
|
||||||
|
}
|
||||||
|
} = {
|
||||||
|
'foreground': {
|
||||||
|
'nordic': [
|
||||||
|
200,
|
||||||
|
220,
|
||||||
|
255
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
230,
|
||||||
|
230,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
255,
|
||||||
|
255,
|
||||||
|
255
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
40,
|
||||||
|
40,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'foreground-accent': {
|
||||||
|
'nordic': [
|
||||||
|
255,
|
||||||
|
255,
|
||||||
|
255
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
255,
|
||||||
|
255,
|
||||||
|
255
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
200,
|
||||||
|
200,
|
||||||
|
200
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
50,
|
||||||
|
50,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'background': {
|
||||||
|
'nordic': [
|
||||||
|
10,
|
||||||
|
10,
|
||||||
|
15
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
20,
|
||||||
|
20,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
30,
|
||||||
|
30,
|
||||||
|
30
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
230,
|
||||||
|
230,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
255,
|
||||||
|
255,
|
||||||
|
255
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
255,
|
||||||
|
255,
|
||||||
|
255
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'background-alternative': {
|
||||||
|
'nordic': [
|
||||||
|
20,
|
||||||
|
20,
|
||||||
|
25
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
30,
|
||||||
|
30,
|
||||||
|
30
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
40,
|
||||||
|
40,
|
||||||
|
40
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
210,
|
||||||
|
210,
|
||||||
|
210
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
230,
|
||||||
|
230,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
255,
|
||||||
|
255,
|
||||||
|
0
|
||||||
|
] // brown
|
||||||
|
},
|
||||||
|
'background-tertiary': {
|
||||||
|
'nordic': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
45,
|
||||||
|
45,
|
||||||
|
45
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
180,
|
||||||
|
180,
|
||||||
|
180
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
200,
|
||||||
|
200,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
255,
|
||||||
|
0,
|
||||||
|
255
|
||||||
|
] // purple
|
||||||
|
},
|
||||||
|
'shadow': {
|
||||||
|
'nordic': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
40,
|
||||||
|
40,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
30,
|
||||||
|
30,
|
||||||
|
30
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
190,
|
||||||
|
190,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
150,
|
||||||
|
150,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
120,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
] // dark red
|
||||||
|
},
|
||||||
|
'inactive': {
|
||||||
|
'nordic': [
|
||||||
|
200,
|
||||||
|
200,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
200,
|
||||||
|
200,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
200,
|
||||||
|
200,
|
||||||
|
200
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
65,
|
||||||
|
65,
|
||||||
|
65
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
60,
|
||||||
|
60,
|
||||||
|
60
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
150,
|
||||||
|
150,
|
||||||
|
150
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'inactive-background': {
|
||||||
|
'nordic': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
'deep-dark': [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
'material': [
|
||||||
|
255,
|
||||||
|
255,
|
||||||
|
255
|
||||||
|
], // TODO: Will be calculated by material theme generator
|
||||||
|
'light': [
|
||||||
|
80,
|
||||||
|
80,
|
||||||
|
80
|
||||||
|
],
|
||||||
|
'bright': [
|
||||||
|
60,
|
||||||
|
60,
|
||||||
|
60
|
||||||
|
],
|
||||||
|
'test': [
|
||||||
|
60,
|
||||||
|
60,
|
||||||
|
60
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
27
build/src/variables/fonts.ts
Normal file
27
build/src/variables/fonts.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
export const fonts: {
|
||||||
|
[key: string]: {
|
||||||
|
[key]: string
|
||||||
|
}
|
||||||
|
} = {
|
||||||
|
'primary': {
|
||||||
|
'nordic': 'Comfortaa',
|
||||||
|
'deep-dark': 'Comfortaa',
|
||||||
|
'material': 'Comfortaa',
|
||||||
|
'light': 'Adwaita Sans',
|
||||||
|
'bright': 'Adwaita Sans Extralight'
|
||||||
|
},
|
||||||
|
'accent': {
|
||||||
|
'nordic': 'Adwaita Sans',
|
||||||
|
'deep-dark': 'Adwaita Sans',
|
||||||
|
'material': 'Adwaita Sans',
|
||||||
|
'light': 'Cantarell',
|
||||||
|
'bright': 'Contarell Thin'
|
||||||
|
},
|
||||||
|
'mono': {
|
||||||
|
'nordic': 'Source Code Pro',
|
||||||
|
'deep-dark': 'Source Code Pro',
|
||||||
|
'material': 'Source Code Pro',
|
||||||
|
'light': 'Jetbrains Mono',
|
||||||
|
'bright': 'Jetbrains Mono'
|
||||||
|
}
|
||||||
|
};
|
||||||
10
build/src/variables/gradients.ts
Normal file
10
build/src/variables/gradients.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export const gradientMultipliers: {
|
||||||
|
[key: string]: number
|
||||||
|
} = {
|
||||||
|
'nordic': 0.9,
|
||||||
|
'deep-dark': 0.8,
|
||||||
|
'material': 0.85,
|
||||||
|
'light': 1.1,
|
||||||
|
'bright': 1.15,
|
||||||
|
'test': 0.75
|
||||||
|
};
|
||||||
9
build/src/variables/icons.ts
Normal file
9
build/src/variables/icons.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export const iconTheme: {
|
||||||
|
[key: string]: string
|
||||||
|
} = {
|
||||||
|
'nordic': 'Candy',
|
||||||
|
'deep-dark': 'Candy',
|
||||||
|
'material': 'Candy',
|
||||||
|
'light': 'Candy',
|
||||||
|
'bright': 'Candy'
|
||||||
|
};
|
||||||
56
build/src/variables/replacements.ts
Normal file
56
build/src/variables/replacements.ts
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Replace the colours with variable names
|
||||||
|
*/
|
||||||
|
export const replacements: {
|
||||||
|
[key: string]: string
|
||||||
|
} = {
|
||||||
|
'#0f1011': '@bg',
|
||||||
|
'rgba(9, 9, 10, 0.9)': '@bg_rgba_07',
|
||||||
|
'rgba(26, 28, 30, 0.3)': '@bg_rgba_05',
|
||||||
|
'#000': '@bg_accent',
|
||||||
|
'#000000': '@bg_accent',
|
||||||
|
'rgba(0, 0, 0, 0.7)': '@bg_accent_rgba_07',
|
||||||
|
'rgba(0, 0, 0, 0.6)': '@bg_accent_rgba_06',
|
||||||
|
'rgba(0, 0, 0, 0.5)': '@bg_accent_rgba_05',
|
||||||
|
'rgba(0, 0, 0, 0.4)': '@bg_accent_rgba_04',
|
||||||
|
'rgba(0, 0, 0, 0.3)': '@bg_accent_rgba_03',
|
||||||
|
'rgba(0, 0, 0, 0.12)': '@bg_accent_rgba_015',
|
||||||
|
'rgba(0, 0, 0, 0.08)': '@bg_accent_rgba_01',
|
||||||
|
'#80868b': '@inactive',
|
||||||
|
'rgba(128, 134, 139, 0.7)': '@inactive_rgba_07',
|
||||||
|
'rgba(128, 134, 139, 0.5)': '@inactive_rgba_05',
|
||||||
|
'rgba(128, 134, 139, 0.3)': '@inactive_rgba_03',
|
||||||
|
'rgba(128, 134, 139, 0.2)': '@inactive_rgba_02',
|
||||||
|
// '#555A': '@shadow_rgba',
|
||||||
|
// '#555': '@shadow',
|
||||||
|
'#387db7': '@accent',
|
||||||
|
'rgba(56, 125, 183, 0.5)': '@accent_rgba_05',
|
||||||
|
'rgba(56, 125, 183, 0.32)': '@accent_rgba_03',
|
||||||
|
'rgba(56, 125, 183, 0.24)': '@accent_rgba_02',
|
||||||
|
'rgba(56, 125, 183, 0.16)': '@accent_rgba_015',
|
||||||
|
'rgba(56, 125, 183, 0.12)': '@accent_rgba_011',
|
||||||
|
'rgba(56, 125, 183, 0.08)': '@accent_rgba_007',
|
||||||
|
'#1a1a1b': '@accent_gradient_5',
|
||||||
|
'#1f1f21': '@accent_gradient_4',
|
||||||
|
'#1a2530': '@accent_gradient_3',
|
||||||
|
'#1c2c3b': '@accent_gradient_2',
|
||||||
|
'#1e3040': '@accent_gradient_1',
|
||||||
|
'#4887bd': '@accent_gradient_inverse_1',
|
||||||
|
'#508dc0': '@accent_gradient_inverse_2',
|
||||||
|
'#5892c3': '@accent_gradient_inverse_3',
|
||||||
|
'#673ab7': '@accent2',
|
||||||
|
'rgba(103, 58, 183, 0.12)': '@accent2_rgba_015',
|
||||||
|
'#fff': '@fg_accent',
|
||||||
|
'rgba(255, 255, 255, 0.7)': '@fg_accent_rgba_07',
|
||||||
|
'rgba(255, 255, 255, 0.6)': '@fg_accent_rgba_06',
|
||||||
|
'rgba(255, 255, 255, 0.5)': '@fg_accent_rgba_05',
|
||||||
|
'rgba(255, 255, 255, 0.3)': '@fg_accent_rgba_03',
|
||||||
|
'rgba(255, 255, 255, 0.2)': '@fg_accent_rgba_02',
|
||||||
|
'#9e9e9e': '@fg',
|
||||||
|
'rgba(158, 158, 158, 0.7)': '@fg_rgba_07',
|
||||||
|
'rgba(158, 158, 158, 0.6)': '@fg_rgba_06',
|
||||||
|
'rgba(158, 158, 158, 0.5)': '@fg_rgba_05',
|
||||||
|
'rgba(158, 158, 158, 0.3)': '@fg_rgba_03',
|
||||||
|
'rgba(158, 158, 158, 0.2)': '@fg_rgba_02',
|
||||||
|
'rgba(158, 158, 158, 0.1168)': '@fg_rgba_01'
|
||||||
|
};
|
||||||
9
build/src/variables/yazi.ts
Normal file
9
build/src/variables/yazi.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export const yaziThemes: {
|
||||||
|
[key: string]: string
|
||||||
|
} = {
|
||||||
|
'nordic': 'tokyo-night',
|
||||||
|
'deep-dark': 'vscode-dark-modern',
|
||||||
|
'material': 'dracula',
|
||||||
|
'light': 'vscode-light-modern',
|
||||||
|
'bright': 'vscode-light-modern'
|
||||||
|
};
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"gen": {
|
|
||||||
"overrides": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { App } from "astal/gtk4"
|
|
||||||
import style from "./style.scss"
|
|
||||||
import Bar from "./ui/Launcher"
|
|
||||||
|
|
||||||
App.start({
|
|
||||||
css: style,
|
|
||||||
main() {
|
|
||||||
App.get_monitors().map(Bar)
|
|
||||||
},
|
|
||||||
requestHandler(request, res) {
|
|
||||||
if ( request === 'open' ) {
|
|
||||||
res( 'ok' );
|
|
||||||
} else if ( request === 'close' ) {
|
|
||||||
res( 'ok' );
|
|
||||||
} else if ( request === 'toggle' ) {
|
|
||||||
res( 'ok' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
75
config/ags/launcher/definitions/components.d.ts
vendored
75
config/ags/launcher/definitions/components.d.ts
vendored
@@ -1,75 +0,0 @@
|
|||||||
/*
|
|
||||||
* dotfiles - components.d.ts
|
|
||||||
*
|
|
||||||
* Created by Janis Hutz 03/22/2025, Licensed under the GPL V3 License
|
|
||||||
* https://janishutz.com, development@janishutz.com
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import type { UIComponent, ResultElement } from "./rendering";
|
|
||||||
|
|
||||||
|
|
||||||
export interface App extends ResultElement {
|
|
||||||
/**
|
|
||||||
* The app start command that will be executed
|
|
||||||
*/
|
|
||||||
command: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Finish
|
|
||||||
export interface DictionaryEntry extends ResultElement {
|
|
||||||
/**
|
|
||||||
* Execute no command
|
|
||||||
*/
|
|
||||||
action: null;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The dictionary definition
|
|
||||||
*/
|
|
||||||
definition: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CMDOutput extends ResultElement {
|
|
||||||
/**
|
|
||||||
* Stdout from the command that was run
|
|
||||||
*/
|
|
||||||
result: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Calculation extends ResultElement {
|
|
||||||
/**
|
|
||||||
* THe calculation result
|
|
||||||
*/
|
|
||||||
result: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ************* *
|
|
||||||
* UI Components *
|
|
||||||
* ************* */
|
|
||||||
|
|
||||||
export interface LargeUIComponent extends UIComponent {
|
|
||||||
/**
|
|
||||||
* The number of items to display per line. Image size will automatically be scaled
|
|
||||||
* based on width
|
|
||||||
*/
|
|
||||||
itemsPerLine: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MediumUIComponent extends UIComponent {}
|
|
||||||
|
|
||||||
export interface ListUIComponent extends UIComponent {}
|
|
||||||
|
|
||||||
export interface DictionaryUIComponent extends UIComponent {
|
|
||||||
elements: DictionaryEntry[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CMDOutputUIComponent extends UIComponent {
|
|
||||||
elements: CMDOutput[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CalculationUIComponent extends UIComponent {
|
|
||||||
elements: Calculation[];
|
|
||||||
}
|
|
||||||
60
config/ags/launcher/definitions/rendering.d.ts
vendored
60
config/ags/launcher/definitions/rendering.d.ts
vendored
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* dotfiles - rendering.d.ts
|
|
||||||
*
|
|
||||||
* Created by Janis Hutz 03/22/2025, Licensed under the GPL V3 License
|
|
||||||
* https://janishutz.com, development@janishutz.com
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface UIComponent {
|
|
||||||
/**
|
|
||||||
* The title of the component (like a category name), shown above small divider line
|
|
||||||
*/
|
|
||||||
title: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ResultElement list, made up of all elements that should be shown
|
|
||||||
*/
|
|
||||||
elements: ResultElement[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Choose how many elements to show before truncating (will expand when command is run)
|
|
||||||
*/
|
|
||||||
truncate: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The weight of the element (determines order)
|
|
||||||
*/
|
|
||||||
weight: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface ResultElement {
|
|
||||||
/**
|
|
||||||
* The name of the result element
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Path to the image to be displayed in the UI
|
|
||||||
*/
|
|
||||||
img: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The weight of the element (determines order)
|
|
||||||
*/
|
|
||||||
weight: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The action to be executed
|
|
||||||
*/
|
|
||||||
action: Action;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The font size of the text (optional)
|
|
||||||
*/
|
|
||||||
fontSize: number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
type Action = '' | null;
|
|
||||||
32
config/ags/launcher/helpers/fzf/dist/fzf.js
vendored
32
config/ags/launcher/helpers/fzf/dist/fzf.js
vendored
@@ -1,32 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const fast_fuzzy_1 = require("fast-fuzzy");
|
|
||||||
const fs_1 = __importDefault(require("fs"));
|
|
||||||
// Get list source from args
|
|
||||||
// ARGS: type source
|
|
||||||
// Then we read query from stdin to not restart indexing & the like for each keystroke
|
|
||||||
let data = [];
|
|
||||||
if (process.argv[2] === 'fs') {
|
|
||||||
if (process.argv[3].includes('.json')) {
|
|
||||||
data = JSON.parse('' + fs_1.default.readFileSync(process.argv[3]));
|
|
||||||
}
|
|
||||||
else if (process.argv[3].includes('.txt')) {
|
|
||||||
data = ('' + fs_1.default.readFileSync(process.argv[3])).split(',');
|
|
||||||
}
|
|
||||||
else if (fs_1.default.statSync(process.argv[3]).isDirectory()) {
|
|
||||||
data = fs_1.default.readdirSync(process.argv[3]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (process.argv[2] === 'arg') {
|
|
||||||
data = process.argv[3].split(',');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new Error('Invalid argument at position 1. Can be either fs or arg, not ' + process.argv[2]);
|
|
||||||
}
|
|
||||||
process.stdin.on("data", (query) => {
|
|
||||||
// On stdin submit (which the other client will have to support) process data
|
|
||||||
console.log((0, fast_fuzzy_1.search)(query.toString(), data));
|
|
||||||
});
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "fzf",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"author": "",
|
|
||||||
"type": "commonjs",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "^22.14.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"fast-fuzzy": "^1.12.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { search } from 'fast-fuzzy';
|
|
||||||
import fs from 'fs';
|
|
||||||
|
|
||||||
// Get list source from args
|
|
||||||
// ARGS: type source
|
|
||||||
// Then we read query from stdin to not restart indexing & the like for each keystroke
|
|
||||||
|
|
||||||
let data: string[] = [];
|
|
||||||
if ( process.argv[ 2 ] === 'fs' ) {
|
|
||||||
if ( process.argv[ 3 ].includes( '.json' ) ) {
|
|
||||||
data = JSON.parse( '' + fs.readFileSync( process.argv[ 3 ] ) );
|
|
||||||
} else if ( process.argv[ 3 ].includes( '.txt' ) ) {
|
|
||||||
data = ( '' + fs.readFileSync( process.argv[ 3 ] ) ).split( ',' );
|
|
||||||
} else if ( fs.statSync( process.argv[ 3 ] ).isDirectory() ) {
|
|
||||||
data = fs.readdirSync( process.argv[ 3 ] );
|
|
||||||
}
|
|
||||||
} else if ( process.argv[ 2 ] === 'arg' ) {
|
|
||||||
data = process.argv[ 3 ].split( ',' );
|
|
||||||
} else {
|
|
||||||
throw new Error( 'Invalid argument at position 1. Can be either fs or arg, not ' + process.argv[ 2 ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
process.stdin.on( "data", ( query ) => {
|
|
||||||
// On stdin submit (which the other client will have to support) process data
|
|
||||||
|
|
||||||
console.log( search( query.toString(), data ) );
|
|
||||||
} );
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "./dist",
|
|
||||||
"allowJs": true,
|
|
||||||
"target": "ES6",
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"types": ["node"],
|
|
||||||
"module": "NodeNext",
|
|
||||||
"moduleResolution": "NodeNext"
|
|
||||||
},
|
|
||||||
"include": [ "./src/**/*" ],
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss
|
|
||||||
$fg-color: #{"@theme_fg_color"};
|
|
||||||
$bg-color: #{"@theme_bg_color"};
|
|
||||||
|
|
||||||
window.Bar {
|
|
||||||
background: transparent;
|
|
||||||
color: $fg-color;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
>centerbox {
|
|
||||||
background: $bg-color;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border-radius: 8px;
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import { App, Astal, Gtk, Gdk } from "astal/gtk4"
|
|
||||||
import { Variable } from "astal"
|
|
||||||
|
|
||||||
function hide() {
|
|
||||||
App.get_window("launcher")!.hide()
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Launcher(monitor: Gdk.Monitor) {
|
|
||||||
const { CENTER } = Gtk.Align
|
|
||||||
const width = Variable(1000)
|
|
||||||
|
|
||||||
const text = Variable("")
|
|
||||||
|
|
||||||
return <window
|
|
||||||
name="launcher"
|
|
||||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.BOTTOM}
|
|
||||||
exclusivity={Astal.Exclusivity.IGNORE}
|
|
||||||
keymode={Astal.Keymode.ON_DEMAND}
|
|
||||||
application={App}
|
|
||||||
onShow={(self) => {
|
|
||||||
text.set("")
|
|
||||||
width.set(self.get_current_monitor().get_width_mm())
|
|
||||||
}}
|
|
||||||
onKeyPressed={(self, keyval, keycode) => {
|
|
||||||
print( 'key pressed: ' + keyval + ' which has code ' + keycode );
|
|
||||||
}}>
|
|
||||||
<box>
|
|
||||||
|
|
||||||
</box>
|
|
||||||
|
|
||||||
</window>
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export default () => {
|
|
||||||
return <box></box>
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
* dotfiles - file.ts
|
|
||||||
*
|
|
||||||
* Created by Janis Hutz 03/22/2025, Licensed under the GPL V3 License
|
|
||||||
* https://janishutz.com, development@janishutz.com
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { readFileAsync, writeFileAsync, monitorFile } from "astal";
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* dotfiles - fzf.ts
|
|
||||||
*
|
|
||||||
* Created by Janis Hutz 03/30/2025, Licensed under the GPL V3 License
|
|
||||||
* https://janishutz.com, development@janishutz.com
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import AstalApps from "gi://AstalApps?version=0.1"
|
|
||||||
|
|
||||||
// TODO: For all astal apps, read a global colours config file
|
|
||||||
const fzfApplication = ( query: string ) => {
|
|
||||||
const apps = new AstalApps.Apps()
|
|
||||||
return apps.fuzzy_query( query );
|
|
||||||
}
|
|
||||||
|
|
||||||
const fzfCmd = ( query: string ) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
fzfApplication
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* dotfiles - search.ts
|
|
||||||
*
|
|
||||||
* Created by Janis Hutz 03/22/2025, Licensed under the GPL V3 License
|
|
||||||
* https://janishutz.com, development@janishutz.com
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import subprocessRunner from "./subprocessRunner";
|
|
||||||
import fzf from "./fzf";
|
|
||||||
|
|
||||||
const preprocess = ( input: string ) => {
|
|
||||||
// Find out what kind of instruction to process
|
|
||||||
if ( input.startsWith( ':' ) ) {
|
|
||||||
processCommand( input.substring( 1, input.indexOf( ' ' ) ), input.substring( input.indexOf( ' ' ) ).split( ' ' ) );
|
|
||||||
} else if ( input.startsWith( '!' ) ) {
|
|
||||||
processBang( input.substring( 1, input.indexOf( ' ' ) ), input.substring( input.indexOf( ' ' ) ) );
|
|
||||||
} else {
|
|
||||||
// Determine if entered string is calculation or not
|
|
||||||
// We can easily do that by asking qalc (qalculate cli) if this is fine
|
|
||||||
subprocessRunner.executeCommand( 'qalc "' + input + '"' ).then( out => {
|
|
||||||
// we get a calculation result here
|
|
||||||
print( out );
|
|
||||||
processCalculation( out );
|
|
||||||
} ).catch( err => {
|
|
||||||
processSearch( input );
|
|
||||||
print( err );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const processSearch = ( input: string ) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const processCalculation = ( output: string ) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const processCommand = ( cmd: string, args: string[] ) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const processBang = ( bang: string, input: string ) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
preprocess
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* dotfiles - subprocessRunner.ts
|
|
||||||
*
|
|
||||||
* Created by Janis Hutz 03/22/2025, Licensed under the GPL V3 License
|
|
||||||
* https://janishutz.com, development@janishutz.com
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { subprocess, execAsync, Process } from "astal/process";
|
|
||||||
|
|
||||||
// TODO: Get cwd and the likes to then use that to run JavaScript files with node / python with python, etc
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run a subprocess. If you simply want to run a command that doesn't need continuous updates
|
|
||||||
* run executeCommand instead.
|
|
||||||
* @param cmd - The command to be run
|
|
||||||
* @param onOut - Calback function for stdout of the subprocess
|
|
||||||
* @param onErr - [TODO:description]
|
|
||||||
* @returns [TODO:return]
|
|
||||||
*/
|
|
||||||
const startSubProcess = (
|
|
||||||
cmd: string | string[],
|
|
||||||
onOut: (stdout: string) => void,
|
|
||||||
onErr: (stderr: string) => void | undefined,
|
|
||||||
): Process => {
|
|
||||||
return subprocess( cmd, onOut, onErr );
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run a command. If you need continuous updates, run startSubProcess instead
|
|
||||||
* @param cmd - The command to be run. Either a string or an array of strings
|
|
||||||
* @returns A Promise resolving to stdout of the command
|
|
||||||
*/
|
|
||||||
const executeCommand = (cmd: string | string[]): Promise<string> => {
|
|
||||||
return execAsync( cmd );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
|
||||||
startSubProcess,
|
|
||||||
executeCommand
|
|
||||||
}
|
|
||||||
2
config/ags/notifications/.gitignore
vendored
2
config/ags/notifications/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
node_modules/
|
|
||||||
@girs/
|
|
||||||
21
config/ags/notifications/env.d.ts
vendored
21
config/ags/notifications/env.d.ts
vendored
@@ -1,21 +0,0 @@
|
|||||||
declare const SRC: string
|
|
||||||
|
|
||||||
declare module "inline:*" {
|
|
||||||
const content: string
|
|
||||||
export default content
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module "*.scss" {
|
|
||||||
const content: string
|
|
||||||
export default content
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module "*.blp" {
|
|
||||||
const content: string
|
|
||||||
export default content
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module "*.css" {
|
|
||||||
const content: string
|
|
||||||
export default content
|
|
||||||
}
|
|
||||||
2
config/astal/.gitignore
vendored
2
config/astal/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
node_modules/
|
|
||||||
@girs/
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
import { exec } from "astal";
|
|
||||||
import { Gtk } from "astal/gtk4";
|
|
||||||
|
|
||||||
const PowerMenu = (): Gtk.Popover => {
|
|
||||||
const popover = new Gtk.Popover({ cssClasses: ["PowerMenu"] });
|
|
||||||
|
|
||||||
const powerMenuBox = () => {
|
|
||||||
return (
|
|
||||||
<box>
|
|
||||||
<button
|
|
||||||
cssClasses={["power-button"]}
|
|
||||||
child={
|
|
||||||
<image iconName={"system-shutdown-symbolic"}></image>
|
|
||||||
}
|
|
||||||
onClicked={() => exec("/bin/sh -c 'shutdown now'")}
|
|
||||||
></button>
|
|
||||||
<button
|
|
||||||
cssClasses={["power-button"]}
|
|
||||||
child={<image iconName={"system-reboot-symbolic"}></image>}
|
|
||||||
onClicked={() => exec("/bin/sh -c 'reboot'")}
|
|
||||||
></button>
|
|
||||||
<button
|
|
||||||
cssClasses={["power-button"]}
|
|
||||||
child={<image iconName={"system-suspend-symbolic"}></image>}
|
|
||||||
onClicked={() => exec("/bin/sh -c 'systemctl suspend'")}
|
|
||||||
></button>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
popover.set_child(powerMenuBox());
|
|
||||||
return popover;
|
|
||||||
};
|
|
||||||
|
|
||||||
const Power = () => {
|
|
||||||
const pm = PowerMenu();
|
|
||||||
return (
|
|
||||||
<button
|
|
||||||
widthRequest={0}
|
|
||||||
hexpand={false}
|
|
||||||
vexpand={false}
|
|
||||||
cssClasses={["power-menu-button"]}
|
|
||||||
child={
|
|
||||||
<box>
|
|
||||||
<image iconName={"system-shutdown-symbolic"}></image>
|
|
||||||
{pm}
|
|
||||||
</box>
|
|
||||||
}
|
|
||||||
onClicked={() => pm.popup()}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const UserMenu = (): Gtk.Popover => {
|
|
||||||
const popover = new Gtk.Popover();
|
|
||||||
|
|
||||||
const powerMenuBox = () => {
|
|
||||||
return (
|
|
||||||
<box>
|
|
||||||
<button
|
|
||||||
cssClasses={["power-button"]}
|
|
||||||
child={
|
|
||||||
<image iconName={"system-lock-screen-symbolic"}></image>
|
|
||||||
}
|
|
||||||
onClicked={() => exec("/bin/sh -c 'hyprlock'")}
|
|
||||||
></button>
|
|
||||||
<button
|
|
||||||
cssClasses={["power-button"]}
|
|
||||||
child={<image iconName={"system-log-out-symbolic"}></image>}
|
|
||||||
onClicked={() =>
|
|
||||||
exec("/bin/sh -c 'hyprctl dispatch exit 0'")
|
|
||||||
}
|
|
||||||
></button>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
popover.set_child(powerMenuBox());
|
|
||||||
return popover;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
Power,
|
|
||||||
UserMenu
|
|
||||||
};
|
|
||||||
@@ -1,143 +0,0 @@
|
|||||||
import AstalTray from "gi://AstalTray";
|
|
||||||
import { bind, GObject } from "astal";
|
|
||||||
import AstalHyprland from "gi://AstalHyprland";
|
|
||||||
import { Gtk } from "astal/gtk4";
|
|
||||||
|
|
||||||
const hypr = AstalHyprland.get_default();
|
|
||||||
const SYNC = GObject.BindingFlags.SYNC_CREATE;
|
|
||||||
|
|
||||||
const SysTray = () => {
|
|
||||||
const trayBox = new Gtk.Box({ cssClasses: ["bar-button"] });
|
|
||||||
const tray = AstalTray.get_default();
|
|
||||||
|
|
||||||
const trayItems = new Map<string, Gtk.MenuButton>();
|
|
||||||
const trayAddedHandler = tray.connect("item-added", (_, id) => {
|
|
||||||
const item = tray.get_item(id);
|
|
||||||
const popover = Gtk.PopoverMenu.new_from_model(item.menu_model);
|
|
||||||
const icon = new Gtk.Image();
|
|
||||||
const button = new Gtk.MenuButton({
|
|
||||||
popover,
|
|
||||||
child: icon,
|
|
||||||
cssClasses: ["tray-item"],
|
|
||||||
});
|
|
||||||
|
|
||||||
item.bind_property("gicon", icon, "gicon", SYNC);
|
|
||||||
popover.insert_action_group("dbusmenu", item.action_group);
|
|
||||||
item.connect("notify::action-group", () => {
|
|
||||||
popover.insert_action_group("dbusmenu", item.action_group);
|
|
||||||
});
|
|
||||||
|
|
||||||
trayItems.set(id, button);
|
|
||||||
trayBox.append(button);
|
|
||||||
});
|
|
||||||
|
|
||||||
const trayRemovedHandler = tray.connect("item-removed", (_, id) => {
|
|
||||||
const button = trayItems.get(id);
|
|
||||||
if (button) {
|
|
||||||
trayBox.remove(button);
|
|
||||||
button.run_dispose();
|
|
||||||
trayItems.delete(id);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
trayBox.connect("destroy", () => {
|
|
||||||
tray.disconnect(trayAddedHandler);
|
|
||||||
tray.disconnect(trayRemovedHandler);
|
|
||||||
});
|
|
||||||
|
|
||||||
return trayBox;
|
|
||||||
};
|
|
||||||
|
|
||||||
const Workspace = () => {
|
|
||||||
return (
|
|
||||||
<box>
|
|
||||||
{bind(hypr, "workspaces").as(wss =>
|
|
||||||
wss
|
|
||||||
.filter(ws => !(ws.id >= -99 && ws.id <= -2)) // filter out special workspaces
|
|
||||||
.sort((a, b) => a.id - b.id)
|
|
||||||
.map(ws => (
|
|
||||||
<button
|
|
||||||
cssClasses={bind(hypr, "focusedWorkspace").as(fw =>
|
|
||||||
ws === fw
|
|
||||||
? [
|
|
||||||
"focused-workspace-button",
|
|
||||||
"workspace-button",
|
|
||||||
]
|
|
||||||
: ["workspace-button"],
|
|
||||||
)}
|
|
||||||
onButtonPressed={() => ws.focus()}
|
|
||||||
child={<label label={String(ws.id)}></label>}
|
|
||||||
></button>
|
|
||||||
)),
|
|
||||||
)}
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Displays the name of the currently active window and provides a popover for
|
|
||||||
* displaying all available clients
|
|
||||||
*/
|
|
||||||
const ActiveWindow = () => {
|
|
||||||
const focused = bind(hypr, "focusedClient");
|
|
||||||
|
|
||||||
const WindowPopover = (): Gtk.Popover => {
|
|
||||||
// Set up boxes + Popover
|
|
||||||
const popover = new Gtk.Popover();
|
|
||||||
|
|
||||||
const popoverBox = WindowPopoverBox();
|
|
||||||
|
|
||||||
popover.set_child(popoverBox);
|
|
||||||
return popover;
|
|
||||||
};
|
|
||||||
|
|
||||||
const windowPopover = WindowPopover();
|
|
||||||
|
|
||||||
// ───────────────────────────────────────────────────────────────────
|
|
||||||
// Return fully assembled HyprlandFocusedClient box
|
|
||||||
// ───────────────────────────────────────────────────────────────────
|
|
||||||
return (
|
|
||||||
<box visible={focused.as(Boolean)}>
|
|
||||||
<button
|
|
||||||
onClicked={() => windowPopover.popup()}
|
|
||||||
cssClasses={["bar-button"]}
|
|
||||||
child={
|
|
||||||
focused.as(
|
|
||||||
client =>
|
|
||||||
client && (
|
|
||||||
<label label={bind(client, "title").as(String)} />
|
|
||||||
),
|
|
||||||
)
|
|
||||||
}></button>
|
|
||||||
{windowPopover}
|
|
||||||
</box >
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const WindowPopoverBox = () => {
|
|
||||||
return <box vertical>
|
|
||||||
<label label={"Available Windows"} cssClasses={['title-2']}></label>
|
|
||||||
<Gtk.Separator marginTop={5} marginBottom={5}></Gtk.Separator>
|
|
||||||
<box vertical>
|
|
||||||
{bind(hypr, 'clients').as(clients => {
|
|
||||||
return clients.map(client => {
|
|
||||||
return <button child={
|
|
||||||
<box>
|
|
||||||
<label label={bind(client, 'workspace').as(w => `(WS ${w.name})`)}></label>
|
|
||||||
<label label={bind(client, 'initialClass').as(c => `[${c}]`)}></label>
|
|
||||||
<label label={bind(client, 'title')}></label>
|
|
||||||
</box>
|
|
||||||
}
|
|
||||||
onClicked={() => client.focus()}
|
|
||||||
></button>
|
|
||||||
})
|
|
||||||
})}
|
|
||||||
</box>
|
|
||||||
</box>
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
Workspace,
|
|
||||||
ActiveWindow,
|
|
||||||
SysTray,
|
|
||||||
};
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
import { bind } from "astal";
|
|
||||||
import AstalBattery from "gi://AstalBattery";
|
|
||||||
import AstalBluetooth from "gi://AstalBluetooth";
|
|
||||||
import AstalNetwork from "gi://AstalNetwork";
|
|
||||||
import AstalWp from "gi://AstalWp";
|
|
||||||
import { Gtk } from "astal/gtk4";
|
|
||||||
import Brightness from "../../../util/brightness";
|
|
||||||
import QuickActions from "../../QuickActions/QuickActions";
|
|
||||||
|
|
||||||
const STATE = AstalNetwork.DeviceState;
|
|
||||||
|
|
||||||
const QuickView = () => {
|
|
||||||
const qa = QuickActions.QuickActions();
|
|
||||||
const showQuickActions = () => {
|
|
||||||
qa.popup();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<button
|
|
||||||
onClicked={() => showQuickActions()}
|
|
||||||
cssClasses={["quick-action-button"]}
|
|
||||||
child={
|
|
||||||
<box>
|
|
||||||
<BatteryWidget></BatteryWidget>
|
|
||||||
<Audio></Audio>
|
|
||||||
<BluetoothWidget></BluetoothWidget>
|
|
||||||
<NetworkWidget></NetworkWidget>
|
|
||||||
<image iconName={"system-shutdown-symbolic"}></image>
|
|
||||||
{qa}
|
|
||||||
</box>
|
|
||||||
}
|
|
||||||
></button>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const NetworkWidget = () => {
|
|
||||||
const network = AstalNetwork.get_default();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<box>
|
|
||||||
<image
|
|
||||||
iconName={bind(network, "state").as(state => {
|
|
||||||
if (state === AstalNetwork.State.CONNECTING) {
|
|
||||||
return "chronometer-reset-symbolic";
|
|
||||||
} else if (
|
|
||||||
state === AstalNetwork.State.CONNECTED_LOCAL ||
|
|
||||||
state === AstalNetwork.State.CONNECTED_SITE ||
|
|
||||||
state === AstalNetwork.State.CONNECTED_GLOBAL
|
|
||||||
) {
|
|
||||||
return "network-wired-activated-symbolic";
|
|
||||||
} else {
|
|
||||||
return "paint-unknown-symbolic";
|
|
||||||
}
|
|
||||||
})}
|
|
||||||
cssClasses={["network-widget", "quick-view-symbol"]}
|
|
||||||
visible={bind(network.wifi, "state").as(
|
|
||||||
state => state !== STATE.ACTIVATED,
|
|
||||||
)}
|
|
||||||
></image>
|
|
||||||
<image
|
|
||||||
iconName={bind(network.wifi, "state").as(state => {
|
|
||||||
if (state === STATE.ACTIVATED) {
|
|
||||||
return network.wifi.iconName;
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
})}
|
|
||||||
tooltipText={bind(network.wifi, 'ssid')}
|
|
||||||
cssClasses={["network-widget", "quick-view-symbol"]}
|
|
||||||
visible={bind(network.wifi, "state").as(
|
|
||||||
state => state === STATE.ACTIVATED,
|
|
||||||
)}
|
|
||||||
></image>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const BluetoothWidget = () => {
|
|
||||||
const bluetooth = AstalBluetooth.get_default();
|
|
||||||
const enabled = bind(bluetooth, "isPowered");
|
|
||||||
const connected = bind(bluetooth, "isConnected");
|
|
||||||
|
|
||||||
// For each connected BT device, render status
|
|
||||||
return (
|
|
||||||
<box>
|
|
||||||
<box visible={enabled.as(e => e)}>
|
|
||||||
<image
|
|
||||||
iconName={"bluetooth-active-symbolic"}
|
|
||||||
visible={connected.as(c => c)}
|
|
||||||
></image>
|
|
||||||
<image
|
|
||||||
iconName={"bluetooth-disconnected-symbolic"}
|
|
||||||
visible={connected.as(c => !c)}
|
|
||||||
></image>
|
|
||||||
</box>
|
|
||||||
<image
|
|
||||||
iconName={"bluetooth-disabled-symbolic"}
|
|
||||||
visible={enabled.as(e => !e)}
|
|
||||||
></image>
|
|
||||||
<box>
|
|
||||||
{bind(bluetooth, "devices").as(devices => {
|
|
||||||
return devices.map(device => {
|
|
||||||
return (
|
|
||||||
<image
|
|
||||||
iconName={bind(device, "icon").as(
|
|
||||||
icon => icon,
|
|
||||||
)}
|
|
||||||
visible={bind(device, "connected")}
|
|
||||||
tooltipText={bind(device, "batteryPercentage").as(
|
|
||||||
n => {
|
|
||||||
return device.get_name() + ': ' + n + "%";
|
|
||||||
},
|
|
||||||
)}
|
|
||||||
></image>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
})}
|
|
||||||
</box>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const BatteryWidget = () => {
|
|
||||||
const battery = AstalBattery.get_default();
|
|
||||||
if (battery.get_is_present()) {
|
|
||||||
return (
|
|
||||||
<image
|
|
||||||
iconName={bind(battery, "iconName").as(icon => icon)}
|
|
||||||
cssClasses={["quick-view-symbol"]}
|
|
||||||
tooltipText={bind(battery, 'percentage').as(p => `${Math.round(p * 100)}%`)}
|
|
||||||
></image>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return <box></box>;
|
|
||||||
}
|
|
||||||
// Else, no battery available -> Don't show the widget
|
|
||||||
};
|
|
||||||
|
|
||||||
const BrightnessWidget = () => {
|
|
||||||
const brightness = Brightness.get_default();
|
|
||||||
const screen_brightness = bind(brightness, "screen");
|
|
||||||
|
|
||||||
return (
|
|
||||||
<box cssClasses={["quick-view-symbol"]}>
|
|
||||||
<image iconName={"brightness-high-symbolic"}></image>
|
|
||||||
<label
|
|
||||||
label={screen_brightness.as(b => '' + Math.round(100 * b))}
|
|
||||||
visible={bind(brightness, "screenAvailable")}
|
|
||||||
></label>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const Audio = () => {
|
|
||||||
const wireplumber = AstalWp.get_default();
|
|
||||||
if (wireplumber) {
|
|
||||||
return (
|
|
||||||
<box orientation={Gtk.Orientation.HORIZONTAL}>
|
|
||||||
<image
|
|
||||||
iconName={bind(wireplumber.defaultSpeaker, "volumeIcon").as(
|
|
||||||
icon => icon,
|
|
||||||
)}
|
|
||||||
cssClasses={["quick-view-symbol"]}
|
|
||||||
tooltipText={bind(wireplumber.defaultSpeaker, 'volume').as(v => Math.round(100 * v) + '%')}
|
|
||||||
></image>
|
|
||||||
<image
|
|
||||||
iconName={bind(
|
|
||||||
wireplumber.defaultMicrophone,
|
|
||||||
"volumeIcon",
|
|
||||||
).as(icon => icon)}
|
|
||||||
cssClasses={["quick-view-symbol"]}
|
|
||||||
tooltipText={bind(wireplumber.defaultMicrophone, 'volume').as(v => Math.round(100 * v) + '%')}
|
|
||||||
></image>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
print(
|
|
||||||
"[ WirePlumber ] Could not connect, Audio support in bar will be missing",
|
|
||||||
);
|
|
||||||
return <image iconName={"action-unavailable-symbolic"}></image>;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// cssClasses={[ 'quick-view-symbol' ]}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
QuickView,
|
|
||||||
};
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "astal-shell",
|
|
||||||
"dependencies": {
|
|
||||||
"astal": "/usr/share/astal/gjs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
$fg-color: #E6E6E6;
|
|
||||||
$bg-color: #141414;
|
|
||||||
$accent-color: #591641;
|
|
||||||
$accent-color-2: #97103A;
|
|
||||||
$shadow-color: rgba(40, 40, 40, 0.3);
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
# ────────────────────────────────────────────────────────────────────
|
|
||||||
# ╭────────────────────────────────────────────────╮
|
|
||||||
# │ WORKSPACE RULES │
|
|
||||||
# ╰────────────────────────────────────────────────╯
|
|
||||||
# ────────────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
# Display full sized (without gaps), if only window on screen
|
|
||||||
# workspace = w[tv1], gapsout:0, gapsin:0
|
|
||||||
# workspace = f[1], gapsout:0, gapsin:0
|
|
||||||
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
|
|
||||||
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
|
|
||||||
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
|
|
||||||
# windowrule = rounding 0, floating:0, onworkspace:f[1]
|
|
||||||
|
|
||||||
$mainMod = SUPER
|
|
||||||
|
|
||||||
# ────────────────────────────────────────────────────────────────────
|
|
||||||
# ╭────────────────────────────────────────────────╮
|
|
||||||
# │ WINDOW RULES │
|
|
||||||
# ╰────────────────────────────────────────────────╯
|
|
||||||
# ────────────────────────────────────────────────────────────────────
|
|
||||||
windowrule = float, title:.*(rofi).*
|
|
||||||
windowrule = animation popin, title:.*(rofi).*
|
|
||||||
windowrule = center, title:(rofi)(.*)
|
|
||||||
|
|
||||||
windowrule = move 1450 50, title:^(.*)(Power menu)$
|
|
||||||
windowrule = workspace 2, class:evince
|
|
||||||
windowrule = workspace 2, title:.*(Okular).*
|
|
||||||
windowrule = workspace 2, class:org.pwmt.zathura
|
|
||||||
windowrule = fullscreen, title:wlogout
|
|
||||||
windowrule = workspace 2, class:librewolf
|
|
||||||
windowrule = workspace 2, title:LibreWolf
|
|
||||||
windowrule = workspace 2, title:(.*)(Discord)(.*)
|
|
||||||
windowrule = workspace 3, title:^(Steam)(.*)$
|
|
||||||
windowrule = workspace 1, title:^(.*)(VSCodium)$
|
|
||||||
windowrule = center, title:^(.*)(VSCodium)$
|
|
||||||
windowrule = workspace 3, class:minecraft-launcher
|
|
||||||
windowrule = tile, class:minecraft-launcher
|
|
||||||
windowrule = fullscreen, title:^(.*)(Minecraft)(.*)$
|
|
||||||
windowrule = workspace 3, title:^(.*)(Minecraft)(.*)$
|
|
||||||
|
|
||||||
windowrule = workspace 1, title:^(.*)hidden-terminator*(.*)$
|
|
||||||
windowrule = size 0 0, title:^(.*)hidden-terminator*(.*)$
|
|
||||||
windowrule = move 0 0, title:^(.*)hidden-terminator*(.*)$
|
|
||||||
windowrule = float, title:^(.*)hidden-terminator*(.*)$
|
|
||||||
|
|
||||||
# ┌ ┐
|
|
||||||
# │ Set rule for yazi filepicker │
|
|
||||||
# └ ┘
|
|
||||||
windowrule = float, title:^(.*)termfilechooser*(.*)$
|
|
||||||
windowrule = size 1400 800, title:^(.*)termfilechooser*(.*)$
|
|
||||||
windowrule = center, title:^(.*)termfilechooser*(.*)$
|
|
||||||
|
|
||||||
# ┌ ┐
|
|
||||||
# │ Set floating windows & position them centered │
|
|
||||||
# └ ┘
|
|
||||||
windowrule = float, class:file_progress
|
|
||||||
windowrule = center, class:file_progress
|
|
||||||
|
|
||||||
windowrule = float, class:confirm
|
|
||||||
windowrule = center, class:confirm
|
|
||||||
|
|
||||||
windowrule = float, class:dialog
|
|
||||||
windowrule = center, class:dialog
|
|
||||||
|
|
||||||
windowrule = float, class:download
|
|
||||||
windowrule = center, class:download
|
|
||||||
|
|
||||||
windowrule = float, class:notification
|
|
||||||
windowrule = center, class:notification
|
|
||||||
|
|
||||||
windowrule = float, class:error
|
|
||||||
windowrule = center, class:error
|
|
||||||
|
|
||||||
windowrule = float, class:splash
|
|
||||||
windowrule = center, class:splash
|
|
||||||
|
|
||||||
windowrule = float, class:confirmreset
|
|
||||||
windowrule = center, class:confirmreset
|
|
||||||
|
|
||||||
windowrule = float, title:Open File
|
|
||||||
windowrule = center, title:Open File
|
|
||||||
|
|
||||||
windowrule = float, title:branchdialog
|
|
||||||
windowrule = center, title:branchdialog
|
|
||||||
|
|
||||||
windowrule = float, class:Lxappearance
|
|
||||||
windowrule = center, class:Lxappearance
|
|
||||||
|
|
||||||
windowrule = float, title:^(Media viewer)$
|
|
||||||
windowrule = center, title:^(Media viewer)$
|
|
||||||
|
|
||||||
windowrule = float, title:^(Volume Control)$
|
|
||||||
windowrule = center, title:^(Volume Control)$
|
|
||||||
|
|
||||||
windowrule = float, title:^(Picture-in-Picture)$
|
|
||||||
windowrule = center, title:^(Picture-in-Picture)$
|
|
||||||
|
|
||||||
windowrule = float, title:^(File Operation Progress)$
|
|
||||||
windowrule = center, title:^(File Operation Progress)$
|
|
||||||
|
|
||||||
windowrule = float, title:^(Loading)(.*)$
|
|
||||||
windowrule = center, title:^(Loading)(.*)$
|
|
||||||
|
|
||||||
windowrule = float, class:pavucontrol-qt
|
|
||||||
windowrule = center, class:pavucontrol-qt
|
|
||||||
|
|
||||||
windowrule = float, class:pavucontrol
|
|
||||||
windowrule = center, class:pavucontrol
|
|
||||||
|
|
||||||
windowrule = float, class:file-roller
|
|
||||||
windowrule = center, class:file-roller
|
|
||||||
|
|
||||||
windowrule = idleinhibit focus, title:^(Rocket League)(.*)$
|
|
||||||
windowrule = fullscreen, title:^(Steam Big Picture)$
|
|
||||||
windowrule = idleinhibit always, class:steam
|
|
||||||
windowrule = idleinhibit always, class:lutris
|
|
||||||
windowrule = idleinhibit focus, class:vlc
|
|
||||||
windowrule = idleinhibit focus, class:supertuxkart
|
|
||||||
windowrule = idleinhibit fullscreen, title:^(.*)(Discord)(.*)$
|
|
||||||
windowrule = idleinhibit fullscreen, title:^(.*)(~)(.*)$
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,65 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
|
|
||||||
import eslint from '@eslint/js';
|
|
||||||
import tseslint from 'typescript-eslint';
|
|
||||||
import stylistic from '@stylistic/eslint-plugin';
|
|
||||||
|
|
||||||
export default tseslint.config(
|
|
||||||
eslint.configs.recommended,
|
|
||||||
...tseslint.configs.recommended,
|
|
||||||
{
|
|
||||||
'plugins': {
|
|
||||||
'@stylistic/js': stylistic,
|
|
||||||
'@stylistic/ts': stylistic,
|
|
||||||
},
|
|
||||||
'rules': {
|
|
||||||
// Formatting
|
|
||||||
'@stylistic/js/array-bracket-newline': [ 'error', { 'multiline': true, 'minItems': 4 } ],
|
|
||||||
'@stylistic/js/array-bracket-spacing': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/array-element-newline': [ 'error', { 'multiline': true, 'minItems': 4 } ],
|
|
||||||
'@stylistic/js/arrow-parens': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/arrow-spacing': [ 'error', { 'before': true, 'after': true } ],
|
|
||||||
'@stylistic/js/block-spacing': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/brace-style': [ 'error', '1tbs' ],
|
|
||||||
'@stylistic/js/comma-spacing': [ 'error', { 'before': false, 'after': true } ],
|
|
||||||
'@stylistic/js/comma-style': [ 'error', 'last' ],
|
|
||||||
'@stylistic/js/dot-location': [ 'error', 'property' ],
|
|
||||||
'@stylistic/js/eol-last': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/function-call-spacing': [ 'error', 'never' ],
|
|
||||||
'@stylistic/js/implicit-arrow-linebreak': [ 'error', 'beside' ],
|
|
||||||
'@stylistic/js/indent': [ 'error', 4 ],
|
|
||||||
'@stylistic/js/key-spacing': [ 'error', { 'beforeColon': false, 'afterColon': true } ],
|
|
||||||
'@stylistic/js/keyword-spacing': [ 'error', { 'before': true, 'after': true } ],
|
|
||||||
'@stylistic/js/lines-between-class-members': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/new-parens': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/no-extra-parens': [ 'error', 'all' ],
|
|
||||||
'@stylistic/js/no-extra-semi': 'error',
|
|
||||||
'@stylistic/js/no-floating-decimal': 'error',
|
|
||||||
'@stylistic/js/no-mixed-operators': 'error',
|
|
||||||
'@stylistic/js/no-mixed-spaces-and-tabs': 'error',
|
|
||||||
'@stylistic/js/no-multi-spaces': 'error',
|
|
||||||
'@stylistic/js/no-trailing-spaces': 'error',
|
|
||||||
'@stylistic/js/no-whitespace-before-property': 'error',
|
|
||||||
'@stylistic/js/object-curly-newline': [ 'error', { 'multiline': true, 'minProperties': 3 } ],
|
|
||||||
'@stylistic/js/object-curly-spacing': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/one-var-declaration-per-line': 'error',
|
|
||||||
'@stylistic/js/quote-props': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/quotes': [ 'error', 'single' ],
|
|
||||||
'@stylistic/js/rest-spread-spacing': [ 'error', 'never' ],
|
|
||||||
'@stylistic/js/semi': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/semi-spacing': [ 'error', { 'before': false, 'after': true } ],
|
|
||||||
'@stylistic/js/semi-style': [ 'error', 'last' ],
|
|
||||||
'@stylistic/js/space-before-blocks': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/space-before-function-paren': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/space-in-parens': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/space-infix-ops': [ 'error', { 'int32Hint': false } ],
|
|
||||||
'@stylistic/js/space-unary-ops': 'error',
|
|
||||||
'@stylistic/js/spaced-comment': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/switch-colon-spacing': 'error',
|
|
||||||
'@stylistic/js/template-curly-spacing': [ 'error', 'always' ],
|
|
||||||
'@stylistic/js/wrap-iife': [ 'error', 'inside' ],
|
|
||||||
'@stylistic/js/wrap-regex': 'error',
|
|
||||||
'@stylistic/ts/type-annotation-spacing': 'error',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
/** Basic config file **/
|
|
||||||
|
|
||||||
configuration {
|
|
||||||
show-icons: true;
|
|
||||||
icon-theme: "Candy";
|
|
||||||
display-drun: "";
|
|
||||||
display-run: "🏃🏽♂️ ";
|
|
||||||
display-window: "🗔 ";
|
|
||||||
display-combi: "🔎 ";
|
|
||||||
dpi: 160;
|
|
||||||
}
|
|
||||||
|
|
||||||
@theme "style.rasi"
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
[manager]
|
|
||||||
|
|
||||||
prepend_keymap = [
|
|
||||||
# # undo trash
|
|
||||||
{ on = "u", run = "plugin restore", desc = "Restore last deleted files/folders" },
|
|
||||||
# # compress
|
|
||||||
{ on = "C", run = "plugin ouch tar.gz", desc = "Compress with ouch" },
|
|
||||||
# Goto
|
|
||||||
{ on = [ "g", "h" ], run = "cd ~", desc = "Go to ~" },
|
|
||||||
{ on = [ "g", "c", "c" ], run = "cd ~/.config", desc = "Go to ~/.config" },
|
|
||||||
{ on = [ "g", "c", "h" ], run = "cd ~/.config/hypr", desc = "Go to Hyprland config" },
|
|
||||||
{ on = [ "g", "c", "f" ], run = "cd ~/.config/fish", desc = "Go to Fish config" },
|
|
||||||
{ on = [ "g", "c", "y" ], run = "cd ~/.config/yazi", desc = "Go to Yazi config" },
|
|
||||||
{ on = [ "g", "c", "w" ], run = "cd ~/.config/waybar", desc = "Go to waybar config" },
|
|
||||||
{ on = [ "g", "c", "n" ], run = "cd ~/.config/nvim", desc = "Go to NeoVim config" },
|
|
||||||
{ on = [ "g", "a" ], run = "cd ~/.cache", desc = "Go to ~/.cache" },
|
|
||||||
{ on = [ "g", "n" ], run = "cd ~/NextCloud/Documents/", desc = "Go to NextCloud Documents" },
|
|
||||||
{ on = [ "g", "e", "c" ], run = "cd ~/projects/active/eth-gitlab/eth-code-expert/Semester2/", desc = "Go to ETH-Code-Expert" },
|
|
||||||
{ on = [ "g", "e", "n" ], run = "cd ~/NextCloud/Documents/ETH/Semester2", desc = "Go to ETH Nextcloud" },
|
|
||||||
{ on = [ "g", "e", "p" ], run = "cd ~/projects/active/eth/semester2/", desc = "Go to ETH notes folder" },
|
|
||||||
{ on = [ "g", "e", "g" ], run = "cd ~/projects/active/eth-gitlab/pprog25-jahutz/", desc = "Go to ETH Gitlab folder" },
|
|
||||||
{ on = [ "g", "l", "b" ], run = "cd ~/.local/bin", desc = "Go to ~/.local/bin" },
|
|
||||||
{ on = [ "g", "l", "s" ], run = "cd ~/.local/share", desc = "Go to ~/.local/share" },
|
|
||||||
{ on = [ "g", "s", "h" ], run = "cd ~/.steam/steam/steamapps/common", desc = "Go to ~/.steam/steam/steamapps/common" },
|
|
||||||
{ on = [ "g", "s", "g" ], run = "cd /mnt/games/SteamLibrary", desc = "Go to SteamLibrary on NTFS partition" },
|
|
||||||
{ on = [ "g", "s", "s" ], run = "cd /mnt/secondary/SteamLibrary", desc = "Go to SteamLibrary on main games drive" },
|
|
||||||
{ on = [ "g", "o" ], run = "cd /mnt/janis/Documents", desc = "Go to Documents" },
|
|
||||||
{ on = [ "g", "d" ], run = "cd ~/Downloads", desc = "Go to ~/Downloads" },
|
|
||||||
{ on = [ "g", "p", "a" ], run = "cd ~/projects/active", desc = "Go to Active projects" },
|
|
||||||
{ on = [ "g", "p", "r" ], run = "cd ~/projects/archive", desc = "Go to Archive projects" },
|
|
||||||
{ on = [ "g", "p", "p" ], run = "cd ~/projects", desc = "Go to projects" },
|
|
||||||
{ on = [ "g", "t", "m" ], run = "cd /tmp", desc = "Go to /tmp" },
|
|
||||||
{ on = [ "g", "t", "t" ], run = "cd ~/.local/share/Trash/", desc = "Go to TRASH" },
|
|
||||||
{ on = [ "g", "/" ], run = "cd /", desc = "Go to /" },
|
|
||||||
{ on = [ "g", "m" ], run = "cd /run/media/$USER", desc = "Go to /run/media" },
|
|
||||||
{ on = [ "g", "<Space>" ], run = "cd --interactive", desc = "Go to interactively" },
|
|
||||||
]
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[flavor]
|
|
||||||
use = "vscode-dark-modern"
|
|
||||||
276
configs/linters/clang-format
Normal file
276
configs/linters/clang-format
Normal file
@@ -0,0 +1,276 @@
|
|||||||
|
# ─────────────────────────────────────────────────────────────────────
|
||||||
|
# ╭─────────────────────────────────────────────────╮
|
||||||
|
# │ clang-format config │
|
||||||
|
# ╰─────────────────────────────────────────────────╯
|
||||||
|
# ─────────────────────────────────────────────────────────────────────
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
AccessModifierOffset: -2
|
||||||
|
AlignAfterOpenBracket: BlockIndent
|
||||||
|
AlignArrayOfStructures: Left
|
||||||
|
AlignConsecutiveAssignments:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: true
|
||||||
|
AlignConsecutiveBitFields:
|
||||||
|
Enabled: true
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: false
|
||||||
|
AlignConsecutiveDeclarations:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: false
|
||||||
|
AlignConsecutiveMacros:
|
||||||
|
Enabled: true
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: false
|
||||||
|
AlignConsecutiveShortCaseStatements:
|
||||||
|
Enabled: true
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCaseArrows: false
|
||||||
|
AlignCaseColons: false
|
||||||
|
AlignConsecutiveTableGenBreakingDAGArgColons:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: false
|
||||||
|
AlignConsecutiveTableGenCondOperatorColons:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: false
|
||||||
|
AlignConsecutiveTableGenDefinitionColons:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: false
|
||||||
|
AlignEscapedNewlines: Right
|
||||||
|
AlignOperands: Align
|
||||||
|
AlignTrailingComments:
|
||||||
|
Kind: Always
|
||||||
|
OverEmptyLines: 0
|
||||||
|
AllowAllArgumentsOnNextLine: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
|
AllowBreakBeforeNoexceptSpecifier: Never
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortCaseExpressionOnASingleLine: true
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortCompoundRequirementOnASingleLine: true
|
||||||
|
AllowShortEnumsOnASingleLine: true
|
||||||
|
AllowShortFunctionsOnASingleLine: Empty
|
||||||
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
|
AllowShortLambdasOnASingleLine: All
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AttributeMacros:
|
||||||
|
- __capability
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
BitFieldColonSpacing: Both
|
||||||
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: false
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: Never
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: false
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: true
|
||||||
|
AfterUnion: false
|
||||||
|
AfterExternBlock: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
BeforeLambdaBody: false
|
||||||
|
BeforeWhile: false
|
||||||
|
IndentBraces: false
|
||||||
|
SplitEmptyFunction: true
|
||||||
|
SplitEmptyRecord: true
|
||||||
|
SplitEmptyNamespace: true
|
||||||
|
BreakAdjacentStringLiterals: true
|
||||||
|
BreakAfterAttributes: Always
|
||||||
|
BreakAfterJavaFieldAnnotations: false
|
||||||
|
BreakAfterReturnType: None
|
||||||
|
BreakArrays: true
|
||||||
|
BreakBeforeBinaryOperators: All
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeConceptDeclarations: Always
|
||||||
|
BreakBeforeInlineASMColon: OnlyMultiline
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakFunctionDefinitionParameters: false
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
|
BreakStringLiterals: true
|
||||||
|
BreakTemplateDeclarations: MultiLine
|
||||||
|
ColumnLimit: 100
|
||||||
|
CommentPragmas: "^ IWYU pragma:"
|
||||||
|
CompactNamespaces: false
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DerivePointerAlignment: true
|
||||||
|
DisableFormat: false
|
||||||
|
EmptyLineAfterAccessModifier: Never
|
||||||
|
EmptyLineBeforeAccessModifier: Always
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
FixNamespaceComments: true
|
||||||
|
ForEachMacros:
|
||||||
|
- foreach
|
||||||
|
- Q_FOREACH
|
||||||
|
- BOOST_FOREACH
|
||||||
|
IfMacros:
|
||||||
|
- KJ_IF_MAYBE
|
||||||
|
IncludeBlocks: Preserve
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: ^"(llvm|llvm-c|clang|clang-c)/
|
||||||
|
Priority: 2
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: ^(<|"(gtest|gmock|isl|json)/)
|
||||||
|
Priority: 3
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: .*
|
||||||
|
Priority: 1
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
IncludeIsMainRegex: (Test)?$
|
||||||
|
IncludeIsMainSourceRegex: ""
|
||||||
|
IndentAccessModifiers: true
|
||||||
|
IndentCaseBlocks: true
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentExternBlock: AfterExternBlock
|
||||||
|
IndentGotoLabels: true
|
||||||
|
IndentPPDirectives: BeforeHash
|
||||||
|
IndentRequiresClause: true
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentWrappedFunctionNames: true
|
||||||
|
InsertBraces: false
|
||||||
|
InsertNewlineAtEOF: false
|
||||||
|
InsertTrailingCommas: None
|
||||||
|
IntegerLiteralSeparator:
|
||||||
|
Binary: 0
|
||||||
|
BinaryMinDigits: 0
|
||||||
|
Decimal: 0
|
||||||
|
DecimalMinDigits: 0
|
||||||
|
Hex: 0
|
||||||
|
HexMinDigits: 0
|
||||||
|
JavaScriptQuotes: Leave
|
||||||
|
JavaScriptWrapImports: true
|
||||||
|
KeepEmptyLines:
|
||||||
|
AtEndOfFile: false
|
||||||
|
AtStartOfBlock: true
|
||||||
|
AtStartOfFile: true
|
||||||
|
LambdaBodyIndentation: Signature
|
||||||
|
LineEnding: DeriveLF
|
||||||
|
MacroBlockBegin: ""
|
||||||
|
MacroBlockEnd: ""
|
||||||
|
MainIncludeChar: Quote
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
ObjCBinPackProtocolList: Auto
|
||||||
|
ObjCBlockIndentWidth: 2
|
||||||
|
ObjCBreakBeforeNestedBlockParam: true
|
||||||
|
ObjCSpaceAfterProperty: false
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PPIndentWidth: -1
|
||||||
|
PackConstructorInitializers: BinPack
|
||||||
|
PenaltyBreakAssignment: 2
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
PenaltyBreakComment: 300
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakOpenParenthesis: 0
|
||||||
|
PenaltyBreakScopeResolution: 500
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyBreakTemplateDeclaration: 10
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyIndentedWhitespace: 0
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
PointerAlignment: Right
|
||||||
|
QualifierAlignment: Left
|
||||||
|
ReferenceAlignment: Pointer
|
||||||
|
ReflowComments: true
|
||||||
|
RemoveBracesLLVM: true
|
||||||
|
RemoveParentheses: MultipleParentheses
|
||||||
|
RemoveSemicolon: false
|
||||||
|
RequiresClausePosition: OwnLine
|
||||||
|
RequiresExpressionIndentation: OuterScope
|
||||||
|
SeparateDefinitionBlocks: Always
|
||||||
|
ShortNamespaceLines: 1
|
||||||
|
SkipMacroDefinitionBody: false
|
||||||
|
SortIncludes: CaseSensitive
|
||||||
|
SortJavaStaticImport: Before
|
||||||
|
SortUsingDeclarations: LexicographicNumeric
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
SpaceAfterLogicalNot: false
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceAroundPointerQualifiers: Default
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCaseColon: false
|
||||||
|
SpaceBeforeCpp11BracedList: true
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeJsonColon: false
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeParensOptions:
|
||||||
|
AfterControlStatements: true
|
||||||
|
AfterForeachMacros: true
|
||||||
|
AfterFunctionDeclarationName: true
|
||||||
|
AfterFunctionDefinitionName: true
|
||||||
|
AfterIfMacros: true
|
||||||
|
AfterOverloadedOperator: false
|
||||||
|
AfterPlacementOperator: true
|
||||||
|
AfterRequiresInClause: false
|
||||||
|
AfterRequiresInExpression: false
|
||||||
|
BeforeNonEmptyParentheses: false
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceBeforeSquareBrackets: false
|
||||||
|
SpaceInEmptyBlock: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
SpacesInAngles: Never
|
||||||
|
SpacesInContainerLiterals: true
|
||||||
|
SpacesInLineCommentPrefix:
|
||||||
|
Minimum: 1
|
||||||
|
Maximum: -1
|
||||||
|
SpacesInParens: Custom
|
||||||
|
SpacesInParensOptions:
|
||||||
|
ExceptDoubleParentheses: false
|
||||||
|
InConditionalStatements: true
|
||||||
|
InCStyleCasts: false
|
||||||
|
InEmptyParentheses: false
|
||||||
|
Other: true
|
||||||
|
SpacesInSquareBrackets: true
|
||||||
|
Standard: Latest
|
||||||
|
StatementAttributeLikeMacros:
|
||||||
|
- Q_EMIT
|
||||||
|
StatementMacros:
|
||||||
|
- Q_UNUSED
|
||||||
|
- QT_REQUIRE_VERSION
|
||||||
|
TabWidth: 4
|
||||||
|
TableGenBreakInsideDAGArg: DontBreak
|
||||||
|
UseTab: Never
|
||||||
|
VerilogBreakBetweenInstancePorts: true
|
||||||
|
WhitespaceSensitiveMacros:
|
||||||
|
- BOOST_PP_STRINGIZE
|
||||||
|
- CF_SWIFT_NAME
|
||||||
|
- NS_SWIFT_NAME
|
||||||
|
- PP_STRINGIZE
|
||||||
|
- STRINGIZE
|
||||||
744
configs/linters/eslint.config.mjs
Normal file
744
configs/linters/eslint.config.mjs
Normal file
@@ -0,0 +1,744 @@
|
|||||||
|
import eslint from '@eslint/js';
|
||||||
|
import globals from 'globals';
|
||||||
|
import stylistic from '@stylistic/eslint-plugin';
|
||||||
|
import tseslint from 'typescript-eslint';
|
||||||
|
import typescript from '@typescript-eslint/eslint-plugin';
|
||||||
|
import vue from 'eslint-plugin-vue';
|
||||||
|
|
||||||
|
const style = {
|
||||||
|
'plugins': {
|
||||||
|
'@stylistic': stylistic,
|
||||||
|
'@stylistic/js': stylistic,
|
||||||
|
'@stylistic/ts': stylistic
|
||||||
|
},
|
||||||
|
'files': [
|
||||||
|
'**/*.ts',
|
||||||
|
'**/*.js',
|
||||||
|
'**/*.mjs',
|
||||||
|
'**/*.cjs',
|
||||||
|
'**/*.tsx',
|
||||||
|
'**/*.jsx'
|
||||||
|
],
|
||||||
|
'rules': {
|
||||||
|
'sort-imports': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
'ignoreCase': false,
|
||||||
|
'ignoreDeclarationSort': false,
|
||||||
|
'ignoreMemberSort': false,
|
||||||
|
'memberSyntaxSortOrder': [
|
||||||
|
'none',
|
||||||
|
'all',
|
||||||
|
'multiple',
|
||||||
|
'single'
|
||||||
|
],
|
||||||
|
'allowSeparatedGroups': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// Formatting
|
||||||
|
'@stylistic/array-bracket-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'multiline': false,
|
||||||
|
'minItems': 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/array-bracket-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/array-element-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'consistent': false,
|
||||||
|
'multiline': false,
|
||||||
|
'minItems': 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/arrow-parens': [
|
||||||
|
'error',
|
||||||
|
'as-needed'
|
||||||
|
],
|
||||||
|
'@stylistic/arrow-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': true,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/block-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/brace-style': [
|
||||||
|
'error',
|
||||||
|
'1tbs',
|
||||||
|
{
|
||||||
|
'allowSingleLine': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/comma-dangle': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/comma-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': false,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/comma-style': [
|
||||||
|
'error',
|
||||||
|
'last'
|
||||||
|
],
|
||||||
|
'@stylistic/dot-location': [
|
||||||
|
'error',
|
||||||
|
'property'
|
||||||
|
],
|
||||||
|
'@stylistic/function-call-argument-newline': [
|
||||||
|
'error',
|
||||||
|
'consistent'
|
||||||
|
],
|
||||||
|
'@stylistic/function-call-spacing': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/function-paren-newline': [
|
||||||
|
'error',
|
||||||
|
'multiline-arguments'
|
||||||
|
],
|
||||||
|
'@stylistic/implicit-arrow-linebreak': [
|
||||||
|
'error',
|
||||||
|
'beside'
|
||||||
|
],
|
||||||
|
'@stylistic/indent': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'@stylistic/indent-binary-ops': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'@stylistic/key-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'beforeColon': false,
|
||||||
|
'afterColon': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/keyword-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': true,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/lines-between-class-members': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/max-len': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
'code': 140,
|
||||||
|
'comments': 160,
|
||||||
|
'ignoreComments': false,
|
||||||
|
'ignoreUrls': true,
|
||||||
|
'ignoreStrings': true,
|
||||||
|
'ignoreTemplateLiterals': true,
|
||||||
|
'ignoreRegExpLiterals': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/max-statements-per-line': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'max': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/multiline-ternary': [
|
||||||
|
'error',
|
||||||
|
'always-multiline'
|
||||||
|
],
|
||||||
|
'@stylistic/new-parens': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/newline-per-chained-call': 'error',
|
||||||
|
'@stylistic/no-confusing-arrow': 'error',
|
||||||
|
'@stylistic/no-extra-parens': [
|
||||||
|
'error',
|
||||||
|
'all',
|
||||||
|
{
|
||||||
|
'nestedBinaryExpressions': false,
|
||||||
|
'ternaryOperandBinaryExpressions': false,
|
||||||
|
'ignoreJSX': 'multi-line',
|
||||||
|
'nestedConditionalExpressions': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/no-extra-semi': 'error',
|
||||||
|
'@stylistic/no-floating-decimal': 'error',
|
||||||
|
'@stylistic/no-mixed-operators': 'error',
|
||||||
|
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
||||||
|
'@stylistic/no-multi-spaces': 'error',
|
||||||
|
'@stylistic/no-multiple-empty-lines': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'max': 3,
|
||||||
|
'maxEOF': 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/no-tabs': 'error',
|
||||||
|
'@stylistic/no-trailing-spaces': 'error',
|
||||||
|
'@stylistic/no-whitespace-before-property': 'error',
|
||||||
|
'@stylistic/object-curly-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'multiline': true,
|
||||||
|
'minProperties': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/object-curly-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/object-property-newline': 'error',
|
||||||
|
'@stylistic/one-var-declaration-per-line': 'error',
|
||||||
|
'@stylistic/operator-linebreak': [
|
||||||
|
'error',
|
||||||
|
'before'
|
||||||
|
],
|
||||||
|
'@stylistic/padded-blocks': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'blocks': 'never',
|
||||||
|
'classes': 'always',
|
||||||
|
'switches': 'never'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
// Padding lines. The most in-depth part of this config
|
||||||
|
'@stylistic/padding-line-between-statements': [
|
||||||
|
'error',
|
||||||
|
// Variables, Constants
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'var',
|
||||||
|
'next': 'var'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'let',
|
||||||
|
'next': 'let'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'const',
|
||||||
|
'next': 'const'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'var',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'cjs-import',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'import',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'let',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'cjs-import',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'import',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'const',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'cjs-import',
|
||||||
|
'class',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'import',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// Import
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'import',
|
||||||
|
'next': 'import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'cjs-import',
|
||||||
|
'next': 'cjs-import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
],
|
||||||
|
'next': 'cjs-import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'cjs-import',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
],
|
||||||
|
'next': 'import'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'import',
|
||||||
|
'next': [
|
||||||
|
'block',
|
||||||
|
'block-like',
|
||||||
|
'break',
|
||||||
|
'cjs-export',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'directive',
|
||||||
|
'do',
|
||||||
|
'empty',
|
||||||
|
'export',
|
||||||
|
'expression',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'iife',
|
||||||
|
'let',
|
||||||
|
'return',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'try',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'with'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// If
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'if'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'if',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// For
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'for'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'for',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// While
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'while'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'while',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Functions
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'function'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'function',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Block Statements
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'block-like'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'block-like',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Switch
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'switch'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'switch',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Try-Catch
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'try'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'try',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Throw
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'throw'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'throw',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Return
|
||||||
|
{
|
||||||
|
'blankLine': 'never',
|
||||||
|
'prev': 'return',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'return'
|
||||||
|
},
|
||||||
|
// Export
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'export'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'export',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'cjs-export'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'cjs-export',
|
||||||
|
'next': '*'
|
||||||
|
},
|
||||||
|
// Classes
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': '*',
|
||||||
|
'next': 'class'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'blankLine': 'always',
|
||||||
|
'prev': 'class',
|
||||||
|
'next': '*'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/quote-props': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/quotes': [
|
||||||
|
'error',
|
||||||
|
'single'
|
||||||
|
],
|
||||||
|
'@stylistic/rest-spread-spacing': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/semi': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/semi-spacing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'before': false,
|
||||||
|
'after': true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/semi-style': [
|
||||||
|
'error',
|
||||||
|
'last'
|
||||||
|
],
|
||||||
|
'@stylistic/space-before-blocks': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/space-before-function-paren': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/space-in-parens': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/space-infix-ops': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'int32Hint': false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/space-unary-ops': 'error',
|
||||||
|
'@stylistic/spaced-comment': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/switch-colon-spacing': 'error',
|
||||||
|
'@stylistic/template-curly-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/template-tag-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/type-generic-spacing': 'error',
|
||||||
|
'@stylistic/type-named-tuple-spacing': 'error',
|
||||||
|
'@stylistic/wrap-iife': [
|
||||||
|
'error',
|
||||||
|
'inside'
|
||||||
|
],
|
||||||
|
'@stylistic/wrap-regex': 'error',
|
||||||
|
'@stylistic/ts/type-annotation-spacing': 'error'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** @type {import('eslint').Linter.Config} */
|
||||||
|
export default tseslint.config(
|
||||||
|
// Base JavaScript rules
|
||||||
|
eslint.configs.recommended,
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
style,
|
||||||
|
|
||||||
|
// Vue support (including TS and JSX inside SFCs)
|
||||||
|
{
|
||||||
|
'files': [ '**/*.vue' ],
|
||||||
|
'languageOptions': {
|
||||||
|
'sourceType': 'module',
|
||||||
|
'ecmaVersion': 'latest',
|
||||||
|
'globals': globals.browser,
|
||||||
|
'parserOptions': {
|
||||||
|
'parser': tseslint.parser
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'plugins': {
|
||||||
|
'vue': vue,
|
||||||
|
'@stylistic': stylistic,
|
||||||
|
'@stylistic/js': stylistic,
|
||||||
|
'@stylistic/ts': stylistic,
|
||||||
|
'@typescript-eslint': typescript
|
||||||
|
},
|
||||||
|
'extends': [
|
||||||
|
eslint.configs.recommended,
|
||||||
|
...vue.configs['flat/recommended']
|
||||||
|
],
|
||||||
|
'rules': {
|
||||||
|
...typescript.configs.recommended.rules,
|
||||||
|
...style.rules,
|
||||||
|
|
||||||
|
// Vue specific rules
|
||||||
|
'@stylistic/indent': 'off',
|
||||||
|
'vue/html-indent': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'vue/html-comment-indent': [
|
||||||
|
'error',
|
||||||
|
4
|
||||||
|
],
|
||||||
|
'vue/script-indent': [
|
||||||
|
'error',
|
||||||
|
4,
|
||||||
|
{
|
||||||
|
'baseIndent': 1,
|
||||||
|
'switchCase': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'vue/html-self-closing': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'html': {
|
||||||
|
'void': 'never',
|
||||||
|
'normal': 'never',
|
||||||
|
'component': 'always'
|
||||||
|
},
|
||||||
|
'svg': 'always',
|
||||||
|
'math': 'never'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'vue/max-attributes-per-line': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'singleline': 3,
|
||||||
|
'multiline': 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
2
configs/linters/indentconfig.yaml
Normal file
2
configs/linters/indentconfig.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
paths:
|
||||||
|
- /home/janis/projects/dotfiles/config/lint/latexfmt.yaml
|
||||||
82
configs/linters/latexfmt.yaml
Normal file
82
configs/linters/latexfmt.yaml
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# Use spaces for indent (because f*k tabs)
|
||||||
|
defaultIndent: " "
|
||||||
|
|
||||||
|
# Limit Number of backups
|
||||||
|
maxNumberOfBackups: 3
|
||||||
|
|
||||||
|
verbatimEnvironments:
|
||||||
|
verbatim: 1
|
||||||
|
lstlisting: 1
|
||||||
|
minted: 1
|
||||||
|
code: 1
|
||||||
|
|
||||||
|
indentRules:
|
||||||
|
recall: " "
|
||||||
|
remarks: " "
|
||||||
|
remark: " "
|
||||||
|
guides: " "
|
||||||
|
properties: " "
|
||||||
|
restrictions: " "
|
||||||
|
limitations: " "
|
||||||
|
terms: " "
|
||||||
|
notation: " "
|
||||||
|
usage: " "
|
||||||
|
task: " "
|
||||||
|
proof: " "
|
||||||
|
general: " "
|
||||||
|
simplebox: " "
|
||||||
|
definition: " "
|
||||||
|
theorem: " "
|
||||||
|
lemma: " "
|
||||||
|
corollary: " "
|
||||||
|
axiom: " "
|
||||||
|
fact: " "
|
||||||
|
proposition: " "
|
||||||
|
example: " "
|
||||||
|
formula: " "
|
||||||
|
conjugation: " "
|
||||||
|
forms: " "
|
||||||
|
|
||||||
|
lookForAlignDelims:
|
||||||
|
tables:
|
||||||
|
delims: 1
|
||||||
|
alignDoubleBackSlash: 1
|
||||||
|
spacesBeforeDoubleBackSlash: 1
|
||||||
|
multiColumnGrouping: 0
|
||||||
|
alignRowsWithoutMaxDelims: 1
|
||||||
|
spacesBeforeAmpersand: 1
|
||||||
|
spacesAfterAmpersand: 1
|
||||||
|
justification: left
|
||||||
|
alignFinalDoubleBackSlash: 0
|
||||||
|
dontMeasure: 0
|
||||||
|
delimiterRegEx: (?<!\\)(&)
|
||||||
|
delimiterJustification: left
|
||||||
|
lookForChildCodeBlocks: 1
|
||||||
|
alignContentAfterDoubleBackSlash: 0
|
||||||
|
spacesAfterDoubleBackSlash: 1
|
||||||
|
|
||||||
|
specialBeginEnd:
|
||||||
|
If:
|
||||||
|
begin: '\\If'
|
||||||
|
middle:
|
||||||
|
- '\\ElsIf'
|
||||||
|
- '\\Else'
|
||||||
|
end: '\\EndIf'
|
||||||
|
lookForThis: 1
|
||||||
|
For:
|
||||||
|
begin: '\\For'
|
||||||
|
end: '\\EndFor'
|
||||||
|
lookForThis: 1
|
||||||
|
Procedure:
|
||||||
|
begin: '\\Procedure'
|
||||||
|
end: '\\EndProcedure'
|
||||||
|
lookForThis: 1
|
||||||
|
Function:
|
||||||
|
begin: '\\Function'
|
||||||
|
end: '\\EndFunction'
|
||||||
|
lookForThis: 1
|
||||||
|
While:
|
||||||
|
begin: '\\While'
|
||||||
|
end: '\\EndWhile'
|
||||||
|
lookForThis: 1
|
||||||
|
specialBeforeCommand: 1
|
||||||
8
configs/linters/package.json
Normal file
8
configs/linters/package.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.28.0",
|
||||||
|
"@stylistic/eslint-plugin": "^4.4.1",
|
||||||
|
"eslint-plugin-vue": "^10.2.0",
|
||||||
|
"typescript-eslint": "^8.33.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,3 +3,4 @@ $bg-color: {{ colour-background-hex }};
|
|||||||
$accent-color: {{ colour-accent-hex }};
|
$accent-color: {{ colour-accent-hex }};
|
||||||
$accent-color-2: {{ colour-accent-2-hex }};
|
$accent-color-2: {{ colour-accent-2-hex }};
|
||||||
$shadow-color: {{ colour-shadow-rgba-03 }};
|
$shadow-color: {{ colour-shadow-rgba-03 }};
|
||||||
|
$monospace-font: {{ font-mono }}
|
||||||
@@ -9,10 +9,6 @@
|
|||||||
#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||||
|
|
||||||
|
|
||||||
general {
|
|
||||||
grace = 15
|
|
||||||
}
|
|
||||||
|
|
||||||
# ┌ ┐
|
# ┌ ┐
|
||||||
# │ BACKGROUND │
|
# │ BACKGROUND │
|
||||||
# └ ┘
|
# └ ┘
|
||||||
@@ -49,7 +45,7 @@ label {
|
|||||||
monitor =
|
monitor =
|
||||||
text = <b>$TIME</b>
|
text = <b>$TIME</b>
|
||||||
color = {{ colour-primary-rgb }}
|
color = {{ colour-primary-rgb }}
|
||||||
font_size = 100
|
font_size = 150
|
||||||
font_family = {{ font-primary }}
|
font_family = {{ font-primary }}
|
||||||
|
|
||||||
position = 0, 80
|
position = 0, 80
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
border: 1px;
|
border: 1px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
location: west;
|
location: center;
|
||||||
anchor: west;
|
anchor: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
0
config/wlogout/layout → configs/renderable/wlogout/layout
Executable file → Normal file
0
config/wlogout/layout → configs/renderable/wlogout/layout
Executable file → Normal file
3
configs/renderable/yazi/theme.toml
Normal file
3
configs/renderable/yazi/theme.toml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[flavor]
|
||||||
|
dark = "{{ yazi-theme }}"
|
||||||
|
light = "{{ yazi-theme }}"
|
||||||
@@ -14,3 +14,5 @@ VKD3D_CONFIG=dxr11,dxr
|
|||||||
RADV_PERFTEST_RT=1
|
RADV_PERFTEST_RT=1
|
||||||
ANDROID_HOME=/home/janis/Android/Sdk
|
ANDROID_HOME=/home/janis/Android/Sdk
|
||||||
EDITOR=nvim
|
EDITOR=nvim
|
||||||
|
PAGER=nvimpager
|
||||||
|
MANPAGER=nvimpager
|
||||||
18
configs/system/greetd/config-autologin.toml
Normal file
18
configs/system/greetd/config-autologin.toml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[terminal]
|
||||||
|
# The VT to run the greeter on. Can be "next", "current" or a number
|
||||||
|
# designating the VT.
|
||||||
|
vt = 1
|
||||||
|
|
||||||
|
# The default session, also known as the greeter.
|
||||||
|
[default_session]
|
||||||
|
command = "tuigreet --cmd Hyprland --time --remember --remember-user-session --asterisks --user-menu --sessions /usr/share/wayland-sessions"
|
||||||
|
|
||||||
|
# The user to run the command as. The privileges this user must have depends
|
||||||
|
# on the greeter. A graphical greeter may for example require the user to be
|
||||||
|
# in the `video` group.
|
||||||
|
user = "greeter"
|
||||||
|
|
||||||
|
|
||||||
|
[initial_session]
|
||||||
|
command = "Hyprland"
|
||||||
|
user = "janis"
|
||||||
9
configs/system/greetd/pam
Normal file
9
configs/system/greetd/pam
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#%PAM-1.0
|
||||||
|
|
||||||
|
auth required pam_securetty.so
|
||||||
|
auth requisite pam_nologin.so
|
||||||
|
auth include system-local-login
|
||||||
|
auth optional pam_gnome_keyring.so
|
||||||
|
account include system-local-login
|
||||||
|
session include system-local-login
|
||||||
|
session optional pam_gnome_keyring.so auto_start
|
||||||
2344
configs/userland/ags/@girs/accounts-1.0.d.ts
vendored
Normal file
2344
configs/userland/ags/@girs/accounts-1.0.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
944
configs/userland/ags/@girs/accountsservice-1.0.d.ts
vendored
Normal file
944
configs/userland/ags/@girs/accountsservice-1.0.d.ts
vendored
Normal file
@@ -0,0 +1,944 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AccountsService?version=1.0' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AccountsService {
|
||||||
|
/**
|
||||||
|
* AccountsService-1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of user account
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of user account
|
||||||
|
*/
|
||||||
|
export namespace UserAccountType {
|
||||||
|
export const $gtype: GObject.GType<UserAccountType>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum UserAccountType {
|
||||||
|
/**
|
||||||
|
* Normal non-administrative user
|
||||||
|
*/
|
||||||
|
STANDARD,
|
||||||
|
/**
|
||||||
|
* Administrative user
|
||||||
|
*/
|
||||||
|
ADMINISTRATOR,
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Various error codes returned by the accounts service.
|
||||||
|
*/
|
||||||
|
class UserManagerError extends GLib.Error {
|
||||||
|
static $gtype: GObject.GType<UserManagerError>;
|
||||||
|
|
||||||
|
// Static fields
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic failure
|
||||||
|
*/
|
||||||
|
static FAILED: number;
|
||||||
|
/**
|
||||||
|
* The user already exists
|
||||||
|
*/
|
||||||
|
static USER_EXISTS: number;
|
||||||
|
/**
|
||||||
|
* The user does not exist
|
||||||
|
*/
|
||||||
|
static USER_DOES_NOT_EXIST: number;
|
||||||
|
/**
|
||||||
|
* Permission denied
|
||||||
|
*/
|
||||||
|
static PERMISSION_DENIED: number;
|
||||||
|
/**
|
||||||
|
* Operation not supported
|
||||||
|
*/
|
||||||
|
static NOT_SUPPORTED: number;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(options: { message: string; code: number });
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
static quark(): GLib.Quark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mode for setting the user's password.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mode for setting the user's password.
|
||||||
|
*/
|
||||||
|
export namespace UserPasswordMode {
|
||||||
|
export const $gtype: GObject.GType<UserPasswordMode>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum UserPasswordMode {
|
||||||
|
/**
|
||||||
|
* Password set normally
|
||||||
|
*/
|
||||||
|
REGULAR,
|
||||||
|
/**
|
||||||
|
* Password will be chosen at next login
|
||||||
|
*/
|
||||||
|
SET_AT_LOGIN,
|
||||||
|
/**
|
||||||
|
* No password set
|
||||||
|
*/
|
||||||
|
NONE,
|
||||||
|
}
|
||||||
|
function user_manager_error_quark(): GLib.Quark;
|
||||||
|
module User {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Changed {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SessionsChanged {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
account_type: number;
|
||||||
|
accountType: number;
|
||||||
|
automatic_login: boolean;
|
||||||
|
automaticLogin: boolean;
|
||||||
|
email: string;
|
||||||
|
home_directory: string;
|
||||||
|
homeDirectory: string;
|
||||||
|
icon_file: string;
|
||||||
|
iconFile: string;
|
||||||
|
is_loaded: boolean;
|
||||||
|
isLoaded: boolean;
|
||||||
|
language: string;
|
||||||
|
local_account: boolean;
|
||||||
|
localAccount: boolean;
|
||||||
|
location: string;
|
||||||
|
locked: boolean;
|
||||||
|
login_frequency: number;
|
||||||
|
loginFrequency: number;
|
||||||
|
login_history: GLib.Variant;
|
||||||
|
loginHistory: GLib.Variant;
|
||||||
|
login_time: number;
|
||||||
|
loginTime: number;
|
||||||
|
nonexistent: boolean;
|
||||||
|
password_hint: string;
|
||||||
|
passwordHint: string;
|
||||||
|
password_mode: number;
|
||||||
|
passwordMode: number;
|
||||||
|
real_name: string;
|
||||||
|
realName: string;
|
||||||
|
shell: string;
|
||||||
|
system_account: boolean;
|
||||||
|
systemAccount: boolean;
|
||||||
|
uid: number;
|
||||||
|
user_name: string;
|
||||||
|
userName: string;
|
||||||
|
x_session: string;
|
||||||
|
xSession: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a user account on the system.
|
||||||
|
*/
|
||||||
|
class User extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<User>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get account_type(): number;
|
||||||
|
get accountType(): number;
|
||||||
|
get automatic_login(): boolean;
|
||||||
|
get automaticLogin(): boolean;
|
||||||
|
get email(): string;
|
||||||
|
get home_directory(): string;
|
||||||
|
get homeDirectory(): string;
|
||||||
|
get icon_file(): string;
|
||||||
|
get iconFile(): string;
|
||||||
|
get is_loaded(): boolean;
|
||||||
|
get isLoaded(): boolean;
|
||||||
|
/**
|
||||||
|
* The user’s locale, in the format
|
||||||
|
* `language[_territory][.codeset][`modifier]``, where `language` is an
|
||||||
|
* ISO 639 language code, `territory` is an ISO 3166 country code, and
|
||||||
|
* `codeset` is a character set or encoding identifier like `ISO-8859-1`
|
||||||
|
* or `UTF-8`; as specified by [`setlocale(3)`](man:setlocale(3)).
|
||||||
|
*
|
||||||
|
* The locale may be the empty string, which means the user is using the
|
||||||
|
* system default locale.
|
||||||
|
*
|
||||||
|
* The property may be %NULL if it wasn’t possible to load it from the
|
||||||
|
* daemon.
|
||||||
|
*/
|
||||||
|
get language(): string;
|
||||||
|
get local_account(): boolean;
|
||||||
|
get localAccount(): boolean;
|
||||||
|
get location(): string;
|
||||||
|
get locked(): boolean;
|
||||||
|
get login_frequency(): number;
|
||||||
|
get loginFrequency(): number;
|
||||||
|
get login_history(): GLib.Variant;
|
||||||
|
get loginHistory(): GLib.Variant;
|
||||||
|
get login_time(): number;
|
||||||
|
get loginTime(): number;
|
||||||
|
get nonexistent(): boolean;
|
||||||
|
get password_hint(): string;
|
||||||
|
get passwordHint(): string;
|
||||||
|
get password_mode(): number;
|
||||||
|
get passwordMode(): number;
|
||||||
|
get real_name(): string;
|
||||||
|
get realName(): string;
|
||||||
|
get shell(): string;
|
||||||
|
get system_account(): boolean;
|
||||||
|
get systemAccount(): boolean;
|
||||||
|
get uid(): number;
|
||||||
|
get user_name(): string;
|
||||||
|
get userName(): string;
|
||||||
|
get x_session(): string;
|
||||||
|
get xSession(): string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<User.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'changed'): void;
|
||||||
|
connect(signal: 'sessions-changed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'sessions-changed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'sessions-changed'): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Organize the user by login frequency and names.
|
||||||
|
* @param user2 a user
|
||||||
|
* @returns negative if @user1 is before @user2, zero if equal or positive if @user1 is after @user2
|
||||||
|
*/
|
||||||
|
collate(user2: User): number;
|
||||||
|
/**
|
||||||
|
* Retrieves the account type of `user`.
|
||||||
|
* @returns a #ActUserAccountType
|
||||||
|
*/
|
||||||
|
get_account_type(): UserAccountType;
|
||||||
|
/**
|
||||||
|
* Returns whether or not #ActUser is automatically logged in at boot time.
|
||||||
|
* @returns %TRUE or %FALSE
|
||||||
|
*/
|
||||||
|
get_automatic_login(): boolean;
|
||||||
|
/**
|
||||||
|
* Retrieves the email address set by `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_email(): string;
|
||||||
|
/**
|
||||||
|
* Retrieves the home directory for `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_home_dir(): string;
|
||||||
|
/**
|
||||||
|
* Returns the path to the account icon belonging to `user`.
|
||||||
|
* @returns a path to an icon
|
||||||
|
*/
|
||||||
|
get_icon_file(): string;
|
||||||
|
/**
|
||||||
|
* Returns the value of #ActUser:language.
|
||||||
|
* @returns the user’s language, or the empty string if they are using the system default language, or %NULL if there is no connection to the daemon
|
||||||
|
*/
|
||||||
|
get_language(): string | null;
|
||||||
|
/**
|
||||||
|
* Returns the value of #ActUser:languages.
|
||||||
|
* @returns the user’s preferred languages, or the empty string if they are using the system default language, or %NULL if there is no connection to the daemon
|
||||||
|
*/
|
||||||
|
get_languages(): string[] | null;
|
||||||
|
/**
|
||||||
|
* Retrieves the location set by `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_location(): string;
|
||||||
|
/**
|
||||||
|
* Returns whether or not the #ActUser account is locked.
|
||||||
|
* @returns %TRUE or %FALSE
|
||||||
|
*/
|
||||||
|
get_locked(): boolean;
|
||||||
|
/**
|
||||||
|
* Returns the number of times `user` has logged in.
|
||||||
|
* @returns the login frequency
|
||||||
|
*/
|
||||||
|
get_login_frequency(): number;
|
||||||
|
/**
|
||||||
|
* Returns the login history for `user`.
|
||||||
|
* @returns a pointer to GVariant of type "a(xxa{sv})" which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_login_history(): GLib.Variant;
|
||||||
|
/**
|
||||||
|
* Returns the last login time for `user`.
|
||||||
|
* @returns the login time
|
||||||
|
*/
|
||||||
|
get_login_time(): number;
|
||||||
|
/**
|
||||||
|
* Get the number of sessions for a user that are graphical and on the
|
||||||
|
* same seat as the session of the calling process.
|
||||||
|
* @returns the number of sessions
|
||||||
|
*/
|
||||||
|
get_num_sessions(): number;
|
||||||
|
/**
|
||||||
|
* Get the number of sessions for a user on any seat of any type.
|
||||||
|
* See also act_user_get_num_sessions().
|
||||||
|
*
|
||||||
|
* (Currently, this function is only implemented for systemd-logind.
|
||||||
|
* For ConsoleKit, it is equivalent to act_user_get_num_sessions.)
|
||||||
|
* @returns the number of sessions
|
||||||
|
*/
|
||||||
|
get_num_sessions_anywhere(): number;
|
||||||
|
/**
|
||||||
|
* Returns the user accounts service object path of `user,`
|
||||||
|
* or %NULL if `user` doesn't have an object path associated
|
||||||
|
* with it.
|
||||||
|
* @returns the object path of the user
|
||||||
|
*/
|
||||||
|
get_object_path(): string;
|
||||||
|
/**
|
||||||
|
* Get the password expiration policy for a user.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
*/
|
||||||
|
get_password_expiration_policy(): [number, number, number, number, number, number];
|
||||||
|
/**
|
||||||
|
* Retrieves the password hint set by `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_password_hint(): string;
|
||||||
|
/**
|
||||||
|
* Retrieves the password mode of `user`.
|
||||||
|
* @returns a #ActUserPasswordMode
|
||||||
|
*/
|
||||||
|
get_password_mode(): UserPasswordMode;
|
||||||
|
/**
|
||||||
|
* Returns the id of the primary session of `user,` or %NULL if `user`
|
||||||
|
* has no primary session. The primary session will always be
|
||||||
|
* graphical and will be chosen from the sessions on the same seat as
|
||||||
|
* the seat of the session of the calling process.
|
||||||
|
* @returns the id of the primary session of the user
|
||||||
|
*/
|
||||||
|
get_primary_session_id(): string;
|
||||||
|
/**
|
||||||
|
* Retrieves the display name of `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_real_name(): string;
|
||||||
|
/**
|
||||||
|
* Returns whether or not the #ActUser account has retained state in accountsservice.
|
||||||
|
* @returns %TRUE or %FALSE
|
||||||
|
*/
|
||||||
|
get_saved(): boolean;
|
||||||
|
/**
|
||||||
|
* Returns the path to the configured session for `user`.
|
||||||
|
* @returns a path to an icon
|
||||||
|
*/
|
||||||
|
get_session(): string;
|
||||||
|
/**
|
||||||
|
* Returns the type of the configured session for `user`.
|
||||||
|
* @returns a path to an icon
|
||||||
|
*/
|
||||||
|
get_session_type(): string;
|
||||||
|
/**
|
||||||
|
* Retrieves the shell assigned to `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_shell(): string;
|
||||||
|
/**
|
||||||
|
* Retrieves the ID of `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_uid(): number;
|
||||||
|
/**
|
||||||
|
* Retrieves the login name of `user`.
|
||||||
|
* @returns a pointer to an array of characters which must not be modified or freed, or %NULL.
|
||||||
|
*/
|
||||||
|
get_user_name(): string;
|
||||||
|
/**
|
||||||
|
* Returns the path to the configured X session for `user`.
|
||||||
|
* @returns a path to an icon
|
||||||
|
*/
|
||||||
|
get_x_session(): string;
|
||||||
|
/**
|
||||||
|
* Retrieves whether the user is a local account or not.
|
||||||
|
* @returns %TRUE if the user is local
|
||||||
|
*/
|
||||||
|
is_local_account(): boolean;
|
||||||
|
/**
|
||||||
|
* Returns whether or not #ActUser is currently graphically logged in
|
||||||
|
* on the same seat as the seat of the session of the calling process.
|
||||||
|
* @returns %TRUE or %FALSE
|
||||||
|
*/
|
||||||
|
is_logged_in(): boolean;
|
||||||
|
/**
|
||||||
|
* Returns whether or not #ActUser is currently logged in in any way
|
||||||
|
* whatsoever. See also act_user_is_logged_in().
|
||||||
|
*
|
||||||
|
* (Currently, this function is only implemented for systemd-logind.
|
||||||
|
* For ConsoleKit, it is equivalent to act_user_is_logged_in.)
|
||||||
|
* @returns %TRUE or %FALSE
|
||||||
|
*/
|
||||||
|
is_logged_in_anywhere(): boolean;
|
||||||
|
/**
|
||||||
|
* Retrieves whether the user is nonexistent or not.
|
||||||
|
* @returns %TRUE if the user is nonexistent
|
||||||
|
*/
|
||||||
|
is_nonexistent(): boolean;
|
||||||
|
/**
|
||||||
|
* Returns whether or not #ActUser represents a 'system account' like
|
||||||
|
* 'root' or 'nobody'.
|
||||||
|
* @returns %TRUE or %FALSE
|
||||||
|
*/
|
||||||
|
is_system_account(): boolean;
|
||||||
|
/**
|
||||||
|
* Changes the account type of `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param account_type a #ActUserAccountType
|
||||||
|
*/
|
||||||
|
set_account_type(account_type: UserAccountType | null): void;
|
||||||
|
/**
|
||||||
|
* If enabled is set to %TRUE then this user will automatically be logged in
|
||||||
|
* at boot up time. Only one user can be configured to auto login at any given
|
||||||
|
* time, so subsequent calls to act_user_set_automatic_login() override previous
|
||||||
|
* calls.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param enabled whether or not to autologin for user.
|
||||||
|
*/
|
||||||
|
set_automatic_login(enabled: boolean): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new email to `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param email an email address
|
||||||
|
*/
|
||||||
|
set_email(email: string): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new icon for `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param icon_file path to an icon
|
||||||
|
*/
|
||||||
|
set_icon_file(icon_file: string): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new locale for `user,` setting #ActUser:language.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param language a locale (for example, `en_US.utf8`), or the empty string to use the system default locale
|
||||||
|
*/
|
||||||
|
set_language(language: string): void;
|
||||||
|
/**
|
||||||
|
* Assigns preferred languages for `user,` setting #ActUser:languages, and
|
||||||
|
* overriding #ActUser:language with the first item in the list if there is one.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param languages an array of locale (for example, `en_US.utf8`), or the empty string to use the system default locale
|
||||||
|
*/
|
||||||
|
set_languages(languages: string[]): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new location for `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param location a location
|
||||||
|
*/
|
||||||
|
set_location(location: string): void;
|
||||||
|
/**
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param locked whether or not the account is locked
|
||||||
|
*/
|
||||||
|
set_locked(locked: boolean): void;
|
||||||
|
/**
|
||||||
|
* Changes the password of `user` to `password`.
|
||||||
|
* `hint` is displayed to the user if they forget the password.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param password a password
|
||||||
|
* @param hint a hint to help user recall password
|
||||||
|
*/
|
||||||
|
set_password(password: string, hint: string): void;
|
||||||
|
/**
|
||||||
|
* Set the password expiration policy for a user.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param min_days_between_changes location to write minimum number of days needed between password changes.
|
||||||
|
* @param max_days_between_changes location to write maximum number of days password can stay unchanged.
|
||||||
|
* @param days_to_warn location to write number of days to warn user password is about to expire.
|
||||||
|
* @param days_after_expiration_until_lock location to write number of days account will be locked after password expires.
|
||||||
|
*/
|
||||||
|
set_password_expiration_policy(
|
||||||
|
min_days_between_changes: number,
|
||||||
|
max_days_between_changes: number,
|
||||||
|
days_to_warn: number,
|
||||||
|
days_after_expiration_until_lock: number,
|
||||||
|
): void;
|
||||||
|
set_password_hint(hint: string): void;
|
||||||
|
/**
|
||||||
|
* Changes the password of `user`. If `password_mode` is
|
||||||
|
* ACT_USER_PASSWORD_MODE_SET_AT_LOGIN then the user will
|
||||||
|
* be asked for a new password at the next login. If `password_mode`
|
||||||
|
* is ACT_USER_PASSWORD_MODE_NONE then the user will not require
|
||||||
|
* a password to log in.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param password_mode a #ActUserPasswordMode
|
||||||
|
*/
|
||||||
|
set_password_mode(password_mode: UserPasswordMode | null): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new name for `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param real_name a new name
|
||||||
|
*/
|
||||||
|
set_real_name(real_name: string): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new session for `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param session a session (e.g. gnome)
|
||||||
|
*/
|
||||||
|
set_session(session: string): void;
|
||||||
|
/**
|
||||||
|
* Assigns a type to the session for `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param session_type a type of session (e.g. "wayland" or "x11")
|
||||||
|
*/
|
||||||
|
set_session_type(session_type: string): void;
|
||||||
|
/**
|
||||||
|
* Set the user expiration policy for a user.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param expiration_time location to write users expires timestamp
|
||||||
|
*/
|
||||||
|
set_user_expiration_policy(expiration_time: number): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new username for `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param user_name a new user name
|
||||||
|
*/
|
||||||
|
set_user_name(user_name: string): void;
|
||||||
|
/**
|
||||||
|
* Assigns a new x session for `user`.
|
||||||
|
*
|
||||||
|
* Note this function is synchronous and ignores errors.
|
||||||
|
* @param x_session an x session (e.g. gnome)
|
||||||
|
*/
|
||||||
|
set_x_session(x_session: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module UserManager {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface UserAdded {
|
||||||
|
(user: User): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface UserChanged {
|
||||||
|
(user: User): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface UserIsLoggedInChanged {
|
||||||
|
(user: User): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface UserRemoved {
|
||||||
|
(user: User): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
exclude_usernames_list: any;
|
||||||
|
excludeUsernamesList: any;
|
||||||
|
has_multiple_users: boolean;
|
||||||
|
hasMultipleUsers: boolean;
|
||||||
|
include_usernames_list: any;
|
||||||
|
includeUsernamesList: any;
|
||||||
|
is_loaded: boolean;
|
||||||
|
isLoaded: boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A user manager object.
|
||||||
|
*/
|
||||||
|
class UserManager extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<UserManager>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get exclude_usernames_list(): any;
|
||||||
|
set exclude_usernames_list(val: any);
|
||||||
|
get excludeUsernamesList(): any;
|
||||||
|
set excludeUsernamesList(val: any);
|
||||||
|
get has_multiple_users(): boolean;
|
||||||
|
set has_multiple_users(val: boolean);
|
||||||
|
get hasMultipleUsers(): boolean;
|
||||||
|
set hasMultipleUsers(val: boolean);
|
||||||
|
get include_usernames_list(): any;
|
||||||
|
set include_usernames_list(val: any);
|
||||||
|
get includeUsernamesList(): any;
|
||||||
|
set includeUsernamesList(val: any);
|
||||||
|
get is_loaded(): boolean;
|
||||||
|
get isLoaded(): boolean;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<UserManager.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'user-added', callback: (_source: this, user: User) => void): number;
|
||||||
|
connect_after(signal: 'user-added', callback: (_source: this, user: User) => void): number;
|
||||||
|
emit(signal: 'user-added', user: User): void;
|
||||||
|
connect(signal: 'user-changed', callback: (_source: this, user: User) => void): number;
|
||||||
|
connect_after(signal: 'user-changed', callback: (_source: this, user: User) => void): number;
|
||||||
|
emit(signal: 'user-changed', user: User): void;
|
||||||
|
connect(signal: 'user-is-logged-in-changed', callback: (_source: this, user: User) => void): number;
|
||||||
|
connect_after(signal: 'user-is-logged-in-changed', callback: (_source: this, user: User) => void): number;
|
||||||
|
emit(signal: 'user-is-logged-in-changed', user: User): void;
|
||||||
|
connect(signal: 'user-removed', callback: (_source: this, user: User) => void): number;
|
||||||
|
connect_after(signal: 'user-removed', callback: (_source: this, user: User) => void): number;
|
||||||
|
emit(signal: 'user-removed', user: User): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the user manager singleton instance. Calling this function will
|
||||||
|
* automatically being loading the user list if it isn't loaded already.
|
||||||
|
* The #ActUserManager:is-loaded property will be set to %TRUE when the users
|
||||||
|
* are finished loading and then act_user_manager_list_users() can be called.
|
||||||
|
*/
|
||||||
|
static get_default(): UserManager;
|
||||||
|
|
||||||
|
// Virtual methods
|
||||||
|
|
||||||
|
vfunc_user_added(user: User): void;
|
||||||
|
vfunc_user_changed(user: User): void;
|
||||||
|
vfunc_user_is_logged_in_changed(user: User): void;
|
||||||
|
vfunc_user_removed(user: User): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Activate the session for a given user.
|
||||||
|
* @param user the user to activate
|
||||||
|
* @returns whether successfully activated
|
||||||
|
*/
|
||||||
|
activate_user_session(user: User): boolean;
|
||||||
|
/**
|
||||||
|
* Caches a user account so it shows up via act_user_manager_list_users().
|
||||||
|
* @param username a user name
|
||||||
|
* @returns user object
|
||||||
|
*/
|
||||||
|
cache_user(username: string): User;
|
||||||
|
/**
|
||||||
|
* Asynchronously caches a user account so it shows up via
|
||||||
|
* act_user_manager_list_users().
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_cache_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param username a unix user name
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
*/
|
||||||
|
cache_user_async(username: string, cancellable?: Gio.Cancellable | null): Promise<User>;
|
||||||
|
/**
|
||||||
|
* Asynchronously caches a user account so it shows up via
|
||||||
|
* act_user_manager_list_users().
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_cache_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param username a unix user name
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
||||||
|
*/
|
||||||
|
cache_user_async(
|
||||||
|
username: string,
|
||||||
|
cancellable: Gio.Cancellable | null,
|
||||||
|
callback: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): void;
|
||||||
|
/**
|
||||||
|
* Asynchronously caches a user account so it shows up via
|
||||||
|
* act_user_manager_list_users().
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_cache_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param username a unix user name
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
||||||
|
*/
|
||||||
|
cache_user_async(
|
||||||
|
username: string,
|
||||||
|
cancellable?: Gio.Cancellable | null,
|
||||||
|
callback?: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): Promise<User> | void;
|
||||||
|
/**
|
||||||
|
* Finishes an asynchronous user caching.
|
||||||
|
*
|
||||||
|
* See act_user_manager_cache_user_async().
|
||||||
|
* @param result a #GAsyncResult
|
||||||
|
* @returns user object
|
||||||
|
*/
|
||||||
|
cache_user_finish(result: Gio.AsyncResult): User;
|
||||||
|
/**
|
||||||
|
* Check whether the user can switch to another session.
|
||||||
|
* @returns whether we can switch to another session
|
||||||
|
*/
|
||||||
|
can_switch(): boolean;
|
||||||
|
/**
|
||||||
|
* Creates a user account on the system.
|
||||||
|
* @param username a unix user name
|
||||||
|
* @param fullname a unix GECOS value
|
||||||
|
* @param accounttype a #ActUserAccountType
|
||||||
|
* @returns user object
|
||||||
|
*/
|
||||||
|
create_user(username: string, fullname: string, accounttype: UserAccountType | null): User;
|
||||||
|
/**
|
||||||
|
* Asynchronously creates a user account on the system.
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_create_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param username a unix user name
|
||||||
|
* @param fullname a unix GECOS value
|
||||||
|
* @param accounttype a #ActUserAccountType
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
*/
|
||||||
|
create_user_async(
|
||||||
|
username: string,
|
||||||
|
fullname: string,
|
||||||
|
accounttype: UserAccountType | null,
|
||||||
|
cancellable?: Gio.Cancellable | null,
|
||||||
|
): Promise<User>;
|
||||||
|
/**
|
||||||
|
* Asynchronously creates a user account on the system.
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_create_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param username a unix user name
|
||||||
|
* @param fullname a unix GECOS value
|
||||||
|
* @param accounttype a #ActUserAccountType
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
||||||
|
*/
|
||||||
|
create_user_async(
|
||||||
|
username: string,
|
||||||
|
fullname: string,
|
||||||
|
accounttype: UserAccountType | null,
|
||||||
|
cancellable: Gio.Cancellable | null,
|
||||||
|
callback: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): void;
|
||||||
|
/**
|
||||||
|
* Asynchronously creates a user account on the system.
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_create_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param username a unix user name
|
||||||
|
* @param fullname a unix GECOS value
|
||||||
|
* @param accounttype a #ActUserAccountType
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
||||||
|
*/
|
||||||
|
create_user_async(
|
||||||
|
username: string,
|
||||||
|
fullname: string,
|
||||||
|
accounttype: UserAccountType | null,
|
||||||
|
cancellable?: Gio.Cancellable | null,
|
||||||
|
callback?: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): Promise<User> | void;
|
||||||
|
/**
|
||||||
|
* Finishes an asynchronous user creation.
|
||||||
|
*
|
||||||
|
* See act_user_manager_create_user_async().
|
||||||
|
* @param result a #GAsyncResult
|
||||||
|
* @returns user object
|
||||||
|
*/
|
||||||
|
create_user_finish(result: Gio.AsyncResult): User;
|
||||||
|
/**
|
||||||
|
* Deletes a user account on the system.
|
||||||
|
* @param user an #ActUser object
|
||||||
|
* @param remove_files %TRUE to delete the users home directory
|
||||||
|
* @returns %TRUE if the user account was successfully deleted
|
||||||
|
*/
|
||||||
|
delete_user(user: User, remove_files: boolean): boolean;
|
||||||
|
/**
|
||||||
|
* Asynchronously deletes a user account from the system.
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_delete_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param user a #ActUser object
|
||||||
|
* @param remove_files %TRUE to delete the users home directory
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
*/
|
||||||
|
delete_user_async(
|
||||||
|
user: User,
|
||||||
|
remove_files: boolean,
|
||||||
|
cancellable?: Gio.Cancellable | null,
|
||||||
|
): Promise<boolean>;
|
||||||
|
/**
|
||||||
|
* Asynchronously deletes a user account from the system.
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_delete_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param user a #ActUser object
|
||||||
|
* @param remove_files %TRUE to delete the users home directory
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
||||||
|
*/
|
||||||
|
delete_user_async(
|
||||||
|
user: User,
|
||||||
|
remove_files: boolean,
|
||||||
|
cancellable: Gio.Cancellable | null,
|
||||||
|
callback: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): void;
|
||||||
|
/**
|
||||||
|
* Asynchronously deletes a user account from the system.
|
||||||
|
*
|
||||||
|
* For more details, see act_user_manager_delete_user(), which
|
||||||
|
* is the synchronous version of this call.
|
||||||
|
* @param user a #ActUser object
|
||||||
|
* @param remove_files %TRUE to delete the users home directory
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore
|
||||||
|
* @param callback a #GAsyncReadyCallback to call when the request is satisfied
|
||||||
|
*/
|
||||||
|
delete_user_async(
|
||||||
|
user: User,
|
||||||
|
remove_files: boolean,
|
||||||
|
cancellable?: Gio.Cancellable | null,
|
||||||
|
callback?: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): Promise<boolean> | void;
|
||||||
|
/**
|
||||||
|
* Finishes an asynchronous user account deletion.
|
||||||
|
*
|
||||||
|
* See act_user_manager_delete_user_async().
|
||||||
|
* @param result a #GAsyncResult
|
||||||
|
* @returns %TRUE if the user account was successfully deleted
|
||||||
|
*/
|
||||||
|
delete_user_finish(result: Gio.AsyncResult): boolean;
|
||||||
|
/**
|
||||||
|
* Retrieves a pointer to the #ActUser object for the login `username`
|
||||||
|
* from `manager`. Trying to use this object before its
|
||||||
|
* #ActUser:is-loaded property is %TRUE will result in undefined
|
||||||
|
* behavior.
|
||||||
|
* @param username the login name of the user to get.
|
||||||
|
* @returns #ActUser object
|
||||||
|
*/
|
||||||
|
get_user(username: string): User;
|
||||||
|
/**
|
||||||
|
* Retrieves a pointer to the #ActUser object for the user with the
|
||||||
|
* given uid from `manager`. Trying to use this object before its
|
||||||
|
* #ActUser:is-loaded property is %TRUE will result in undefined
|
||||||
|
* behavior.
|
||||||
|
* @param id the uid of the user to get.
|
||||||
|
* @returns #ActUser object
|
||||||
|
*/
|
||||||
|
get_user_by_id(id: number): User;
|
||||||
|
/**
|
||||||
|
* Switch the display to the login manager.
|
||||||
|
* @returns whether successful or not
|
||||||
|
*/
|
||||||
|
goto_login_session(): boolean;
|
||||||
|
/**
|
||||||
|
* Get a list of system user accounts
|
||||||
|
* @returns List of #ActUser objects
|
||||||
|
*/
|
||||||
|
list_users(): User[];
|
||||||
|
/**
|
||||||
|
* Check whether or not the accounts service is running.
|
||||||
|
* @returns whether or not accounts service is running
|
||||||
|
*/
|
||||||
|
no_service(): boolean;
|
||||||
|
/**
|
||||||
|
* Releases all metadata about a user account, including icon,
|
||||||
|
* language and session. If the user account is from a remote
|
||||||
|
* server and the user has never logged in before, then that
|
||||||
|
* account will no longer show up in ListCachedUsers() output.
|
||||||
|
* @param username a user name
|
||||||
|
* @returns %TRUE if successful, otherwise %FALSE
|
||||||
|
*/
|
||||||
|
uncache_user(username: string): boolean;
|
||||||
|
uncache_user_async(username: string, cancellable?: Gio.Cancellable | null): Promise<boolean>;
|
||||||
|
uncache_user_async(
|
||||||
|
username: string,
|
||||||
|
cancellable: Gio.Cancellable | null,
|
||||||
|
callback: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): void;
|
||||||
|
uncache_user_async(
|
||||||
|
username: string,
|
||||||
|
cancellable?: Gio.Cancellable | null,
|
||||||
|
callback?: Gio.AsyncReadyCallback<this> | null,
|
||||||
|
): Promise<boolean> | void;
|
||||||
|
/**
|
||||||
|
* Finishes an asynchronous user uncaching.
|
||||||
|
*
|
||||||
|
* See act_user_manager_uncache_user_async().
|
||||||
|
* @param result a #GAsyncResult
|
||||||
|
* @returns %TRUE if the user account was successfully uncached
|
||||||
|
*/
|
||||||
|
uncache_user_finish(result: Gio.AsyncResult): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserClass = typeof User;
|
||||||
|
type UserManagerClass = typeof UserManager;
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AccountsService;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AccountsService' {
|
||||||
|
import AccountsService10 from 'gi://AccountsService?version=1.0';
|
||||||
|
export default AccountsService10;
|
||||||
|
}
|
||||||
|
// END
|
||||||
117691
configs/userland/ags/@girs/adw-1.d.ts
vendored
Normal file
117691
configs/userland/ags/@girs/adw-1.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
648
configs/userland/ags/@girs/appindicator3-0.1.d.ts
vendored
Normal file
648
configs/userland/ags/@girs/appindicator3-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,648 @@
|
|||||||
|
/// <reference path="./gtk-3.0.d.ts" />
|
||||||
|
/// <reference path="./xlib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gdk-3.0.d.ts" />
|
||||||
|
/// <reference path="./cairo-1.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./pango-1.0.d.ts" />
|
||||||
|
/// <reference path="./harfbuzz-0.0.d.ts" />
|
||||||
|
/// <reference path="./freetype2-2.0.d.ts" />
|
||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
/// <reference path="./gdkpixbuf-2.0.d.ts" />
|
||||||
|
/// <reference path="./atk-1.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AppIndicator3?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gtk from 'gi://Gtk?version=3.0';
|
||||||
|
import type xlib from 'gi://xlib?version=2.0';
|
||||||
|
import type Gdk from 'gi://Gdk?version=3.0';
|
||||||
|
import type cairo from 'gi://cairo?version=1.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type Pango from 'gi://Pango?version=1.0';
|
||||||
|
import type HarfBuzz from 'gi://HarfBuzz?version=0.0';
|
||||||
|
import type freetype2 from 'gi://freetype2?version=2.0';
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
import type GdkPixbuf from 'gi://GdkPixbuf?version=2.0';
|
||||||
|
import type Atk from 'gi://Atk?version=1.0';
|
||||||
|
|
||||||
|
export namespace AppIndicator3 {
|
||||||
|
/**
|
||||||
|
* AppIndicator3-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The category provides grouping for the indicators so that
|
||||||
|
* users can find indicators that are similar together.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The category provides grouping for the indicators so that
|
||||||
|
* users can find indicators that are similar together.
|
||||||
|
*/
|
||||||
|
export namespace IndicatorCategory {
|
||||||
|
export const $gtype: GObject.GType<IndicatorCategory>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum IndicatorCategory {
|
||||||
|
/**
|
||||||
|
* The indicator is used to display the status of the application.
|
||||||
|
*/
|
||||||
|
APPLICATION_STATUS,
|
||||||
|
/**
|
||||||
|
* The application is used for communication with other people.
|
||||||
|
*/
|
||||||
|
COMMUNICATIONS,
|
||||||
|
/**
|
||||||
|
* A system indicator relating to something in the user's system.
|
||||||
|
*/
|
||||||
|
SYSTEM_SERVICES,
|
||||||
|
/**
|
||||||
|
* An indicator relating to the user's hardware.
|
||||||
|
*/
|
||||||
|
HARDWARE,
|
||||||
|
/**
|
||||||
|
* Something not defined in this enum, please don't use unless you really need it.
|
||||||
|
*/
|
||||||
|
OTHER,
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* These are the states that the indicator can be on in
|
||||||
|
* the user's panel. The indicator by default starts
|
||||||
|
* in the state `APP_INDICATOR_STATUS_PASSIVE` and can be
|
||||||
|
* shown by setting it to `APP_INDICATOR_STATUS_ACTIVE`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These are the states that the indicator can be on in
|
||||||
|
* the user's panel. The indicator by default starts
|
||||||
|
* in the state `APP_INDICATOR_STATUS_PASSIVE` and can be
|
||||||
|
* shown by setting it to `APP_INDICATOR_STATUS_ACTIVE`.
|
||||||
|
*/
|
||||||
|
export namespace IndicatorStatus {
|
||||||
|
export const $gtype: GObject.GType<IndicatorStatus>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum IndicatorStatus {
|
||||||
|
/**
|
||||||
|
* The indicator should not be shown to the user.
|
||||||
|
*/
|
||||||
|
PASSIVE,
|
||||||
|
/**
|
||||||
|
* The indicator should be shown in it's default state.
|
||||||
|
*/
|
||||||
|
ACTIVE,
|
||||||
|
/**
|
||||||
|
* The indicator should show it's attention icon.
|
||||||
|
*/
|
||||||
|
ATTENTION,
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* String identifier for the #AppIndicator::connection-changed signal.
|
||||||
|
*/
|
||||||
|
const INDICATOR_SIGNAL_CONNECTION_CHANGED: string;
|
||||||
|
/**
|
||||||
|
* String identifier for the #AppIndicator::new-attention-icon signal.
|
||||||
|
*/
|
||||||
|
const INDICATOR_SIGNAL_NEW_ATTENTION_ICON: string;
|
||||||
|
/**
|
||||||
|
* String identifier for the #AppIndicator::new-icon signal.
|
||||||
|
*/
|
||||||
|
const INDICATOR_SIGNAL_NEW_ICON: string;
|
||||||
|
/**
|
||||||
|
* String identifier for the #AppIndicator::new-icon-theme-path signal.
|
||||||
|
*/
|
||||||
|
const INDICATOR_SIGNAL_NEW_ICON_THEME_PATH: string;
|
||||||
|
/**
|
||||||
|
* String identifier for the #AppIndicator::new-label signal.
|
||||||
|
*/
|
||||||
|
const INDICATOR_SIGNAL_NEW_LABEL: string;
|
||||||
|
/**
|
||||||
|
* String identifier for the #AppIndicator::new-status signal.
|
||||||
|
*/
|
||||||
|
const INDICATOR_SIGNAL_NEW_STATUS: string;
|
||||||
|
/**
|
||||||
|
* String identifier for the #AppIndicator::scroll-event signal.
|
||||||
|
*/
|
||||||
|
const INDICATOR_SIGNAL_SCROLL_EVENT: string;
|
||||||
|
module Indicator {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface ConnectionChanged {
|
||||||
|
(arg1: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NewAttentionIcon {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NewIcon {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NewIconThemePath {
|
||||||
|
(object: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NewLabel {
|
||||||
|
(object: string, p0: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NewStatus {
|
||||||
|
(arg1: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ScrollEvent {
|
||||||
|
(arg1: number, arg2: Gdk.ScrollDirection): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
attention_icon_desc: string;
|
||||||
|
attentionIconDesc: string;
|
||||||
|
attention_icon_name: string;
|
||||||
|
attentionIconName: string;
|
||||||
|
category: string;
|
||||||
|
connected: boolean;
|
||||||
|
icon_desc: string;
|
||||||
|
iconDesc: string;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
icon_theme_path: string;
|
||||||
|
iconThemePath: string;
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
label_guide: string;
|
||||||
|
labelGuide: string;
|
||||||
|
ordering_index: number;
|
||||||
|
orderingIndex: number;
|
||||||
|
status: string;
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A application indicator represents the values that are needed to show a
|
||||||
|
* unique status in the panel for an application. In general, applications
|
||||||
|
* should try to fit in the other indicators that are available on the
|
||||||
|
* panel before using this. But, sometimes it is necissary.
|
||||||
|
*
|
||||||
|
* Private fields
|
||||||
|
*/
|
||||||
|
class Indicator extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Indicator>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the indicator sets it's status to %APP_INDICATOR_STATUS_ATTENTION
|
||||||
|
* then this textual description of the icon shown.
|
||||||
|
*/
|
||||||
|
get attention_icon_desc(): string;
|
||||||
|
set attention_icon_desc(val: string);
|
||||||
|
/**
|
||||||
|
* If the indicator sets it's status to %APP_INDICATOR_STATUS_ATTENTION
|
||||||
|
* then this textual description of the icon shown.
|
||||||
|
*/
|
||||||
|
get attentionIconDesc(): string;
|
||||||
|
set attentionIconDesc(val: string);
|
||||||
|
/**
|
||||||
|
* If the indicator sets it's status to %APP_INDICATOR_STATUS_ATTENTION
|
||||||
|
* then this icon is shown.
|
||||||
|
*/
|
||||||
|
get attention_icon_name(): string;
|
||||||
|
set attention_icon_name(val: string);
|
||||||
|
/**
|
||||||
|
* If the indicator sets it's status to %APP_INDICATOR_STATUS_ATTENTION
|
||||||
|
* then this icon is shown.
|
||||||
|
*/
|
||||||
|
get attentionIconName(): string;
|
||||||
|
set attentionIconName(val: string);
|
||||||
|
/**
|
||||||
|
* The type of indicator that this represents. Please don't use 'Other'.
|
||||||
|
* Defaults to 'ApplicationStatus'.
|
||||||
|
*/
|
||||||
|
get category(): string;
|
||||||
|
/**
|
||||||
|
* Pretty simple, %TRUE if we have a reasonable expectation of being
|
||||||
|
* displayed through this object. You should hide your TrayIcon if so.
|
||||||
|
*/
|
||||||
|
get connected(): boolean;
|
||||||
|
/**
|
||||||
|
* The description of the regular icon that is shown for the indicator.
|
||||||
|
*/
|
||||||
|
get icon_desc(): string;
|
||||||
|
set icon_desc(val: string);
|
||||||
|
/**
|
||||||
|
* The description of the regular icon that is shown for the indicator.
|
||||||
|
*/
|
||||||
|
get iconDesc(): string;
|
||||||
|
set iconDesc(val: string);
|
||||||
|
/**
|
||||||
|
* The name of the regular icon that is shown for the indicator.
|
||||||
|
*/
|
||||||
|
get icon_name(): string;
|
||||||
|
set icon_name(val: string);
|
||||||
|
/**
|
||||||
|
* The name of the regular icon that is shown for the indicator.
|
||||||
|
*/
|
||||||
|
get iconName(): string;
|
||||||
|
set iconName(val: string);
|
||||||
|
/**
|
||||||
|
* An additional place to look for icon names that may be installed by the
|
||||||
|
* application.
|
||||||
|
*/
|
||||||
|
get icon_theme_path(): string;
|
||||||
|
set icon_theme_path(val: string);
|
||||||
|
/**
|
||||||
|
* An additional place to look for icon names that may be installed by the
|
||||||
|
* application.
|
||||||
|
*/
|
||||||
|
get iconThemePath(): string;
|
||||||
|
set iconThemePath(val: string);
|
||||||
|
/**
|
||||||
|
* The ID for this indicator, which should be unique, but used consistently
|
||||||
|
* by this program and its indicator.
|
||||||
|
*/
|
||||||
|
get id(): string;
|
||||||
|
/**
|
||||||
|
* A label that can be shown next to the string in the application
|
||||||
|
* indicator. The label will not be shown unless there is an icon
|
||||||
|
* as well. The label is useful for numerical and other frequently
|
||||||
|
* updated information. In general, it shouldn't be shown unless a
|
||||||
|
* user requests it as it can take up a significant amount of space
|
||||||
|
* on the user's panel. This may not be shown in all visualizations.
|
||||||
|
*/
|
||||||
|
get label(): string;
|
||||||
|
set label(val: string);
|
||||||
|
/**
|
||||||
|
* An optional string to provide guidance to the panel on how big
|
||||||
|
* the #AppIndicator:label string could get. If this is set correctly
|
||||||
|
* then the panel should never 'jiggle' as the string adjusts through
|
||||||
|
* out the range of options. For instance, if you were providing a
|
||||||
|
* percentage like "54% thrust" in #AppIndicator:label you'd want to
|
||||||
|
* set this string to "100% thrust" to ensure space when Scotty can
|
||||||
|
* get you enough power.
|
||||||
|
*/
|
||||||
|
get label_guide(): string;
|
||||||
|
set label_guide(val: string);
|
||||||
|
/**
|
||||||
|
* An optional string to provide guidance to the panel on how big
|
||||||
|
* the #AppIndicator:label string could get. If this is set correctly
|
||||||
|
* then the panel should never 'jiggle' as the string adjusts through
|
||||||
|
* out the range of options. For instance, if you were providing a
|
||||||
|
* percentage like "54% thrust" in #AppIndicator:label you'd want to
|
||||||
|
* set this string to "100% thrust" to ensure space when Scotty can
|
||||||
|
* get you enough power.
|
||||||
|
*/
|
||||||
|
get labelGuide(): string;
|
||||||
|
set labelGuide(val: string);
|
||||||
|
/**
|
||||||
|
* The ordering index is an odd parameter, and if you think you don't need
|
||||||
|
* it you're probably right. In general, the application indicator try
|
||||||
|
* to place the applications in a recreatable place taking into account
|
||||||
|
* which category they're in to try and group them. But, there are some
|
||||||
|
* cases where you'd want to ensure indicators are next to each other.
|
||||||
|
* To do that you can override the generated ordering index and replace it
|
||||||
|
* with a new one. Again, you probably don't want to be doing this, but
|
||||||
|
* in case you do, this is the way.
|
||||||
|
*/
|
||||||
|
get ordering_index(): number;
|
||||||
|
set ordering_index(val: number);
|
||||||
|
/**
|
||||||
|
* The ordering index is an odd parameter, and if you think you don't need
|
||||||
|
* it you're probably right. In general, the application indicator try
|
||||||
|
* to place the applications in a recreatable place taking into account
|
||||||
|
* which category they're in to try and group them. But, there are some
|
||||||
|
* cases where you'd want to ensure indicators are next to each other.
|
||||||
|
* To do that you can override the generated ordering index and replace it
|
||||||
|
* with a new one. Again, you probably don't want to be doing this, but
|
||||||
|
* in case you do, this is the way.
|
||||||
|
*/
|
||||||
|
get orderingIndex(): number;
|
||||||
|
set orderingIndex(val: number);
|
||||||
|
/**
|
||||||
|
* Whether the indicator is shown or requests attention. Defaults to
|
||||||
|
* 'Passive'.
|
||||||
|
*/
|
||||||
|
get status(): string;
|
||||||
|
set status(val: string);
|
||||||
|
/**
|
||||||
|
* Provides a way to refer to this application indicator in a human
|
||||||
|
* readable form. This is used in the Unity desktop in the HUD as
|
||||||
|
* the first part of the menu entries to distinguish them from the
|
||||||
|
* focused application's entries.
|
||||||
|
*/
|
||||||
|
get title(): string;
|
||||||
|
set title(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Indicator.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](id: string, icon_name: string, category: IndicatorCategory): Indicator;
|
||||||
|
|
||||||
|
static new_with_path(
|
||||||
|
id: string,
|
||||||
|
icon_name: string,
|
||||||
|
category: IndicatorCategory,
|
||||||
|
icon_theme_path: string,
|
||||||
|
): Indicator;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'connection-changed', callback: (_source: this, arg1: boolean) => void): number;
|
||||||
|
connect_after(signal: 'connection-changed', callback: (_source: this, arg1: boolean) => void): number;
|
||||||
|
emit(signal: 'connection-changed', arg1: boolean): void;
|
||||||
|
connect(signal: 'new-attention-icon', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'new-attention-icon', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'new-attention-icon'): void;
|
||||||
|
connect(signal: 'new-icon', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'new-icon', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'new-icon'): void;
|
||||||
|
connect(signal: 'new-icon-theme-path', callback: (_source: this, object: string) => void): number;
|
||||||
|
connect_after(signal: 'new-icon-theme-path', callback: (_source: this, object: string) => void): number;
|
||||||
|
emit(signal: 'new-icon-theme-path', object: string): void;
|
||||||
|
connect(signal: 'new-label', callback: (_source: this, object: string, p0: string) => void): number;
|
||||||
|
connect_after(signal: 'new-label', callback: (_source: this, object: string, p0: string) => void): number;
|
||||||
|
emit(signal: 'new-label', object: string, p0: string): void;
|
||||||
|
connect(signal: 'new-status', callback: (_source: this, arg1: string) => void): number;
|
||||||
|
connect_after(signal: 'new-status', callback: (_source: this, arg1: string) => void): number;
|
||||||
|
emit(signal: 'new-status', arg1: string): void;
|
||||||
|
connect(
|
||||||
|
signal: 'scroll-event',
|
||||||
|
callback: (_source: this, arg1: number, arg2: Gdk.ScrollDirection) => void,
|
||||||
|
): number;
|
||||||
|
connect_after(
|
||||||
|
signal: 'scroll-event',
|
||||||
|
callback: (_source: this, arg1: number, arg2: Gdk.ScrollDirection) => void,
|
||||||
|
): number;
|
||||||
|
emit(signal: 'scroll-event', arg1: number, arg2: Gdk.ScrollDirection): void;
|
||||||
|
|
||||||
|
// Virtual methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Slot for #AppIndicator::connection-changed.
|
||||||
|
* @param connected
|
||||||
|
*/
|
||||||
|
vfunc_connection_changed(connected: boolean): void;
|
||||||
|
/**
|
||||||
|
* Slot for #AppIndicator::new-attention-icon.
|
||||||
|
*/
|
||||||
|
vfunc_new_attention_icon(): void;
|
||||||
|
/**
|
||||||
|
* Slot for #AppIndicator::new-icon.
|
||||||
|
*/
|
||||||
|
vfunc_new_icon(): void;
|
||||||
|
/**
|
||||||
|
* Slot for #AppIndicator::new-icon-theme-path
|
||||||
|
* @param icon_theme_path
|
||||||
|
*/
|
||||||
|
vfunc_new_icon_theme_path(icon_theme_path: string): void;
|
||||||
|
/**
|
||||||
|
* Slot for #AppIndicator::new-label.
|
||||||
|
* @param label
|
||||||
|
* @param guide
|
||||||
|
*/
|
||||||
|
vfunc_new_label(label: string, guide: string): void;
|
||||||
|
/**
|
||||||
|
* Slot for #AppIndicator::new-status.
|
||||||
|
* @param status
|
||||||
|
*/
|
||||||
|
vfunc_new_status(status: string): void;
|
||||||
|
/**
|
||||||
|
* Slot for #AppIndicator::scroll-event
|
||||||
|
* @param delta
|
||||||
|
* @param direction
|
||||||
|
*/
|
||||||
|
vfunc_scroll_event(delta: number, direction: Gdk.ScrollDirection): void;
|
||||||
|
/**
|
||||||
|
* The function that gets called if an Application
|
||||||
|
* Indicator area appears after the fallback has been created.
|
||||||
|
* @param status_icon
|
||||||
|
*/
|
||||||
|
vfunc_unfallback(status_icon: Gtk.StatusIcon): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function allows for building the Application Indicator menu
|
||||||
|
* from a static desktop file.
|
||||||
|
* @param desktop_file A path to the desktop file to build the menu from
|
||||||
|
* @param desktop_profile Which entries should be used from the desktop file
|
||||||
|
*/
|
||||||
|
build_menu_from_desktop(desktop_file: string, desktop_profile: string): void;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:attention-icon-name.
|
||||||
|
* @returns The current attention icon name.
|
||||||
|
*/
|
||||||
|
get_attention_icon(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:attention-icon-desc.
|
||||||
|
* @returns The current attention icon description.
|
||||||
|
*/
|
||||||
|
get_attention_icon_desc(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:category.
|
||||||
|
* @returns The current category.
|
||||||
|
*/
|
||||||
|
get_category(): IndicatorCategory;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:icon-name.
|
||||||
|
* @returns The current icon name.
|
||||||
|
*/
|
||||||
|
get_icon(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:icon-desc.
|
||||||
|
* @returns The current icon description.
|
||||||
|
*/
|
||||||
|
get_icon_desc(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:icon-theme-path.
|
||||||
|
* @returns The current icon theme path.
|
||||||
|
*/
|
||||||
|
get_icon_theme_path(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:id.
|
||||||
|
* @returns The current ID
|
||||||
|
*/
|
||||||
|
get_id(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:label.
|
||||||
|
* @returns The current label.
|
||||||
|
*/
|
||||||
|
get_label(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:label-guide.
|
||||||
|
* @returns The current label guide.
|
||||||
|
*/
|
||||||
|
get_label_guide(): string;
|
||||||
|
/**
|
||||||
|
* Gets the menu being used for this application indicator.
|
||||||
|
* Wrapper function for property #AppIndicator:menu.
|
||||||
|
* @returns A #GtkMenu object or %NULL if one hasn't been set.
|
||||||
|
*/
|
||||||
|
get_menu(): Gtk.Menu;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:ordering-index.
|
||||||
|
* @returns The current ordering index.
|
||||||
|
*/
|
||||||
|
get_ordering_index(): number;
|
||||||
|
/**
|
||||||
|
* Gets the menuitem being called on secondary-activate event.
|
||||||
|
* @returns A #GtkWidget object or %NULL if none has been set.
|
||||||
|
*/
|
||||||
|
get_secondary_activate_target(): Gtk.Widget;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:status.
|
||||||
|
* @returns The current status.
|
||||||
|
*/
|
||||||
|
get_status(): IndicatorStatus;
|
||||||
|
/**
|
||||||
|
* Gets the title of the application indicator. See the function
|
||||||
|
* app_indicator_set_title() for information on the title.
|
||||||
|
* @returns The current title.
|
||||||
|
*/
|
||||||
|
get_title(): string;
|
||||||
|
/**
|
||||||
|
* Wrapper for app_indicator_set_attention_icon_full() with a NULL
|
||||||
|
* description.
|
||||||
|
* @param icon_name The name of the attention icon to set for this indicator
|
||||||
|
*/
|
||||||
|
set_attention_icon(icon_name: string): void;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:attention-icon-name.
|
||||||
|
* @param icon_name The name of the attention icon to set for this indicator
|
||||||
|
* @param icon_desc A textual description of the icon
|
||||||
|
*/
|
||||||
|
set_attention_icon_full(icon_name: string, icon_desc: string): void;
|
||||||
|
/**
|
||||||
|
* Wrapper function for app_indicator_set_icon_full() with a NULL
|
||||||
|
* description.
|
||||||
|
* @param icon_name The icon name to set.
|
||||||
|
*/
|
||||||
|
set_icon(icon_name: string): void;
|
||||||
|
/**
|
||||||
|
* Sets the default icon to use when the status is active but
|
||||||
|
* not set to attention. In most cases, this should be the
|
||||||
|
* application icon for the program.
|
||||||
|
*
|
||||||
|
* Wrapper function for property #AppIndicator:icon-name and
|
||||||
|
* #AppIndicator::icon-desc.
|
||||||
|
* @param icon_name The icon name to set.
|
||||||
|
* @param icon_desc A textual description of the icon for accessibility
|
||||||
|
*/
|
||||||
|
set_icon_full(icon_name: string, icon_desc: string): void;
|
||||||
|
/**
|
||||||
|
* Sets the path to use when searching for icons.
|
||||||
|
* @param icon_theme_path The icon theme path to set.
|
||||||
|
*/
|
||||||
|
set_icon_theme_path(icon_theme_path: string): void;
|
||||||
|
/**
|
||||||
|
* This is a wrapper function for the #AppIndicator:label and
|
||||||
|
* #AppIndicator:guide properties. This function can take #NULL
|
||||||
|
* as either `label` or `guide` and will clear the entries.
|
||||||
|
* @param label The label to show next to the icon.
|
||||||
|
* @param guide A guide to size the label correctly.
|
||||||
|
*/
|
||||||
|
set_label(label: string, guide: string): void;
|
||||||
|
/**
|
||||||
|
* Sets the menu that should be shown when the Application Indicator
|
||||||
|
* is clicked on in the panel. An application indicator will not
|
||||||
|
* be rendered unless it has a menu.
|
||||||
|
*
|
||||||
|
* Wrapper function for property #AppIndicator:menu.
|
||||||
|
* @param menu A #GtkMenu to set
|
||||||
|
*/
|
||||||
|
set_menu(menu?: Gtk.Menu | null): void;
|
||||||
|
/**
|
||||||
|
* Sets the ordering index for the app indicator which effects the
|
||||||
|
* placement of it on the panel. For almost all app indicator
|
||||||
|
* this is not the function you're looking for.
|
||||||
|
*
|
||||||
|
* Wrapper function for property #AppIndicator:ordering-index.
|
||||||
|
* @param ordering_index A value for the ordering of this app indicator
|
||||||
|
*/
|
||||||
|
set_ordering_index(ordering_index: number): void;
|
||||||
|
/**
|
||||||
|
* Set the `menuitem` to be activated when a secondary activation event (i.e. a
|
||||||
|
* middle-click) is emitted over the #AppIndicator icon/label.
|
||||||
|
*
|
||||||
|
* The `menuitem` can be also a complex #GtkWidget, but to get activated when
|
||||||
|
* a secondary activation occurs in the #Appindicator, it must be a visible and
|
||||||
|
* active child (or inner-child) of the #AppIndicator:menu.
|
||||||
|
*
|
||||||
|
* Setting `menuitem` to %NULL causes to disable this feature.
|
||||||
|
* @param menuitem A #GtkWidget to be activated on secondary activation
|
||||||
|
*/
|
||||||
|
set_secondary_activate_target(menuitem?: Gtk.Widget | null): void;
|
||||||
|
/**
|
||||||
|
* Wrapper function for property #AppIndicator:status.
|
||||||
|
* @param status The status to set for this indicator
|
||||||
|
*/
|
||||||
|
set_status(status: IndicatorStatus | null): void;
|
||||||
|
/**
|
||||||
|
* Sets the title of the application indicator, or how it should be referred
|
||||||
|
* in a human readable form. This string should be UTF-8 and localized as it
|
||||||
|
* expected that users will set it.
|
||||||
|
*
|
||||||
|
* In the Unity desktop the most prominent place that this is show will be
|
||||||
|
* in the HUD. HUD listings for this application indicator will start with
|
||||||
|
* the title as the first part of the line for the menu items.
|
||||||
|
*
|
||||||
|
* Setting `title` to %NULL removes the title.
|
||||||
|
* @param title Title of the app indicator
|
||||||
|
*/
|
||||||
|
set_title(title?: string | null): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type IndicatorClass = typeof Indicator;
|
||||||
|
/**
|
||||||
|
* All of the private data in an instance of an application indicator.
|
||||||
|
* Private Fields
|
||||||
|
*/
|
||||||
|
abstract class IndicatorPrivate {
|
||||||
|
static $gtype: GObject.GType<IndicatorPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppIndicator3;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AppIndicator3' {
|
||||||
|
import AppIndicator301 from 'gi://AppIndicator3?version=0.1';
|
||||||
|
export default AppIndicator301;
|
||||||
|
}
|
||||||
|
// END
|
||||||
83
configs/userland/ags/@girs/appmenuglibtranslator-24.02.d.ts
vendored
Normal file
83
configs/userland/ags/@girs/appmenuglibtranslator-24.02.d.ts
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AppmenuGLibTranslator?version=24.02' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AppmenuGLibTranslator {
|
||||||
|
/**
|
||||||
|
* AppmenuGLibTranslator-24.02
|
||||||
|
*/
|
||||||
|
|
||||||
|
module Importer {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
action_group: Gio.ActionGroup;
|
||||||
|
actionGroup: Gio.ActionGroup;
|
||||||
|
bus_name: string;
|
||||||
|
busName: string;
|
||||||
|
model: Gio.MenuModel;
|
||||||
|
object_path: string;
|
||||||
|
objectPath: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Importer extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Importer>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get action_group(): Gio.ActionGroup;
|
||||||
|
get actionGroup(): Gio.ActionGroup;
|
||||||
|
set bus_name(val: string);
|
||||||
|
set busName(val: string);
|
||||||
|
get model(): Gio.MenuModel;
|
||||||
|
set object_path(val: string);
|
||||||
|
set objectPath(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Importer.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](bus_name: string, object_path: string): Importer;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImporterClass = typeof Importer;
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppmenuGLibTranslator;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AppmenuGLibTranslator' {
|
||||||
|
import AppmenuGLibTranslator2402 from 'gi://AppmenuGLibTranslator?version=24.02';
|
||||||
|
export default AppmenuGLibTranslator2402;
|
||||||
|
}
|
||||||
|
// END
|
||||||
6706
configs/userland/ags/@girs/appstream-1.0.d.ts
vendored
Normal file
6706
configs/userland/ags/@girs/appstream-1.0.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1318
configs/userland/ags/@girs/appstreamcompose-1.0.d.ts
vendored
Normal file
1318
configs/userland/ags/@girs/appstreamcompose-1.0.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6142
configs/userland/ags/@girs/appstreamglib-1.0.d.ts
vendored
Normal file
6142
configs/userland/ags/@girs/appstreamglib-1.0.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2169
configs/userland/ags/@girs/astal-3.0.d.ts
vendored
Normal file
2169
configs/userland/ags/@girs/astal-3.0.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1485
configs/userland/ags/@girs/astal-4.0.d.ts
vendored
Normal file
1485
configs/userland/ags/@girs/astal-4.0.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
384
configs/userland/ags/@girs/astalapps-0.1.d.ts
vendored
Normal file
384
configs/userland/ags/@girs/astalapps-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,384 @@
|
|||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalApps?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalApps {
|
||||||
|
/**
|
||||||
|
* AstalApps-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
module Application {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
app: never;
|
||||||
|
frequency: number;
|
||||||
|
name: string;
|
||||||
|
entry: string;
|
||||||
|
description: string;
|
||||||
|
wm_class: string;
|
||||||
|
wmClass: string;
|
||||||
|
executable: string;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
keywords: string[];
|
||||||
|
categories: string[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object representing an applications .desktop file.
|
||||||
|
*/
|
||||||
|
class Application extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Application>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The underlying DesktopAppInfo.
|
||||||
|
*/
|
||||||
|
get app(): never;
|
||||||
|
set app(val: never);
|
||||||
|
/**
|
||||||
|
* The number of times [method`AstalApps`.Application.launch] was called on this Application.
|
||||||
|
*/
|
||||||
|
get frequency(): number;
|
||||||
|
set frequency(val: number);
|
||||||
|
/**
|
||||||
|
* The name of this Application.
|
||||||
|
*/
|
||||||
|
get name(): string;
|
||||||
|
/**
|
||||||
|
* Name of the .desktop of this Application.
|
||||||
|
*/
|
||||||
|
get entry(): string;
|
||||||
|
/**
|
||||||
|
* Description of this Application.
|
||||||
|
*/
|
||||||
|
get description(): string;
|
||||||
|
/**
|
||||||
|
* `StartupWMClass` field from the desktop file. This represents the `WM_CLASS` property of the main window of the application.
|
||||||
|
*/
|
||||||
|
get wm_class(): string;
|
||||||
|
/**
|
||||||
|
* `StartupWMClass` field from the desktop file. This represents the `WM_CLASS` property of the main window of the application.
|
||||||
|
*/
|
||||||
|
get wmClass(): string;
|
||||||
|
/**
|
||||||
|
* `Exec` field from the desktop file. Note that if you want to launch this Application you should use the [method@
|
||||||
|
* AstalApps.Application.launch] method.
|
||||||
|
*/
|
||||||
|
get executable(): string;
|
||||||
|
/**
|
||||||
|
* `Icon` field from the desktop file. This is usually a named icon or a path to a file.
|
||||||
|
*/
|
||||||
|
get icon_name(): string;
|
||||||
|
/**
|
||||||
|
* `Icon` field from the desktop file. This is usually a named icon or a path to a file.
|
||||||
|
*/
|
||||||
|
get iconName(): string;
|
||||||
|
/**
|
||||||
|
* `Keywords` field from the desktop file.
|
||||||
|
*/
|
||||||
|
get keywords(): string[];
|
||||||
|
/**
|
||||||
|
* `Categories` field from the desktop file.
|
||||||
|
*/
|
||||||
|
get categories(): string[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Application.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a value from the .desktop file by its key.
|
||||||
|
* @param key
|
||||||
|
*/
|
||||||
|
get_key(key: string): string;
|
||||||
|
/**
|
||||||
|
* Launches this application. The launched application inherits the environment of the launching process
|
||||||
|
*/
|
||||||
|
launch(): boolean;
|
||||||
|
/**
|
||||||
|
* Calculate a score for an application using fuzzy matching algorithm.
|
||||||
|
* @param term
|
||||||
|
*/
|
||||||
|
fuzzy_match(term: string): Score;
|
||||||
|
/**
|
||||||
|
* Calculate a score using exact string algorithm.
|
||||||
|
* @param term
|
||||||
|
*/
|
||||||
|
exact_match(term: string): Score;
|
||||||
|
get_app(): never;
|
||||||
|
set_app(value: never): void;
|
||||||
|
get_frequency(): number;
|
||||||
|
set_frequency(value: number): void;
|
||||||
|
get_name(): string;
|
||||||
|
get_entry(): string;
|
||||||
|
get_description(): string;
|
||||||
|
get_wm_class(): string;
|
||||||
|
get_executable(): string;
|
||||||
|
get_icon_name(): string;
|
||||||
|
get_keywords(): string[];
|
||||||
|
get_categories(): string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
module Apps {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
show_hidden: boolean;
|
||||||
|
showHidden: boolean;
|
||||||
|
list: Application[];
|
||||||
|
min_score: number;
|
||||||
|
minScore: number;
|
||||||
|
name_multiplier: number;
|
||||||
|
nameMultiplier: number;
|
||||||
|
entry_multiplier: number;
|
||||||
|
entryMultiplier: number;
|
||||||
|
executable_multiplier: number;
|
||||||
|
executableMultiplier: number;
|
||||||
|
description_multiplier: number;
|
||||||
|
descriptionMultiplier: number;
|
||||||
|
keywords_multiplier: number;
|
||||||
|
keywordsMultiplier: number;
|
||||||
|
categories_multiplier: number;
|
||||||
|
categoriesMultiplier: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This object can be used to query applications. Multipliers can be set to customize [struct`AstalApps`.Score] results from queries which
|
||||||
|
* then are summed and sorted accordingly.
|
||||||
|
*/
|
||||||
|
class Apps extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Apps>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates wether hidden applications should included in queries.
|
||||||
|
*/
|
||||||
|
get show_hidden(): boolean;
|
||||||
|
set show_hidden(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates wether hidden applications should included in queries.
|
||||||
|
*/
|
||||||
|
get showHidden(): boolean;
|
||||||
|
set showHidden(val: boolean);
|
||||||
|
/**
|
||||||
|
* Full list of available applications.
|
||||||
|
*/
|
||||||
|
get list(): Application[];
|
||||||
|
/**
|
||||||
|
* The minimum score the application has to meet in order to be included in queries.
|
||||||
|
*/
|
||||||
|
get min_score(): number;
|
||||||
|
set min_score(val: number);
|
||||||
|
/**
|
||||||
|
* The minimum score the application has to meet in order to be included in queries.
|
||||||
|
*/
|
||||||
|
get minScore(): number;
|
||||||
|
set minScore(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the `name` of an application. Defaults to `2`
|
||||||
|
*/
|
||||||
|
get name_multiplier(): number;
|
||||||
|
set name_multiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the `name` of an application. Defaults to `2`
|
||||||
|
*/
|
||||||
|
get nameMultiplier(): number;
|
||||||
|
set nameMultiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the entry of an application. Defaults to `0`
|
||||||
|
*/
|
||||||
|
get entry_multiplier(): number;
|
||||||
|
set entry_multiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the entry of an application. Defaults to `0`
|
||||||
|
*/
|
||||||
|
get entryMultiplier(): number;
|
||||||
|
set entryMultiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the executable of an application. Defaults to `0.5`
|
||||||
|
*/
|
||||||
|
get executable_multiplier(): number;
|
||||||
|
set executable_multiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the executable of an application. Defaults to `0.5`
|
||||||
|
*/
|
||||||
|
get executableMultiplier(): number;
|
||||||
|
set executableMultiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the description of an application. Defaults to `0`
|
||||||
|
*/
|
||||||
|
get description_multiplier(): number;
|
||||||
|
set description_multiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the description of an application. Defaults to `0`
|
||||||
|
*/
|
||||||
|
get descriptionMultiplier(): number;
|
||||||
|
set descriptionMultiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the keywords of an application. Defaults to `0.5`
|
||||||
|
*/
|
||||||
|
get keywords_multiplier(): number;
|
||||||
|
set keywords_multiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the keywords of an application. Defaults to `0.5`
|
||||||
|
*/
|
||||||
|
get keywordsMultiplier(): number;
|
||||||
|
set keywordsMultiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the categories of an application. Defaults to `0`
|
||||||
|
*/
|
||||||
|
get categories_multiplier(): number;
|
||||||
|
set categories_multiplier(val: number);
|
||||||
|
/**
|
||||||
|
* Extra multiplier to apply when matching the categories of an application. Defaults to `0`
|
||||||
|
*/
|
||||||
|
get categoriesMultiplier(): number;
|
||||||
|
set categoriesMultiplier(val: number);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Apps.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Apps;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate a score for an application using fuzzy matching algorithm. Taking this Apps' include settings into consideration .
|
||||||
|
* @param search
|
||||||
|
* @param a
|
||||||
|
*/
|
||||||
|
fuzzy_score(search: string, a: Application): number;
|
||||||
|
/**
|
||||||
|
* Calculate a score for an application using exact string algorithm. Taking this Apps' include settings into consideration .
|
||||||
|
* @param search
|
||||||
|
* @param a
|
||||||
|
*/
|
||||||
|
exact_score(search: string, a: Application): number;
|
||||||
|
/**
|
||||||
|
* Query the `list` of applications with a fuzzy matching algorithm.
|
||||||
|
* @param search
|
||||||
|
*/
|
||||||
|
fuzzy_query(search?: string | null): Application[];
|
||||||
|
/**
|
||||||
|
* Query the `list` of applications with a simple string matching algorithm.
|
||||||
|
* @param search
|
||||||
|
*/
|
||||||
|
exact_query(search?: string | null): Application[];
|
||||||
|
/**
|
||||||
|
* Reload the `list` of Applications.
|
||||||
|
*/
|
||||||
|
reload(): void;
|
||||||
|
get_show_hidden(): boolean;
|
||||||
|
set_show_hidden(value: boolean): void;
|
||||||
|
get_list(): Application[];
|
||||||
|
get_min_score(): number;
|
||||||
|
set_min_score(value: number): void;
|
||||||
|
get_name_multiplier(): number;
|
||||||
|
set_name_multiplier(value: number): void;
|
||||||
|
get_entry_multiplier(): number;
|
||||||
|
set_entry_multiplier(value: number): void;
|
||||||
|
get_executable_multiplier(): number;
|
||||||
|
set_executable_multiplier(value: number): void;
|
||||||
|
get_description_multiplier(): number;
|
||||||
|
set_description_multiplier(value: number): void;
|
||||||
|
get_keywords_multiplier(): number;
|
||||||
|
set_keywords_multiplier(value: number): void;
|
||||||
|
get_categories_multiplier(): number;
|
||||||
|
set_categories_multiplier(value: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApplicationClass = typeof Application;
|
||||||
|
abstract class ApplicationPrivate {
|
||||||
|
static $gtype: GObject.GType<ApplicationPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type AppsClass = typeof Apps;
|
||||||
|
abstract class AppsPrivate {
|
||||||
|
static $gtype: GObject.GType<AppsPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Score {
|
||||||
|
static $gtype: GObject.GType<Score>;
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
name: number;
|
||||||
|
entry: number;
|
||||||
|
executable: number;
|
||||||
|
description: number;
|
||||||
|
keywords: number;
|
||||||
|
categories: number;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
properties?: Partial<{
|
||||||
|
name: number;
|
||||||
|
entry: number;
|
||||||
|
executable: number;
|
||||||
|
description: number;
|
||||||
|
keywords: number;
|
||||||
|
categories: number;
|
||||||
|
}>,
|
||||||
|
);
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalApps;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalApps' {
|
||||||
|
import AstalApps01 from 'gi://AstalApps?version=0.1';
|
||||||
|
export default AstalApps01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
217
configs/userland/ags/@girs/astalauth-0.1.d.ts
vendored
Normal file
217
configs/userland/ags/@girs/astalauth-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalAuth?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalAuth {
|
||||||
|
/**
|
||||||
|
* AstalAuth-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
module Pam {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface AuthError {
|
||||||
|
(msg: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AuthInfo {
|
||||||
|
(msg: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AuthPromptHidden {
|
||||||
|
(msg: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AuthPromptVisible {
|
||||||
|
(msg: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Fail {
|
||||||
|
(msg: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Success {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
service: string;
|
||||||
|
username: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For simple authentication using only a password, using the [func`AstalAuth`.Pam.authenticate]
|
||||||
|
* method is recommended. Look at the simple examples for how to use it.
|
||||||
|
*
|
||||||
|
* There is also a way to get access to the pam conversation, to allow for a more complex
|
||||||
|
* authentication process, like using multiple factor authentication. Generally it can be used like
|
||||||
|
* this:
|
||||||
|
*
|
||||||
|
* 1. create the Pam object.
|
||||||
|
* 2. set username and service if so required. It has sane defaults, so in most cases you can skip
|
||||||
|
* this.
|
||||||
|
* 3. connect to the signals.
|
||||||
|
* After an `auth-*` signal is emitted, it has to be responded with exactly one
|
||||||
|
* [method`AstalAuth`.Pam.supply_secret] call. The secret is a string containing the user input. For
|
||||||
|
* [auth-info][signal`AstalAuth`.Pam::auth-info:] and [auth-error][signal`AstalAuth`.Pam::auth-error:]
|
||||||
|
* it should be `NULL`. Not connecting those signals, is equivalent to calling
|
||||||
|
* [method`AstalAuth`.Pam.supply_secret] with `NULL` immediately after the signal is emitted.
|
||||||
|
* 4. start authentication process using [method`AstalAuth`.Pam.start_authenticate].
|
||||||
|
* 5. it is possible to reuse the same Pam object for multiple sequential authentication attempts.
|
||||||
|
* Just call [method`AstalAuth`.Pam.start_authenticate] again after the `success` or `fail` signal
|
||||||
|
* was emitted.
|
||||||
|
*/
|
||||||
|
class Pam extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Pam>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The pam service used for authentication.
|
||||||
|
* Changing the value of this property has no affect on an already started authentication
|
||||||
|
* process.
|
||||||
|
*
|
||||||
|
* Defaults to the astal-auth pam service.
|
||||||
|
*/
|
||||||
|
get service(): string;
|
||||||
|
set service(val: string);
|
||||||
|
/**
|
||||||
|
* The username used for authentication.
|
||||||
|
* Changing the value of this property has no affect on an already started authentication
|
||||||
|
* process.
|
||||||
|
*
|
||||||
|
* Defaults to the user that owns this process.
|
||||||
|
*/
|
||||||
|
get username(): string;
|
||||||
|
set username(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Pam.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'auth-error', callback: (_source: this, msg: string) => void): number;
|
||||||
|
connect_after(signal: 'auth-error', callback: (_source: this, msg: string) => void): number;
|
||||||
|
emit(signal: 'auth-error', msg: string): void;
|
||||||
|
connect(signal: 'auth-info', callback: (_source: this, msg: string) => void): number;
|
||||||
|
connect_after(signal: 'auth-info', callback: (_source: this, msg: string) => void): number;
|
||||||
|
emit(signal: 'auth-info', msg: string): void;
|
||||||
|
connect(signal: 'auth-prompt-hidden', callback: (_source: this, msg: string) => void): number;
|
||||||
|
connect_after(signal: 'auth-prompt-hidden', callback: (_source: this, msg: string) => void): number;
|
||||||
|
emit(signal: 'auth-prompt-hidden', msg: string): void;
|
||||||
|
connect(signal: 'auth-prompt-visible', callback: (_source: this, msg: string) => void): number;
|
||||||
|
connect_after(signal: 'auth-prompt-visible', callback: (_source: this, msg: string) => void): number;
|
||||||
|
emit(signal: 'auth-prompt-visible', msg: string): void;
|
||||||
|
connect(signal: 'fail', callback: (_source: this, msg: string) => void): number;
|
||||||
|
connect_after(signal: 'fail', callback: (_source: this, msg: string) => void): number;
|
||||||
|
emit(signal: 'fail', msg: string): void;
|
||||||
|
connect(signal: 'success', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'success', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'success'): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests authentication of the provided password using the PAM (Pluggable Authentication Modules)
|
||||||
|
* system.
|
||||||
|
* @param password the password to be authenticated
|
||||||
|
* @param result_callback a GAsyncReadyCallback to call when the request is satisfied
|
||||||
|
*/
|
||||||
|
static authenticate(password: string, result_callback?: Gio.AsyncReadyCallback<Pam> | null): boolean;
|
||||||
|
static authenticate_finish(res: Gio.AsyncResult): number;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetches the service from AsalAuthPam object.
|
||||||
|
* @returns the service of the AsalAuthPam object. This string is owned by the object and must not be modified or freed.
|
||||||
|
*/
|
||||||
|
get_service(): string;
|
||||||
|
/**
|
||||||
|
* Fetches the username from AsalAuthPam object.
|
||||||
|
* @returns the username of the AsalAuthPam object. This string is owned by the object and must not be modified or freed.
|
||||||
|
*/
|
||||||
|
get_username(): string;
|
||||||
|
/**
|
||||||
|
* Sets the service to be used for authentication. This must be set to
|
||||||
|
* before calling start_authenticate.
|
||||||
|
* Changing it afterwards has no effect on the authentication process.
|
||||||
|
*
|
||||||
|
* Defaults to `astal-auth`.
|
||||||
|
* @param service the pam service used for authentication
|
||||||
|
*/
|
||||||
|
set_service(service: string): void;
|
||||||
|
/**
|
||||||
|
* Sets the username to be used for authentication. This must be set to
|
||||||
|
* before calling start_authenticate.
|
||||||
|
* Changing it afterwards has no effect on the authentication process.
|
||||||
|
*
|
||||||
|
* Defaults to the owner of the process.
|
||||||
|
* @param username the new username
|
||||||
|
*/
|
||||||
|
set_username(username: string): void;
|
||||||
|
/**
|
||||||
|
* starts a new authentication process using the PAM (Pluggable Authentication Modules) system.
|
||||||
|
* Note that this will cancel an already running authentication process
|
||||||
|
* associated with this AstalAuthPam object.
|
||||||
|
*/
|
||||||
|
start_authenticate(): boolean;
|
||||||
|
/**
|
||||||
|
* provides pam with a secret. This method must be called exactly once after a
|
||||||
|
* auth-* signal is emitted.
|
||||||
|
* @param secret the secret to be provided to pam. Can be NULL.
|
||||||
|
*/
|
||||||
|
supply_secret(secret?: string | null): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PamClass = typeof Pam;
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalAuth' {
|
||||||
|
import AstalAuth01 from 'gi://AstalAuth?version=0.1';
|
||||||
|
export default AstalAuth01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
696
configs/userland/ags/@girs/astalbattery-0.1.d.ts
vendored
Normal file
696
configs/userland/ags/@girs/astalbattery-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,696 @@
|
|||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalBattery?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalBattery {
|
||||||
|
/**
|
||||||
|
* AstalBattery-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace State {
|
||||||
|
export const $gtype: GObject.GType<State>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum State {
|
||||||
|
UNKNOWN,
|
||||||
|
CHARGING,
|
||||||
|
DISCHARGING,
|
||||||
|
EMPTY,
|
||||||
|
FULLY_CHARGED,
|
||||||
|
PENDING_CHARGE,
|
||||||
|
PENDING_DISCHARGE,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Technology {
|
||||||
|
export const $gtype: GObject.GType<Technology>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Technology {
|
||||||
|
UNKNOWN,
|
||||||
|
LITHIUM_ION,
|
||||||
|
LITHIUM_POLYMER,
|
||||||
|
LITHIUM_IRON_PHOSPHATE,
|
||||||
|
LEAD_ACID,
|
||||||
|
NICKEL_CADMIUM,
|
||||||
|
NICKEL_METAL_HYDRIDE,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace WarningLevel {
|
||||||
|
export const $gtype: GObject.GType<WarningLevel>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum WarningLevel {
|
||||||
|
UNKNOWN,
|
||||||
|
NONE,
|
||||||
|
DISCHARGING,
|
||||||
|
LOW,
|
||||||
|
CRITICIAL,
|
||||||
|
ACTION,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace BatteryLevel {
|
||||||
|
export const $gtype: GObject.GType<BatteryLevel>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BatteryLevel {
|
||||||
|
UNKNOWN,
|
||||||
|
NONE,
|
||||||
|
LOW,
|
||||||
|
CRITICIAL,
|
||||||
|
NORMAL,
|
||||||
|
HIGH,
|
||||||
|
FULL,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Type {
|
||||||
|
export const $gtype: GObject.GType<Type>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Type {
|
||||||
|
UNKNOWN,
|
||||||
|
LINE_POWER,
|
||||||
|
BATTERY,
|
||||||
|
UPS,
|
||||||
|
MONITOR,
|
||||||
|
MOUSE,
|
||||||
|
KEYBOARD,
|
||||||
|
PDA,
|
||||||
|
PHONE,
|
||||||
|
MEDIA_PLAYER,
|
||||||
|
TABLET,
|
||||||
|
COMPUTER,
|
||||||
|
GAMING_INPUT,
|
||||||
|
PEN,
|
||||||
|
TOUCHPAD,
|
||||||
|
MODEM,
|
||||||
|
NETWORK,
|
||||||
|
HEADSET,
|
||||||
|
SPEAKERS,
|
||||||
|
HEADPHONES,
|
||||||
|
VIDEO,
|
||||||
|
OTHER_AUDIO,
|
||||||
|
REMOVE_CONTROL,
|
||||||
|
PRINTER,
|
||||||
|
SCANNER,
|
||||||
|
CAMERA,
|
||||||
|
WEARABLE,
|
||||||
|
TOY,
|
||||||
|
BLUETOOTH_GENERIC,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
/**
|
||||||
|
* Get the DisplayDevice.
|
||||||
|
*/
|
||||||
|
function get_default(): Device;
|
||||||
|
module Device {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
device_type: Type;
|
||||||
|
deviceType: Type;
|
||||||
|
native_path: string;
|
||||||
|
nativePath: string;
|
||||||
|
vendor: string;
|
||||||
|
model: string;
|
||||||
|
serial: string;
|
||||||
|
update_time: number;
|
||||||
|
updateTime: number;
|
||||||
|
power_supply: boolean;
|
||||||
|
powerSupply: boolean;
|
||||||
|
online: boolean;
|
||||||
|
energy: number;
|
||||||
|
energy_empty: number;
|
||||||
|
energyEmpty: number;
|
||||||
|
energy_full: number;
|
||||||
|
energyFull: number;
|
||||||
|
energy_full_design: number;
|
||||||
|
energyFullDesign: number;
|
||||||
|
energy_rate: number;
|
||||||
|
energyRate: number;
|
||||||
|
voltage: number;
|
||||||
|
charge_cycles: number;
|
||||||
|
chargeCycles: number;
|
||||||
|
luminosity: number;
|
||||||
|
time_to_empty: number;
|
||||||
|
timeToEmpty: number;
|
||||||
|
time_to_full: number;
|
||||||
|
timeToFull: number;
|
||||||
|
percentage: number;
|
||||||
|
temperature: number;
|
||||||
|
is_present: boolean;
|
||||||
|
isPresent: boolean;
|
||||||
|
state: State;
|
||||||
|
is_rechargable: boolean;
|
||||||
|
isRechargable: boolean;
|
||||||
|
capacity: number;
|
||||||
|
technology: Technology;
|
||||||
|
warning_level: WarningLevel;
|
||||||
|
warningLevel: WarningLevel;
|
||||||
|
battery_level: BatteryLevel;
|
||||||
|
batteryLevel: BatteryLevel;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
charging: boolean;
|
||||||
|
is_battery: boolean;
|
||||||
|
isBattery: boolean;
|
||||||
|
battery_icon_name: string;
|
||||||
|
batteryIconName: string;
|
||||||
|
device_type_name: string;
|
||||||
|
deviceTypeName: string;
|
||||||
|
device_type_icon: string;
|
||||||
|
deviceTypeIcon: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Client for a UPower [device](https://upower.freedesktop.org/docs/Device.html).
|
||||||
|
*/
|
||||||
|
class Device extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Device>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If it is [enum`AstalBattery`.Type.BATTERY], you will need to verify that the property power-supply has the value `true` before
|
||||||
|
* considering it as a laptop battery. Otherwise it will likely be the battery for a device of an unknown type.
|
||||||
|
*/
|
||||||
|
get device_type(): Type;
|
||||||
|
set device_type(val: Type);
|
||||||
|
/**
|
||||||
|
* If it is [enum`AstalBattery`.Type.BATTERY], you will need to verify that the property power-supply has the value `true` before
|
||||||
|
* considering it as a laptop battery. Otherwise it will likely be the battery for a device of an unknown type.
|
||||||
|
*/
|
||||||
|
get deviceType(): Type;
|
||||||
|
set deviceType(val: Type);
|
||||||
|
/**
|
||||||
|
* Native path of the power source. This is the sysfs path, for example /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0. It is
|
||||||
|
* blank if the device is being driven by a user space driver.
|
||||||
|
*/
|
||||||
|
get native_path(): string;
|
||||||
|
set native_path(val: string);
|
||||||
|
/**
|
||||||
|
* Native path of the power source. This is the sysfs path, for example /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0. It is
|
||||||
|
* blank if the device is being driven by a user space driver.
|
||||||
|
*/
|
||||||
|
get nativePath(): string;
|
||||||
|
set nativePath(val: string);
|
||||||
|
/**
|
||||||
|
* Name of the vendor of the battery.
|
||||||
|
*/
|
||||||
|
get vendor(): string;
|
||||||
|
set vendor(val: string);
|
||||||
|
/**
|
||||||
|
* Name of the model of this battery.
|
||||||
|
*/
|
||||||
|
get model(): string;
|
||||||
|
set model(val: string);
|
||||||
|
/**
|
||||||
|
* Unique serial number of the battery.
|
||||||
|
*/
|
||||||
|
get serial(): string;
|
||||||
|
set serial(val: string);
|
||||||
|
/**
|
||||||
|
* The point in time (seconds since the Epoch) that data was read from the power source.
|
||||||
|
*/
|
||||||
|
get update_time(): number;
|
||||||
|
set update_time(val: number);
|
||||||
|
/**
|
||||||
|
* The point in time (seconds since the Epoch) that data was read from the power source.
|
||||||
|
*/
|
||||||
|
get updateTime(): number;
|
||||||
|
set updateTime(val: number);
|
||||||
|
/**
|
||||||
|
* If the power device is used to supply the system. This would be set `true` for laptop batteries and UPS devices, but set to `false` for
|
||||||
|
* wireless mice or PDAs.
|
||||||
|
*/
|
||||||
|
get power_supply(): boolean;
|
||||||
|
set power_supply(val: boolean);
|
||||||
|
/**
|
||||||
|
* If the power device is used to supply the system. This would be set `true` for laptop batteries and UPS devices, but set to `false` for
|
||||||
|
* wireless mice or PDAs.
|
||||||
|
*/
|
||||||
|
get powerSupply(): boolean;
|
||||||
|
set powerSupply(val: boolean);
|
||||||
|
/**
|
||||||
|
* Whether power is currently being provided through line power.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.LINE_POWER].
|
||||||
|
*/
|
||||||
|
get online(): boolean;
|
||||||
|
set online(val: boolean);
|
||||||
|
/**
|
||||||
|
* Amount of energy (measured in Wh) currently available in the power source.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energy(): number;
|
||||||
|
set energy(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy (measured in Wh) in the power source when it's considered to be empty.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energy_empty(): number;
|
||||||
|
set energy_empty(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy (measured in Wh) in the power source when it's considered to be empty.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energyEmpty(): number;
|
||||||
|
set energyEmpty(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy (measured in Wh) in the power source when it's considered full.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energy_full(): number;
|
||||||
|
set energy_full(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy (measured in Wh) in the power source when it's considered full.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energyFull(): number;
|
||||||
|
set energyFull(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy (measured in Wh) the power source is designed to hold when it's considered full.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energy_full_design(): number;
|
||||||
|
set energy_full_design(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy (measured in Wh) the power source is designed to hold when it's considered full.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energyFullDesign(): number;
|
||||||
|
set energyFullDesign(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy being drained from the source, measured in W. If positive, the source is being discharged, if negative it's being charged.
|
||||||
|
*
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energy_rate(): number;
|
||||||
|
set energy_rate(val: number);
|
||||||
|
/**
|
||||||
|
* Amount of energy being drained from the source, measured in W. If positive, the source is being discharged, if negative it's being charged.
|
||||||
|
*
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get energyRate(): number;
|
||||||
|
set energyRate(val: number);
|
||||||
|
/**
|
||||||
|
* Voltage in the Cell or being recorded by the meter.
|
||||||
|
*/
|
||||||
|
get voltage(): number;
|
||||||
|
set voltage(val: number);
|
||||||
|
/**
|
||||||
|
* The number of charge cycles as defined by the TCO certification, or -1 if that value is unknown or not applicable.
|
||||||
|
*/
|
||||||
|
get charge_cycles(): number;
|
||||||
|
set charge_cycles(val: number);
|
||||||
|
/**
|
||||||
|
* The number of charge cycles as defined by the TCO certification, or -1 if that value is unknown or not applicable.
|
||||||
|
*/
|
||||||
|
get chargeCycles(): number;
|
||||||
|
set chargeCycles(val: number);
|
||||||
|
/**
|
||||||
|
* Luminosity being recorded by the meter.
|
||||||
|
*/
|
||||||
|
get luminosity(): number;
|
||||||
|
set luminosity(val: number);
|
||||||
|
/**
|
||||||
|
* Number of seconds until the power source is considered empty. Is set to 0 if unknown.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get time_to_empty(): number;
|
||||||
|
set time_to_empty(val: number);
|
||||||
|
/**
|
||||||
|
* Number of seconds until the power source is considered empty. Is set to 0 if unknown.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get timeToEmpty(): number;
|
||||||
|
set timeToEmpty(val: number);
|
||||||
|
/**
|
||||||
|
* Number of seconds until the power source is considered full. Is set to 0 if unknown.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get time_to_full(): number;
|
||||||
|
set time_to_full(val: number);
|
||||||
|
/**
|
||||||
|
* Number of seconds until the power source is considered full. Is set to 0 if unknown.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get timeToFull(): number;
|
||||||
|
set timeToFull(val: number);
|
||||||
|
/**
|
||||||
|
* The amount of energy left in the power source expressed as a percentage between 0 and 1.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY]. The percentage
|
||||||
|
* will be an approximation if [property`AstalBattery`.Device:battery_level] is set to something other than None.
|
||||||
|
*/
|
||||||
|
get percentage(): number;
|
||||||
|
set percentage(val: number);
|
||||||
|
/**
|
||||||
|
* The temperature of the device in degrees Celsius.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get temperature(): number;
|
||||||
|
set temperature(val: number);
|
||||||
|
/**
|
||||||
|
* If the power source is present in the bay.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get is_present(): boolean;
|
||||||
|
set is_present(val: boolean);
|
||||||
|
/**
|
||||||
|
* If the power source is present in the bay.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get isPresent(): boolean;
|
||||||
|
set isPresent(val: boolean);
|
||||||
|
/**
|
||||||
|
* The battery power state.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get state(): State;
|
||||||
|
set state(val: State);
|
||||||
|
/**
|
||||||
|
* If the power source is rechargeable.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get is_rechargable(): boolean;
|
||||||
|
set is_rechargable(val: boolean);
|
||||||
|
/**
|
||||||
|
* If the power source is rechargeable.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get isRechargable(): boolean;
|
||||||
|
set isRechargable(val: boolean);
|
||||||
|
/**
|
||||||
|
* The capacity of the power source expressed as a percentage between 0 and 1.
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get capacity(): number;
|
||||||
|
set capacity(val: number);
|
||||||
|
/**
|
||||||
|
* Technology used in the battery:
|
||||||
|
* This property is only valid if [property`AstalBattery`.Device:device_type] is [enum`AstalBattery`.Type.BATTERY].
|
||||||
|
*/
|
||||||
|
get technology(): Technology;
|
||||||
|
set technology(val: Technology);
|
||||||
|
/**
|
||||||
|
* Warning level of the battery.
|
||||||
|
*/
|
||||||
|
get warning_level(): WarningLevel;
|
||||||
|
set warning_level(val: WarningLevel);
|
||||||
|
/**
|
||||||
|
* Warning level of the battery.
|
||||||
|
*/
|
||||||
|
get warningLevel(): WarningLevel;
|
||||||
|
set warningLevel(val: WarningLevel);
|
||||||
|
/**
|
||||||
|
* The level of the battery for devices which do not report a percentage but rather a coarse battery level. If the value is None. then the device
|
||||||
|
* does not support coarse battery reporting, and the [property`AstalBattery`.Device:percentage] should be used instead.
|
||||||
|
*/
|
||||||
|
get battery_level(): BatteryLevel;
|
||||||
|
set battery_level(val: BatteryLevel);
|
||||||
|
/**
|
||||||
|
* The level of the battery for devices which do not report a percentage but rather a coarse battery level. If the value is None. then the device
|
||||||
|
* does not support coarse battery reporting, and the [property`AstalBattery`.Device:percentage] should be used instead.
|
||||||
|
*/
|
||||||
|
get batteryLevel(): BatteryLevel;
|
||||||
|
set batteryLevel(val: BatteryLevel);
|
||||||
|
/**
|
||||||
|
* An icon name representing this Device.
|
||||||
|
* NOTE: [property`AstalBattery`.Device:battery_icon_name] might be a better fit as it is calculated from percentage.
|
||||||
|
*/
|
||||||
|
get icon_name(): string;
|
||||||
|
set icon_name(val: string);
|
||||||
|
/**
|
||||||
|
* An icon name representing this Device.
|
||||||
|
* NOTE: [property`AstalBattery`.Device:battery_icon_name] might be a better fit as it is calculated from percentage.
|
||||||
|
*/
|
||||||
|
get iconName(): string;
|
||||||
|
set iconName(val: string);
|
||||||
|
/**
|
||||||
|
* Indicates if [property`AstalBattery`.Device:state] is charging or fully charged.
|
||||||
|
*/
|
||||||
|
get charging(): boolean;
|
||||||
|
set charging(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [property`AstalBattery`.Device:device_type] is not line power or unknown.
|
||||||
|
*/
|
||||||
|
get is_battery(): boolean;
|
||||||
|
set is_battery(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [property`AstalBattery`.Device:device_type] is not line power or unknown.
|
||||||
|
*/
|
||||||
|
get isBattery(): boolean;
|
||||||
|
set isBattery(val: boolean);
|
||||||
|
/**
|
||||||
|
* An icon name in the form of "battery-level-$percentage-$state-symbolic".
|
||||||
|
*/
|
||||||
|
get battery_icon_name(): string;
|
||||||
|
set battery_icon_name(val: string);
|
||||||
|
/**
|
||||||
|
* An icon name in the form of "battery-level-$percentage-$state-symbolic".
|
||||||
|
*/
|
||||||
|
get batteryIconName(): string;
|
||||||
|
set batteryIconName(val: string);
|
||||||
|
/**
|
||||||
|
* A string representation of this device's [property`AstalBattery`.Device:device_type].
|
||||||
|
*/
|
||||||
|
get device_type_name(): string;
|
||||||
|
set device_type_name(val: string);
|
||||||
|
/**
|
||||||
|
* A string representation of this device's [property`AstalBattery`.Device:device_type].
|
||||||
|
*/
|
||||||
|
get deviceTypeName(): string;
|
||||||
|
set deviceTypeName(val: string);
|
||||||
|
/**
|
||||||
|
* An icon name that can be used to represent this device's [property`AstalBattery`.Device:device_type].
|
||||||
|
*/
|
||||||
|
get device_type_icon(): string;
|
||||||
|
set device_type_icon(val: string);
|
||||||
|
/**
|
||||||
|
* An icon name that can be used to represent this device's [property`AstalBattery`.Device:device_type].
|
||||||
|
*/
|
||||||
|
get deviceTypeIcon(): string;
|
||||||
|
set deviceTypeIcon(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Device.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](path: never): Device;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the DisplayDevice.
|
||||||
|
*/
|
||||||
|
static get_default(): Device | null;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_device_type(): Type;
|
||||||
|
get_native_path(): string;
|
||||||
|
get_vendor(): string;
|
||||||
|
get_model(): string;
|
||||||
|
get_serial(): string;
|
||||||
|
get_update_time(): number;
|
||||||
|
get_power_supply(): boolean;
|
||||||
|
get_online(): boolean;
|
||||||
|
get_energy(): number;
|
||||||
|
get_energy_empty(): number;
|
||||||
|
get_energy_full(): number;
|
||||||
|
get_energy_full_design(): number;
|
||||||
|
get_energy_rate(): number;
|
||||||
|
get_voltage(): number;
|
||||||
|
get_charge_cycles(): number;
|
||||||
|
get_luminosity(): number;
|
||||||
|
get_time_to_empty(): number;
|
||||||
|
get_time_to_full(): number;
|
||||||
|
get_percentage(): number;
|
||||||
|
get_temperature(): number;
|
||||||
|
get_is_present(): boolean;
|
||||||
|
get_state(): State;
|
||||||
|
get_is_rechargable(): boolean;
|
||||||
|
get_capacity(): number;
|
||||||
|
get_technology(): Technology;
|
||||||
|
get_warning_level(): WarningLevel;
|
||||||
|
get_battery_level(): BatteryLevel;
|
||||||
|
get_icon_name(): string;
|
||||||
|
get_charging(): boolean;
|
||||||
|
get_is_battery(): boolean;
|
||||||
|
get_battery_icon_name(): string;
|
||||||
|
get_device_type_name(): string;
|
||||||
|
get_device_type_icon(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
module UPower {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface DeviceAdded {
|
||||||
|
(device: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DeviceRemoved {
|
||||||
|
(device: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
devices: Device[];
|
||||||
|
display_device: Device;
|
||||||
|
displayDevice: Device;
|
||||||
|
daemon_version: string;
|
||||||
|
daemonVersion: string;
|
||||||
|
on_battery: boolean;
|
||||||
|
onBattery: boolean;
|
||||||
|
lid_is_closed: boolean;
|
||||||
|
lidIsClosed: boolean;
|
||||||
|
lid_is_present: boolean;
|
||||||
|
lidIsPresent: boolean;
|
||||||
|
critical_action: string;
|
||||||
|
criticalAction: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Client for the UPower [dbus interface](https://upower.freedesktop.org/docs/UPower.html).
|
||||||
|
*/
|
||||||
|
class UPower extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<UPower>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of UPower devices.
|
||||||
|
*/
|
||||||
|
get devices(): Device[];
|
||||||
|
/**
|
||||||
|
* A composite device that represents the battery status.
|
||||||
|
*/
|
||||||
|
get display_device(): Device;
|
||||||
|
/**
|
||||||
|
* A composite device that represents the battery status.
|
||||||
|
*/
|
||||||
|
get displayDevice(): Device;
|
||||||
|
get daemon_version(): string;
|
||||||
|
get daemonVersion(): string;
|
||||||
|
/**
|
||||||
|
* Indicates whether the system is running on battery power.
|
||||||
|
*/
|
||||||
|
get on_battery(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates whether the system is running on battery power.
|
||||||
|
*/
|
||||||
|
get onBattery(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates if the laptop lid is closed where the display cannot be seen.
|
||||||
|
*/
|
||||||
|
get lid_is_closed(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates if the laptop lid is closed where the display cannot be seen.
|
||||||
|
*/
|
||||||
|
get lidIsClosed(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates if the system has a lid device.
|
||||||
|
*/
|
||||||
|
get lid_is_present(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates if the system has a lid device.
|
||||||
|
*/
|
||||||
|
get lidIsPresent(): boolean;
|
||||||
|
/**
|
||||||
|
* When the system's power supply is critical (critically low batteries or UPS), the system will take this action.
|
||||||
|
*/
|
||||||
|
get critical_action(): string;
|
||||||
|
/**
|
||||||
|
* When the system's power supply is critical (critically low batteries or UPS), the system will take this action.
|
||||||
|
*/
|
||||||
|
get criticalAction(): string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<UPower.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): UPower;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'device-added', callback: (_source: this, device: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-added', callback: (_source: this, device: Device) => void): number;
|
||||||
|
emit(signal: 'device-added', device: Device): void;
|
||||||
|
connect(signal: 'device-removed', callback: (_source: this, device: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-removed', callback: (_source: this, device: Device) => void): number;
|
||||||
|
emit(signal: 'device-removed', device: Device): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_devices(): Device[];
|
||||||
|
get_display_device(): Device;
|
||||||
|
get_daemon_version(): string;
|
||||||
|
get_on_battery(): boolean;
|
||||||
|
get_lid_is_closed(): boolean;
|
||||||
|
get_lid_is_present(): boolean;
|
||||||
|
get_critical_action(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type DeviceClass = typeof Device;
|
||||||
|
abstract class DevicePrivate {
|
||||||
|
static $gtype: GObject.GType<DevicePrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type UPowerClass = typeof UPower;
|
||||||
|
abstract class UPowerPrivate {
|
||||||
|
static $gtype: GObject.GType<UPowerPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalBattery;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalBattery' {
|
||||||
|
import AstalBattery01 from 'gi://AstalBattery?version=0.1';
|
||||||
|
export default AstalBattery01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
551
configs/userland/ags/@girs/astalbluetooth-0.1.d.ts
vendored
Normal file
551
configs/userland/ags/@girs/astalbluetooth-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,551 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalBluetooth?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalBluetooth {
|
||||||
|
/**
|
||||||
|
* AstalBluetooth-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
/**
|
||||||
|
* Gets the default singleton Bluetooth object.
|
||||||
|
*/
|
||||||
|
function get_default(): Bluetooth;
|
||||||
|
module Adapter {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
uuids: string[];
|
||||||
|
discovering: boolean;
|
||||||
|
modalias: string;
|
||||||
|
name: string;
|
||||||
|
class: number;
|
||||||
|
address: string;
|
||||||
|
discoverable: boolean;
|
||||||
|
pairable: boolean;
|
||||||
|
powered: boolean;
|
||||||
|
alias: string;
|
||||||
|
discoverable_timeout: number;
|
||||||
|
discoverableTimeout: number;
|
||||||
|
pairable_timeout: number;
|
||||||
|
pairableTimeout: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object representing an [adapter](https://github.com/RadiusNetworks/bluez/blob/master/doc/adapter-api.txt).
|
||||||
|
*/
|
||||||
|
class Adapter extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Adapter>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of 128-bit UUIDs that represents the available local services.
|
||||||
|
*/
|
||||||
|
get uuids(): string[];
|
||||||
|
/**
|
||||||
|
* Indicates that a device discovery procedure is active.
|
||||||
|
*/
|
||||||
|
get discovering(): boolean;
|
||||||
|
/**
|
||||||
|
* Local Device ID information in modalias format used by the kernel and udev.
|
||||||
|
*/
|
||||||
|
get modalias(): string;
|
||||||
|
/**
|
||||||
|
* The Bluetooth system name (pretty hostname).
|
||||||
|
*/
|
||||||
|
get name(): string;
|
||||||
|
/**
|
||||||
|
* The Bluetooth class of device.
|
||||||
|
*/
|
||||||
|
get class(): number;
|
||||||
|
/**
|
||||||
|
* The Bluetooth device address.
|
||||||
|
*/
|
||||||
|
get address(): string;
|
||||||
|
/**
|
||||||
|
* Switch an adapter to discoverable or non-discoverable to either make it visible or hide it.
|
||||||
|
*/
|
||||||
|
get discoverable(): boolean;
|
||||||
|
set discoverable(val: boolean);
|
||||||
|
/**
|
||||||
|
* Switch an adapter to pairable or non-pairable.
|
||||||
|
*/
|
||||||
|
get pairable(): boolean;
|
||||||
|
set pairable(val: boolean);
|
||||||
|
/**
|
||||||
|
* Switch an adapter on or off.
|
||||||
|
*/
|
||||||
|
get powered(): boolean;
|
||||||
|
set powered(val: boolean);
|
||||||
|
/**
|
||||||
|
* The Bluetooth friendly name.
|
||||||
|
* In case no alias is set, it will return [property`AstalBluetooth`.Adapter:name].
|
||||||
|
*/
|
||||||
|
get alias(): string;
|
||||||
|
set alias(val: string);
|
||||||
|
/**
|
||||||
|
* The discoverable timeout in seconds. A value of zero means that the timeout is disabled and it will stay in discoverable/limited mode forever
|
||||||
|
* until [method`AstalBluetooth`.Adapter.stop_discovery] is invoked. The default value for the discoverable timeout should be `180`.
|
||||||
|
*/
|
||||||
|
get discoverable_timeout(): number;
|
||||||
|
set discoverable_timeout(val: number);
|
||||||
|
/**
|
||||||
|
* The discoverable timeout in seconds. A value of zero means that the timeout is disabled and it will stay in discoverable/limited mode forever
|
||||||
|
* until [method`AstalBluetooth`.Adapter.stop_discovery] is invoked. The default value for the discoverable timeout should be `180`.
|
||||||
|
*/
|
||||||
|
get discoverableTimeout(): number;
|
||||||
|
set discoverableTimeout(val: number);
|
||||||
|
/**
|
||||||
|
* The pairable timeout in seconds.
|
||||||
|
* A value of zero means that the timeout is disabled and it will stay in pairable mode forever. The default value for pairable timeout should be
|
||||||
|
* disabled `0`.
|
||||||
|
*/
|
||||||
|
get pairable_timeout(): number;
|
||||||
|
set pairable_timeout(val: number);
|
||||||
|
/**
|
||||||
|
* The pairable timeout in seconds.
|
||||||
|
* A value of zero means that the timeout is disabled and it will stay in pairable mode forever. The default value for pairable timeout should be
|
||||||
|
* disabled `0`.
|
||||||
|
*/
|
||||||
|
get pairableTimeout(): number;
|
||||||
|
set pairableTimeout(val: number);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Adapter.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This removes the remote device and the pairing information.
|
||||||
|
* Possible errors: `InvalidArguments`, `Failed`.
|
||||||
|
* @param device
|
||||||
|
*/
|
||||||
|
remove_device(device: Device): void;
|
||||||
|
/**
|
||||||
|
* This method starts the device discovery procedure.
|
||||||
|
* Possible errors: `NotReady`, `Failed`.
|
||||||
|
*/
|
||||||
|
start_discovery(): void;
|
||||||
|
/**
|
||||||
|
* This method will cancel any previous [method`AstalBluetooth`.Adapter.start_discovery] procedure.
|
||||||
|
* Possible errors: `NotReady`, `Failed`, `NotAuthorized`.
|
||||||
|
*/
|
||||||
|
stop_discovery(): void;
|
||||||
|
get_uuids(): string[];
|
||||||
|
get_discovering(): boolean;
|
||||||
|
get_modalias(): string;
|
||||||
|
get_name(): string;
|
||||||
|
get_class(): number;
|
||||||
|
get_address(): string;
|
||||||
|
get_discoverable(): boolean;
|
||||||
|
set_discoverable(value: boolean): void;
|
||||||
|
get_pairable(): boolean;
|
||||||
|
set_pairable(value: boolean): void;
|
||||||
|
get_powered(): boolean;
|
||||||
|
set_powered(value: boolean): void;
|
||||||
|
get_alias(): string;
|
||||||
|
set_alias(value: string): void;
|
||||||
|
get_discoverable_timeout(): number;
|
||||||
|
set_discoverable_timeout(value: number): void;
|
||||||
|
get_pairable_timeout(): number;
|
||||||
|
set_pairable_timeout(value: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Bluetooth {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface DeviceAdded {
|
||||||
|
(device: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DeviceRemoved {
|
||||||
|
(device: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AdapterAdded {
|
||||||
|
(adapter: Adapter): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AdapterRemoved {
|
||||||
|
(adapter: Adapter): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
is_powered: boolean;
|
||||||
|
isPowered: boolean;
|
||||||
|
is_connected: boolean;
|
||||||
|
isConnected: boolean;
|
||||||
|
adapter: Adapter;
|
||||||
|
adapters: Adapter[];
|
||||||
|
devices: Device[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manager object for `org.bluez`.
|
||||||
|
*/
|
||||||
|
class Bluetooth extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Bluetooth>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `true` if any of the [property`AstalBluetooth`.Bluetooth:adapters] are powered.
|
||||||
|
*/
|
||||||
|
get is_powered(): boolean;
|
||||||
|
set is_powered(val: boolean);
|
||||||
|
/**
|
||||||
|
* `true` if any of the [property`AstalBluetooth`.Bluetooth:adapters] are powered.
|
||||||
|
*/
|
||||||
|
get isPowered(): boolean;
|
||||||
|
set isPowered(val: boolean);
|
||||||
|
/**
|
||||||
|
* `true` if any of the [property`AstalBluetooth`.Bluetooth:devices] is connected.
|
||||||
|
*/
|
||||||
|
get is_connected(): boolean;
|
||||||
|
set is_connected(val: boolean);
|
||||||
|
/**
|
||||||
|
* `true` if any of the [property`AstalBluetooth`.Bluetooth:devices] is connected.
|
||||||
|
*/
|
||||||
|
get isConnected(): boolean;
|
||||||
|
set isConnected(val: boolean);
|
||||||
|
/**
|
||||||
|
* The first registered adapter which is usually the only adapter.
|
||||||
|
*/
|
||||||
|
get adapter(): Adapter;
|
||||||
|
/**
|
||||||
|
* List of adapters available on the host device.
|
||||||
|
*/
|
||||||
|
get adapters(): Adapter[];
|
||||||
|
/**
|
||||||
|
* List of registered devices on the `org.bluez` bus.
|
||||||
|
*/
|
||||||
|
get devices(): Device[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Bluetooth.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Bluetooth;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'device-added', callback: (_source: this, device: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-added', callback: (_source: this, device: Device) => void): number;
|
||||||
|
emit(signal: 'device-added', device: Device): void;
|
||||||
|
connect(signal: 'device-removed', callback: (_source: this, device: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-removed', callback: (_source: this, device: Device) => void): number;
|
||||||
|
emit(signal: 'device-removed', device: Device): void;
|
||||||
|
connect(signal: 'adapter-added', callback: (_source: this, adapter: Adapter) => void): number;
|
||||||
|
connect_after(signal: 'adapter-added', callback: (_source: this, adapter: Adapter) => void): number;
|
||||||
|
emit(signal: 'adapter-added', adapter: Adapter): void;
|
||||||
|
connect(signal: 'adapter-removed', callback: (_source: this, adapter: Adapter) => void): number;
|
||||||
|
connect_after(signal: 'adapter-removed', callback: (_source: this, adapter: Adapter) => void): number;
|
||||||
|
emit(signal: 'adapter-removed', adapter: Adapter): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default singleton Bluetooth object.
|
||||||
|
*/
|
||||||
|
static get_default(): Bluetooth;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle the [property`AstalBluetooth`.Adapter:powered] property of the [property`AstalBluetooth`.Bluetooth:adapter].
|
||||||
|
*/
|
||||||
|
toggle(): void;
|
||||||
|
get_is_powered(): boolean;
|
||||||
|
get_is_connected(): boolean;
|
||||||
|
get_adapter(): Adapter | null;
|
||||||
|
get_adapters(): Adapter[];
|
||||||
|
get_devices(): Device[];
|
||||||
|
}
|
||||||
|
|
||||||
|
module Device {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
uuids: string[];
|
||||||
|
connected: boolean;
|
||||||
|
legacy_pairing: boolean;
|
||||||
|
legacyPairing: boolean;
|
||||||
|
paired: boolean;
|
||||||
|
rssi: number;
|
||||||
|
adapter: never;
|
||||||
|
address: string;
|
||||||
|
icon: string;
|
||||||
|
modalias: string;
|
||||||
|
name: string;
|
||||||
|
appearance: number;
|
||||||
|
class: number;
|
||||||
|
connecting: boolean;
|
||||||
|
blocked: boolean;
|
||||||
|
trusted: boolean;
|
||||||
|
battery_percentage: number;
|
||||||
|
batteryPercentage: number;
|
||||||
|
alias: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object representing a [device](https://github.com/luetzel/bluez/blob/master/doc/device-api.txt).
|
||||||
|
*/
|
||||||
|
class Device extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Device>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of 128-bit UUIDs that represents the available remote services.
|
||||||
|
*/
|
||||||
|
get uuids(): string[];
|
||||||
|
/**
|
||||||
|
* Indicates if the remote device is currently connected.
|
||||||
|
*/
|
||||||
|
get connected(): boolean;
|
||||||
|
/**
|
||||||
|
* `true` if the device only supports the pre-2.1 pairing mechanism.
|
||||||
|
*/
|
||||||
|
get legacy_pairing(): boolean;
|
||||||
|
/**
|
||||||
|
* `true` if the device only supports the pre-2.1 pairing mechanism.
|
||||||
|
*/
|
||||||
|
get legacyPairing(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates if the remote device is paired.
|
||||||
|
*/
|
||||||
|
get paired(): boolean;
|
||||||
|
/**
|
||||||
|
* Received Signal Strength Indicator of the remote device (inquiry or advertising).
|
||||||
|
*/
|
||||||
|
get rssi(): number;
|
||||||
|
/**
|
||||||
|
* The object path of the adapter the device belongs to.
|
||||||
|
*/
|
||||||
|
get adapter(): never;
|
||||||
|
/**
|
||||||
|
* The Bluetooth device address of the remote device.
|
||||||
|
*/
|
||||||
|
get address(): string;
|
||||||
|
/**
|
||||||
|
* Proposed icon name.
|
||||||
|
*/
|
||||||
|
get icon(): string;
|
||||||
|
/**
|
||||||
|
* Remote Device ID information in modalias format used by the kernel and udev.
|
||||||
|
*/
|
||||||
|
get modalias(): string;
|
||||||
|
/**
|
||||||
|
* The Bluetooth remote name.
|
||||||
|
* It is always better to use [property`AstalBluetooth`.Device:alias].
|
||||||
|
*/
|
||||||
|
get name(): string;
|
||||||
|
/**
|
||||||
|
* External appearance of device, as found on GAP service.
|
||||||
|
*/
|
||||||
|
get appearance(): number;
|
||||||
|
/**
|
||||||
|
* The Bluetooth class of device of the remote device.
|
||||||
|
*/
|
||||||
|
get class(): number;
|
||||||
|
/**
|
||||||
|
* Indicates if this device is currently trying to be connected.
|
||||||
|
*/
|
||||||
|
get connecting(): boolean;
|
||||||
|
set connecting(val: boolean);
|
||||||
|
/**
|
||||||
|
* If set to `true` any incoming connections from the device will be immediately rejected.
|
||||||
|
*/
|
||||||
|
get blocked(): boolean;
|
||||||
|
set blocked(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if the remote is seen as trusted.
|
||||||
|
*/
|
||||||
|
get trusted(): boolean;
|
||||||
|
set trusted(val: boolean);
|
||||||
|
/**
|
||||||
|
* The percentage of battery left on the device if it has one, else -1.
|
||||||
|
*/
|
||||||
|
get battery_percentage(): number;
|
||||||
|
/**
|
||||||
|
* The percentage of battery left on the device if it has one, else -1.
|
||||||
|
*/
|
||||||
|
get batteryPercentage(): number;
|
||||||
|
/**
|
||||||
|
* The name alias for the remote device.
|
||||||
|
* In case no alias is set, it will return the remote device [property`AstalBluetooth`.Device:name].
|
||||||
|
*/
|
||||||
|
get alias(): string;
|
||||||
|
set alias(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Device.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a generic method to connect any profiles the remote device supports that can be connected to.
|
||||||
|
* Possible errors: `NotReady`, `Failed`, `InProgress`, `AlreadyConnected`.
|
||||||
|
*/
|
||||||
|
connect_device(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* This is a generic method to connect any profiles the remote device supports that can be connected to.
|
||||||
|
* Possible errors: `NotReady`, `Failed`, `InProgress`, `AlreadyConnected`.
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
connect_device(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
||||||
|
/**
|
||||||
|
* This is a generic method to connect any profiles the remote device supports that can be connected to.
|
||||||
|
* Possible errors: `NotReady`, `Failed`, `InProgress`, `AlreadyConnected`.
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
connect_device(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
||||||
|
connect_device_finish(_res_: Gio.AsyncResult): void;
|
||||||
|
/**
|
||||||
|
* This method gracefully disconnects all connected profiles.
|
||||||
|
* Possible errors: `NotConnected`.
|
||||||
|
*/
|
||||||
|
disconnect_device(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* This method gracefully disconnects all connected profiles.
|
||||||
|
* Possible errors: `NotConnected`.
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
disconnect_device(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
||||||
|
/**
|
||||||
|
* This method gracefully disconnects all connected profiles.
|
||||||
|
* Possible errors: `NotConnected`.
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
disconnect_device(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
||||||
|
disconnect_device_finish(_res_: Gio.AsyncResult): void;
|
||||||
|
/**
|
||||||
|
* This method connects a specific profile of this device. The UUID provided is the remote service UUID for the profile.
|
||||||
|
* Possible errors: `Failed`, `InProgress`, `InvalidArguments`, `NotAvailable`, `NotReady`.
|
||||||
|
* @param uuid the remote service UUID.
|
||||||
|
*/
|
||||||
|
connect_profile(uuid: string): void;
|
||||||
|
/**
|
||||||
|
* This method disconnects a specific profile of this device.
|
||||||
|
* Possible errors: `Failed`, `InProgress`, `InvalidArguments`, `NotSupported`.
|
||||||
|
* @param uuid the remote service UUID.
|
||||||
|
*/
|
||||||
|
disconnect_profile(uuid: string): void;
|
||||||
|
/**
|
||||||
|
* This method will connect to the remote device and initiate pairing.
|
||||||
|
* Possible errors: `InvalidArguments`, `Failed`, `AlreadyExists`, `AuthenticationCanceled`, `AuthenticationFailed`, `AuthenticationRejected`,
|
||||||
|
* `AuthenticationTimeout`, `ConnectionAttemptFailed`.
|
||||||
|
*/
|
||||||
|
pair(): void;
|
||||||
|
/**
|
||||||
|
* This method can be used to cancel a pairing operation initiated by [method`AstalBluetooth`.Device.pair].
|
||||||
|
* Possible errors: `DoesNotExist`, `Failed`.
|
||||||
|
*/
|
||||||
|
cancel_pairing(): void;
|
||||||
|
get_uuids(): string[];
|
||||||
|
get_connected(): boolean;
|
||||||
|
get_legacy_pairing(): boolean;
|
||||||
|
get_paired(): boolean;
|
||||||
|
get_rssi(): number;
|
||||||
|
get_adapter(): never;
|
||||||
|
get_address(): string;
|
||||||
|
get_icon(): string;
|
||||||
|
get_modalias(): string;
|
||||||
|
get_name(): string;
|
||||||
|
get_appearance(): number;
|
||||||
|
get_class(): number;
|
||||||
|
get_connecting(): boolean;
|
||||||
|
get_blocked(): boolean;
|
||||||
|
set_blocked(value: boolean): void;
|
||||||
|
get_trusted(): boolean;
|
||||||
|
set_trusted(value: boolean): void;
|
||||||
|
get_battery_percentage(): number;
|
||||||
|
get_alias(): string;
|
||||||
|
set_alias(value: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type AdapterClass = typeof Adapter;
|
||||||
|
abstract class AdapterPrivate {
|
||||||
|
static $gtype: GObject.GType<AdapterPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type BluetoothClass = typeof Bluetooth;
|
||||||
|
abstract class BluetoothPrivate {
|
||||||
|
static $gtype: GObject.GType<BluetoothPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type DeviceClass = typeof Device;
|
||||||
|
abstract class DevicePrivate {
|
||||||
|
static $gtype: GObject.GType<DevicePrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalBluetooth;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalBluetooth' {
|
||||||
|
import AstalBluetooth01 from 'gi://AstalBluetooth?version=0.1';
|
||||||
|
export default AstalBluetooth01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
222
configs/userland/ags/@girs/astalcava-0.1.d.ts
vendored
Normal file
222
configs/userland/ags/@girs/astalcava-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalCava?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalCava {
|
||||||
|
/**
|
||||||
|
* AstalCava-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace Input {
|
||||||
|
export const $gtype: GObject.GType<Input>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Input {
|
||||||
|
FIFO,
|
||||||
|
PORTAUDIO,
|
||||||
|
PIPEWIRE,
|
||||||
|
ALSA,
|
||||||
|
PULSE,
|
||||||
|
SNDIO,
|
||||||
|
SHMEM,
|
||||||
|
WINSCAP,
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* gets the default Cava object.
|
||||||
|
*/
|
||||||
|
function get_default(): Cava | null;
|
||||||
|
module Cava {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
active: boolean;
|
||||||
|
autosens: boolean;
|
||||||
|
bars: number;
|
||||||
|
channels: number;
|
||||||
|
framerate: number;
|
||||||
|
high_cutoff: number;
|
||||||
|
highCutoff: number;
|
||||||
|
input: Input;
|
||||||
|
low_cutoff: number;
|
||||||
|
lowCutoff: number;
|
||||||
|
noise_reduction: number;
|
||||||
|
noiseReduction: number;
|
||||||
|
samplerate: number;
|
||||||
|
source: string;
|
||||||
|
stereo: boolean;
|
||||||
|
values: number[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Cava extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Cava>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* whether or not the audio capture and visualization is running. if false the values array will
|
||||||
|
* not be updated.
|
||||||
|
*/
|
||||||
|
get active(): boolean;
|
||||||
|
set active(val: boolean);
|
||||||
|
/**
|
||||||
|
* When set, the sensitivity will automatically be adjusted.
|
||||||
|
*/
|
||||||
|
get autosens(): boolean;
|
||||||
|
set autosens(val: boolean);
|
||||||
|
/**
|
||||||
|
* the number of bars the visualizer should create.
|
||||||
|
*/
|
||||||
|
get bars(): number;
|
||||||
|
set bars(val: number);
|
||||||
|
/**
|
||||||
|
* how many input channels to consider
|
||||||
|
*/
|
||||||
|
get channels(): number;
|
||||||
|
set channels(val: number);
|
||||||
|
/**
|
||||||
|
* how often the values should be updated
|
||||||
|
*/
|
||||||
|
get framerate(): number;
|
||||||
|
set framerate(val: number);
|
||||||
|
/**
|
||||||
|
* cut off frequencies above this value
|
||||||
|
*/
|
||||||
|
get high_cutoff(): number;
|
||||||
|
set high_cutoff(val: number);
|
||||||
|
/**
|
||||||
|
* cut off frequencies above this value
|
||||||
|
*/
|
||||||
|
get highCutoff(): number;
|
||||||
|
set highCutoff(val: number);
|
||||||
|
/**
|
||||||
|
* specifies which audio server should be used.
|
||||||
|
*/
|
||||||
|
get input(): Input;
|
||||||
|
set input(val: Input);
|
||||||
|
/**
|
||||||
|
* cut off frequencies below this value
|
||||||
|
*/
|
||||||
|
get low_cutoff(): number;
|
||||||
|
set low_cutoff(val: number);
|
||||||
|
/**
|
||||||
|
* cut off frequencies below this value
|
||||||
|
*/
|
||||||
|
get lowCutoff(): number;
|
||||||
|
set lowCutoff(val: number);
|
||||||
|
/**
|
||||||
|
* adjusts the noise-reduction filter. low values are fast and noisy, large values are slow and
|
||||||
|
* smooth.
|
||||||
|
*/
|
||||||
|
get noise_reduction(): number;
|
||||||
|
set noise_reduction(val: number);
|
||||||
|
/**
|
||||||
|
* adjusts the noise-reduction filter. low values are fast and noisy, large values are slow and
|
||||||
|
* smooth.
|
||||||
|
*/
|
||||||
|
get noiseReduction(): number;
|
||||||
|
set noiseReduction(val: number);
|
||||||
|
/**
|
||||||
|
* the samplerate of the input
|
||||||
|
*/
|
||||||
|
get samplerate(): number;
|
||||||
|
set samplerate(val: number);
|
||||||
|
/**
|
||||||
|
* specifies which audio source should be used. Refer to the cava docs on how to use this
|
||||||
|
* property.
|
||||||
|
*/
|
||||||
|
get source(): string;
|
||||||
|
set source(val: string);
|
||||||
|
get stereo(): boolean;
|
||||||
|
set stereo(val: boolean);
|
||||||
|
/**
|
||||||
|
* A list of values, each represent the height of one bar. The values are generally between 0
|
||||||
|
* and 1 but can overshoot occasionally, in which case the sensitivity will be decreased
|
||||||
|
* automatically if [property`AstalCava`.Cava:autosens] is set. The array will have
|
||||||
|
* [property`AstalCava`.Cava:bars] entries. If [property`AstalCava`.Cava:stereo] is set, the first
|
||||||
|
* half of the array will represent the left channel and the second half the right channel, so
|
||||||
|
* there will be only bars/2 bars per channel. If the number of bars is odd, the last value will
|
||||||
|
* be 0.
|
||||||
|
*/
|
||||||
|
get values(): number[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Cava.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the default Cava object.
|
||||||
|
*/
|
||||||
|
static get_default(): Cava | null;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_active(): boolean;
|
||||||
|
get_autosens(): boolean;
|
||||||
|
get_bars(): number;
|
||||||
|
get_channels(): number;
|
||||||
|
get_framerate(): number;
|
||||||
|
get_high_cutoff(): number;
|
||||||
|
get_input(): Input;
|
||||||
|
get_low_cutoff(): number;
|
||||||
|
get_noise_reduction(): number;
|
||||||
|
get_samplerate(): number;
|
||||||
|
get_source(): string;
|
||||||
|
get_stereo(): boolean;
|
||||||
|
get_values(): number[];
|
||||||
|
set_active(active: boolean): void;
|
||||||
|
set_autosens(autosens: boolean): void;
|
||||||
|
set_bars(bars: number): void;
|
||||||
|
set_channels(channels: number): void;
|
||||||
|
set_framerate(framerate: number): void;
|
||||||
|
set_high_cutoff(high_cutoff: number): void;
|
||||||
|
set_input(input: Input | null): void;
|
||||||
|
set_low_cutoff(low_cutoff: number): void;
|
||||||
|
set_noise_reduction(noise: number): void;
|
||||||
|
set_samplerate(samplerate: number): void;
|
||||||
|
set_source(source: string): void;
|
||||||
|
set_stereo(stereo: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type CavaClass = typeof Cava;
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalCava;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalCava' {
|
||||||
|
import AstalCava01 from 'gi://AstalCava?version=0.1';
|
||||||
|
export default AstalCava01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
533
configs/userland/ags/@girs/astalgreet-0.1.d.ts
vendored
Normal file
533
configs/userland/ags/@girs/astalgreet-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,533 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalGreet?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalGreet {
|
||||||
|
/**
|
||||||
|
* AstalGreet-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace ErrorType {
|
||||||
|
export const $gtype: GObject.GType<ErrorType>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ErrorType {
|
||||||
|
/**
|
||||||
|
* Indicates that authentication failed. This is not a fatal error, and is likely caused by incorrect credentials.
|
||||||
|
*/
|
||||||
|
AUTH_ERROR,
|
||||||
|
/**
|
||||||
|
* A general error. See the error description for more information.
|
||||||
|
*/
|
||||||
|
ERROR,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace AuthMessageType {
|
||||||
|
export const $gtype: GObject.GType<AuthMessageType>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum AuthMessageType {
|
||||||
|
/**
|
||||||
|
* Indicates that input from the user should be visible when they answer this question.
|
||||||
|
*/
|
||||||
|
VISIBLE,
|
||||||
|
/**
|
||||||
|
* Indicates that input from the user should be considered secret when they answer this question.
|
||||||
|
*/
|
||||||
|
SECRET,
|
||||||
|
/**
|
||||||
|
* Indicates that this message is informative, not a question.
|
||||||
|
*/
|
||||||
|
INFO,
|
||||||
|
/**
|
||||||
|
* Indicates that this message is an error, not a question.
|
||||||
|
*/
|
||||||
|
ERROR,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
/**
|
||||||
|
* Shorthand for creating a session, posting the password, and starting the session with the given `cmd` which is parsed with [func@
|
||||||
|
* GLib.shell_parse_argv].
|
||||||
|
* @param username User to login to
|
||||||
|
* @param password Password of the user
|
||||||
|
* @param cmd Command to start the session with
|
||||||
|
*/
|
||||||
|
function login(username: string, password: string, cmd: string): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Shorthand for creating a session, posting the password, and starting the session with the given `cmd` which is parsed with [func@
|
||||||
|
* GLib.shell_parse_argv].
|
||||||
|
* @param username User to login to
|
||||||
|
* @param password Password of the user
|
||||||
|
* @param cmd Command to start the session with
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
function login(
|
||||||
|
username: string,
|
||||||
|
password: string,
|
||||||
|
cmd: string,
|
||||||
|
_callback_: Gio.AsyncReadyCallback<string> | null,
|
||||||
|
): void;
|
||||||
|
/**
|
||||||
|
* Shorthand for creating a session, posting the password, and starting the session with the given `cmd` which is parsed with [func@
|
||||||
|
* GLib.shell_parse_argv].
|
||||||
|
* @param username User to login to
|
||||||
|
* @param password Password of the user
|
||||||
|
* @param cmd Command to start the session with
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
function login(
|
||||||
|
username: string,
|
||||||
|
password: string,
|
||||||
|
cmd: string,
|
||||||
|
_callback_?: Gio.AsyncReadyCallback<string> | null,
|
||||||
|
): Promise<void> | void;
|
||||||
|
function login_finish(_res_: Gio.AsyncResult): void;
|
||||||
|
/**
|
||||||
|
* Same as [func`AstalGreet`.login] but allow for setting additonal env in the form of `name=value` pairs.
|
||||||
|
* @param username User to login to
|
||||||
|
* @param password Password of the user
|
||||||
|
* @param cmd Command to start the session with
|
||||||
|
* @param env Additonal env vars to set for the session
|
||||||
|
*/
|
||||||
|
function login_with_env(username: string, password: string, cmd: string, env: string[]): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Same as [func`AstalGreet`.login] but allow for setting additonal env in the form of `name=value` pairs.
|
||||||
|
* @param username User to login to
|
||||||
|
* @param password Password of the user
|
||||||
|
* @param cmd Command to start the session with
|
||||||
|
* @param env Additonal env vars to set for the session
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
function login_with_env(
|
||||||
|
username: string,
|
||||||
|
password: string,
|
||||||
|
cmd: string,
|
||||||
|
env: string[],
|
||||||
|
_callback_: Gio.AsyncReadyCallback<string> | null,
|
||||||
|
): void;
|
||||||
|
/**
|
||||||
|
* Same as [func`AstalGreet`.login] but allow for setting additonal env in the form of `name=value` pairs.
|
||||||
|
* @param username User to login to
|
||||||
|
* @param password Password of the user
|
||||||
|
* @param cmd Command to start the session with
|
||||||
|
* @param env Additonal env vars to set for the session
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
function login_with_env(
|
||||||
|
username: string,
|
||||||
|
password: string,
|
||||||
|
cmd: string,
|
||||||
|
env: string[],
|
||||||
|
_callback_?: Gio.AsyncReadyCallback<string> | null,
|
||||||
|
): Promise<void> | void;
|
||||||
|
function login_with_env_finish(_res_: Gio.AsyncResult): void;
|
||||||
|
module Request {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
type_name: string;
|
||||||
|
typeName: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base Request type.
|
||||||
|
*/
|
||||||
|
abstract class Request extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Request>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get type_name(): string;
|
||||||
|
get typeName(): string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Request.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Virtual methods
|
||||||
|
|
||||||
|
vfunc_get_type_name(): string;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send this request to greetd.
|
||||||
|
*/
|
||||||
|
send(): Promise<Response>;
|
||||||
|
/**
|
||||||
|
* Send this request to greetd.
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
send(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
||||||
|
/**
|
||||||
|
* Send this request to greetd.
|
||||||
|
* @param _callback_
|
||||||
|
*/
|
||||||
|
send(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<Response> | void;
|
||||||
|
send_finish(_res_: Gio.AsyncResult): Response;
|
||||||
|
get_type_name(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
module CreateSession {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends Request.ConstructorProps {
|
||||||
|
username: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a session and initiates a login attempted for the given user. The session is ready to be started if a success is returned.
|
||||||
|
*/
|
||||||
|
class CreateSession extends Request {
|
||||||
|
static $gtype: GObject.GType<CreateSession>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get username(): string;
|
||||||
|
set username(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<CreateSession.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](username: string): CreateSession;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_username(): string;
|
||||||
|
set_username(value: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module PostAuthMesssage {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends Request.ConstructorProps {
|
||||||
|
response: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Answers an authentication message. If the message was informative (info, error), then a response does not need to be set in this
|
||||||
|
* message. The session is ready to be started if a success is returned.
|
||||||
|
*/
|
||||||
|
class PostAuthMesssage extends Request {
|
||||||
|
static $gtype: GObject.GType<PostAuthMesssage>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get response(): string;
|
||||||
|
set response(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<PostAuthMesssage.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](response: string): PostAuthMesssage;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_response(): string;
|
||||||
|
set_response(value: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module StartSession {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends Request.ConstructorProps {
|
||||||
|
cmd: string[];
|
||||||
|
env: string[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests for the session to be started using the provided command line, adding the supplied environment to that created by PAM. The session
|
||||||
|
* will start after the greeter process terminates
|
||||||
|
*/
|
||||||
|
class StartSession extends Request {
|
||||||
|
static $gtype: GObject.GType<StartSession>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get cmd(): string[];
|
||||||
|
set cmd(val: string[]);
|
||||||
|
get env(): string[];
|
||||||
|
set env(val: string[]);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<StartSession.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](cmd: string[], env: string[]): StartSession;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_cmd(): string[];
|
||||||
|
set_cmd(value: string[]): void;
|
||||||
|
get_env(): string[];
|
||||||
|
set_env(value: string[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module CancelSession {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends Request.ConstructorProps {}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cancels the session that is currently under configuration.
|
||||||
|
*/
|
||||||
|
class CancelSession extends Request {
|
||||||
|
static $gtype: GObject.GType<CancelSession>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<CancelSession.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): CancelSession;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Response {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base Response type.
|
||||||
|
*/
|
||||||
|
abstract class Response extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Response>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Response.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Success {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends Response.ConstructorProps {}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the request succeeded.
|
||||||
|
*/
|
||||||
|
class Success extends Response {
|
||||||
|
static $gtype: GObject.GType<Success>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Success.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Error {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends Response.ConstructorProps {
|
||||||
|
error_type: ErrorType;
|
||||||
|
errorType: ErrorType;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the request succeeded.
|
||||||
|
*/
|
||||||
|
class Error extends Response {
|
||||||
|
static $gtype: GObject.GType<Error>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get error_type(): ErrorType;
|
||||||
|
set error_type(val: ErrorType);
|
||||||
|
get errorType(): ErrorType;
|
||||||
|
set errorType(val: ErrorType);
|
||||||
|
get description(): string;
|
||||||
|
set description(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Error.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_error_type(): ErrorType;
|
||||||
|
get_description(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
module AuthMessage {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends Response.ConstructorProps {
|
||||||
|
message_type: AuthMessageType;
|
||||||
|
messageType: AuthMessageType;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the request succeeded.
|
||||||
|
*/
|
||||||
|
class AuthMessage extends Response {
|
||||||
|
static $gtype: GObject.GType<AuthMessage>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get message_type(): AuthMessageType;
|
||||||
|
set message_type(val: AuthMessageType);
|
||||||
|
get messageType(): AuthMessageType;
|
||||||
|
set messageType(val: AuthMessageType);
|
||||||
|
get message(): string;
|
||||||
|
set message(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<AuthMessage.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_message_type(): AuthMessageType;
|
||||||
|
get_message(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type RequestClass = typeof Request;
|
||||||
|
abstract class RequestPrivate {
|
||||||
|
static $gtype: GObject.GType<RequestPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateSessionClass = typeof CreateSession;
|
||||||
|
abstract class CreateSessionPrivate {
|
||||||
|
static $gtype: GObject.GType<CreateSessionPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PostAuthMesssageClass = typeof PostAuthMesssage;
|
||||||
|
abstract class PostAuthMesssagePrivate {
|
||||||
|
static $gtype: GObject.GType<PostAuthMesssagePrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type StartSessionClass = typeof StartSession;
|
||||||
|
abstract class StartSessionPrivate {
|
||||||
|
static $gtype: GObject.GType<StartSessionPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type CancelSessionClass = typeof CancelSession;
|
||||||
|
abstract class CancelSessionPrivate {
|
||||||
|
static $gtype: GObject.GType<CancelSessionPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ResponseClass = typeof Response;
|
||||||
|
abstract class ResponsePrivate {
|
||||||
|
static $gtype: GObject.GType<ResponsePrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type SuccessClass = typeof Success;
|
||||||
|
abstract class SuccessPrivate {
|
||||||
|
static $gtype: GObject.GType<SuccessPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ErrorClass = typeof Error;
|
||||||
|
abstract class ErrorPrivate {
|
||||||
|
static $gtype: GObject.GType<ErrorPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type AuthMessageClass = typeof AuthMessage;
|
||||||
|
abstract class AuthMessagePrivate {
|
||||||
|
static $gtype: GObject.GType<AuthMessagePrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalGreet;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalGreet' {
|
||||||
|
import AstalGreet01 from 'gi://AstalGreet?version=0.1';
|
||||||
|
export default AstalGreet01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
887
configs/userland/ags/@girs/astalhyprland-0.1.d.ts
vendored
Normal file
887
configs/userland/ags/@girs/astalhyprland-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,887 @@
|
|||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalHyprland?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalHyprland {
|
||||||
|
/**
|
||||||
|
* AstalHyprland-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace MonitorTransform {
|
||||||
|
export const $gtype: GObject.GType<MonitorTransform>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum MonitorTransform {
|
||||||
|
NORMAL,
|
||||||
|
ROTATE_90_DEG,
|
||||||
|
ROTATE_180_DEG,
|
||||||
|
ROTATE_270_DEG,
|
||||||
|
FLIPPED,
|
||||||
|
FLIPPED_ROTATE_90_DEG,
|
||||||
|
FLIPPED_ROTATE_180_DEG,
|
||||||
|
FLIPPED_ROTATE_270_DEG,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
function get_default(): Hyprland;
|
||||||
|
|
||||||
|
export namespace Fullscreen {
|
||||||
|
export const $gtype: GObject.GType<Fullscreen>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Fullscreen {
|
||||||
|
CURRENT,
|
||||||
|
NONE,
|
||||||
|
MAXIMIZED,
|
||||||
|
FULLSCREEN,
|
||||||
|
}
|
||||||
|
module Client {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Removed {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MovedTo {
|
||||||
|
(workspace: Workspace): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
address: string;
|
||||||
|
mapped: boolean;
|
||||||
|
hidden: boolean;
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
workspace: Workspace;
|
||||||
|
floating: boolean;
|
||||||
|
monitor: Monitor;
|
||||||
|
class: string;
|
||||||
|
title: string;
|
||||||
|
initial_class: string;
|
||||||
|
initialClass: string;
|
||||||
|
initial_title: string;
|
||||||
|
initialTitle: string;
|
||||||
|
pid: number;
|
||||||
|
xwayland: boolean;
|
||||||
|
pinned: boolean;
|
||||||
|
fullscreen: Fullscreen;
|
||||||
|
fullscreen_client: Fullscreen;
|
||||||
|
fullscreenClient: Fullscreen;
|
||||||
|
swallowing: string;
|
||||||
|
focus_history_id: number;
|
||||||
|
focusHistoryId: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Client extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Client>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get address(): string;
|
||||||
|
set address(val: string);
|
||||||
|
get mapped(): boolean;
|
||||||
|
set mapped(val: boolean);
|
||||||
|
get hidden(): boolean;
|
||||||
|
set hidden(val: boolean);
|
||||||
|
get x(): number;
|
||||||
|
set x(val: number);
|
||||||
|
get y(): number;
|
||||||
|
set y(val: number);
|
||||||
|
get width(): number;
|
||||||
|
set width(val: number);
|
||||||
|
get height(): number;
|
||||||
|
set height(val: number);
|
||||||
|
get workspace(): Workspace;
|
||||||
|
set workspace(val: Workspace);
|
||||||
|
get floating(): boolean;
|
||||||
|
set floating(val: boolean);
|
||||||
|
get monitor(): Monitor;
|
||||||
|
set monitor(val: Monitor);
|
||||||
|
get class(): string;
|
||||||
|
set class(val: string);
|
||||||
|
get title(): string;
|
||||||
|
set title(val: string);
|
||||||
|
get initial_class(): string;
|
||||||
|
set initial_class(val: string);
|
||||||
|
get initialClass(): string;
|
||||||
|
set initialClass(val: string);
|
||||||
|
get initial_title(): string;
|
||||||
|
set initial_title(val: string);
|
||||||
|
get initialTitle(): string;
|
||||||
|
set initialTitle(val: string);
|
||||||
|
get pid(): number;
|
||||||
|
set pid(val: number);
|
||||||
|
get xwayland(): boolean;
|
||||||
|
set xwayland(val: boolean);
|
||||||
|
get pinned(): boolean;
|
||||||
|
set pinned(val: boolean);
|
||||||
|
get fullscreen(): Fullscreen;
|
||||||
|
set fullscreen(val: Fullscreen);
|
||||||
|
get fullscreen_client(): Fullscreen;
|
||||||
|
set fullscreen_client(val: Fullscreen);
|
||||||
|
get fullscreenClient(): Fullscreen;
|
||||||
|
set fullscreenClient(val: Fullscreen);
|
||||||
|
get swallowing(): string;
|
||||||
|
set swallowing(val: string);
|
||||||
|
get focus_history_id(): number;
|
||||||
|
set focus_history_id(val: number);
|
||||||
|
get focusHistoryId(): number;
|
||||||
|
set focusHistoryId(val: number);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Client.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Client;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'removed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'removed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'removed'): void;
|
||||||
|
connect(signal: 'moved-to', callback: (_source: this, workspace: Workspace) => void): number;
|
||||||
|
connect_after(signal: 'moved-to', callback: (_source: this, workspace: Workspace) => void): number;
|
||||||
|
emit(signal: 'moved-to', workspace: Workspace): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
kill(): void;
|
||||||
|
focus(): void;
|
||||||
|
move_to(ws: Workspace): void;
|
||||||
|
toggle_floating(): void;
|
||||||
|
get_address(): string;
|
||||||
|
get_mapped(): boolean;
|
||||||
|
get_hidden(): boolean;
|
||||||
|
get_x(): number;
|
||||||
|
get_y(): number;
|
||||||
|
get_width(): number;
|
||||||
|
get_height(): number;
|
||||||
|
get_workspace(): Workspace;
|
||||||
|
get_floating(): boolean;
|
||||||
|
get_monitor(): Monitor;
|
||||||
|
get_class(): string;
|
||||||
|
get_title(): string;
|
||||||
|
get_initial_class(): string;
|
||||||
|
get_initial_title(): string;
|
||||||
|
get_pid(): number;
|
||||||
|
get_xwayland(): boolean;
|
||||||
|
get_pinned(): boolean;
|
||||||
|
get_fullscreen(): Fullscreen;
|
||||||
|
get_fullscreen_client(): Fullscreen;
|
||||||
|
get_swallowing(): string;
|
||||||
|
get_focus_history_id(): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Hyprland {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Event {
|
||||||
|
(event: string, args: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Minimize {
|
||||||
|
(client: Client, minimize: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Floating {
|
||||||
|
(client: Client, floating: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Urgent {
|
||||||
|
(client: Client): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ClientMoved {
|
||||||
|
(client: Client, ws: Workspace): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Submap {
|
||||||
|
(name: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface KeyboardLayout {
|
||||||
|
(keyboard: string, layout: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ConfigReloaded {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ClientAdded {
|
||||||
|
(client: Client): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ClientRemoved {
|
||||||
|
(address: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface WorkspaceAdded {
|
||||||
|
(workspace: Workspace): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface WorkspaceRemoved {
|
||||||
|
(id: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MonitorAdded {
|
||||||
|
(monitor: Monitor): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MonitorRemoved {
|
||||||
|
(id: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
monitors: Monitor[];
|
||||||
|
workspaces: Workspace[];
|
||||||
|
clients: Client[];
|
||||||
|
focused_workspace: Workspace;
|
||||||
|
focusedWorkspace: Workspace;
|
||||||
|
focused_monitor: Monitor;
|
||||||
|
focusedMonitor: Monitor;
|
||||||
|
focused_client: Client;
|
||||||
|
focusedClient: Client;
|
||||||
|
binds: Bind[];
|
||||||
|
cursor_position: Position;
|
||||||
|
cursorPosition: Position;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Hyprland extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Hyprland>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get monitors(): Monitor[];
|
||||||
|
get workspaces(): Workspace[];
|
||||||
|
get clients(): Client[];
|
||||||
|
get focused_workspace(): Workspace;
|
||||||
|
set focused_workspace(val: Workspace);
|
||||||
|
get focusedWorkspace(): Workspace;
|
||||||
|
set focusedWorkspace(val: Workspace);
|
||||||
|
get focused_monitor(): Monitor;
|
||||||
|
set focused_monitor(val: Monitor);
|
||||||
|
get focusedMonitor(): Monitor;
|
||||||
|
set focusedMonitor(val: Monitor);
|
||||||
|
get focused_client(): Client;
|
||||||
|
set focused_client(val: Client);
|
||||||
|
get focusedClient(): Client;
|
||||||
|
set focusedClient(val: Client);
|
||||||
|
get binds(): Bind[];
|
||||||
|
get cursor_position(): Position;
|
||||||
|
get cursorPosition(): Position;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Hyprland.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Hyprland;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'event', callback: (_source: this, event: string, args: string) => void): number;
|
||||||
|
connect_after(signal: 'event', callback: (_source: this, event: string, args: string) => void): number;
|
||||||
|
emit(signal: 'event', event: string, args: string): void;
|
||||||
|
connect(signal: 'minimize', callback: (_source: this, client: Client, minimize: boolean) => void): number;
|
||||||
|
connect_after(
|
||||||
|
signal: 'minimize',
|
||||||
|
callback: (_source: this, client: Client, minimize: boolean) => void,
|
||||||
|
): number;
|
||||||
|
emit(signal: 'minimize', client: Client, minimize: boolean): void;
|
||||||
|
connect(signal: 'floating', callback: (_source: this, client: Client, floating: boolean) => void): number;
|
||||||
|
connect_after(
|
||||||
|
signal: 'floating',
|
||||||
|
callback: (_source: this, client: Client, floating: boolean) => void,
|
||||||
|
): number;
|
||||||
|
emit(signal: 'floating', client: Client, floating: boolean): void;
|
||||||
|
connect(signal: 'urgent', callback: (_source: this, client: Client) => void): number;
|
||||||
|
connect_after(signal: 'urgent', callback: (_source: this, client: Client) => void): number;
|
||||||
|
emit(signal: 'urgent', client: Client): void;
|
||||||
|
connect(signal: 'client-moved', callback: (_source: this, client: Client, ws: Workspace) => void): number;
|
||||||
|
connect_after(
|
||||||
|
signal: 'client-moved',
|
||||||
|
callback: (_source: this, client: Client, ws: Workspace) => void,
|
||||||
|
): number;
|
||||||
|
emit(signal: 'client-moved', client: Client, ws: Workspace): void;
|
||||||
|
connect(signal: 'submap', callback: (_source: this, name: string) => void): number;
|
||||||
|
connect_after(signal: 'submap', callback: (_source: this, name: string) => void): number;
|
||||||
|
emit(signal: 'submap', name: string): void;
|
||||||
|
connect(
|
||||||
|
signal: 'keyboard-layout',
|
||||||
|
callback: (_source: this, keyboard: string, layout: string) => void,
|
||||||
|
): number;
|
||||||
|
connect_after(
|
||||||
|
signal: 'keyboard-layout',
|
||||||
|
callback: (_source: this, keyboard: string, layout: string) => void,
|
||||||
|
): number;
|
||||||
|
emit(signal: 'keyboard-layout', keyboard: string, layout: string): void;
|
||||||
|
connect(signal: 'config-reloaded', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'config-reloaded', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'config-reloaded'): void;
|
||||||
|
connect(signal: 'client-added', callback: (_source: this, client: Client) => void): number;
|
||||||
|
connect_after(signal: 'client-added', callback: (_source: this, client: Client) => void): number;
|
||||||
|
emit(signal: 'client-added', client: Client): void;
|
||||||
|
connect(signal: 'client-removed', callback: (_source: this, address: string) => void): number;
|
||||||
|
connect_after(signal: 'client-removed', callback: (_source: this, address: string) => void): number;
|
||||||
|
emit(signal: 'client-removed', address: string): void;
|
||||||
|
connect(signal: 'workspace-added', callback: (_source: this, workspace: Workspace) => void): number;
|
||||||
|
connect_after(signal: 'workspace-added', callback: (_source: this, workspace: Workspace) => void): number;
|
||||||
|
emit(signal: 'workspace-added', workspace: Workspace): void;
|
||||||
|
connect(signal: 'workspace-removed', callback: (_source: this, id: number) => void): number;
|
||||||
|
connect_after(signal: 'workspace-removed', callback: (_source: this, id: number) => void): number;
|
||||||
|
emit(signal: 'workspace-removed', id: number): void;
|
||||||
|
connect(signal: 'monitor-added', callback: (_source: this, monitor: Monitor) => void): number;
|
||||||
|
connect_after(signal: 'monitor-added', callback: (_source: this, monitor: Monitor) => void): number;
|
||||||
|
emit(signal: 'monitor-added', monitor: Monitor): void;
|
||||||
|
connect(signal: 'monitor-removed', callback: (_source: this, id: number) => void): number;
|
||||||
|
connect_after(signal: 'monitor-removed', callback: (_source: this, id: number) => void): number;
|
||||||
|
emit(signal: 'monitor-removed', id: number): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
static get_default(): Hyprland | null;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_monitor(id: number): Monitor;
|
||||||
|
get_workspace(id: number): Workspace;
|
||||||
|
get_client(address: string): Client | null;
|
||||||
|
get_monitor_by_name(name: string): Monitor | null;
|
||||||
|
get_workspace_by_name(name: string): Workspace | null;
|
||||||
|
message(message: string): string;
|
||||||
|
message_async(message: string): Promise<string>;
|
||||||
|
message_async(message: string, _callback_: Gio.AsyncReadyCallback<this> | null): void;
|
||||||
|
message_async(message: string, _callback_?: Gio.AsyncReadyCallback<this> | null): Promise<string> | void;
|
||||||
|
message_finish(_res_: Gio.AsyncResult): string;
|
||||||
|
dispatch(dispatcher: string, args: string): void;
|
||||||
|
move_cursor(x: number, y: number): void;
|
||||||
|
sync_monitors(): Promise<void>;
|
||||||
|
sync_monitors(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
||||||
|
sync_monitors(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
||||||
|
sync_monitors_finish(_res_: Gio.AsyncResult): void;
|
||||||
|
sync_workspaces(): Promise<void>;
|
||||||
|
sync_workspaces(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
||||||
|
sync_workspaces(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
||||||
|
sync_workspaces_finish(_res_: Gio.AsyncResult): void;
|
||||||
|
sync_clients(): Promise<void>;
|
||||||
|
sync_clients(_callback_: Gio.AsyncReadyCallback<this> | null): void;
|
||||||
|
sync_clients(_callback_?: Gio.AsyncReadyCallback<this> | null): Promise<void> | void;
|
||||||
|
sync_clients_finish(_res_: Gio.AsyncResult): void;
|
||||||
|
get_monitors(): Monitor[];
|
||||||
|
get_workspaces(): Workspace[];
|
||||||
|
get_clients(): Client[];
|
||||||
|
get_focused_workspace(): Workspace;
|
||||||
|
get_focused_monitor(): Monitor;
|
||||||
|
get_focused_client(): Client;
|
||||||
|
get_binds(): Bind[];
|
||||||
|
get_cursor_position(): Position;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Monitor {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Removed {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
make: string;
|
||||||
|
model: string;
|
||||||
|
serial: string;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
refresh_rate: number;
|
||||||
|
refreshRate: number;
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
active_workspace: Workspace;
|
||||||
|
activeWorkspace: Workspace;
|
||||||
|
special_workspace: Workspace;
|
||||||
|
specialWorkspace: Workspace;
|
||||||
|
reserved_top: number;
|
||||||
|
reservedTop: number;
|
||||||
|
reserved_bottom: number;
|
||||||
|
reservedBottom: number;
|
||||||
|
reserved_left: number;
|
||||||
|
reservedLeft: number;
|
||||||
|
reserved_right: number;
|
||||||
|
reservedRight: number;
|
||||||
|
scale: number;
|
||||||
|
transform: MonitorTransform;
|
||||||
|
focused: boolean;
|
||||||
|
dpms_status: boolean;
|
||||||
|
dpmsStatus: boolean;
|
||||||
|
vrr: boolean;
|
||||||
|
actively_tearing: boolean;
|
||||||
|
activelyTearing: boolean;
|
||||||
|
disabled: boolean;
|
||||||
|
current_format: string;
|
||||||
|
currentFormat: string;
|
||||||
|
available_modes: string[];
|
||||||
|
availableModes: string[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Monitor extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Monitor>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get id(): number;
|
||||||
|
set id(val: number);
|
||||||
|
get name(): string;
|
||||||
|
set name(val: string);
|
||||||
|
get description(): string;
|
||||||
|
set description(val: string);
|
||||||
|
get make(): string;
|
||||||
|
set make(val: string);
|
||||||
|
get model(): string;
|
||||||
|
set model(val: string);
|
||||||
|
get serial(): string;
|
||||||
|
set serial(val: string);
|
||||||
|
get width(): number;
|
||||||
|
set width(val: number);
|
||||||
|
get height(): number;
|
||||||
|
set height(val: number);
|
||||||
|
get refresh_rate(): number;
|
||||||
|
set refresh_rate(val: number);
|
||||||
|
get refreshRate(): number;
|
||||||
|
set refreshRate(val: number);
|
||||||
|
get x(): number;
|
||||||
|
set x(val: number);
|
||||||
|
get y(): number;
|
||||||
|
set y(val: number);
|
||||||
|
get active_workspace(): Workspace;
|
||||||
|
set active_workspace(val: Workspace);
|
||||||
|
get activeWorkspace(): Workspace;
|
||||||
|
set activeWorkspace(val: Workspace);
|
||||||
|
get special_workspace(): Workspace;
|
||||||
|
set special_workspace(val: Workspace);
|
||||||
|
get specialWorkspace(): Workspace;
|
||||||
|
set specialWorkspace(val: Workspace);
|
||||||
|
get reserved_top(): number;
|
||||||
|
set reserved_top(val: number);
|
||||||
|
get reservedTop(): number;
|
||||||
|
set reservedTop(val: number);
|
||||||
|
get reserved_bottom(): number;
|
||||||
|
set reserved_bottom(val: number);
|
||||||
|
get reservedBottom(): number;
|
||||||
|
set reservedBottom(val: number);
|
||||||
|
get reserved_left(): number;
|
||||||
|
set reserved_left(val: number);
|
||||||
|
get reservedLeft(): number;
|
||||||
|
set reservedLeft(val: number);
|
||||||
|
get reserved_right(): number;
|
||||||
|
set reserved_right(val: number);
|
||||||
|
get reservedRight(): number;
|
||||||
|
set reservedRight(val: number);
|
||||||
|
get scale(): number;
|
||||||
|
set scale(val: number);
|
||||||
|
get transform(): MonitorTransform;
|
||||||
|
set transform(val: MonitorTransform);
|
||||||
|
get focused(): boolean;
|
||||||
|
set focused(val: boolean);
|
||||||
|
get dpms_status(): boolean;
|
||||||
|
set dpms_status(val: boolean);
|
||||||
|
get dpmsStatus(): boolean;
|
||||||
|
set dpmsStatus(val: boolean);
|
||||||
|
get vrr(): boolean;
|
||||||
|
set vrr(val: boolean);
|
||||||
|
get actively_tearing(): boolean;
|
||||||
|
set actively_tearing(val: boolean);
|
||||||
|
get activelyTearing(): boolean;
|
||||||
|
set activelyTearing(val: boolean);
|
||||||
|
get disabled(): boolean;
|
||||||
|
set disabled(val: boolean);
|
||||||
|
get current_format(): string;
|
||||||
|
set current_format(val: string);
|
||||||
|
get currentFormat(): string;
|
||||||
|
set currentFormat(val: string);
|
||||||
|
get available_modes(): string[];
|
||||||
|
set available_modes(val: string[]);
|
||||||
|
get availableModes(): string[];
|
||||||
|
set availableModes(val: string[]);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Monitor.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Monitor;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'removed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'removed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'removed'): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
focus(): void;
|
||||||
|
get_id(): number;
|
||||||
|
get_name(): string;
|
||||||
|
get_description(): string;
|
||||||
|
get_make(): string;
|
||||||
|
get_model(): string;
|
||||||
|
get_serial(): string;
|
||||||
|
get_width(): number;
|
||||||
|
get_height(): number;
|
||||||
|
get_refresh_rate(): number;
|
||||||
|
get_x(): number;
|
||||||
|
get_y(): number;
|
||||||
|
get_active_workspace(): Workspace;
|
||||||
|
get_special_workspace(): Workspace;
|
||||||
|
get_reserved_top(): number;
|
||||||
|
get_reserved_bottom(): number;
|
||||||
|
get_reserved_left(): number;
|
||||||
|
get_reserved_right(): number;
|
||||||
|
get_scale(): number;
|
||||||
|
get_transform(): MonitorTransform;
|
||||||
|
get_focused(): boolean;
|
||||||
|
get_dpms_status(): boolean;
|
||||||
|
get_vrr(): boolean;
|
||||||
|
get_actively_tearing(): boolean;
|
||||||
|
get_disabled(): boolean;
|
||||||
|
get_current_format(): string;
|
||||||
|
get_available_modes(): string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
module Bind {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
locked: boolean;
|
||||||
|
mouse: boolean;
|
||||||
|
release: boolean;
|
||||||
|
repeat: boolean;
|
||||||
|
long_press: boolean;
|
||||||
|
longPress: boolean;
|
||||||
|
non_consuming: boolean;
|
||||||
|
nonConsuming: boolean;
|
||||||
|
has_description: boolean;
|
||||||
|
hasDescription: boolean;
|
||||||
|
modmask: number;
|
||||||
|
submap: string;
|
||||||
|
key: string;
|
||||||
|
keycode: number;
|
||||||
|
catch_all: boolean;
|
||||||
|
catchAll: boolean;
|
||||||
|
description: string;
|
||||||
|
dispatcher: string;
|
||||||
|
arg: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Bind extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Bind>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get locked(): boolean;
|
||||||
|
set locked(val: boolean);
|
||||||
|
get mouse(): boolean;
|
||||||
|
set mouse(val: boolean);
|
||||||
|
get release(): boolean;
|
||||||
|
set release(val: boolean);
|
||||||
|
get repeat(): boolean;
|
||||||
|
set repeat(val: boolean);
|
||||||
|
get long_press(): boolean;
|
||||||
|
set long_press(val: boolean);
|
||||||
|
get longPress(): boolean;
|
||||||
|
set longPress(val: boolean);
|
||||||
|
get non_consuming(): boolean;
|
||||||
|
set non_consuming(val: boolean);
|
||||||
|
get nonConsuming(): boolean;
|
||||||
|
set nonConsuming(val: boolean);
|
||||||
|
get has_description(): boolean;
|
||||||
|
set has_description(val: boolean);
|
||||||
|
get hasDescription(): boolean;
|
||||||
|
set hasDescription(val: boolean);
|
||||||
|
get modmask(): number;
|
||||||
|
set modmask(val: number);
|
||||||
|
get submap(): string;
|
||||||
|
set submap(val: string);
|
||||||
|
get key(): string;
|
||||||
|
set key(val: string);
|
||||||
|
get keycode(): number;
|
||||||
|
set keycode(val: number);
|
||||||
|
get catch_all(): boolean;
|
||||||
|
set catch_all(val: boolean);
|
||||||
|
get catchAll(): boolean;
|
||||||
|
set catchAll(val: boolean);
|
||||||
|
get description(): string;
|
||||||
|
set description(val: string);
|
||||||
|
get dispatcher(): string;
|
||||||
|
set dispatcher(val: string);
|
||||||
|
get arg(): string;
|
||||||
|
set arg(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Bind.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Bind;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_locked(): boolean;
|
||||||
|
set_locked(value: boolean): void;
|
||||||
|
get_mouse(): boolean;
|
||||||
|
set_mouse(value: boolean): void;
|
||||||
|
get_release(): boolean;
|
||||||
|
set_release(value: boolean): void;
|
||||||
|
get_repeat(): boolean;
|
||||||
|
set_repeat(value: boolean): void;
|
||||||
|
get_long_press(): boolean;
|
||||||
|
set_long_press(value: boolean): void;
|
||||||
|
get_non_consuming(): boolean;
|
||||||
|
set_non_consuming(value: boolean): void;
|
||||||
|
get_has_description(): boolean;
|
||||||
|
set_has_description(value: boolean): void;
|
||||||
|
get_modmask(): number;
|
||||||
|
set_modmask(value: number): void;
|
||||||
|
get_submap(): string;
|
||||||
|
set_submap(value: string): void;
|
||||||
|
get_key(): string;
|
||||||
|
set_key(value: string): void;
|
||||||
|
get_keycode(): number;
|
||||||
|
set_keycode(value: number): void;
|
||||||
|
get_catch_all(): boolean;
|
||||||
|
set_catch_all(value: boolean): void;
|
||||||
|
get_description(): string;
|
||||||
|
set_description(value: string): void;
|
||||||
|
get_dispatcher(): string;
|
||||||
|
set_dispatcher(value: string): void;
|
||||||
|
get_arg(): string;
|
||||||
|
set_arg(value: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Position {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Position extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Position>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get x(): number;
|
||||||
|
set x(val: number);
|
||||||
|
get y(): number;
|
||||||
|
set y(val: number);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Position.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Position;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_x(): number;
|
||||||
|
set_x(value: number): void;
|
||||||
|
get_y(): number;
|
||||||
|
set_y(value: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Workspace {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Removed {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
monitor: Monitor;
|
||||||
|
clients: Client[];
|
||||||
|
has_fullscreen: boolean;
|
||||||
|
hasFullscreen: boolean;
|
||||||
|
last_client: Client;
|
||||||
|
lastClient: Client;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Workspace extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Workspace>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get id(): number;
|
||||||
|
set id(val: number);
|
||||||
|
get name(): string;
|
||||||
|
set name(val: string);
|
||||||
|
get monitor(): Monitor;
|
||||||
|
set monitor(val: Monitor);
|
||||||
|
get clients(): Client[];
|
||||||
|
get has_fullscreen(): boolean;
|
||||||
|
set has_fullscreen(val: boolean);
|
||||||
|
get hasFullscreen(): boolean;
|
||||||
|
set hasFullscreen(val: boolean);
|
||||||
|
get last_client(): Client;
|
||||||
|
set last_client(val: Client);
|
||||||
|
get lastClient(): Client;
|
||||||
|
set lastClient(val: Client);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Workspace.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static dummy(id: number, monitor?: Monitor | null): Workspace;
|
||||||
|
|
||||||
|
static ['new'](): Workspace;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'removed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'removed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'removed'): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
focus(): void;
|
||||||
|
move_to(m: Monitor): void;
|
||||||
|
get_id(): number;
|
||||||
|
get_name(): string;
|
||||||
|
get_monitor(): Monitor;
|
||||||
|
get_clients(): Client[];
|
||||||
|
get_has_fullscreen(): boolean;
|
||||||
|
get_last_client(): Client;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ClientClass = typeof Client;
|
||||||
|
abstract class ClientPrivate {
|
||||||
|
static $gtype: GObject.GType<ClientPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type HyprlandClass = typeof Hyprland;
|
||||||
|
abstract class HyprlandPrivate {
|
||||||
|
static $gtype: GObject.GType<HyprlandPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type MonitorClass = typeof Monitor;
|
||||||
|
abstract class MonitorPrivate {
|
||||||
|
static $gtype: GObject.GType<MonitorPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type BindClass = typeof Bind;
|
||||||
|
abstract class BindPrivate {
|
||||||
|
static $gtype: GObject.GType<BindPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PositionClass = typeof Position;
|
||||||
|
abstract class PositionPrivate {
|
||||||
|
static $gtype: GObject.GType<PositionPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type WorkspaceClass = typeof Workspace;
|
||||||
|
abstract class WorkspacePrivate {
|
||||||
|
static $gtype: GObject.GType<WorkspacePrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalHyprland;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalHyprland' {
|
||||||
|
import AstalHyprland01 from 'gi://AstalHyprland?version=0.1';
|
||||||
|
export default AstalHyprland01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
1074
configs/userland/ags/@girs/astalio-0.1.d.ts
vendored
Normal file
1074
configs/userland/ags/@girs/astalio-0.1.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
651
configs/userland/ags/@girs/astalmpris-0.1.d.ts
vendored
Normal file
651
configs/userland/ags/@girs/astalmpris-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,651 @@
|
|||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalMpris?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalMpris {
|
||||||
|
/**
|
||||||
|
* AstalMpris-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace PlaybackStatus {
|
||||||
|
export const $gtype: GObject.GType<PlaybackStatus>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PlaybackStatus {
|
||||||
|
PLAYING,
|
||||||
|
PAUSED,
|
||||||
|
STOPPED,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Loop {
|
||||||
|
export const $gtype: GObject.GType<Loop>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Loop {
|
||||||
|
UNSUPPORTED,
|
||||||
|
/**
|
||||||
|
* The playback will stop when there are no more tracks to play.
|
||||||
|
*/
|
||||||
|
NONE,
|
||||||
|
/**
|
||||||
|
* The current track will start again from the begining once it has finished playing.
|
||||||
|
*/
|
||||||
|
TRACK,
|
||||||
|
/**
|
||||||
|
* The playback loops through a list of tracks.
|
||||||
|
*/
|
||||||
|
PLAYLIST,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Shuffle {
|
||||||
|
export const $gtype: GObject.GType<Shuffle>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Shuffle {
|
||||||
|
UNSUPPORTED,
|
||||||
|
/**
|
||||||
|
* Playback is progressing through a playlist in some other order.
|
||||||
|
*/
|
||||||
|
ON,
|
||||||
|
/**
|
||||||
|
* Playback is progressing linearly through a playlist.
|
||||||
|
*/
|
||||||
|
OFF,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
/**
|
||||||
|
* Gets the default singleton Mpris instance.
|
||||||
|
*/
|
||||||
|
function get_default(): Mpris;
|
||||||
|
module Mpris {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface PlayerAdded {
|
||||||
|
(player: Player): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PlayerClosed {
|
||||||
|
(player: Player): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
players: Player[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object that monitors dbus for players to appear and disappear.
|
||||||
|
*/
|
||||||
|
class Mpris extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Mpris>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of currently available players.
|
||||||
|
*/
|
||||||
|
get players(): Player[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Mpris.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Mpris;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'player-added', callback: (_source: this, player: Player) => void): number;
|
||||||
|
connect_after(signal: 'player-added', callback: (_source: this, player: Player) => void): number;
|
||||||
|
emit(signal: 'player-added', player: Player): void;
|
||||||
|
connect(signal: 'player-closed', callback: (_source: this, player: Player) => void): number;
|
||||||
|
connect_after(signal: 'player-closed', callback: (_source: this, player: Player) => void): number;
|
||||||
|
emit(signal: 'player-closed', player: Player): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default singleton Mpris instance.
|
||||||
|
*/
|
||||||
|
static get_default(): Mpris;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_players(): Player[];
|
||||||
|
}
|
||||||
|
|
||||||
|
module Player {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
bus_name: string;
|
||||||
|
busName: string;
|
||||||
|
available: boolean;
|
||||||
|
can_quit: boolean;
|
||||||
|
canQuit: boolean;
|
||||||
|
fullscreen: boolean;
|
||||||
|
can_set_fullscreen: boolean;
|
||||||
|
canSetFullscreen: boolean;
|
||||||
|
can_raise: boolean;
|
||||||
|
canRaise: boolean;
|
||||||
|
identity: string;
|
||||||
|
entry: string;
|
||||||
|
supported_uri_schemes: string[];
|
||||||
|
supportedUriSchemes: string[];
|
||||||
|
supported_mime_types: string[];
|
||||||
|
supportedMimeTypes: string[];
|
||||||
|
loop_status: Loop;
|
||||||
|
loopStatus: Loop;
|
||||||
|
rate: number;
|
||||||
|
shuffle_status: Shuffle;
|
||||||
|
shuffleStatus: Shuffle;
|
||||||
|
volume: number;
|
||||||
|
position: number;
|
||||||
|
playback_status: PlaybackStatus;
|
||||||
|
playbackStatus: PlaybackStatus;
|
||||||
|
minimum_rate: number;
|
||||||
|
minimumRate: number;
|
||||||
|
maximum_rate: number;
|
||||||
|
maximumRate: number;
|
||||||
|
can_go_next: boolean;
|
||||||
|
canGoNext: boolean;
|
||||||
|
can_go_previous: boolean;
|
||||||
|
canGoPrevious: boolean;
|
||||||
|
can_play: boolean;
|
||||||
|
canPlay: boolean;
|
||||||
|
can_pause: boolean;
|
||||||
|
canPause: boolean;
|
||||||
|
can_seek: boolean;
|
||||||
|
canSeek: boolean;
|
||||||
|
can_control: boolean;
|
||||||
|
canControl: boolean;
|
||||||
|
metadata: GLib.HashTable<string, GLib.Variant>;
|
||||||
|
trackid: string;
|
||||||
|
length: number;
|
||||||
|
art_url: string;
|
||||||
|
artUrl: string;
|
||||||
|
album: string;
|
||||||
|
album_artist: string;
|
||||||
|
albumArtist: string;
|
||||||
|
artist: string;
|
||||||
|
lyrics: string;
|
||||||
|
title: string;
|
||||||
|
composer: string;
|
||||||
|
comments: string;
|
||||||
|
cover_art: string;
|
||||||
|
coverArt: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object which tracks players through their mpris dbus interface. The most simple way is to use [class`AstalMpris`.Mpris] which tracks
|
||||||
|
* every player, but [class`AstalMpris`.Player] can be constructed for a dedicated players too.
|
||||||
|
*/
|
||||||
|
class Player extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Player>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Full dbus namae of this player.
|
||||||
|
*/
|
||||||
|
get bus_name(): string;
|
||||||
|
set bus_name(val: string);
|
||||||
|
/**
|
||||||
|
* Full dbus namae of this player.
|
||||||
|
*/
|
||||||
|
get busName(): string;
|
||||||
|
set busName(val: string);
|
||||||
|
/**
|
||||||
|
* Indicates if [property`AstalMpris`.Player:bus_name] is available on dbus.
|
||||||
|
*/
|
||||||
|
get available(): boolean;
|
||||||
|
set available(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [method`AstalMpris`.Player.quit] has any effect.
|
||||||
|
*/
|
||||||
|
get can_quit(): boolean;
|
||||||
|
set can_quit(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [method`AstalMpris`.Player.quit] has any effect.
|
||||||
|
*/
|
||||||
|
get canQuit(): boolean;
|
||||||
|
set canQuit(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if the player is occupying the fullscreen. This is typically used for videos. Use [method`AstalMpris`.Player.toggle_fullscreen]
|
||||||
|
* to toggle fullscreen state.
|
||||||
|
*/
|
||||||
|
get fullscreen(): boolean;
|
||||||
|
set fullscreen(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [method`AstalMpris`.Player.toggle_fullscreen] has any effect.
|
||||||
|
*/
|
||||||
|
get can_set_fullscreen(): boolean;
|
||||||
|
set can_set_fullscreen(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [method`AstalMpris`.Player.toggle_fullscreen] has any effect.
|
||||||
|
*/
|
||||||
|
get canSetFullscreen(): boolean;
|
||||||
|
set canSetFullscreen(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [method`AstalMpris`.Player.raise] has any effect.
|
||||||
|
*/
|
||||||
|
get can_raise(): boolean;
|
||||||
|
set can_raise(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if [method`AstalMpris`.Player.raise] has any effect.
|
||||||
|
*/
|
||||||
|
get canRaise(): boolean;
|
||||||
|
set canRaise(val: boolean);
|
||||||
|
/**
|
||||||
|
* A human friendly name to identify the player.
|
||||||
|
*/
|
||||||
|
get identity(): string;
|
||||||
|
set identity(val: string);
|
||||||
|
/**
|
||||||
|
* The base name of a .desktop file
|
||||||
|
*/
|
||||||
|
get entry(): string;
|
||||||
|
set entry(val: string);
|
||||||
|
/**
|
||||||
|
* The URI schemes supported by the media player.
|
||||||
|
* This can be viewed as protocols supported by the player in almost all cases. Almost every media player will include support for the "file
|
||||||
|
* " scheme. Other common schemes are "http" and "rtsp".
|
||||||
|
*/
|
||||||
|
get supported_uri_schemes(): string[];
|
||||||
|
set supported_uri_schemes(val: string[]);
|
||||||
|
/**
|
||||||
|
* The URI schemes supported by the media player.
|
||||||
|
* This can be viewed as protocols supported by the player in almost all cases. Almost every media player will include support for the "file
|
||||||
|
* " scheme. Other common schemes are "http" and "rtsp".
|
||||||
|
*/
|
||||||
|
get supportedUriSchemes(): string[];
|
||||||
|
set supportedUriSchemes(val: string[]);
|
||||||
|
/**
|
||||||
|
* The mime-types supported by the player.
|
||||||
|
*/
|
||||||
|
get supported_mime_types(): string[];
|
||||||
|
set supported_mime_types(val: string[]);
|
||||||
|
/**
|
||||||
|
* The mime-types supported by the player.
|
||||||
|
*/
|
||||||
|
get supportedMimeTypes(): string[];
|
||||||
|
set supportedMimeTypes(val: string[]);
|
||||||
|
/**
|
||||||
|
* The current loop/repeat status.
|
||||||
|
*/
|
||||||
|
get loop_status(): Loop;
|
||||||
|
set loop_status(val: Loop);
|
||||||
|
/**
|
||||||
|
* The current loop/repeat status.
|
||||||
|
*/
|
||||||
|
get loopStatus(): Loop;
|
||||||
|
set loopStatus(val: Loop);
|
||||||
|
/**
|
||||||
|
* The current playback rate.
|
||||||
|
*/
|
||||||
|
get rate(): number;
|
||||||
|
set rate(val: number);
|
||||||
|
/**
|
||||||
|
* The current shuffle status.
|
||||||
|
*/
|
||||||
|
get shuffle_status(): Shuffle;
|
||||||
|
set shuffle_status(val: Shuffle);
|
||||||
|
/**
|
||||||
|
* The current shuffle status.
|
||||||
|
*/
|
||||||
|
get shuffleStatus(): Shuffle;
|
||||||
|
set shuffleStatus(val: Shuffle);
|
||||||
|
/**
|
||||||
|
* The current volume level between 0 and 1.
|
||||||
|
*/
|
||||||
|
get volume(): number;
|
||||||
|
set volume(val: number);
|
||||||
|
/**
|
||||||
|
* The current position of the track in seconds. To get a progress percentage simply divide this with [property`AstalMpris`.Player:length].
|
||||||
|
*/
|
||||||
|
get position(): number;
|
||||||
|
set position(val: number);
|
||||||
|
/**
|
||||||
|
* The current playback status.
|
||||||
|
*/
|
||||||
|
get playback_status(): PlaybackStatus;
|
||||||
|
set playback_status(val: PlaybackStatus);
|
||||||
|
/**
|
||||||
|
* The current playback status.
|
||||||
|
*/
|
||||||
|
get playbackStatus(): PlaybackStatus;
|
||||||
|
set playbackStatus(val: PlaybackStatus);
|
||||||
|
/**
|
||||||
|
* The minimum value which the [property`AstalMpris`.Player:rate] can take.
|
||||||
|
*/
|
||||||
|
get minimum_rate(): number;
|
||||||
|
set minimum_rate(val: number);
|
||||||
|
/**
|
||||||
|
* The minimum value which the [property`AstalMpris`.Player:rate] can take.
|
||||||
|
*/
|
||||||
|
get minimumRate(): number;
|
||||||
|
set minimumRate(val: number);
|
||||||
|
/**
|
||||||
|
* The maximum value which the [property`AstalMpris`.Player:rate] can take.
|
||||||
|
*/
|
||||||
|
get maximum_rate(): number;
|
||||||
|
set maximum_rate(val: number);
|
||||||
|
/**
|
||||||
|
* The maximum value which the [property`AstalMpris`.Player:rate] can take.
|
||||||
|
*/
|
||||||
|
get maximumRate(): number;
|
||||||
|
set maximumRate(val: number);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.next] has effect.
|
||||||
|
*/
|
||||||
|
get can_go_next(): boolean;
|
||||||
|
set can_go_next(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.next] has effect.
|
||||||
|
*/
|
||||||
|
get canGoNext(): boolean;
|
||||||
|
set canGoNext(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.previous] has effect.
|
||||||
|
*/
|
||||||
|
get can_go_previous(): boolean;
|
||||||
|
set can_go_previous(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.previous] has effect.
|
||||||
|
*/
|
||||||
|
get canGoPrevious(): boolean;
|
||||||
|
set canGoPrevious(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.play] has effect.
|
||||||
|
*/
|
||||||
|
get can_play(): boolean;
|
||||||
|
set can_play(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.play] has effect.
|
||||||
|
*/
|
||||||
|
get canPlay(): boolean;
|
||||||
|
set canPlay(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.pause] has effect.
|
||||||
|
*/
|
||||||
|
get can_pause(): boolean;
|
||||||
|
set can_pause(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if invoking [method`AstalMpris`.Player.pause] has effect.
|
||||||
|
*/
|
||||||
|
get canPause(): boolean;
|
||||||
|
set canPause(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if setting [property`AstalMpris`.Player:position] has effect.
|
||||||
|
*/
|
||||||
|
get can_seek(): boolean;
|
||||||
|
set can_seek(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if setting [property`AstalMpris`.Player:position] has effect.
|
||||||
|
*/
|
||||||
|
get canSeek(): boolean;
|
||||||
|
set canSeek(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if the player can be controlled with methods such as [method`AstalMpris`.Player.play_pause].
|
||||||
|
*/
|
||||||
|
get can_control(): boolean;
|
||||||
|
set can_control(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicates if the player can be controlled with methods such as [method`AstalMpris`.Player.play_pause].
|
||||||
|
*/
|
||||||
|
get canControl(): boolean;
|
||||||
|
set canControl(val: boolean);
|
||||||
|
/**
|
||||||
|
* Metadata hashtable of this player. In languages that cannot introspect this use [method`AstalMpris`.Player.get_meta].
|
||||||
|
*/
|
||||||
|
get metadata(): GLib.HashTable<string, GLib.Variant>;
|
||||||
|
set metadata(val: GLib.HashTable<string, GLib.Variant>);
|
||||||
|
/**
|
||||||
|
* Currently playing track's id.
|
||||||
|
*/
|
||||||
|
get trackid(): string;
|
||||||
|
set trackid(val: string);
|
||||||
|
/**
|
||||||
|
* Length of the currently playing track in seconds.
|
||||||
|
*/
|
||||||
|
get length(): number;
|
||||||
|
set length(val: number);
|
||||||
|
/**
|
||||||
|
* The location of an image representing the track or album. You should always prefer to use [property`AstalMpris`.Player:cover_art].
|
||||||
|
*/
|
||||||
|
get art_url(): string;
|
||||||
|
set art_url(val: string);
|
||||||
|
/**
|
||||||
|
* The location of an image representing the track or album. You should always prefer to use [property`AstalMpris`.Player:cover_art].
|
||||||
|
*/
|
||||||
|
get artUrl(): string;
|
||||||
|
set artUrl(val: string);
|
||||||
|
/**
|
||||||
|
* Title of the currently playing album.
|
||||||
|
*/
|
||||||
|
get album(): string;
|
||||||
|
set album(val: string);
|
||||||
|
/**
|
||||||
|
* Artists of the currently playing album.
|
||||||
|
*/
|
||||||
|
get album_artist(): string;
|
||||||
|
set album_artist(val: string);
|
||||||
|
/**
|
||||||
|
* Artists of the currently playing album.
|
||||||
|
*/
|
||||||
|
get albumArtist(): string;
|
||||||
|
set albumArtist(val: string);
|
||||||
|
/**
|
||||||
|
* Artists of the currently playing track.
|
||||||
|
*/
|
||||||
|
get artist(): string;
|
||||||
|
set artist(val: string);
|
||||||
|
/**
|
||||||
|
* Lyrics of the currently playing track.
|
||||||
|
*/
|
||||||
|
get lyrics(): string;
|
||||||
|
set lyrics(val: string);
|
||||||
|
/**
|
||||||
|
* Title of the currently playing track.
|
||||||
|
*/
|
||||||
|
get title(): string;
|
||||||
|
set title(val: string);
|
||||||
|
/**
|
||||||
|
* Composers of the currently playing track.
|
||||||
|
*/
|
||||||
|
get composer(): string;
|
||||||
|
set composer(val: string);
|
||||||
|
/**
|
||||||
|
* Comments of the currently playing track.
|
||||||
|
*/
|
||||||
|
get comments(): string;
|
||||||
|
set comments(val: string);
|
||||||
|
/**
|
||||||
|
* Path of the cached [property`AstalMpris`.Player:art_url].
|
||||||
|
*/
|
||||||
|
get cover_art(): string;
|
||||||
|
set cover_art(val: string);
|
||||||
|
/**
|
||||||
|
* Path of the cached [property`AstalMpris`.Player:art_url].
|
||||||
|
*/
|
||||||
|
get coverArt(): string;
|
||||||
|
set coverArt(val: string);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Player.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](name: string): Player;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Brings the player's user interface to the front using any appropriate mechanism available.
|
||||||
|
* The media player may be unable to control how its user interface is displayed, or it may not have a graphical user interface at all. In this
|
||||||
|
* case, the [property`AstalMpris`.Player:can_raise] is `false` and this method does nothing.
|
||||||
|
*/
|
||||||
|
raise(): void;
|
||||||
|
/**
|
||||||
|
* Causes the media player to stop running.
|
||||||
|
* The media player may refuse to allow clients to shut it down. In this case, the [property`AstalMpris`.Player:can_quit] property is false
|
||||||
|
* and this method does nothing.
|
||||||
|
*/
|
||||||
|
quit(): void;
|
||||||
|
/**
|
||||||
|
* Toggle [property`AstalMpris`.Player:fullscreen] state.
|
||||||
|
*/
|
||||||
|
toggle_fullscreen(): void;
|
||||||
|
/**
|
||||||
|
* Skips to the next track in the tracklist. If there is no next track (and endless playback and track repeat are both off), stop
|
||||||
|
* playback. If [property`AstalMpris`.Player:can_go_next] is `false` this method has no effect.
|
||||||
|
*/
|
||||||
|
next(): void;
|
||||||
|
/**
|
||||||
|
* Skips to the previous track in the tracklist. If there is no previous track (and endless playback and track repeat are both off),
|
||||||
|
* stop playback. If [property`AstalMpris`.Player:can_go_previous] is `false` this method has no effect.
|
||||||
|
*/
|
||||||
|
previous(): void;
|
||||||
|
/**
|
||||||
|
* Pauses playback. If playback is already paused, this has no effect. If [property`AstalMpris`.Player:can_pause] is `false` this method has
|
||||||
|
* no effect.
|
||||||
|
*/
|
||||||
|
pause(): void;
|
||||||
|
/**
|
||||||
|
* Pauses playback. If playback is already paused, resumes playback. If playback is stopped, starts playback.
|
||||||
|
*/
|
||||||
|
play_pause(): void;
|
||||||
|
/**
|
||||||
|
* Stops playback. If playback is already stopped, this has no effect. If [property`AstalMpris`.Player:can_control] is `false` this method
|
||||||
|
* has no effect.
|
||||||
|
*/
|
||||||
|
stop(): void;
|
||||||
|
/**
|
||||||
|
* Starts or resumes playback. If already playing, this has no effect. If paused, playback resumes from the current position. If [property@
|
||||||
|
* AstalMpris.Player:can_play] is `false` this method has no effect.
|
||||||
|
*/
|
||||||
|
play(): void;
|
||||||
|
/**
|
||||||
|
* uri scheme should be an element of [property`AstalMpris`.Player:supported_uri_schemes] and the mime-type should match one of the elements
|
||||||
|
* of [property`AstalMpris`.Player:supported_mime_types].
|
||||||
|
* @param uri Uri of the track to load.
|
||||||
|
*/
|
||||||
|
open_uri(uri: string): void;
|
||||||
|
/**
|
||||||
|
* Change [property`AstalMpris`.Player:loop_status] from none to track, from track to playlist, from playlist to none.
|
||||||
|
*/
|
||||||
|
loop(): void;
|
||||||
|
/**
|
||||||
|
* Toggle [property`AstalMpris`.Player:shuffle_status].
|
||||||
|
*/
|
||||||
|
shuffle(): void;
|
||||||
|
/**
|
||||||
|
* Lookup a key from [property`AstalMpris`.Player:metadata]. This method is useful for languages that fail to introspect hashtables.
|
||||||
|
* @param key
|
||||||
|
*/
|
||||||
|
get_meta(key: string): GLib.Variant | null;
|
||||||
|
get_bus_name(): string;
|
||||||
|
get_available(): boolean;
|
||||||
|
get_can_quit(): boolean;
|
||||||
|
get_fullscreen(): boolean;
|
||||||
|
get_can_set_fullscreen(): boolean;
|
||||||
|
get_can_raise(): boolean;
|
||||||
|
get_identity(): string;
|
||||||
|
get_entry(): string;
|
||||||
|
get_supported_uri_schemes(): string[];
|
||||||
|
get_supported_mime_types(): string[];
|
||||||
|
get_loop_status(): Loop;
|
||||||
|
set_loop_status(value: Loop | null): void;
|
||||||
|
get_rate(): number;
|
||||||
|
set_rate(value: number): void;
|
||||||
|
get_shuffle_status(): Shuffle;
|
||||||
|
set_shuffle_status(value: Shuffle | null): void;
|
||||||
|
get_volume(): number;
|
||||||
|
set_volume(value: number): void;
|
||||||
|
get_position(): number;
|
||||||
|
set_position(value: number): void;
|
||||||
|
get_playback_status(): PlaybackStatus;
|
||||||
|
get_minimum_rate(): number;
|
||||||
|
get_maximum_rate(): number;
|
||||||
|
get_can_go_next(): boolean;
|
||||||
|
get_can_go_previous(): boolean;
|
||||||
|
get_can_play(): boolean;
|
||||||
|
get_can_pause(): boolean;
|
||||||
|
get_can_seek(): boolean;
|
||||||
|
get_can_control(): boolean;
|
||||||
|
get_metadata(): GLib.HashTable<string, GLib.Variant>;
|
||||||
|
get_trackid(): string;
|
||||||
|
get_length(): number;
|
||||||
|
get_art_url(): string;
|
||||||
|
get_album(): string;
|
||||||
|
get_album_artist(): string;
|
||||||
|
get_artist(): string;
|
||||||
|
get_lyrics(): string;
|
||||||
|
get_title(): string;
|
||||||
|
get_composer(): string;
|
||||||
|
get_comments(): string;
|
||||||
|
get_cover_art(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type MprisClass = typeof Mpris;
|
||||||
|
abstract class MprisPrivate {
|
||||||
|
static $gtype: GObject.GType<MprisPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PlayerClass = typeof Player;
|
||||||
|
abstract class PlayerPrivate {
|
||||||
|
static $gtype: GObject.GType<PlayerPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalMpris;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalMpris' {
|
||||||
|
import AstalMpris01 from 'gi://AstalMpris?version=0.1';
|
||||||
|
export default AstalMpris01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
466
configs/userland/ags/@girs/astalnetwork-0.1.d.ts
vendored
Normal file
466
configs/userland/ags/@girs/astalnetwork-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,466 @@
|
|||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./nm-1.0.d.ts" />
|
||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalNetwork?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type NM from 'gi://NM?version=1.0';
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalNetwork {
|
||||||
|
/**
|
||||||
|
* AstalNetwork-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace Primary {
|
||||||
|
export const $gtype: GObject.GType<Primary>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Primary {
|
||||||
|
UNKNOWN,
|
||||||
|
WIRED,
|
||||||
|
WIFI,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace State {
|
||||||
|
export const $gtype: GObject.GType<State>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum State {
|
||||||
|
UNKNOWN,
|
||||||
|
ASLEEP,
|
||||||
|
DISCONNECTED,
|
||||||
|
DISCONNECTING,
|
||||||
|
CONNECTING,
|
||||||
|
CONNECTED_LOCAL,
|
||||||
|
CONNECTED_SITE,
|
||||||
|
CONNECTED_GLOBAL,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Connectivity {
|
||||||
|
export const $gtype: GObject.GType<Connectivity>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Connectivity {
|
||||||
|
UNKNOWN,
|
||||||
|
NONE,
|
||||||
|
PORTAL,
|
||||||
|
LIMITED,
|
||||||
|
FULL,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace DeviceState {
|
||||||
|
export const $gtype: GObject.GType<DeviceState>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum DeviceState {
|
||||||
|
UNKNOWN,
|
||||||
|
UNMANAGED,
|
||||||
|
UNAVAILABLE,
|
||||||
|
DISCONNECTED,
|
||||||
|
PREPARE,
|
||||||
|
CONFIG,
|
||||||
|
NEED_AUTH,
|
||||||
|
IP_CONFIG,
|
||||||
|
IP_CHECK,
|
||||||
|
SECONDARIES,
|
||||||
|
ACTIVATED,
|
||||||
|
DEACTIVATING,
|
||||||
|
FAILED,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Internet {
|
||||||
|
export const $gtype: GObject.GType<Internet>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Internet {
|
||||||
|
CONNECTED,
|
||||||
|
CONNECTING,
|
||||||
|
DISCONNECTED,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
function primary_to_string(): string;
|
||||||
|
function primary_from_connection_type(type: string): Primary;
|
||||||
|
function state_to_string(): string;
|
||||||
|
function connectivity_to_string(): string;
|
||||||
|
function device_state_to_string(): string;
|
||||||
|
function internet_from_device(device: NM.Device): Internet;
|
||||||
|
function internet_to_string(): string;
|
||||||
|
function get_default(): Network;
|
||||||
|
module Network {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
client: NM.Client;
|
||||||
|
wifi: Wifi;
|
||||||
|
wired: Wired;
|
||||||
|
primary: Primary;
|
||||||
|
connectivity: Connectivity;
|
||||||
|
state: State;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Network extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Network>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get client(): NM.Client;
|
||||||
|
set client(val: NM.Client);
|
||||||
|
get wifi(): Wifi;
|
||||||
|
set wifi(val: Wifi);
|
||||||
|
get wired(): Wired;
|
||||||
|
set wired(val: Wired);
|
||||||
|
get primary(): Primary;
|
||||||
|
set primary(val: Primary);
|
||||||
|
get connectivity(): Connectivity;
|
||||||
|
get state(): State;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Network.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Network;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
static get_default(): Network;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_client(): NM.Client;
|
||||||
|
get_wifi(): Wifi | null;
|
||||||
|
get_wired(): Wired | null;
|
||||||
|
get_primary(): Primary;
|
||||||
|
get_connectivity(): Connectivity;
|
||||||
|
get_state(): State;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Wifi {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface StateChanged {
|
||||||
|
(new_state: DeviceState, old_state: DeviceState, reaseon: NM.DeviceStateReason): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
device: NM.DeviceWifi;
|
||||||
|
active_connection: NM.ActiveConnection;
|
||||||
|
activeConnection: NM.ActiveConnection;
|
||||||
|
active_access_point: AccessPoint;
|
||||||
|
activeAccessPoint: AccessPoint;
|
||||||
|
access_points: AccessPoint[];
|
||||||
|
accessPoints: AccessPoint[];
|
||||||
|
enabled: boolean;
|
||||||
|
internet: Internet;
|
||||||
|
bandwidth: number;
|
||||||
|
ssid: string;
|
||||||
|
strength: number;
|
||||||
|
frequency: number;
|
||||||
|
state: DeviceState;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
is_hotspot: boolean;
|
||||||
|
isHotspot: boolean;
|
||||||
|
scanning: boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Wifi extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Wifi>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get device(): NM.DeviceWifi;
|
||||||
|
set device(val: NM.DeviceWifi);
|
||||||
|
get active_connection(): NM.ActiveConnection;
|
||||||
|
set active_connection(val: NM.ActiveConnection);
|
||||||
|
get activeConnection(): NM.ActiveConnection;
|
||||||
|
set activeConnection(val: NM.ActiveConnection);
|
||||||
|
get active_access_point(): AccessPoint;
|
||||||
|
set active_access_point(val: AccessPoint);
|
||||||
|
get activeAccessPoint(): AccessPoint;
|
||||||
|
set activeAccessPoint(val: AccessPoint);
|
||||||
|
get access_points(): AccessPoint[];
|
||||||
|
get accessPoints(): AccessPoint[];
|
||||||
|
get enabled(): boolean;
|
||||||
|
set enabled(val: boolean);
|
||||||
|
get internet(): Internet;
|
||||||
|
set internet(val: Internet);
|
||||||
|
get bandwidth(): number;
|
||||||
|
set bandwidth(val: number);
|
||||||
|
get ssid(): string;
|
||||||
|
set ssid(val: string);
|
||||||
|
get strength(): number;
|
||||||
|
set strength(val: number);
|
||||||
|
get frequency(): number;
|
||||||
|
set frequency(val: number);
|
||||||
|
get state(): DeviceState;
|
||||||
|
set state(val: DeviceState);
|
||||||
|
get icon_name(): string;
|
||||||
|
set icon_name(val: string);
|
||||||
|
get iconName(): string;
|
||||||
|
set iconName(val: string);
|
||||||
|
get is_hotspot(): boolean;
|
||||||
|
set is_hotspot(val: boolean);
|
||||||
|
get isHotspot(): boolean;
|
||||||
|
set isHotspot(val: boolean);
|
||||||
|
get scanning(): boolean;
|
||||||
|
set scanning(val: boolean);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Wifi.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(
|
||||||
|
signal: 'state-changed',
|
||||||
|
callback: (
|
||||||
|
_source: this,
|
||||||
|
new_state: DeviceState,
|
||||||
|
old_state: DeviceState,
|
||||||
|
reaseon: NM.DeviceStateReason,
|
||||||
|
) => void,
|
||||||
|
): number;
|
||||||
|
connect_after(
|
||||||
|
signal: 'state-changed',
|
||||||
|
callback: (
|
||||||
|
_source: this,
|
||||||
|
new_state: DeviceState,
|
||||||
|
old_state: DeviceState,
|
||||||
|
reaseon: NM.DeviceStateReason,
|
||||||
|
) => void,
|
||||||
|
): number;
|
||||||
|
emit(
|
||||||
|
signal: 'state-changed',
|
||||||
|
new_state: DeviceState,
|
||||||
|
old_state: DeviceState,
|
||||||
|
reaseon: NM.DeviceStateReason,
|
||||||
|
): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
scan(): void;
|
||||||
|
get_device(): NM.DeviceWifi;
|
||||||
|
set_device(value: NM.DeviceWifi): void;
|
||||||
|
get_active_connection(): NM.ActiveConnection | null;
|
||||||
|
get_active_access_point(): AccessPoint | null;
|
||||||
|
get_access_points(): AccessPoint[];
|
||||||
|
get_enabled(): boolean;
|
||||||
|
set_enabled(value: boolean): void;
|
||||||
|
get_internet(): Internet;
|
||||||
|
get_bandwidth(): number;
|
||||||
|
get_ssid(): string;
|
||||||
|
get_strength(): number;
|
||||||
|
get_frequency(): number;
|
||||||
|
get_state(): DeviceState;
|
||||||
|
get_icon_name(): string;
|
||||||
|
get_is_hotspot(): boolean;
|
||||||
|
get_scanning(): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Wired {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
device: NM.DeviceEthernet;
|
||||||
|
speed: number;
|
||||||
|
internet: Internet;
|
||||||
|
state: DeviceState;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Wired extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Wired>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get device(): NM.DeviceEthernet;
|
||||||
|
set device(val: NM.DeviceEthernet);
|
||||||
|
get speed(): number;
|
||||||
|
set speed(val: number);
|
||||||
|
get internet(): Internet;
|
||||||
|
set internet(val: Internet);
|
||||||
|
get state(): DeviceState;
|
||||||
|
set state(val: DeviceState);
|
||||||
|
get icon_name(): string;
|
||||||
|
set icon_name(val: string);
|
||||||
|
get iconName(): string;
|
||||||
|
set iconName(val: string);
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
connection: NM.ActiveConnection;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Wired.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_device(): NM.DeviceEthernet;
|
||||||
|
set_device(value: NM.DeviceEthernet): void;
|
||||||
|
get_speed(): number;
|
||||||
|
get_internet(): Internet;
|
||||||
|
get_state(): DeviceState;
|
||||||
|
get_icon_name(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
module AccessPoint {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
bandwidth: number;
|
||||||
|
bssid: string;
|
||||||
|
frequency: number;
|
||||||
|
last_seen: number;
|
||||||
|
lastSeen: number;
|
||||||
|
max_bitrate: number;
|
||||||
|
maxBitrate: number;
|
||||||
|
strength: number;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
mode: NM.__80211Mode;
|
||||||
|
flags: NM.__80211ApFlags;
|
||||||
|
rsn_flags: NM.__80211ApSecurityFlags;
|
||||||
|
rsnFlags: NM.__80211ApSecurityFlags;
|
||||||
|
wpa_flags: NM.__80211ApSecurityFlags;
|
||||||
|
wpaFlags: NM.__80211ApSecurityFlags;
|
||||||
|
ssid: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AccessPoint extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<AccessPoint>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get bandwidth(): number;
|
||||||
|
get bssid(): string;
|
||||||
|
get frequency(): number;
|
||||||
|
get last_seen(): number;
|
||||||
|
get lastSeen(): number;
|
||||||
|
get max_bitrate(): number;
|
||||||
|
get maxBitrate(): number;
|
||||||
|
get strength(): number;
|
||||||
|
get icon_name(): string;
|
||||||
|
set icon_name(val: string);
|
||||||
|
get iconName(): string;
|
||||||
|
set iconName(val: string);
|
||||||
|
get mode(): NM.__80211Mode;
|
||||||
|
get flags(): NM.__80211ApFlags;
|
||||||
|
get rsn_flags(): NM.__80211ApSecurityFlags;
|
||||||
|
get rsnFlags(): NM.__80211ApSecurityFlags;
|
||||||
|
get wpa_flags(): NM.__80211ApSecurityFlags;
|
||||||
|
get wpaFlags(): NM.__80211ApSecurityFlags;
|
||||||
|
get ssid(): string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<AccessPoint.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_bandwidth(): number;
|
||||||
|
get_bssid(): string;
|
||||||
|
get_frequency(): number;
|
||||||
|
get_last_seen(): number;
|
||||||
|
get_max_bitrate(): number;
|
||||||
|
get_strength(): number;
|
||||||
|
get_icon_name(): string;
|
||||||
|
get_mode(): NM.__80211Mode;
|
||||||
|
get_flags(): NM.__80211ApFlags;
|
||||||
|
get_rsn_flags(): NM.__80211ApSecurityFlags;
|
||||||
|
get_wpa_flags(): NM.__80211ApSecurityFlags;
|
||||||
|
get_ssid(): string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
type NetworkClass = typeof Network;
|
||||||
|
abstract class NetworkPrivate {
|
||||||
|
static $gtype: GObject.GType<NetworkPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type WifiClass = typeof Wifi;
|
||||||
|
abstract class WifiPrivate {
|
||||||
|
static $gtype: GObject.GType<WifiPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type WiredClass = typeof Wired;
|
||||||
|
abstract class WiredPrivate {
|
||||||
|
static $gtype: GObject.GType<WiredPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type AccessPointClass = typeof AccessPoint;
|
||||||
|
abstract class AccessPointPrivate {
|
||||||
|
static $gtype: GObject.GType<AccessPointPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalNetwork;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalNetwork' {
|
||||||
|
import AstalNetwork01 from 'gi://AstalNetwork?version=0.1';
|
||||||
|
export default AstalNetwork01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
443
configs/userland/ags/@girs/astalnotifd-0.1.d.ts
vendored
Normal file
443
configs/userland/ags/@girs/astalnotifd-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,443 @@
|
|||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalNotifd?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalNotifd {
|
||||||
|
/**
|
||||||
|
* AstalNotifd-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace ClosedReason {
|
||||||
|
export const $gtype: GObject.GType<ClosedReason>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ClosedReason {
|
||||||
|
EXPIRED,
|
||||||
|
DISMISSED_BY_USER,
|
||||||
|
CLOSED,
|
||||||
|
UNDEFINED,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Urgency {
|
||||||
|
export const $gtype: GObject.GType<Urgency>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Urgency {
|
||||||
|
LOW,
|
||||||
|
NORMAL,
|
||||||
|
CRITICAL,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
function get_default(): Notifd;
|
||||||
|
module Notifd {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Notified {
|
||||||
|
(id: number, replaced: boolean): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Resolved {
|
||||||
|
(id: number, reason: ClosedReason): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
ignore_timeout: boolean;
|
||||||
|
ignoreTimeout: boolean;
|
||||||
|
dont_disturb: boolean;
|
||||||
|
dontDisturb: boolean;
|
||||||
|
notifications: Notification[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Notification daemon.
|
||||||
|
* This class queues up to become the next daemon, while acting as a proxy in the meantime.
|
||||||
|
*/
|
||||||
|
class Notifd extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Notifd>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ignore the timeout specified by incoming notifications.
|
||||||
|
* By default notifications can specify a timeout in milliseconds after which the daemon will resolve them even without user input.
|
||||||
|
*/
|
||||||
|
get ignore_timeout(): boolean;
|
||||||
|
set ignore_timeout(val: boolean);
|
||||||
|
/**
|
||||||
|
* Ignore the timeout specified by incoming notifications.
|
||||||
|
* By default notifications can specify a timeout in milliseconds after which the daemon will resolve them even without user input.
|
||||||
|
*/
|
||||||
|
get ignoreTimeout(): boolean;
|
||||||
|
set ignoreTimeout(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicate to frontends to not show popups to the user.
|
||||||
|
* This property does not have any effect on its own, its merely a value to use between the daemon process and proxies for frontends to use.
|
||||||
|
*/
|
||||||
|
get dont_disturb(): boolean;
|
||||||
|
set dont_disturb(val: boolean);
|
||||||
|
/**
|
||||||
|
* Indicate to frontends to not show popups to the user.
|
||||||
|
* This property does not have any effect on its own, its merely a value to use between the daemon process and proxies for frontends to use.
|
||||||
|
*/
|
||||||
|
get dontDisturb(): boolean;
|
||||||
|
set dontDisturb(val: boolean);
|
||||||
|
/**
|
||||||
|
* List of currently unresolved notifications.
|
||||||
|
*/
|
||||||
|
get notifications(): Notification[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Notifd.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Notifd;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'notified', callback: (_source: this, id: number, replaced: boolean) => void): number;
|
||||||
|
connect_after(signal: 'notified', callback: (_source: this, id: number, replaced: boolean) => void): number;
|
||||||
|
emit(signal: 'notified', id: number, replaced: boolean): void;
|
||||||
|
connect(signal: 'resolved', callback: (_source: this, id: number, reason: ClosedReason) => void): number;
|
||||||
|
connect_after(
|
||||||
|
signal: 'resolved',
|
||||||
|
callback: (_source: this, id: number, reason: ClosedReason) => void,
|
||||||
|
): number;
|
||||||
|
emit(signal: 'resolved', id: number, reason: ClosedReason): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the singleton instance
|
||||||
|
*/
|
||||||
|
static get_default(): Notifd;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the [class`AstalNotifd`.Notification] with id or null if there is no such Notification.
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
get_notification(id: number): Notification;
|
||||||
|
get_ignore_timeout(): boolean;
|
||||||
|
set_ignore_timeout(value: boolean): void;
|
||||||
|
get_dont_disturb(): boolean;
|
||||||
|
set_dont_disturb(value: boolean): void;
|
||||||
|
get_notifications(): Notification[];
|
||||||
|
}
|
||||||
|
|
||||||
|
module Notification {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Resolved {
|
||||||
|
(reason: ClosedReason): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Invoked {
|
||||||
|
(action_id: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
time: number;
|
||||||
|
app_name: string;
|
||||||
|
appName: string;
|
||||||
|
app_icon: string;
|
||||||
|
appIcon: string;
|
||||||
|
summary: string;
|
||||||
|
body: string;
|
||||||
|
id: number;
|
||||||
|
expire_timeout: number;
|
||||||
|
expireTimeout: number;
|
||||||
|
actions: Action[];
|
||||||
|
image: string;
|
||||||
|
action_icons: boolean;
|
||||||
|
actionIcons: boolean;
|
||||||
|
category: string;
|
||||||
|
desktop_entry: string;
|
||||||
|
desktopEntry: string;
|
||||||
|
resident: boolean;
|
||||||
|
sound_file: string;
|
||||||
|
soundFile: string;
|
||||||
|
sound_name: string;
|
||||||
|
soundName: string;
|
||||||
|
suppress_sound: boolean;
|
||||||
|
suppressSound: boolean;
|
||||||
|
transient: boolean;
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
urgency: Urgency;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class representing a notification.
|
||||||
|
*/
|
||||||
|
class Notification extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Notification>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unix time of when the notification was sent.
|
||||||
|
*/
|
||||||
|
get time(): number;
|
||||||
|
set time(val: number);
|
||||||
|
/**
|
||||||
|
* Name of the sending application.
|
||||||
|
*/
|
||||||
|
get app_name(): string;
|
||||||
|
set app_name(val: string);
|
||||||
|
/**
|
||||||
|
* Name of the sending application.
|
||||||
|
*/
|
||||||
|
get appName(): string;
|
||||||
|
set appName(val: string);
|
||||||
|
/**
|
||||||
|
* Icon name of the sending application.
|
||||||
|
*/
|
||||||
|
get app_icon(): string;
|
||||||
|
set app_icon(val: string);
|
||||||
|
/**
|
||||||
|
* Icon name of the sending application.
|
||||||
|
*/
|
||||||
|
get appIcon(): string;
|
||||||
|
set appIcon(val: string);
|
||||||
|
/**
|
||||||
|
* Single line overview of the notification.
|
||||||
|
*/
|
||||||
|
get summary(): string;
|
||||||
|
set summary(val: string);
|
||||||
|
/**
|
||||||
|
* Multi-line body of text, where each line is a paragraph. May contain markup.
|
||||||
|
*/
|
||||||
|
get body(): string;
|
||||||
|
set body(val: string);
|
||||||
|
/**
|
||||||
|
* Id of the notification.
|
||||||
|
*/
|
||||||
|
get id(): number;
|
||||||
|
set id(val: number);
|
||||||
|
/**
|
||||||
|
* Time in milliseconds after the notification expires.
|
||||||
|
*/
|
||||||
|
get expire_timeout(): number;
|
||||||
|
set expire_timeout(val: number);
|
||||||
|
/**
|
||||||
|
* Time in milliseconds after the notification expires.
|
||||||
|
*/
|
||||||
|
get expireTimeout(): number;
|
||||||
|
set expireTimeout(val: number);
|
||||||
|
/**
|
||||||
|
* List of [struct`AstalNotifd`.Action] of the notification.
|
||||||
|
* Can be invoked by calling [method`AstalNotifd`.Notification.invoke] with the action's id.
|
||||||
|
*/
|
||||||
|
get actions(): Action[];
|
||||||
|
/**
|
||||||
|
* Path of an image
|
||||||
|
*/
|
||||||
|
get image(): string;
|
||||||
|
/**
|
||||||
|
* Indicates whether [struct`AstalNotifd`.Action] identifier should be interpreted as a named icon.
|
||||||
|
*/
|
||||||
|
get action_icons(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates whether [struct`AstalNotifd`.Action] identifier should be interpreted as a named icon.
|
||||||
|
*/
|
||||||
|
get actionIcons(): boolean;
|
||||||
|
/**
|
||||||
|
* [](https://specifications.freedesktop.org/notification-spec/latest/categories.html)
|
||||||
|
*/
|
||||||
|
get category(): string;
|
||||||
|
/**
|
||||||
|
* Specifies the name of the desktop filename representing the calling program.
|
||||||
|
*/
|
||||||
|
get desktop_entry(): string;
|
||||||
|
/**
|
||||||
|
* Specifies the name of the desktop filename representing the calling program.
|
||||||
|
*/
|
||||||
|
get desktopEntry(): string;
|
||||||
|
/**
|
||||||
|
* Indicates whether notification is kept after action invocation.
|
||||||
|
*/
|
||||||
|
get resident(): boolean;
|
||||||
|
/**
|
||||||
|
* The path to a sound file to play when the notification pops up.
|
||||||
|
*/
|
||||||
|
get sound_file(): string;
|
||||||
|
/**
|
||||||
|
* The path to a sound file to play when the notification pops up.
|
||||||
|
*/
|
||||||
|
get soundFile(): string;
|
||||||
|
/**
|
||||||
|
* A themeable named sound from to play when the notification pops up
|
||||||
|
*/
|
||||||
|
get sound_name(): string;
|
||||||
|
/**
|
||||||
|
* A themeable named sound from to play when the notification pops up
|
||||||
|
*/
|
||||||
|
get soundName(): string;
|
||||||
|
/**
|
||||||
|
* Indicates to suppress playing any sounds.
|
||||||
|
*/
|
||||||
|
get suppress_sound(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates to suppress playing any sounds.
|
||||||
|
*/
|
||||||
|
get suppressSound(): boolean;
|
||||||
|
/**
|
||||||
|
* Indicates that the notification should be excluded from persistency.
|
||||||
|
*/
|
||||||
|
get transient(): boolean;
|
||||||
|
/**
|
||||||
|
* Specifies the X location on the screen that the notification should point to. The "y" hint must also be specified.
|
||||||
|
*/
|
||||||
|
get x(): number;
|
||||||
|
/**
|
||||||
|
* Specifies the Y location on the screen that the notification should point to. The "x" hint must also be specified.
|
||||||
|
*/
|
||||||
|
get y(): number;
|
||||||
|
/**
|
||||||
|
* [enum`AstalNotifd`.Urgency] level of the notification.
|
||||||
|
*/
|
||||||
|
get urgency(): Urgency;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Notification.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'resolved', callback: (_source: this, reason: ClosedReason) => void): number;
|
||||||
|
connect_after(signal: 'resolved', callback: (_source: this, reason: ClosedReason) => void): number;
|
||||||
|
emit(signal: 'resolved', reason: ClosedReason): void;
|
||||||
|
connect(signal: 'invoked', callback: (_source: this, action_id: string) => void): number;
|
||||||
|
connect_after(signal: 'invoked', callback: (_source: this, action_id: string) => void): number;
|
||||||
|
emit(signal: 'invoked', action_id: string): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_hint(hint: string): GLib.Variant | null;
|
||||||
|
get_str_hint(hint: string): string;
|
||||||
|
get_bool_hint(hint: string): boolean;
|
||||||
|
get_int_hint(hint: string): number;
|
||||||
|
get_byte_hint(hint: string): number;
|
||||||
|
/**
|
||||||
|
* Resolve this notification with [enum`AstalNotifd`.ClosedReason.DISMISSED_BY_USER].
|
||||||
|
*/
|
||||||
|
dismiss(): void;
|
||||||
|
/**
|
||||||
|
* Invoke an [struct`AstalNotifd`.Action] of this notification.
|
||||||
|
* Note that this method just notifies the client that this action was invoked by the user. If for example this notification persists through the
|
||||||
|
* lifetime of the sending program this action will have no effect.
|
||||||
|
* @param action_id
|
||||||
|
*/
|
||||||
|
invoke(action_id: string): void;
|
||||||
|
get_time(): number;
|
||||||
|
get_app_name(): string;
|
||||||
|
get_app_icon(): string;
|
||||||
|
get_summary(): string;
|
||||||
|
get_body(): string;
|
||||||
|
get_id(): number;
|
||||||
|
get_expire_timeout(): number;
|
||||||
|
get_actions(): Action[];
|
||||||
|
get_image(): string;
|
||||||
|
get_action_icons(): boolean;
|
||||||
|
get_category(): string;
|
||||||
|
get_desktop_entry(): string;
|
||||||
|
get_resident(): boolean;
|
||||||
|
get_sound_file(): string;
|
||||||
|
get_sound_name(): string;
|
||||||
|
get_suppress_sound(): boolean;
|
||||||
|
get_transient(): boolean;
|
||||||
|
get_x(): number;
|
||||||
|
get_y(): number;
|
||||||
|
get_urgency(): Urgency;
|
||||||
|
}
|
||||||
|
|
||||||
|
type NotifdClass = typeof Notifd;
|
||||||
|
abstract class NotifdPrivate {
|
||||||
|
static $gtype: GObject.GType<NotifdPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type NotificationClass = typeof Notification;
|
||||||
|
abstract class NotificationPrivate {
|
||||||
|
static $gtype: GObject.GType<NotificationPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Action {
|
||||||
|
static $gtype: GObject.GType<Action>;
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
properties?: Partial<{
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
}>,
|
||||||
|
);
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalNotifd;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalNotifd' {
|
||||||
|
import AstalNotifd01 from 'gi://AstalNotifd?version=0.1';
|
||||||
|
export default AstalNotifd01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
224
configs/userland/ags/@girs/astalpowerprofiles-0.1.d.ts
vendored
Normal file
224
configs/userland/ags/@girs/astalpowerprofiles-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalPowerProfiles?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalPowerProfiles {
|
||||||
|
/**
|
||||||
|
* AstalPowerProfiles-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
function get_default(): PowerProfiles;
|
||||||
|
module PowerProfiles {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface ProfileReleased {
|
||||||
|
(cookie: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
active_profile: string;
|
||||||
|
activeProfile: string;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
actions: string[];
|
||||||
|
performance_degraded: string;
|
||||||
|
performanceDegraded: string;
|
||||||
|
version: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Client for <ulink url="https://freedesktop-team.pages.debian.net/power-profiles-daemon/gdbus-org.freedesktop.UPower.PowerProfiles.html">
|
||||||
|
* PowerProfiles</ulink>.
|
||||||
|
*/
|
||||||
|
class PowerProfiles extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<PowerProfiles>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the currently active profile. It might change automatically if a profile is held, using the [method@
|
||||||
|
* AstalPowerProfiles.PowerProfiles.hold_profile] method.
|
||||||
|
*/
|
||||||
|
get active_profile(): string;
|
||||||
|
set active_profile(val: string);
|
||||||
|
/**
|
||||||
|
* The type of the currently active profile. It might change automatically if a profile is held, using the [method@
|
||||||
|
* AstalPowerProfiles.PowerProfiles.hold_profile] method.
|
||||||
|
*/
|
||||||
|
get activeProfile(): string;
|
||||||
|
set activeProfile(val: string);
|
||||||
|
/**
|
||||||
|
* Return a named icon based [property`AstalPowerProfiles`.PowerProfiles:active_profile].
|
||||||
|
*/
|
||||||
|
get icon_name(): string;
|
||||||
|
/**
|
||||||
|
* Return a named icon based [property`AstalPowerProfiles`.PowerProfiles:active_profile].
|
||||||
|
*/
|
||||||
|
get iconName(): string;
|
||||||
|
/**
|
||||||
|
* List of the "actions" implemented in the running daemon. This can used to figure out whether particular functionality is available in
|
||||||
|
* the daemon.
|
||||||
|
*/
|
||||||
|
get actions(): string[];
|
||||||
|
/**
|
||||||
|
* This will be set if the performance power profile is running in degraded mode, with the value being used to identify the reason for that
|
||||||
|
* degradation. Possible values are: - "lap-detected" (the computer is sitting on the user's lap) - "high-operating-
|
||||||
|
* temperature" (the computer is close to overheating) - "" (the empty string, if not performance is not degraded)
|
||||||
|
*/
|
||||||
|
get performance_degraded(): string;
|
||||||
|
/**
|
||||||
|
* This will be set if the performance power profile is running in degraded mode, with the value being used to identify the reason for that
|
||||||
|
* degradation. Possible values are: - "lap-detected" (the computer is sitting on the user's lap) - "high-operating-
|
||||||
|
* temperature" (the computer is close to overheating) - "" (the empty string, if not performance is not degraded)
|
||||||
|
*/
|
||||||
|
get performanceDegraded(): string;
|
||||||
|
/**
|
||||||
|
* The version of the power-profiles-daemon software.
|
||||||
|
*/
|
||||||
|
get version(): string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<PowerProfiles.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): PowerProfiles;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'profile-released', callback: (_source: this, cookie: number) => void): number;
|
||||||
|
connect_after(signal: 'profile-released', callback: (_source: this, cookie: number) => void): number;
|
||||||
|
emit(signal: 'profile-released', cookie: number): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default singleton PowerProfiles instance.
|
||||||
|
*/
|
||||||
|
static get_default(): PowerProfiles;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This forces the passed profile (either 'power-saver' or 'performance') to be activated until either the caller
|
||||||
|
* quits, [method`AstalPowerProfiles`.PowerProfiles.release_profile] is called, or the [property@
|
||||||
|
* AstalPowerProfiles.PowerProfiles:active_profile] is changed by the user. When conflicting profiles are requested to be held, the 'power-saver
|
||||||
|
* ' profile will be activated in preference to the 'performance' profile. Those holds will be automatically cancelled if the user
|
||||||
|
* manually switches to another profile, and the [signal`AstalPowerProfiles`.PowerProfiles::profile_released] signal will be emitted.
|
||||||
|
* @param profile
|
||||||
|
* @param reason
|
||||||
|
* @param application_id
|
||||||
|
*/
|
||||||
|
hold_profile(profile: string, reason: string, application_id: string): number;
|
||||||
|
/**
|
||||||
|
* This removes the hold that was set on a profile.
|
||||||
|
* @param cookie
|
||||||
|
*/
|
||||||
|
release_profile(cookie: number): void;
|
||||||
|
get_active_profile(): string;
|
||||||
|
set_active_profile(value: string): void;
|
||||||
|
get_icon_name(): string;
|
||||||
|
get_actions(): string[];
|
||||||
|
get_active_profile_holds(): Hold[];
|
||||||
|
get_performance_degraded(): string;
|
||||||
|
get_profiles(): Profile[];
|
||||||
|
get_version(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PowerProfilesClass = typeof PowerProfiles;
|
||||||
|
abstract class PowerProfilesPrivate {
|
||||||
|
static $gtype: GObject.GType<PowerProfilesPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Profile {
|
||||||
|
static $gtype: GObject.GType<Profile>;
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
profile: string;
|
||||||
|
cpu_driver: string;
|
||||||
|
platform_driver: string;
|
||||||
|
driver: string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
properties?: Partial<{
|
||||||
|
profile: string;
|
||||||
|
cpu_driver: string;
|
||||||
|
platform_driver: string;
|
||||||
|
driver: string;
|
||||||
|
}>,
|
||||||
|
);
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Hold {
|
||||||
|
static $gtype: GObject.GType<Hold>;
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
application_id: string;
|
||||||
|
profile: string;
|
||||||
|
reason: string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
properties?: Partial<{
|
||||||
|
application_id: string;
|
||||||
|
profile: string;
|
||||||
|
reason: string;
|
||||||
|
}>,
|
||||||
|
);
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalPowerProfiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalPowerProfiles' {
|
||||||
|
import AstalPowerProfiles01 from 'gi://AstalPowerProfiles?version=0.1';
|
||||||
|
export default AstalPowerProfiles01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
902
configs/userland/ags/@girs/astalriver-0.1.d.ts
vendored
Normal file
902
configs/userland/ags/@girs/astalriver-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,902 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalRiver?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalRiver {
|
||||||
|
/**
|
||||||
|
* AstalRiver-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace Transform {
|
||||||
|
export const $gtype: GObject.GType<Transform>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Transform {
|
||||||
|
NORMAL,
|
||||||
|
ROTATE_90,
|
||||||
|
ROTATE_180,
|
||||||
|
ROTATE_270,
|
||||||
|
FLIPPED,
|
||||||
|
FLIPPED_ROTATE_90,
|
||||||
|
FLIPPED_ROTATE_180,
|
||||||
|
FLIPPED_ROTATE_270,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
function get_default(): River | null;
|
||||||
|
interface CommandCallback {
|
||||||
|
(success: boolean, msg: string): void;
|
||||||
|
}
|
||||||
|
module Output {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Changed {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
description: string;
|
||||||
|
focused_tags: number;
|
||||||
|
focusedTags: number;
|
||||||
|
focused_view: string;
|
||||||
|
focusedView: string;
|
||||||
|
height: number;
|
||||||
|
id: number;
|
||||||
|
layout_name: string;
|
||||||
|
layoutName: string;
|
||||||
|
make: string;
|
||||||
|
model: string;
|
||||||
|
name: string;
|
||||||
|
occupied_tags: number;
|
||||||
|
occupiedTags: number;
|
||||||
|
physical_height: number;
|
||||||
|
physicalHeight: number;
|
||||||
|
physical_width: number;
|
||||||
|
physicalWidth: number;
|
||||||
|
refresh_rate: number;
|
||||||
|
refreshRate: number;
|
||||||
|
scale_factor: number;
|
||||||
|
scaleFactor: number;
|
||||||
|
transform: Transform;
|
||||||
|
urgent_tags: number;
|
||||||
|
urgentTags: number;
|
||||||
|
width: number;
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds all the information associated with a monitor.
|
||||||
|
*/
|
||||||
|
class Output extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Output>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get description(): string;
|
||||||
|
/**
|
||||||
|
* The currently focused tags
|
||||||
|
*/
|
||||||
|
get focused_tags(): number;
|
||||||
|
set focused_tags(val: number);
|
||||||
|
/**
|
||||||
|
* The currently focused tags
|
||||||
|
*/
|
||||||
|
get focusedTags(): number;
|
||||||
|
set focusedTags(val: number);
|
||||||
|
/**
|
||||||
|
* The name of currently focused view
|
||||||
|
*/
|
||||||
|
get focused_view(): string;
|
||||||
|
/**
|
||||||
|
* The name of currently focused view
|
||||||
|
*/
|
||||||
|
get focusedView(): string;
|
||||||
|
get height(): number;
|
||||||
|
/**
|
||||||
|
* The id of the underlying wl_output object
|
||||||
|
*/
|
||||||
|
get id(): number;
|
||||||
|
/**
|
||||||
|
* The name of active layout
|
||||||
|
*/
|
||||||
|
get layout_name(): string;
|
||||||
|
/**
|
||||||
|
* The name of active layout
|
||||||
|
*/
|
||||||
|
get layoutName(): string;
|
||||||
|
get make(): string;
|
||||||
|
get model(): string;
|
||||||
|
/**
|
||||||
|
* The name of this output
|
||||||
|
*/
|
||||||
|
get name(): string;
|
||||||
|
/**
|
||||||
|
* The currently occupied tags
|
||||||
|
*/
|
||||||
|
get occupied_tags(): number;
|
||||||
|
/**
|
||||||
|
* The currently occupied tags
|
||||||
|
*/
|
||||||
|
get occupiedTags(): number;
|
||||||
|
get physical_height(): number;
|
||||||
|
get physicalHeight(): number;
|
||||||
|
get physical_width(): number;
|
||||||
|
get physicalWidth(): number;
|
||||||
|
get refresh_rate(): number;
|
||||||
|
get refreshRate(): number;
|
||||||
|
get scale_factor(): number;
|
||||||
|
get scaleFactor(): number;
|
||||||
|
get transform(): Transform;
|
||||||
|
/**
|
||||||
|
* The currently tags marked as urgent
|
||||||
|
*/
|
||||||
|
get urgent_tags(): number;
|
||||||
|
/**
|
||||||
|
* The currently tags marked as urgent
|
||||||
|
*/
|
||||||
|
get urgentTags(): number;
|
||||||
|
get width(): number;
|
||||||
|
get x(): number;
|
||||||
|
get y(): number;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Output.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'changed'): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the description of the output
|
||||||
|
*/
|
||||||
|
get_description(): string;
|
||||||
|
/**
|
||||||
|
* the focused tags of the output
|
||||||
|
* @returns the focused tags of the output
|
||||||
|
*/
|
||||||
|
get_focused_tags(): number;
|
||||||
|
/**
|
||||||
|
* the focused view on the output
|
||||||
|
* @returns the focused view on the output
|
||||||
|
*/
|
||||||
|
get_focused_view(): string | null;
|
||||||
|
/**
|
||||||
|
* the height of the output
|
||||||
|
*/
|
||||||
|
get_height(): number;
|
||||||
|
/**
|
||||||
|
* the id of the underlying wl_output object
|
||||||
|
* @returns the id of the underlying wl_output object
|
||||||
|
*/
|
||||||
|
get_id(): number;
|
||||||
|
/**
|
||||||
|
* the currently used layout name of the output
|
||||||
|
* @returns the currently used layout name of the output
|
||||||
|
*/
|
||||||
|
get_layout_name(): string | null;
|
||||||
|
/**
|
||||||
|
* the make of the output
|
||||||
|
*/
|
||||||
|
get_make(): string;
|
||||||
|
/**
|
||||||
|
* the model of the output
|
||||||
|
*/
|
||||||
|
get_model(): string;
|
||||||
|
/**
|
||||||
|
* the name of the output
|
||||||
|
* @returns the name of the output
|
||||||
|
*/
|
||||||
|
get_name(): string | null;
|
||||||
|
/**
|
||||||
|
* the occupied tags of the output
|
||||||
|
* @returns the occupied tags of the output
|
||||||
|
*/
|
||||||
|
get_occupied_tags(): number;
|
||||||
|
/**
|
||||||
|
* the physical height of the output
|
||||||
|
*/
|
||||||
|
get_physical_height(): number;
|
||||||
|
/**
|
||||||
|
* the physical width of the output
|
||||||
|
*/
|
||||||
|
get_physical_width(): number;
|
||||||
|
/**
|
||||||
|
* the refresh rate of the output
|
||||||
|
*/
|
||||||
|
get_refresh_rate(): number;
|
||||||
|
/**
|
||||||
|
* the scale factor of the output
|
||||||
|
*/
|
||||||
|
get_scale_factor(): number;
|
||||||
|
/**
|
||||||
|
* the urgent tags of the output
|
||||||
|
* @returns the urgent tags of the output
|
||||||
|
*/
|
||||||
|
get_urgent_tags(): number;
|
||||||
|
/**
|
||||||
|
* the width of the output
|
||||||
|
*/
|
||||||
|
get_width(): number;
|
||||||
|
/**
|
||||||
|
* the x coordinate of the outputs position
|
||||||
|
*/
|
||||||
|
get_x(): number;
|
||||||
|
/**
|
||||||
|
* the y coordinate of the outputs position
|
||||||
|
*/
|
||||||
|
get_y(): number;
|
||||||
|
/**
|
||||||
|
* sets the focused tags of the output
|
||||||
|
* @param tags the tagmask to be focused
|
||||||
|
*/
|
||||||
|
set_focused_tags(tags: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module River {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Changed {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface OutputAdded {
|
||||||
|
(output: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface OutputRemoved {
|
||||||
|
(output: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps, Gio.Initable.ConstructorProps {
|
||||||
|
focused_output: string;
|
||||||
|
focusedOutput: string;
|
||||||
|
focused_view: string;
|
||||||
|
focusedView: string;
|
||||||
|
mode: string;
|
||||||
|
outputs: Output[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class creates a connection to the river compositor.
|
||||||
|
*/
|
||||||
|
class River extends GObject.Object implements Gio.Initable {
|
||||||
|
static $gtype: GObject.GType<River>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the currently focused output
|
||||||
|
*/
|
||||||
|
get focused_output(): string;
|
||||||
|
/**
|
||||||
|
* The name of the currently focused output
|
||||||
|
*/
|
||||||
|
get focusedOutput(): string;
|
||||||
|
/**
|
||||||
|
* The name of the currently focused view
|
||||||
|
*/
|
||||||
|
get focused_view(): string;
|
||||||
|
/**
|
||||||
|
* The name of the currently focused view
|
||||||
|
*/
|
||||||
|
get focusedView(): string;
|
||||||
|
/**
|
||||||
|
* The currently active mode
|
||||||
|
*/
|
||||||
|
get mode(): string;
|
||||||
|
/**
|
||||||
|
* A list of [class`AstalRiver`.Output] objects
|
||||||
|
*/
|
||||||
|
get outputs(): Output[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<River.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): River;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'changed'): void;
|
||||||
|
connect(signal: 'output-added', callback: (_source: this, output: string) => void): number;
|
||||||
|
connect_after(signal: 'output-added', callback: (_source: this, output: string) => void): number;
|
||||||
|
emit(signal: 'output-added', output: string): void;
|
||||||
|
connect(signal: 'output-removed', callback: (_source: this, output: string) => void): number;
|
||||||
|
connect_after(signal: 'output-removed', callback: (_source: this, output: string) => void): number;
|
||||||
|
emit(signal: 'output-removed', output: string): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the default River object.
|
||||||
|
*/
|
||||||
|
static get_default(): River | null;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the name of the currently focused output
|
||||||
|
* @returns the name of the currently focused output
|
||||||
|
*/
|
||||||
|
get_focused_output(): string | null;
|
||||||
|
/**
|
||||||
|
* returns the currently focused view
|
||||||
|
* @returns the currently focused view
|
||||||
|
*/
|
||||||
|
get_focused_view(): string | null;
|
||||||
|
/**
|
||||||
|
* returns the currently active mode
|
||||||
|
* @returns the currently active mode
|
||||||
|
*/
|
||||||
|
get_mode(): string | null;
|
||||||
|
/**
|
||||||
|
* returns the output with the given name or null
|
||||||
|
* @param name the name of the output
|
||||||
|
* @returns the output with the given name or null
|
||||||
|
*/
|
||||||
|
get_output(name: string): Output | null;
|
||||||
|
/**
|
||||||
|
* returns a list of all outputs
|
||||||
|
* @returns a list of all outputs
|
||||||
|
*/
|
||||||
|
get_outputs(): Output[];
|
||||||
|
/**
|
||||||
|
* Sends a given command to the compositor and calls the callback after it was executed.
|
||||||
|
* @param cmd the command to execute
|
||||||
|
* @param callback the callback to invoke.
|
||||||
|
*/
|
||||||
|
run_command_async(cmd: string[], callback?: CommandCallback | null): void;
|
||||||
|
|
||||||
|
// Inherited methods
|
||||||
|
/**
|
||||||
|
* Initializes the object implementing the interface.
|
||||||
|
*
|
||||||
|
* This method is intended for language bindings. If writing in C,
|
||||||
|
* g_initable_new() should typically be used instead.
|
||||||
|
*
|
||||||
|
* The object must be initialized before any real use after initial
|
||||||
|
* construction, either with this function or g_async_initable_init_async().
|
||||||
|
*
|
||||||
|
* Implementations may also support cancellation. If `cancellable` is not %NULL,
|
||||||
|
* then initialization can be cancelled by triggering the cancellable object
|
||||||
|
* from another thread. If the operation was cancelled, the error
|
||||||
|
* %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
|
||||||
|
* the object doesn't support cancellable initialization the error
|
||||||
|
* %G_IO_ERROR_NOT_SUPPORTED will be returned.
|
||||||
|
*
|
||||||
|
* If the object is not initialized, or initialization returns with an
|
||||||
|
* error, then all operations on the object except g_object_ref() and
|
||||||
|
* g_object_unref() are considered to be invalid, and have undefined
|
||||||
|
* behaviour. See the [description][iface`Gio`.Initable#description] for more details.
|
||||||
|
*
|
||||||
|
* Callers should not assume that a class which implements #GInitable can be
|
||||||
|
* initialized multiple times, unless the class explicitly documents itself as
|
||||||
|
* supporting this. Generally, a class’ implementation of init() can assume
|
||||||
|
* (and assert) that it will only be called once. Previously, this documentation
|
||||||
|
* recommended all #GInitable implementations should be idempotent; that
|
||||||
|
* recommendation was relaxed in GLib 2.54.
|
||||||
|
*
|
||||||
|
* If a class explicitly supports being initialized multiple times, it is
|
||||||
|
* recommended that the method is idempotent: multiple calls with the same
|
||||||
|
* arguments should return the same results. Only the first call initializes
|
||||||
|
* the object; further calls return the result of the first call.
|
||||||
|
*
|
||||||
|
* One reason why a class might need to support idempotent initialization is if
|
||||||
|
* it is designed to be used via the singleton pattern, with a
|
||||||
|
* #GObjectClass.constructor that sometimes returns an existing instance.
|
||||||
|
* In this pattern, a caller would expect to be able to call g_initable_init()
|
||||||
|
* on the result of g_object_new(), regardless of whether it is in fact a new
|
||||||
|
* instance.
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
||||||
|
* @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
|
||||||
|
*/
|
||||||
|
init(cancellable?: Gio.Cancellable | null): boolean;
|
||||||
|
/**
|
||||||
|
* Initializes the object implementing the interface.
|
||||||
|
*
|
||||||
|
* This method is intended for language bindings. If writing in C,
|
||||||
|
* g_initable_new() should typically be used instead.
|
||||||
|
*
|
||||||
|
* The object must be initialized before any real use after initial
|
||||||
|
* construction, either with this function or g_async_initable_init_async().
|
||||||
|
*
|
||||||
|
* Implementations may also support cancellation. If `cancellable` is not %NULL,
|
||||||
|
* then initialization can be cancelled by triggering the cancellable object
|
||||||
|
* from another thread. If the operation was cancelled, the error
|
||||||
|
* %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
|
||||||
|
* the object doesn't support cancellable initialization the error
|
||||||
|
* %G_IO_ERROR_NOT_SUPPORTED will be returned.
|
||||||
|
*
|
||||||
|
* If the object is not initialized, or initialization returns with an
|
||||||
|
* error, then all operations on the object except g_object_ref() and
|
||||||
|
* g_object_unref() are considered to be invalid, and have undefined
|
||||||
|
* behaviour. See the [description][iface`Gio`.Initable#description] for more details.
|
||||||
|
*
|
||||||
|
* Callers should not assume that a class which implements #GInitable can be
|
||||||
|
* initialized multiple times, unless the class explicitly documents itself as
|
||||||
|
* supporting this. Generally, a class’ implementation of init() can assume
|
||||||
|
* (and assert) that it will only be called once. Previously, this documentation
|
||||||
|
* recommended all #GInitable implementations should be idempotent; that
|
||||||
|
* recommendation was relaxed in GLib 2.54.
|
||||||
|
*
|
||||||
|
* If a class explicitly supports being initialized multiple times, it is
|
||||||
|
* recommended that the method is idempotent: multiple calls with the same
|
||||||
|
* arguments should return the same results. Only the first call initializes
|
||||||
|
* the object; further calls return the result of the first call.
|
||||||
|
*
|
||||||
|
* One reason why a class might need to support idempotent initialization is if
|
||||||
|
* it is designed to be used via the singleton pattern, with a
|
||||||
|
* #GObjectClass.constructor that sometimes returns an existing instance.
|
||||||
|
* In this pattern, a caller would expect to be able to call g_initable_init()
|
||||||
|
* on the result of g_object_new(), regardless of whether it is in fact a new
|
||||||
|
* instance.
|
||||||
|
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
||||||
|
*/
|
||||||
|
vfunc_init(cancellable?: Gio.Cancellable | null): boolean;
|
||||||
|
/**
|
||||||
|
* Creates a binding between `source_property` on `source` and `target_property`
|
||||||
|
* on `target`.
|
||||||
|
*
|
||||||
|
* Whenever the `source_property` is changed the `target_property` is
|
||||||
|
* updated using the same value. For instance:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* g_object_bind_property (action, "active", widget, "sensitive", 0);
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Will result in the "sensitive" property of the widget #GObject instance to be
|
||||||
|
* updated with the same value of the "active" property of the action #GObject
|
||||||
|
* instance.
|
||||||
|
*
|
||||||
|
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
||||||
|
* if `target_property` on `target` changes then the `source_property` on `source`
|
||||||
|
* will be updated as well.
|
||||||
|
*
|
||||||
|
* The binding will automatically be removed when either the `source` or the
|
||||||
|
* `target` instances are finalized. To remove the binding without affecting the
|
||||||
|
* `source` and the `target` you can just call g_object_unref() on the returned
|
||||||
|
* #GBinding instance.
|
||||||
|
*
|
||||||
|
* Removing the binding by calling g_object_unref() on it must only be done if
|
||||||
|
* the binding, `source` and `target` are only used from a single thread and it
|
||||||
|
* is clear that both `source` and `target` outlive the binding. Especially it
|
||||||
|
* is not safe to rely on this if the binding, `source` or `target` can be
|
||||||
|
* finalized from different threads. Keep another reference to the binding and
|
||||||
|
* use g_binding_unbind() instead to be on the safe side.
|
||||||
|
*
|
||||||
|
* A #GObject can have multiple bindings.
|
||||||
|
* @param source_property the property on @source to bind
|
||||||
|
* @param target the target #GObject
|
||||||
|
* @param target_property the property on @target to bind
|
||||||
|
* @param flags flags to pass to #GBinding
|
||||||
|
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
||||||
|
*/
|
||||||
|
bind_property(
|
||||||
|
source_property: string,
|
||||||
|
target: GObject.Object,
|
||||||
|
target_property: string,
|
||||||
|
flags: GObject.BindingFlags | null,
|
||||||
|
): GObject.Binding;
|
||||||
|
/**
|
||||||
|
* Complete version of g_object_bind_property().
|
||||||
|
*
|
||||||
|
* Creates a binding between `source_property` on `source` and `target_property`
|
||||||
|
* on `target,` allowing you to set the transformation functions to be used by
|
||||||
|
* the binding.
|
||||||
|
*
|
||||||
|
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
||||||
|
* if `target_property` on `target` changes then the `source_property` on `source`
|
||||||
|
* will be updated as well. The `transform_from` function is only used in case
|
||||||
|
* of bidirectional bindings, otherwise it will be ignored
|
||||||
|
*
|
||||||
|
* The binding will automatically be removed when either the `source` or the
|
||||||
|
* `target` instances are finalized. This will release the reference that is
|
||||||
|
* being held on the #GBinding instance; if you want to hold on to the
|
||||||
|
* #GBinding instance, you will need to hold a reference to it.
|
||||||
|
*
|
||||||
|
* To remove the binding, call g_binding_unbind().
|
||||||
|
*
|
||||||
|
* A #GObject can have multiple bindings.
|
||||||
|
*
|
||||||
|
* The same `user_data` parameter will be used for both `transform_to`
|
||||||
|
* and `transform_from` transformation functions; the `notify` function will
|
||||||
|
* be called once, when the binding is removed. If you need different data
|
||||||
|
* for each transformation function, please use
|
||||||
|
* g_object_bind_property_with_closures() instead.
|
||||||
|
* @param source_property the property on @source to bind
|
||||||
|
* @param target the target #GObject
|
||||||
|
* @param target_property the property on @target to bind
|
||||||
|
* @param flags flags to pass to #GBinding
|
||||||
|
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
|
||||||
|
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
|
||||||
|
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
|
||||||
|
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
||||||
|
*/
|
||||||
|
bind_property_full(
|
||||||
|
source_property: string,
|
||||||
|
target: GObject.Object,
|
||||||
|
target_property: string,
|
||||||
|
flags: GObject.BindingFlags | null,
|
||||||
|
transform_to?: GObject.BindingTransformFunc | null,
|
||||||
|
transform_from?: GObject.BindingTransformFunc | null,
|
||||||
|
notify?: GLib.DestroyNotify | null,
|
||||||
|
): GObject.Binding;
|
||||||
|
// Conflicted with GObject.Object.bind_property_full
|
||||||
|
bind_property_full(...args: never[]): any;
|
||||||
|
/**
|
||||||
|
* This function is intended for #GObject implementations to re-enforce
|
||||||
|
* a [floating][floating-ref] object reference. Doing this is seldom
|
||||||
|
* required: all #GInitiallyUnowneds are created with a floating reference
|
||||||
|
* which usually just needs to be sunken by calling g_object_ref_sink().
|
||||||
|
*/
|
||||||
|
force_floating(): void;
|
||||||
|
/**
|
||||||
|
* Increases the freeze count on `object`. If the freeze count is
|
||||||
|
* non-zero, the emission of "notify" signals on `object` is
|
||||||
|
* stopped. The signals are queued until the freeze count is decreased
|
||||||
|
* to zero. Duplicate notifications are squashed so that at most one
|
||||||
|
* #GObject::notify signal is emitted for each property modified while the
|
||||||
|
* object is frozen.
|
||||||
|
*
|
||||||
|
* This is necessary for accessors that modify multiple properties to prevent
|
||||||
|
* premature notification while the object is still being modified.
|
||||||
|
*/
|
||||||
|
freeze_notify(): void;
|
||||||
|
/**
|
||||||
|
* Gets a named field from the objects table of associations (see g_object_set_data()).
|
||||||
|
* @param key name of the key for that association
|
||||||
|
* @returns the data if found, or %NULL if no such data exists.
|
||||||
|
*/
|
||||||
|
get_data(key: string): any | null;
|
||||||
|
get_property(property_name: string): any;
|
||||||
|
/**
|
||||||
|
* This function gets back user data pointers stored via
|
||||||
|
* g_object_set_qdata().
|
||||||
|
* @param quark A #GQuark, naming the user data pointer
|
||||||
|
* @returns The user data pointer set, or %NULL
|
||||||
|
*/
|
||||||
|
get_qdata(quark: GLib.Quark): any | null;
|
||||||
|
/**
|
||||||
|
* Gets `n_properties` properties for an `object`.
|
||||||
|
* Obtained properties will be set to `values`. All properties must be valid.
|
||||||
|
* Warnings will be emitted and undefined behaviour may result if invalid
|
||||||
|
* properties are passed in.
|
||||||
|
* @param names the names of each property to get
|
||||||
|
* @param values the values of each property to get
|
||||||
|
*/
|
||||||
|
getv(names: string[], values: (GObject.Value | any)[]): void;
|
||||||
|
/**
|
||||||
|
* Checks whether `object` has a [floating][floating-ref] reference.
|
||||||
|
* @returns %TRUE if @object has a floating reference
|
||||||
|
*/
|
||||||
|
is_floating(): boolean;
|
||||||
|
/**
|
||||||
|
* Emits a "notify" signal for the property `property_name` on `object`.
|
||||||
|
*
|
||||||
|
* When possible, eg. when signaling a property change from within the class
|
||||||
|
* that registered the property, you should use g_object_notify_by_pspec()
|
||||||
|
* instead.
|
||||||
|
*
|
||||||
|
* Note that emission of the notify signal may be blocked with
|
||||||
|
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
||||||
|
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
||||||
|
* called.
|
||||||
|
* @param property_name the name of a property installed on the class of @object.
|
||||||
|
*/
|
||||||
|
notify(property_name: string): void;
|
||||||
|
/**
|
||||||
|
* Emits a "notify" signal for the property specified by `pspec` on `object`.
|
||||||
|
*
|
||||||
|
* This function omits the property name lookup, hence it is faster than
|
||||||
|
* g_object_notify().
|
||||||
|
*
|
||||||
|
* One way to avoid using g_object_notify() from within the
|
||||||
|
* class that registered the properties, and using g_object_notify_by_pspec()
|
||||||
|
* instead, is to store the GParamSpec used with
|
||||||
|
* g_object_class_install_property() inside a static array, e.g.:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* typedef enum
|
||||||
|
* {
|
||||||
|
* PROP_FOO = 1,
|
||||||
|
* PROP_LAST
|
||||||
|
* } MyObjectProperty;
|
||||||
|
*
|
||||||
|
* static GParamSpec *properties[PROP_LAST];
|
||||||
|
*
|
||||||
|
* static void
|
||||||
|
* my_object_class_init (MyObjectClass *klass)
|
||||||
|
* {
|
||||||
|
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
|
||||||
|
* 0, 100,
|
||||||
|
* 50,
|
||||||
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||||
|
* g_object_class_install_property (gobject_class,
|
||||||
|
* PROP_FOO,
|
||||||
|
* properties[PROP_FOO]);
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* and then notify a change on the "foo" property with:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param pspec the #GParamSpec of a property installed on the class of @object.
|
||||||
|
*/
|
||||||
|
notify_by_pspec(pspec: GObject.ParamSpec): void;
|
||||||
|
/**
|
||||||
|
* Increases the reference count of `object`.
|
||||||
|
*
|
||||||
|
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
|
||||||
|
* of `object` will be propagated to the return type (using the GCC typeof()
|
||||||
|
* extension), so any casting the caller needs to do on the return type must be
|
||||||
|
* explicit.
|
||||||
|
* @returns the same @object
|
||||||
|
*/
|
||||||
|
ref(): GObject.Object;
|
||||||
|
/**
|
||||||
|
* Increase the reference count of `object,` and possibly remove the
|
||||||
|
* [floating][floating-ref] reference, if `object` has a floating reference.
|
||||||
|
*
|
||||||
|
* In other words, if the object is floating, then this call "assumes
|
||||||
|
* ownership" of the floating reference, converting it to a normal
|
||||||
|
* reference by clearing the floating flag while leaving the reference
|
||||||
|
* count unchanged. If the object is not floating, then this call
|
||||||
|
* adds a new normal reference increasing the reference count by one.
|
||||||
|
*
|
||||||
|
* Since GLib 2.56, the type of `object` will be propagated to the return type
|
||||||
|
* under the same conditions as for g_object_ref().
|
||||||
|
* @returns @object
|
||||||
|
*/
|
||||||
|
ref_sink(): GObject.Object;
|
||||||
|
/**
|
||||||
|
* Releases all references to other objects. This can be used to break
|
||||||
|
* reference cycles.
|
||||||
|
*
|
||||||
|
* This function should only be called from object system implementations.
|
||||||
|
*/
|
||||||
|
run_dispose(): void;
|
||||||
|
/**
|
||||||
|
* Each object carries around a table of associations from
|
||||||
|
* strings to pointers. This function lets you set an association.
|
||||||
|
*
|
||||||
|
* If the object already had an association with that name,
|
||||||
|
* the old association will be destroyed.
|
||||||
|
*
|
||||||
|
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
|
||||||
|
* This means a copy of `key` is kept permanently (even after `object` has been
|
||||||
|
* finalized) — so it is recommended to only use a small, bounded set of values
|
||||||
|
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
|
||||||
|
* @param key name of the key
|
||||||
|
* @param data data to associate with that key
|
||||||
|
*/
|
||||||
|
set_data(key: string, data?: any | null): void;
|
||||||
|
set_property(property_name: string, value: any): void;
|
||||||
|
/**
|
||||||
|
* Remove a specified datum from the object's data associations,
|
||||||
|
* without invoking the association's destroy handler.
|
||||||
|
* @param key name of the key
|
||||||
|
* @returns the data if found, or %NULL if no such data exists.
|
||||||
|
*/
|
||||||
|
steal_data(key: string): any | null;
|
||||||
|
/**
|
||||||
|
* This function gets back user data pointers stored via
|
||||||
|
* g_object_set_qdata() and removes the `data` from object
|
||||||
|
* without invoking its destroy() function (if any was
|
||||||
|
* set).
|
||||||
|
* Usually, calling this function is only required to update
|
||||||
|
* user data pointers with a destroy notifier, for example:
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* void
|
||||||
|
* object_add_to_user_list (GObject *object,
|
||||||
|
* const gchar *new_string)
|
||||||
|
* {
|
||||||
|
* // the quark, naming the object data
|
||||||
|
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
|
||||||
|
* // retrieve the old string list
|
||||||
|
* GList *list = g_object_steal_qdata (object, quark_string_list);
|
||||||
|
*
|
||||||
|
* // prepend new string
|
||||||
|
* list = g_list_prepend (list, g_strdup (new_string));
|
||||||
|
* // this changed 'list', so we need to set it again
|
||||||
|
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
|
||||||
|
* }
|
||||||
|
* static void
|
||||||
|
* free_string_list (gpointer data)
|
||||||
|
* {
|
||||||
|
* GList *node, *list = data;
|
||||||
|
*
|
||||||
|
* for (node = list; node; node = node->next)
|
||||||
|
* g_free (node->data);
|
||||||
|
* g_list_free (list);
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Using g_object_get_qdata() in the above example, instead of
|
||||||
|
* g_object_steal_qdata() would have left the destroy function set,
|
||||||
|
* and thus the partial string list would have been freed upon
|
||||||
|
* g_object_set_qdata_full().
|
||||||
|
* @param quark A #GQuark, naming the user data pointer
|
||||||
|
* @returns The user data pointer set, or %NULL
|
||||||
|
*/
|
||||||
|
steal_qdata(quark: GLib.Quark): any | null;
|
||||||
|
/**
|
||||||
|
* Reverts the effect of a previous call to
|
||||||
|
* g_object_freeze_notify(). The freeze count is decreased on `object`
|
||||||
|
* and when it reaches zero, queued "notify" signals are emitted.
|
||||||
|
*
|
||||||
|
* Duplicate notifications for each property are squashed so that at most one
|
||||||
|
* #GObject::notify signal is emitted for each property, in the reverse order
|
||||||
|
* in which they have been queued.
|
||||||
|
*
|
||||||
|
* It is an error to call this function when the freeze count is zero.
|
||||||
|
*/
|
||||||
|
thaw_notify(): void;
|
||||||
|
/**
|
||||||
|
* Decreases the reference count of `object`. When its reference count
|
||||||
|
* drops to 0, the object is finalized (i.e. its memory is freed).
|
||||||
|
*
|
||||||
|
* If the pointer to the #GObject may be reused in future (for example, if it is
|
||||||
|
* an instance variable of another object), it is recommended to clear the
|
||||||
|
* pointer to %NULL rather than retain a dangling pointer to a potentially
|
||||||
|
* invalid #GObject instance. Use g_clear_object() for this.
|
||||||
|
*/
|
||||||
|
unref(): void;
|
||||||
|
/**
|
||||||
|
* This function essentially limits the life time of the `closure` to
|
||||||
|
* the life time of the object. That is, when the object is finalized,
|
||||||
|
* the `closure` is invalidated by calling g_closure_invalidate() on
|
||||||
|
* it, in order to prevent invocations of the closure with a finalized
|
||||||
|
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
|
||||||
|
* added as marshal guards to the `closure,` to ensure that an extra
|
||||||
|
* reference count is held on `object` during invocation of the
|
||||||
|
* `closure`. Usually, this function will be called on closures that
|
||||||
|
* use this `object` as closure data.
|
||||||
|
* @param closure #GClosure to watch
|
||||||
|
*/
|
||||||
|
watch_closure(closure: GObject.Closure): void;
|
||||||
|
/**
|
||||||
|
* the `constructed` function is called by g_object_new() as the
|
||||||
|
* final step of the object creation process. At the point of the call, all
|
||||||
|
* construction properties have been set on the object. The purpose of this
|
||||||
|
* call is to allow for object initialisation steps that can only be performed
|
||||||
|
* after construction properties have been set. `constructed` implementors
|
||||||
|
* should chain up to the `constructed` call of their parent class to allow it
|
||||||
|
* to complete its initialisation.
|
||||||
|
*/
|
||||||
|
vfunc_constructed(): void;
|
||||||
|
/**
|
||||||
|
* emits property change notification for a bunch
|
||||||
|
* of properties. Overriding `dispatch_properties_changed` should be rarely
|
||||||
|
* needed.
|
||||||
|
* @param n_pspecs
|
||||||
|
* @param pspecs
|
||||||
|
*/
|
||||||
|
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
|
||||||
|
/**
|
||||||
|
* the `dispose` function is supposed to drop all references to other
|
||||||
|
* objects, but keep the instance otherwise intact, so that client method
|
||||||
|
* invocations still work. It may be run multiple times (due to reference
|
||||||
|
* loops). Before returning, `dispose` should chain up to the `dispose` method
|
||||||
|
* of the parent class.
|
||||||
|
*/
|
||||||
|
vfunc_dispose(): void;
|
||||||
|
/**
|
||||||
|
* instance finalization function, should finish the finalization of
|
||||||
|
* the instance begun in `dispose` and chain up to the `finalize` method of the
|
||||||
|
* parent class.
|
||||||
|
*/
|
||||||
|
vfunc_finalize(): void;
|
||||||
|
/**
|
||||||
|
* the generic getter for all properties of this type. Should be
|
||||||
|
* overridden for every type with properties.
|
||||||
|
* @param property_id
|
||||||
|
* @param value
|
||||||
|
* @param pspec
|
||||||
|
*/
|
||||||
|
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
||||||
|
/**
|
||||||
|
* Emits a "notify" signal for the property `property_name` on `object`.
|
||||||
|
*
|
||||||
|
* When possible, eg. when signaling a property change from within the class
|
||||||
|
* that registered the property, you should use g_object_notify_by_pspec()
|
||||||
|
* instead.
|
||||||
|
*
|
||||||
|
* Note that emission of the notify signal may be blocked with
|
||||||
|
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
||||||
|
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
||||||
|
* called.
|
||||||
|
* @param pspec
|
||||||
|
*/
|
||||||
|
vfunc_notify(pspec: GObject.ParamSpec): void;
|
||||||
|
/**
|
||||||
|
* the generic setter for all properties of this type. Should be
|
||||||
|
* overridden for every type with properties. If implementations of
|
||||||
|
* `set_property` don't emit property change notification explicitly, this will
|
||||||
|
* be done implicitly by the type system. However, if the notify signal is
|
||||||
|
* emitted explicitly, the type system will not emit it a second time.
|
||||||
|
* @param property_id
|
||||||
|
* @param value
|
||||||
|
* @param pspec
|
||||||
|
*/
|
||||||
|
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
||||||
|
disconnect(id: number): void;
|
||||||
|
set(properties: { [key: string]: any }): void;
|
||||||
|
block_signal_handler(id: number): any;
|
||||||
|
unblock_signal_handler(id: number): any;
|
||||||
|
stop_emission_by_name(detailedName: string): any;
|
||||||
|
}
|
||||||
|
|
||||||
|
type OutputClass = typeof Output;
|
||||||
|
type RiverClass = typeof River;
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalRiver;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalRiver' {
|
||||||
|
import AstalRiver01 from 'gi://AstalRiver?version=0.1';
|
||||||
|
export default AstalRiver01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
419
configs/userland/ags/@girs/astaltray-0.1.d.ts
vendored
Normal file
419
configs/userland/ags/@girs/astaltray-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,419 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
/// <reference path="./gdkpixbuf-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalTray?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
import type GdkPixbuf from 'gi://GdkPixbuf?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalTray {
|
||||||
|
/**
|
||||||
|
* AstalTray-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace Category {
|
||||||
|
export const $gtype: GObject.GType<Category>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Category {
|
||||||
|
APPLICATION,
|
||||||
|
COMMUNICATIONS,
|
||||||
|
SYSTEM,
|
||||||
|
HARDWARE,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Status {
|
||||||
|
export const $gtype: GObject.GType<Status>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Status {
|
||||||
|
PASSIVE,
|
||||||
|
ACTIVE,
|
||||||
|
NEEDS_ATTENTION,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
function category_to_nick(): string;
|
||||||
|
function status_to_nick(): string;
|
||||||
|
/**
|
||||||
|
* Get the singleton instance of [class`AstalTray`.Tray]
|
||||||
|
*/
|
||||||
|
function get_default(): Tray;
|
||||||
|
module Tray {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface ItemAdded {
|
||||||
|
(item_id: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ItemRemoved {
|
||||||
|
(item_id: string): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
items: TrayItem[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Tray extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Tray>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of currently registered tray items
|
||||||
|
*/
|
||||||
|
get items(): TrayItem[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Tray.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](): Tray;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'item-added', callback: (_source: this, item_id: string) => void): number;
|
||||||
|
connect_after(signal: 'item-added', callback: (_source: this, item_id: string) => void): number;
|
||||||
|
emit(signal: 'item-added', item_id: string): void;
|
||||||
|
connect(signal: 'item-removed', callback: (_source: this, item_id: string) => void): number;
|
||||||
|
connect_after(signal: 'item-removed', callback: (_source: this, item_id: string) => void): number;
|
||||||
|
emit(signal: 'item-removed', item_id: string): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the singleton instance of [class`AstalTray`.Tray]
|
||||||
|
*/
|
||||||
|
static get_default(): Tray;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the TrayItem with the given item-id.
|
||||||
|
* @param item_id
|
||||||
|
*/
|
||||||
|
get_item(item_id: string): TrayItem;
|
||||||
|
get_items(): TrayItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
module TrayItem {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface Changed {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Ready {
|
||||||
|
(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
title: string;
|
||||||
|
category: Category;
|
||||||
|
status: Status;
|
||||||
|
tooltip: Tooltip;
|
||||||
|
tooltip_markup: string;
|
||||||
|
tooltipMarkup: string;
|
||||||
|
id: string;
|
||||||
|
is_menu: boolean;
|
||||||
|
isMenu: boolean;
|
||||||
|
icon_theme_path: string;
|
||||||
|
iconThemePath: string;
|
||||||
|
icon_name: string;
|
||||||
|
iconName: string;
|
||||||
|
icon_pixbuf: GdkPixbuf.Pixbuf;
|
||||||
|
iconPixbuf: GdkPixbuf.Pixbuf;
|
||||||
|
gicon: Gio.Icon;
|
||||||
|
item_id: string;
|
||||||
|
itemId: string;
|
||||||
|
menu_model: Gio.MenuModel;
|
||||||
|
menuModel: Gio.MenuModel;
|
||||||
|
action_group: Gio.ActionGroup;
|
||||||
|
actionGroup: Gio.ActionGroup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TrayItem extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<TrayItem>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Title of the TrayItem
|
||||||
|
*/
|
||||||
|
get title(): string;
|
||||||
|
/**
|
||||||
|
* The category this item belongs to
|
||||||
|
*/
|
||||||
|
get category(): Category;
|
||||||
|
/**
|
||||||
|
* The current status of this item
|
||||||
|
*/
|
||||||
|
get status(): Status;
|
||||||
|
/**
|
||||||
|
* The tooltip of this item
|
||||||
|
*/
|
||||||
|
get tooltip(): Tooltip;
|
||||||
|
/**
|
||||||
|
* A markup representation of the tooltip. This is basically equvivalent to `tooltip.title \n tooltip.description`
|
||||||
|
*/
|
||||||
|
get tooltip_markup(): string;
|
||||||
|
/**
|
||||||
|
* A markup representation of the tooltip. This is basically equvivalent to `tooltip.title \n tooltip.description`
|
||||||
|
*/
|
||||||
|
get tooltipMarkup(): string;
|
||||||
|
/**
|
||||||
|
* the id of the item. This id is specified by the tray app.
|
||||||
|
*/
|
||||||
|
get id(): string;
|
||||||
|
/**
|
||||||
|
* If set, this only supports the menu, so showing the menu should be prefered over calling [method`AstalTray`.TrayItem.activate].
|
||||||
|
*/
|
||||||
|
get is_menu(): boolean;
|
||||||
|
/**
|
||||||
|
* If set, this only supports the menu, so showing the menu should be prefered over calling [method`AstalTray`.TrayItem.activate].
|
||||||
|
*/
|
||||||
|
get isMenu(): boolean;
|
||||||
|
/**
|
||||||
|
* The icon theme path, where to look for the [property`AstalTray`.TrayItem:icon-name]. It is recommended to use the [property@
|
||||||
|
* AstalTray.TrayItem:gicon] property, which does the icon lookups for you.
|
||||||
|
*/
|
||||||
|
get icon_theme_path(): string;
|
||||||
|
/**
|
||||||
|
* The icon theme path, where to look for the [property`AstalTray`.TrayItem:icon-name]. It is recommended to use the [property@
|
||||||
|
* AstalTray.TrayItem:gicon] property, which does the icon lookups for you.
|
||||||
|
*/
|
||||||
|
get iconThemePath(): string;
|
||||||
|
/**
|
||||||
|
* The name of the icon. This should be looked up in the [property`AstalTray`.TrayItem:icon-theme-path] if set or in the currently used icon
|
||||||
|
* theme otherwise. It is recommended to use the [property`AstalTray`.TrayItem:gicon] property, which does the icon lookups for you.
|
||||||
|
*/
|
||||||
|
get icon_name(): string;
|
||||||
|
/**
|
||||||
|
* The name of the icon. This should be looked up in the [property`AstalTray`.TrayItem:icon-theme-path] if set or in the currently used icon
|
||||||
|
* theme otherwise. It is recommended to use the [property`AstalTray`.TrayItem:gicon] property, which does the icon lookups for you.
|
||||||
|
*/
|
||||||
|
get iconName(): string;
|
||||||
|
/**
|
||||||
|
* A pixbuf containing the icon. It is recommended to use the [property`AstalTray`.TrayItem:gicon] property, which does the icon lookups for
|
||||||
|
* you.
|
||||||
|
*/
|
||||||
|
get icon_pixbuf(): GdkPixbuf.Pixbuf;
|
||||||
|
/**
|
||||||
|
* A pixbuf containing the icon. It is recommended to use the [property`AstalTray`.TrayItem:gicon] property, which does the icon lookups for
|
||||||
|
* you.
|
||||||
|
*/
|
||||||
|
get iconPixbuf(): GdkPixbuf.Pixbuf;
|
||||||
|
/**
|
||||||
|
* Contains the items icon. This property is intended to be used with the gicon property of the Icon widget and the recommended way to display the
|
||||||
|
* icon. This property unifies the [property`AstalTray`.TrayItem:icon-name], [property`AstalTray`.TrayItem:icon-theme-path] and [property
|
||||||
|
* `AstalTray`.TrayItem:icon-pixbuf] properties.
|
||||||
|
*/
|
||||||
|
get gicon(): Gio.Icon;
|
||||||
|
set gicon(val: Gio.Icon);
|
||||||
|
/**
|
||||||
|
* The id of the item used to uniquely identify the TrayItems by this lib.
|
||||||
|
*/
|
||||||
|
get item_id(): string;
|
||||||
|
set item_id(val: string);
|
||||||
|
/**
|
||||||
|
* The id of the item used to uniquely identify the TrayItems by this lib.
|
||||||
|
*/
|
||||||
|
get itemId(): string;
|
||||||
|
set itemId(val: string);
|
||||||
|
/**
|
||||||
|
* The MenuModel describing the menu for this TrayItem to be used with a MenuButton or PopoverMenu. The actions for this menu are defined in
|
||||||
|
* [property`AstalTray`.TrayItem:action-group].
|
||||||
|
*/
|
||||||
|
get menu_model(): Gio.MenuModel;
|
||||||
|
/**
|
||||||
|
* The MenuModel describing the menu for this TrayItem to be used with a MenuButton or PopoverMenu. The actions for this menu are defined in
|
||||||
|
* [property`AstalTray`.TrayItem:action-group].
|
||||||
|
*/
|
||||||
|
get menuModel(): Gio.MenuModel;
|
||||||
|
/**
|
||||||
|
* The ActionGroup containing the actions for the menu. All actions have the `dbusmenu` prefix and are setup to work with the [property@
|
||||||
|
* AstalTray.TrayItem:menu-model]. Make sure to insert this action group into a parent widget of the menu, eg the MenuButton for which the MenuModel for
|
||||||
|
* this TrayItem is set.
|
||||||
|
*/
|
||||||
|
get action_group(): Gio.ActionGroup;
|
||||||
|
/**
|
||||||
|
* The ActionGroup containing the actions for the menu. All actions have the `dbusmenu` prefix and are setup to work with the [property@
|
||||||
|
* AstalTray.TrayItem:menu-model]. Make sure to insert this action group into a parent widget of the menu, eg the MenuButton for which the MenuModel for
|
||||||
|
* this TrayItem is set.
|
||||||
|
*/
|
||||||
|
get actionGroup(): Gio.ActionGroup;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<TrayItem.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'changed', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'changed'): void;
|
||||||
|
connect(signal: 'ready', callback: (_source: this) => void): number;
|
||||||
|
connect_after(signal: 'ready', callback: (_source: this) => void): number;
|
||||||
|
emit(signal: 'ready'): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tells the tray app that its menu is about to be opened, so it can update the menu if needed. You should call this method before openening the
|
||||||
|
* menu.
|
||||||
|
*/
|
||||||
|
about_to_show(): void;
|
||||||
|
/**
|
||||||
|
* Send an activate request to the tray app.
|
||||||
|
* @param x
|
||||||
|
* @param y
|
||||||
|
*/
|
||||||
|
activate(x: number, y: number): void;
|
||||||
|
/**
|
||||||
|
* Send a secondary activate request to the tray app.
|
||||||
|
* @param x
|
||||||
|
* @param y
|
||||||
|
*/
|
||||||
|
secondary_activate(x: number, y: number): void;
|
||||||
|
/**
|
||||||
|
* Send a scroll request to the tray app. valid values for the orientation are "horizontal" and "vertical".
|
||||||
|
* @param delta
|
||||||
|
* @param orientation
|
||||||
|
*/
|
||||||
|
scroll(delta: number, orientation: string): void;
|
||||||
|
to_json_string(): string;
|
||||||
|
get_title(): string;
|
||||||
|
get_category(): Category;
|
||||||
|
get_status(): Status;
|
||||||
|
get_tooltip(): Tooltip | null;
|
||||||
|
get_tooltip_markup(): string;
|
||||||
|
get_id(): string;
|
||||||
|
get_is_menu(): boolean;
|
||||||
|
get_icon_theme_path(): string;
|
||||||
|
get_icon_name(): string;
|
||||||
|
get_icon_pixbuf(): GdkPixbuf.Pixbuf;
|
||||||
|
get_gicon(): Gio.Icon;
|
||||||
|
get_item_id(): string;
|
||||||
|
get_menu_model(): Gio.MenuModel | null;
|
||||||
|
get_action_group(): Gio.ActionGroup | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrayClass = typeof Tray;
|
||||||
|
abstract class TrayPrivate {
|
||||||
|
static $gtype: GObject.GType<TrayPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrayItemClass = typeof TrayItem;
|
||||||
|
abstract class TrayItemPrivate {
|
||||||
|
static $gtype: GObject.GType<TrayItemPrivate>;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Pixmap {
|
||||||
|
static $gtype: GObject.GType<Pixmap>;
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
bytes: Uint8Array;
|
||||||
|
bytes_length1: number;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
properties?: Partial<{
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
bytes: Uint8Array;
|
||||||
|
bytes_length1: number;
|
||||||
|
}>,
|
||||||
|
);
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Tooltip {
|
||||||
|
static $gtype: GObject.GType<Tooltip>;
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
icon_name: string;
|
||||||
|
icon: Pixmap[];
|
||||||
|
icon_length1: number;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
properties?: Partial<{
|
||||||
|
icon_name: string;
|
||||||
|
icon: Pixmap[];
|
||||||
|
icon_length1: number;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
}>,
|
||||||
|
);
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalTray;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalTray' {
|
||||||
|
import AstalTray01 from 'gi://AstalTray?version=0.1';
|
||||||
|
export default AstalTray01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
937
configs/userland/ags/@girs/astalwp-0.1.d.ts
vendored
Normal file
937
configs/userland/ags/@girs/astalwp-0.1.d.ts
vendored
Normal file
@@ -0,0 +1,937 @@
|
|||||||
|
/// <reference path="./gio-2.0.d.ts" />
|
||||||
|
/// <reference path="./gobject-2.0.d.ts" />
|
||||||
|
/// <reference path="./glib-2.0.d.ts" />
|
||||||
|
/// <reference path="./gmodule-2.0.d.ts" />
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Definitions for Gjs (https://gjs.guide/)
|
||||||
|
*
|
||||||
|
* These type definitions are automatically generated, do not edit them by hand.
|
||||||
|
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
||||||
|
*
|
||||||
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare module 'gi://AstalWp?version=0.1' {
|
||||||
|
// Module dependencies
|
||||||
|
import type Gio from 'gi://Gio?version=2.0';
|
||||||
|
import type GObject from 'gi://GObject?version=2.0';
|
||||||
|
import type GLib from 'gi://GLib?version=2.0';
|
||||||
|
import type GModule from 'gi://GModule?version=2.0';
|
||||||
|
|
||||||
|
export namespace AstalWp {
|
||||||
|
/**
|
||||||
|
* AstalWp-0.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
export namespace DeviceType {
|
||||||
|
export const $gtype: GObject.GType<DeviceType>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum DeviceType {
|
||||||
|
AUDIO,
|
||||||
|
VIDEO,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace MediaClass {
|
||||||
|
export const $gtype: GObject.GType<MediaClass>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum MediaClass {
|
||||||
|
AUDIO_MICROPHONE,
|
||||||
|
AUDIO_SPEAKER,
|
||||||
|
AUDIO_RECORDER,
|
||||||
|
AUDIO_STREAM,
|
||||||
|
VIDEO_SOURCE,
|
||||||
|
VIDEO_SINK,
|
||||||
|
VIDEO_RECORDER,
|
||||||
|
VIDEO_STREAM,
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Scale {
|
||||||
|
export const $gtype: GObject.GType<Scale>;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Scale {
|
||||||
|
LINEAR,
|
||||||
|
CUBIC,
|
||||||
|
}
|
||||||
|
const MAJOR_VERSION: number;
|
||||||
|
const MICRO_VERSION: number;
|
||||||
|
const MINOR_VERSION: number;
|
||||||
|
const VERSION: string;
|
||||||
|
/**
|
||||||
|
* gets the default wireplumber object.
|
||||||
|
* @returns gets the default wireplumber object.
|
||||||
|
*/
|
||||||
|
function get_default(): Wp | null;
|
||||||
|
module Audio {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface DeviceAdded {
|
||||||
|
(object: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DeviceRemoved {
|
||||||
|
(object: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MicrophoneAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MicrophoneRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RecorderAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RecorderRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SpeakerAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SpeakerRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface StreamAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface StreamRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
default_microphone: Endpoint;
|
||||||
|
defaultMicrophone: Endpoint;
|
||||||
|
default_speaker: Endpoint;
|
||||||
|
defaultSpeaker: Endpoint;
|
||||||
|
devices: Device[];
|
||||||
|
microphones: Endpoint[];
|
||||||
|
recorders: Endpoint[];
|
||||||
|
speakers: Endpoint[];
|
||||||
|
streams: Endpoint[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* is instanciated by [class`AstalWp`.Wp]. An instance of class can only be received there.
|
||||||
|
*
|
||||||
|
* This is a convinience class and acts as a filter for [class`AstalWp`.Wp] to filter for audio
|
||||||
|
* endpoints and devices.
|
||||||
|
*/
|
||||||
|
class Audio extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Audio>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The AstalWndpoint object representing the default speaker
|
||||||
|
*/
|
||||||
|
get default_microphone(): Endpoint;
|
||||||
|
/**
|
||||||
|
* The AstalWndpoint object representing the default speaker
|
||||||
|
*/
|
||||||
|
get defaultMicrophone(): Endpoint;
|
||||||
|
/**
|
||||||
|
* The AstalWndpoint object representing the default speaker
|
||||||
|
*/
|
||||||
|
get default_speaker(): Endpoint;
|
||||||
|
/**
|
||||||
|
* The AstalWndpoint object representing the default speaker
|
||||||
|
*/
|
||||||
|
get defaultSpeaker(): Endpoint;
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get devices(): Device[];
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get microphones(): Endpoint[];
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get recorders(): Endpoint[];
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get speakers(): Endpoint[];
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get streams(): Endpoint[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Audio.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](wp: Wp): Audio;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'device-added', callback: (_source: this, object: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-added', callback: (_source: this, object: Device) => void): number;
|
||||||
|
emit(signal: 'device-added', object: Device): void;
|
||||||
|
connect(signal: 'device-removed', callback: (_source: this, object: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-removed', callback: (_source: this, object: Device) => void): number;
|
||||||
|
emit(signal: 'device-removed', object: Device): void;
|
||||||
|
connect(signal: 'microphone-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'microphone-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'microphone-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'microphone-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'microphone-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'microphone-removed', object: Endpoint): void;
|
||||||
|
connect(signal: 'recorder-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'recorder-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'recorder-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'recorder-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'recorder-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'recorder-removed', object: Endpoint): void;
|
||||||
|
connect(signal: 'speaker-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'speaker-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'speaker-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'speaker-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'speaker-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'speaker-removed', object: Endpoint): void;
|
||||||
|
connect(signal: 'stream-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'stream-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'stream-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'stream-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'stream-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'stream-removed', object: Endpoint): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the default microphone object
|
||||||
|
*/
|
||||||
|
get_default_microphone(): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* gets the default speaker object
|
||||||
|
*/
|
||||||
|
get_default_speaker(): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* gets the device with the given id
|
||||||
|
* @param id the id of the device
|
||||||
|
*/
|
||||||
|
get_device(id: number): Device | null;
|
||||||
|
/**
|
||||||
|
* a GList containing the devices
|
||||||
|
*/
|
||||||
|
get_devices(): Device[] | null;
|
||||||
|
/**
|
||||||
|
* the endpoint with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
*/
|
||||||
|
get_endpoint(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* gets the microphone with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
*/
|
||||||
|
get_microphone(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a GList containing the microphones
|
||||||
|
*/
|
||||||
|
get_microphones(): Endpoint[] | null;
|
||||||
|
/**
|
||||||
|
* gets the recorder with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
*/
|
||||||
|
get_recorder(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a GList containing the recorders
|
||||||
|
*/
|
||||||
|
get_recorders(): Endpoint[] | null;
|
||||||
|
/**
|
||||||
|
* gets the speaker with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
*/
|
||||||
|
get_speaker(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a GList containing the speakers
|
||||||
|
*/
|
||||||
|
get_speakers(): Endpoint[] | null;
|
||||||
|
/**
|
||||||
|
* gets the stream with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
*/
|
||||||
|
get_stream(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a GList containing the streams
|
||||||
|
*/
|
||||||
|
get_streams(): Endpoint[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Device {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
active_profile_id: number;
|
||||||
|
activeProfileId: number;
|
||||||
|
description: string;
|
||||||
|
device_type: DeviceType;
|
||||||
|
deviceType: DeviceType;
|
||||||
|
icon: string;
|
||||||
|
id: number;
|
||||||
|
profiles: Profile[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Device extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Device>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id of the currently active profile.
|
||||||
|
*/
|
||||||
|
get active_profile_id(): number;
|
||||||
|
set active_profile_id(val: number);
|
||||||
|
/**
|
||||||
|
* The id of the currently active profile.
|
||||||
|
*/
|
||||||
|
get activeProfileId(): number;
|
||||||
|
set activeProfileId(val: number);
|
||||||
|
/**
|
||||||
|
* The description of this device.
|
||||||
|
*/
|
||||||
|
get description(): string;
|
||||||
|
/**
|
||||||
|
* The type of this device
|
||||||
|
*/
|
||||||
|
get device_type(): DeviceType;
|
||||||
|
/**
|
||||||
|
* The type of this device
|
||||||
|
*/
|
||||||
|
get deviceType(): DeviceType;
|
||||||
|
/**
|
||||||
|
* The icon name for this device.
|
||||||
|
*/
|
||||||
|
get icon(): string;
|
||||||
|
/**
|
||||||
|
* The id of this device.
|
||||||
|
*/
|
||||||
|
get id(): number;
|
||||||
|
/**
|
||||||
|
* A list of available profiles
|
||||||
|
*/
|
||||||
|
get profiles(): Profile[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Device.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the currently active profile of this device
|
||||||
|
*/
|
||||||
|
get_active_profile(): number;
|
||||||
|
/**
|
||||||
|
* gets the description of this device
|
||||||
|
*/
|
||||||
|
get_description(): string;
|
||||||
|
/**
|
||||||
|
* gets the type of this device
|
||||||
|
*/
|
||||||
|
get_device_type(): DeviceType;
|
||||||
|
/**
|
||||||
|
* gets the icon of this device
|
||||||
|
*/
|
||||||
|
get_icon(): string;
|
||||||
|
/**
|
||||||
|
* gets the id of this device
|
||||||
|
*/
|
||||||
|
get_id(): number;
|
||||||
|
/**
|
||||||
|
* gets the profile with the given id
|
||||||
|
* @param id the id of the profile
|
||||||
|
*/
|
||||||
|
get_profile(id: number): Profile | null;
|
||||||
|
/**
|
||||||
|
* gets a GList containing the profiles
|
||||||
|
*/
|
||||||
|
get_profiles(): Profile[] | null;
|
||||||
|
/**
|
||||||
|
* sets the profile for this device
|
||||||
|
* @param profile_id the id of the profile
|
||||||
|
*/
|
||||||
|
set_active_profile(profile_id: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Endpoint {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
description: string;
|
||||||
|
icon: string;
|
||||||
|
id: number;
|
||||||
|
is_default: boolean;
|
||||||
|
isDefault: boolean;
|
||||||
|
lock_channels: boolean;
|
||||||
|
lockChannels: boolean;
|
||||||
|
media_class: MediaClass;
|
||||||
|
mediaClass: MediaClass;
|
||||||
|
mute: boolean;
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
serial: number;
|
||||||
|
volume: number;
|
||||||
|
volume_icon: string;
|
||||||
|
volumeIcon: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Endpoint extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Endpoint>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The description of this endpoint
|
||||||
|
*/
|
||||||
|
get description(): string;
|
||||||
|
/**
|
||||||
|
* The icon of this endpoint. Note that endpoints do not have icons associated with them in
|
||||||
|
* pipewire, so the icon of the associated device is used instead.
|
||||||
|
*/
|
||||||
|
get icon(): string;
|
||||||
|
/**
|
||||||
|
* The pipewire id of this endpoint.
|
||||||
|
*/
|
||||||
|
get id(): number;
|
||||||
|
/**
|
||||||
|
* Whether this endpoint is the default one used for this media-class. Note that setting this
|
||||||
|
* property to false has no effect.
|
||||||
|
*/
|
||||||
|
get is_default(): boolean;
|
||||||
|
set is_default(val: boolean);
|
||||||
|
/**
|
||||||
|
* Whether this endpoint is the default one used for this media-class. Note that setting this
|
||||||
|
* property to false has no effect.
|
||||||
|
*/
|
||||||
|
get isDefault(): boolean;
|
||||||
|
set isDefault(val: boolean);
|
||||||
|
/**
|
||||||
|
* Whether to lock the channels together or not.
|
||||||
|
*/
|
||||||
|
get lock_channels(): boolean;
|
||||||
|
set lock_channels(val: boolean);
|
||||||
|
/**
|
||||||
|
* Whether to lock the channels together or not.
|
||||||
|
*/
|
||||||
|
get lockChannels(): boolean;
|
||||||
|
set lockChannels(val: boolean);
|
||||||
|
/**
|
||||||
|
* The media class of this endpoint
|
||||||
|
*/
|
||||||
|
get media_class(): MediaClass;
|
||||||
|
/**
|
||||||
|
* The media class of this endpoint
|
||||||
|
*/
|
||||||
|
get mediaClass(): MediaClass;
|
||||||
|
/**
|
||||||
|
* The mute state of this endpoint
|
||||||
|
*/
|
||||||
|
get mute(): boolean;
|
||||||
|
set mute(val: boolean);
|
||||||
|
/**
|
||||||
|
* The name of this endpoint
|
||||||
|
*/
|
||||||
|
get name(): string;
|
||||||
|
/**
|
||||||
|
* The object path of this endpoint
|
||||||
|
*/
|
||||||
|
get path(): string;
|
||||||
|
/**
|
||||||
|
* The object serial of this endpoint.
|
||||||
|
*/
|
||||||
|
get serial(): number;
|
||||||
|
/**
|
||||||
|
* The volume of this endpoint
|
||||||
|
*/
|
||||||
|
get volume(): number;
|
||||||
|
set volume(val: number);
|
||||||
|
/**
|
||||||
|
* The volume icon of this endpoint
|
||||||
|
*/
|
||||||
|
get volume_icon(): string;
|
||||||
|
/**
|
||||||
|
* The volume icon of this endpoint
|
||||||
|
*/
|
||||||
|
get volumeIcon(): string;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Endpoint.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the description of this endpoint
|
||||||
|
*/
|
||||||
|
get_description(): string;
|
||||||
|
/**
|
||||||
|
* gets the icon for this endpoint
|
||||||
|
*/
|
||||||
|
get_icon(): string;
|
||||||
|
/**
|
||||||
|
* gets the id of the endpoint.
|
||||||
|
*/
|
||||||
|
get_id(): number;
|
||||||
|
get_is_default(): boolean;
|
||||||
|
get_lock_channels(): boolean;
|
||||||
|
/**
|
||||||
|
* gets the media class of the endpoint.
|
||||||
|
*/
|
||||||
|
get_media_class(): MediaClass;
|
||||||
|
/**
|
||||||
|
* gets the mute status of the endpoint.
|
||||||
|
*/
|
||||||
|
get_mute(): boolean;
|
||||||
|
/**
|
||||||
|
* gets the name of this endpoint
|
||||||
|
*/
|
||||||
|
get_name(): string;
|
||||||
|
/**
|
||||||
|
* gets the object path of this endpoint
|
||||||
|
*/
|
||||||
|
get_path(): string;
|
||||||
|
/**
|
||||||
|
* gets the serial number of this endpoint
|
||||||
|
*/
|
||||||
|
get_serial(): number;
|
||||||
|
/**
|
||||||
|
* gets the volume
|
||||||
|
*/
|
||||||
|
get_volume(): number;
|
||||||
|
get_volume_icon(): string;
|
||||||
|
set_is_default(is_default: boolean): void;
|
||||||
|
set_lock_channels(lock_channels: boolean): void;
|
||||||
|
/**
|
||||||
|
* Sets the mute status for the endpoint.
|
||||||
|
* @param mute A boolean indicating whether to mute the endpoint.
|
||||||
|
*/
|
||||||
|
set_mute(mute: boolean): void;
|
||||||
|
/**
|
||||||
|
* Sets the volume level for this endpoint. The volume is clamped to be between
|
||||||
|
* 0 and 1.5.
|
||||||
|
* @param volume The new volume level to set.
|
||||||
|
*/
|
||||||
|
set_volume(volume: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Profile {
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
description: string;
|
||||||
|
index: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Profile extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Profile>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get description(): string;
|
||||||
|
get index(): number;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Profile.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
get_description(): string;
|
||||||
|
get_index(): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Video {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface DeviceAdded {
|
||||||
|
(object: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DeviceRemoved {
|
||||||
|
(object: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RecorderAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RecorderRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SinkAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SinkRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SourceAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SourceRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface StreamAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface StreamRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
devices: Endpoint[];
|
||||||
|
recorders: any;
|
||||||
|
sinks: Endpoint[];
|
||||||
|
sources: Endpoint[];
|
||||||
|
streams: Endpoint[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* is instanciated by [class`AstalWp`.Wp]. An instance of class can only be received there.
|
||||||
|
*
|
||||||
|
* This is a convinience class and acts as a filter for [class`AstalWp`.Wp] to filter for video
|
||||||
|
* endpoints and devices.
|
||||||
|
*/
|
||||||
|
class Video extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Video>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get devices(): Endpoint[];
|
||||||
|
get recorders(): any;
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get sinks(): Endpoint[];
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get sources(): Endpoint[];
|
||||||
|
/**
|
||||||
|
* A list of AstalWpEndpoint objects
|
||||||
|
*/
|
||||||
|
get streams(): Endpoint[];
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Video.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
static ['new'](wp: Wp): Video;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'device-added', callback: (_source: this, object: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-added', callback: (_source: this, object: Device) => void): number;
|
||||||
|
emit(signal: 'device-added', object: Device): void;
|
||||||
|
connect(signal: 'device-removed', callback: (_source: this, object: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-removed', callback: (_source: this, object: Device) => void): number;
|
||||||
|
emit(signal: 'device-removed', object: Device): void;
|
||||||
|
connect(signal: 'recorder-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'recorder-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'recorder-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'recorder-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'recorder-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'recorder-removed', object: Endpoint): void;
|
||||||
|
connect(signal: 'sink-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'sink-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'sink-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'sink-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'sink-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'sink-removed', object: Endpoint): void;
|
||||||
|
connect(signal: 'source-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'source-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'source-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'source-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'source-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'source-removed', object: Endpoint): void;
|
||||||
|
connect(signal: 'stream-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'stream-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'stream-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'stream-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'stream-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'stream-removed', object: Endpoint): void;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the device with the given id
|
||||||
|
* @param id the id of the device
|
||||||
|
* @returns the device with the given id
|
||||||
|
*/
|
||||||
|
get_device(id: number): Device | null;
|
||||||
|
/**
|
||||||
|
* a list containing the devices
|
||||||
|
* @returns a GList containing the devices
|
||||||
|
*/
|
||||||
|
get_devices(): Device[] | null;
|
||||||
|
/**
|
||||||
|
* the recorder with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
* @returns the recorder with the given id
|
||||||
|
*/
|
||||||
|
get_recorder(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a list containing the video recorders
|
||||||
|
* @returns a GList containing the video recorders
|
||||||
|
*/
|
||||||
|
get_recorders(): Endpoint[] | null;
|
||||||
|
/**
|
||||||
|
* the sink with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
* @returns the sink with the given id
|
||||||
|
*/
|
||||||
|
get_sink(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a list containing the video sinks
|
||||||
|
* @returns a GList containing the video sinks
|
||||||
|
*/
|
||||||
|
get_sinks(): Endpoint[] | null;
|
||||||
|
/**
|
||||||
|
* the source with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
* @returns the source with the given id
|
||||||
|
*/
|
||||||
|
get_source(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a list containing the video sources
|
||||||
|
* @returns a GList containing the video sources
|
||||||
|
*/
|
||||||
|
get_sources(): Endpoint[] | null;
|
||||||
|
/**
|
||||||
|
* the stream with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
* @returns the stream with the given id
|
||||||
|
*/
|
||||||
|
get_stream(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a list containing the video streams
|
||||||
|
* @returns a GList containing the video streams
|
||||||
|
*/
|
||||||
|
get_streams(): Endpoint[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
module Wp {
|
||||||
|
// Signal callback interfaces
|
||||||
|
|
||||||
|
interface DeviceAdded {
|
||||||
|
(object: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DeviceRemoved {
|
||||||
|
(object: Device): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface EndpointAdded {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface EndpointRemoved {
|
||||||
|
(object: Endpoint): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor properties interface
|
||||||
|
|
||||||
|
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
||||||
|
audio: Audio;
|
||||||
|
default_microphone: Endpoint;
|
||||||
|
defaultMicrophone: Endpoint;
|
||||||
|
default_speaker: Endpoint;
|
||||||
|
defaultSpeaker: Endpoint;
|
||||||
|
devices: Device[];
|
||||||
|
endpoints: Endpoint[];
|
||||||
|
scale: Scale;
|
||||||
|
video: Video;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* manages the connection to wireplumber. Usually you don't want to use this class directly, but use
|
||||||
|
* the [class`AstalWp`.Audio] or [class`AstalWp`.Video] instead.
|
||||||
|
*/
|
||||||
|
class Wp extends GObject.Object {
|
||||||
|
static $gtype: GObject.GType<Wp>;
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
get audio(): Audio;
|
||||||
|
/**
|
||||||
|
* The [class`AstalWp`.Endpoint] representing the default speaker
|
||||||
|
*/
|
||||||
|
get default_microphone(): Endpoint;
|
||||||
|
/**
|
||||||
|
* The [class`AstalWp`.Endpoint] representing the default speaker
|
||||||
|
*/
|
||||||
|
get defaultMicrophone(): Endpoint;
|
||||||
|
/**
|
||||||
|
* The [class`AstalWp`.Endpoint] representing the default speaker
|
||||||
|
*/
|
||||||
|
get default_speaker(): Endpoint;
|
||||||
|
/**
|
||||||
|
* The [class`AstalWp`.Endpoint] representing the default speaker
|
||||||
|
*/
|
||||||
|
get defaultSpeaker(): Endpoint;
|
||||||
|
/**
|
||||||
|
* A list of [class`AstalWp`.Device] objects
|
||||||
|
*/
|
||||||
|
get devices(): Device[];
|
||||||
|
/**
|
||||||
|
* A list of [class`AstalWp`.Endpoint] objects
|
||||||
|
*/
|
||||||
|
get endpoints(): Endpoint[];
|
||||||
|
/**
|
||||||
|
* The scale used for the volume
|
||||||
|
*/
|
||||||
|
get scale(): Scale;
|
||||||
|
set scale(val: Scale);
|
||||||
|
get video(): Video;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
constructor(properties?: Partial<Wp.ConstructorProps>, ...args: any[]);
|
||||||
|
|
||||||
|
_init(...args: any[]): void;
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
|
||||||
|
connect(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
||||||
|
emit(id: string, ...args: any[]): void;
|
||||||
|
connect(signal: 'device-added', callback: (_source: this, object: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-added', callback: (_source: this, object: Device) => void): number;
|
||||||
|
emit(signal: 'device-added', object: Device): void;
|
||||||
|
connect(signal: 'device-removed', callback: (_source: this, object: Device) => void): number;
|
||||||
|
connect_after(signal: 'device-removed', callback: (_source: this, object: Device) => void): number;
|
||||||
|
emit(signal: 'device-removed', object: Device): void;
|
||||||
|
connect(signal: 'endpoint-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'endpoint-added', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'endpoint-added', object: Endpoint): void;
|
||||||
|
connect(signal: 'endpoint-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
connect_after(signal: 'endpoint-removed', callback: (_source: this, object: Endpoint) => void): number;
|
||||||
|
emit(signal: 'endpoint-removed', object: Endpoint): void;
|
||||||
|
|
||||||
|
// Static methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the default wireplumber object.
|
||||||
|
*/
|
||||||
|
static get_default(): Wp | null;
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the [class`AstalWp`.Audio] object
|
||||||
|
* @returns gets the audio object
|
||||||
|
*/
|
||||||
|
get_audio(): Audio | null;
|
||||||
|
/**
|
||||||
|
* gets the default microphone object
|
||||||
|
* @returns gets the default microphone object
|
||||||
|
*/
|
||||||
|
get_default_microphone(): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* gets the default speaker object
|
||||||
|
* @returns gets the default speaker object
|
||||||
|
*/
|
||||||
|
get_default_speaker(): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* the device with the given id
|
||||||
|
* @param id the id of the device
|
||||||
|
* @returns the device with the given id
|
||||||
|
*/
|
||||||
|
get_device(id: number): Device | null;
|
||||||
|
/**
|
||||||
|
* the GList containing the devices
|
||||||
|
* @returns a GList containing the devices
|
||||||
|
*/
|
||||||
|
get_devices(): Device[] | null;
|
||||||
|
/**
|
||||||
|
* the endpoint with the given id
|
||||||
|
* @param id the id of the endpoint
|
||||||
|
* @returns the endpoint with the given id
|
||||||
|
*/
|
||||||
|
get_endpoint(id: number): Endpoint | null;
|
||||||
|
/**
|
||||||
|
* a GList containing all endpoints
|
||||||
|
* @returns a GList containing the endpoints
|
||||||
|
*/
|
||||||
|
get_endpoints(): Endpoint[] | null;
|
||||||
|
get_scale(): Scale;
|
||||||
|
/**
|
||||||
|
* gets the video object
|
||||||
|
* @returns gets the video object
|
||||||
|
*/
|
||||||
|
get_video(): Video | null;
|
||||||
|
set_scale(scale: Scale | null): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type AudioClass = typeof Audio;
|
||||||
|
type DeviceClass = typeof Device;
|
||||||
|
type EndpointClass = typeof Endpoint;
|
||||||
|
type ProfileClass = typeof Profile;
|
||||||
|
type VideoClass = typeof Video;
|
||||||
|
type WpClass = typeof Wp;
|
||||||
|
/**
|
||||||
|
* Name of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
||||||
|
*/
|
||||||
|
const __name__: string;
|
||||||
|
/**
|
||||||
|
* Version of the imported GIR library
|
||||||
|
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
||||||
|
*/
|
||||||
|
const __version__: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AstalWp;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'gi://AstalWp' {
|
||||||
|
import AstalWp01 from 'gi://AstalWp?version=0.1';
|
||||||
|
export default AstalWp01;
|
||||||
|
}
|
||||||
|
// END
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user