diff --git a/README.md b/README.md index 94a3c6ab..246ffd0b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # My NixOS configs -## Ags +## AGS You might find it weird that most of my config is written in TypeScript. That's because all my desktops run -[AGS](https://github.com/Aylur/ags) +[AGSv2](https://github.com/Aylur/ags/tree/v2) for UI. Click on -[this](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/nixosModules/ags) +[this](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/nixosModules/ags-v2) to see my configuration. I'm also a victim of Stockholm syndrome at this point and make my scripts diff --git a/devices/wim/modules/security.nix b/devices/wim/modules/security.nix index e808d6f0..80cd03c2 100644 --- a/devices/wim/modules/security.nix +++ b/devices/wim/modules/security.nix @@ -35,6 +35,5 @@ in { sudo.text = mkDefault (mkBefore grosshackConf); login.text = mkDefault (mkBefore grosshackConf); polkit-1.text = mkDefault (mkBefore grosshackConf); - ags.text = mkDefault (mkBefore grosshackConf); }; } diff --git a/flake.lock b/flake.lock index 79ba751d..87bd33a6 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/flake.nix b/flake.nix index ae66f8df..231fcc40 100644 Binary files a/flake.nix and b/flake.nix differ diff --git a/inputs.nix b/inputs.nix index bd388732..0b0549c5 100644 --- a/inputs.nix +++ b/inputs.nix @@ -156,11 +156,6 @@ let }; agsInputs = { - ags = mkDep { - owner = "Aylur"; - repo = "ags"; - }; - agsV2 = mkDep { owner = "Aylur"; repo = "ags"; diff --git a/lib/pkgs.nix b/lib/pkgs.nix index 8b16451b..2ca5e338 100644 --- a/lib/pkgs.nix +++ b/lib/pkgs.nix @@ -27,7 +27,7 @@ }) {}; in "${pkg}/lib/node_modules/${pkg.pname}/node_modules"; - buildNodeTypes = { + buildGirTypes = { configPath, packages, pname, diff --git a/nixosModules/ags-v2/packages.nix b/nixosModules/ags-v2/packages.nix index 16e6fc8d..d7943ffa 100644 --- a/nixosModules/ags-v2/packages.nix +++ b/nixosModules/ags-v2/packages.nix @@ -6,44 +6,55 @@ osConfig, pkgs, ... -}: { - options.programs.ags-v2.lockPkg = lib.mkOption { - type = with lib.types; nullOr package; - default = null; +}: let + # Inputs + inherit (self.inputs) agsV2 gtk-session-lock; + + # Libs + inherit (lib) attrValues boolToString optionals removeAttrs; + + # Cfg info + inherit (osConfig.networking) hostName; + cfgDesktop = osConfig.roles.desktop; + fullConfPath = "/home/${cfgDesktop.user}/${agsConfigDir}"; + + # Astal libraries + gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default; + agsV2Packages = agsV2.packages.${pkgs.system}; + astalLibs = attrValues (removeAttrs agsV2.inputs.astal.packages.${pkgs.system} ["docs" "gjs"]) ++ [gtkSessionLock]; + + # Final ags package + agsFull = agsV2Packages.ags.override {extraPackages = astalLibs;}; +in { + options.programs.ags-v2 = { + package = lib.mkOption { + type = with lib.types; nullOr package; + default = null; + }; + lockPkg = lib.mkOption { + type = with lib.types; nullOr package; + default = null; + }; }; - config = let - # Inputs - inherit (self.inputs) agsV2 gtk-session-lock; + config = { + # Make these accessible outside these files + programs.ags-v2 = { + package = agsFull; - # Libs - inherit (lib) attrValues boolToString optionals removeAttrs; + lockPkg = pkgs.writeShellApplication { + name = "lock"; + runtimeInputs = [agsFull]; + text = '' + export CONF="lock" - # Cfg info - inherit (osConfig.networking) hostName; - cfgDesktop = osConfig.roles.desktop; - fullConfPath = "/home/${cfgDesktop.user}/${agsConfigDir}"; - - # Astal libraries - gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default; - agsV2Packages = agsV2.packages.${pkgs.system}; - astalLibs = attrValues (removeAttrs agsV2.inputs.astal.packages.${pkgs.system} ["docs" "gjs"]) ++ [gtkSessionLock]; - - # Final ags package - agsFull = agsV2Packages.ags.override {extraPackages = astalLibs;}; - in { - programs.ags-v2.lockPkg = pkgs.writeShellApplication { - name = "lock"; - runtimeInputs = [agsFull]; - text = '' - export CONF="lock" - - if [ "$#" == 0 ]; then - exec ags run ${fullConfPath} - else - exec ags "$@" -i lock - fi - ''; + if [ "$#" == 0 ]; then + exec ags run ${fullConfPath} + else + exec ags "$@" -i lock + fi + ''; + }; }; home = { @@ -89,10 +100,10 @@ inherit (import "${self}/lib" {inherit pkgs self;}) buildNodeModules - buildNodeTypes + buildGirTypes ; in ( - (buildNodeTypes { + (buildGirTypes { pname = "agsV2"; configPath = "${agsConfigDir}/@girs"; packages = astalLibs; diff --git a/nixosModules/ags-v2/v1/README.md b/nixosModules/ags-v2/v1/README.md new file mode 100644 index 00000000..2c909dc4 --- /dev/null +++ b/nixosModules/ags-v2/v1/README.md @@ -0,0 +1 @@ +# Moving to [AGSv2](https://github.com/Aylur/ags/tree/v2) diff --git a/nixosModules/ags-v2/v1/config/global-types.d.ts b/nixosModules/ags-v2/v1/config/global-types.d.ts new file mode 100644 index 00000000..3d0a06be --- /dev/null +++ b/nixosModules/ags-v2/v1/config/global-types.d.ts @@ -0,0 +1,78 @@ +// For ./ts/bar/hovers/keyboard.ts +export interface Keyboard { + address: string + name: string + rules: string + model: string + layout: string + variant: string + options: string + active_keymap: string + main: boolean +} + +// For ./ts/media-player/gesture.ts +export interface Gesture { + attribute?: object + setup?(self: OverlayGeneric): void + props?: OverlayProps +} + +// For ./ts/media-player/mpris.ts +type PlayerDragProps = unknown & { dragging: boolean }; +export type PlayerDrag = AgsCenterBox< +unknown & Widget, unknown & Widget, unknown & Widget, unknown & PlayerDragProps +>; +interface Colors { + imageAccent: string + buttonAccent: string + buttonText: string + hoverAccent: string +} + +// For ./ts/media-player +export interface PlayerBoxProps { + bgStyle: string + player: MprisPlayer +} +export type PlayerBox = AgsCenterBox< +unknown & Widget, unknown & Widget, unknown & Widget, PlayerBoxProps +>; +export type PlayerOverlay = AgsOverlay; +export interface PlayerButtonType { + player: MprisPlayer + colors: Var + children: StackProps['children'] + onClick: string + prop: string +} + +// For ./ts/on-screen-keyboard +export type OskWindow = Window void + killGestureSigs: () => void + setSlideUp: () => void + setSlideDown: () => void +}>; + +// For ./ts/quick-settings +import { BluetoothDevice as BTDev } from 'types/service/bluetooth.ts'; +export interface APType { + bssid: string + address: string + lastSeen: number + ssid: string + active: boolean + strength: number + iconName: string +} +export type APBox = AgsBox }>; +export type DeviceBox = AgsBox; diff --git a/nixosModules/ags/config/scss/wim-widgets/osk.scss b/nixosModules/ags-v2/v1/config/scss/osk.scss similarity index 100% rename from nixosModules/ags/config/scss/wim-widgets/osk.scss rename to nixosModules/ags-v2/v1/config/scss/osk.scss diff --git a/nixosModules/ags/config/scss/wim-widgets/player.scss b/nixosModules/ags-v2/v1/config/scss/player.scss similarity index 100% rename from nixosModules/ags/config/scss/wim-widgets/player.scss rename to nixosModules/ags-v2/v1/config/scss/player.scss diff --git a/nixosModules/ags/config/scss/wim-widgets/quick-settings.scss b/nixosModules/ags-v2/v1/config/scss/quick-settings.scss similarity index 100% rename from nixosModules/ags/config/scss/wim-widgets/quick-settings.scss rename to nixosModules/ags-v2/v1/config/scss/quick-settings.scss diff --git a/nixosModules/ags/config/services/tablet.ts b/nixosModules/ags-v2/v1/config/services/tablet.ts similarity index 100% rename from nixosModules/ags/config/services/tablet.ts rename to nixosModules/ags-v2/v1/config/services/tablet.ts diff --git a/nixosModules/ags/config/ts/bar/items/heart.ts b/nixosModules/ags-v2/v1/config/ts/bar/heart.ts similarity index 100% rename from nixosModules/ags/config/ts/bar/items/heart.ts rename to nixosModules/ags-v2/v1/config/ts/bar/heart.ts diff --git a/nixosModules/ags/config/ts/bar/hovers/keyboard-layout.ts b/nixosModules/ags-v2/v1/config/ts/bar/keyboard-layout.ts similarity index 100% rename from nixosModules/ags/config/ts/bar/hovers/keyboard-layout.ts rename to nixosModules/ags-v2/v1/config/ts/bar/keyboard-layout.ts diff --git a/nixosModules/ags/config/ts/media-player/gesture.ts b/nixosModules/ags-v2/v1/config/ts/media-player/gesture.ts similarity index 100% rename from nixosModules/ags/config/ts/media-player/gesture.ts rename to nixosModules/ags-v2/v1/config/ts/media-player/gesture.ts diff --git a/nixosModules/ags/config/ts/media-player/mpris.ts b/nixosModules/ags-v2/v1/config/ts/media-player/mpris.ts similarity index 100% rename from nixosModules/ags/config/ts/media-player/mpris.ts rename to nixosModules/ags-v2/v1/config/ts/media-player/mpris.ts diff --git a/nixosModules/ags/config/ts/media-player/player.ts b/nixosModules/ags-v2/v1/config/ts/media-player/player.ts similarity index 100% rename from nixosModules/ags/config/ts/media-player/player.ts rename to nixosModules/ags-v2/v1/config/ts/media-player/player.ts diff --git a/nixosModules/ags/config/ts/on-screen-keyboard/gesture.ts b/nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/gesture.ts similarity index 100% rename from nixosModules/ags/config/ts/on-screen-keyboard/gesture.ts rename to nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/gesture.ts diff --git a/nixosModules/ags/config/ts/on-screen-keyboard/keyboard-layouts.ts b/nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/keyboard-layouts.ts similarity index 100% rename from nixosModules/ags/config/ts/on-screen-keyboard/keyboard-layouts.ts rename to nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/keyboard-layouts.ts diff --git a/nixosModules/ags/config/ts/on-screen-keyboard/keyboard.ts b/nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/keyboard.ts similarity index 100% rename from nixosModules/ags/config/ts/on-screen-keyboard/keyboard.ts rename to nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/keyboard.ts diff --git a/nixosModules/ags/config/ts/on-screen-keyboard/keys.ts b/nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/keys.ts similarity index 100% rename from nixosModules/ags/config/ts/on-screen-keyboard/keys.ts rename to nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/keys.ts diff --git a/nixosModules/ags/config/ts/on-screen-keyboard/main.ts b/nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/main.ts similarity index 100% rename from nixosModules/ags/config/ts/on-screen-keyboard/main.ts rename to nixosModules/ags-v2/v1/config/ts/on-screen-keyboard/main.ts diff --git a/nixosModules/ags/icons.nix b/nixosModules/ags-v2/v1/icons.nix similarity index 100% rename from nixosModules/ags/icons.nix rename to nixosModules/ags-v2/v1/icons.nix diff --git a/nixosModules/ags/README.md b/nixosModules/ags/README.md deleted file mode 100644 index 5edf71e2..00000000 --- a/nixosModules/ags/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# [AGS](https://github.com/Aylur/ags) - -## Nix - -This directory is the Nix entrypoint to my AGS configration. - -On system activation, if this module is imported, it will -generate the `config.js` of the host with the host's name -as the parameter in `transpileTypeScript` to support a different -setup per device. - -## Non-Nix - -To use this setup without Nix: - -```js -/* ~/.config/ags/config.js */ - -import { transpileTypeScript } from './js/utils.js'; - -export default (await transpileTypeScript('wim')).default; -``` - -If you want to try my main config, this is what you need to have -as your `config.js` after copying the contents of `./config` to -`~/.config/ags` - -## Dependencies - -The main dependencies to try it are as follows: - -- **bun** to transpile TS to JS -- **dart-sass** to compile SCSS to CSS -- **[coloryou](https://git.nelim.org/matt1432/nixos-configs/src/branch/master/common/pkgs/coloryou)** for media player colors -- **playerctl** for media player functionality - -If you're interested in my 2-1 laptop setup, you'll need: - -- **ydotool** for my custom on-screen keyboard -- **lisgd** to have touch screen gestures diff --git a/nixosModules/ags/clipboard/default.nix b/nixosModules/ags/clipboard/default.nix deleted file mode 100644 index c9487b9a..00000000 --- a/nixosModules/ags/clipboard/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - cliphist, - gawk, - imagemagick, - ripgrep, - writeShellApplication, - ... -}: -writeShellApplication { - name = "clipboard-manager"; - runtimeInputs = [ - cliphist - gawk - imagemagick - ripgrep - ]; - - text = builtins.readFile ./script.sh; -} diff --git a/nixosModules/ags/clipboard/script.sh b/nixosModules/ags/clipboard/script.sh deleted file mode 100755 index 01e7bde2..00000000 --- a/nixosModules/ags/clipboard/script.sh +++ /dev/null @@ -1,45 +0,0 @@ -set +o errexit - -# Modified from https://github.com/sentriz/cliphist/blob/master/contrib/cliphist-wofi-img - -# set up thumbnail directory -thumb_dir="/tmp/cliphist/thumbs" -mkdir -p "$thumb_dir" - -cliphist_list="$(cliphist list)" - -# delete thumbnails in cache but not in cliphist -for thumb in "$thumb_dir"/*; do - clip_id="${thumb##*/}" - clip_id="${clip_id%.*}" - check=$(rg <<< "$cliphist_list" "^$clip_id\s") - if [ -z "$check" ]; then - >&2 rm -v "$thumb" - fi -done - -# create thumbnail if image not processed already -read -r -d '' prog <' $thumb_dir/"image ) - print "img:$thumb_dir/"image - next -} - -1 -EOF - -output=$(gawk <<< "$cliphist_list" "$prog") - -# Use a while loop with read to iterate over each line -echo "$output" | while IFS= read -r line; do - if [[ ! $line =~ ^img:/tmp/cliphist/thumbs ]]; then - [[ $line =~ ([0-9]+) ]] - line=${BASH_REMATCH[1]} - fi - - echo "$line" -done diff --git a/nixosModules/ags/config/.envrc b/nixosModules/ags/config/.envrc deleted file mode 100644 index 674cafba..00000000 --- a/nixosModules/ags/config/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake "$FLAKE#node" diff --git a/nixosModules/ags/config/binto.ts b/nixosModules/ags/config/binto.ts deleted file mode 100644 index 5e0ef631..00000000 --- a/nixosModules/ags/config/binto.ts +++ /dev/null @@ -1,40 +0,0 @@ -import Brightness from './services/brightness.ts'; -import GSR from './services/gpu-screen-recorder.ts'; -import Pointers from './services/pointers.ts'; - -import AppLauncher from './ts/applauncher/main.ts'; -import Bar from './ts/bar/binto.ts'; -import Clipboard from './ts/clipboard/main.ts'; -import Calendar from './ts/date/binto.ts'; -import { NotifPopups, NotifCenter } from './ts/notifications/binto.ts'; -import OSD from './ts/osd/main.ts'; -import Powermenu from './ts/powermenu.ts'; -import Screenshot from './ts/screenshot/main.ts'; - - -// TODO: add workspace indicator -App.config({ - icons: './icons', - - onConfigParsed: () => { - Brightness.capsName = 'input30::capslock'; - globalThis.Brightness = Brightness; - globalThis.Pointers = Pointers; - setTimeout(() => { - globalThis.GSR = new GSR(); - }, 1000); - }, - - windows: () => [ - AppLauncher(), - Calendar(), - Clipboard(), - NotifCenter(), - Powermenu(), - Screenshot(), - - Bar(), - NotifPopups(), - OSD(), - ], -}); diff --git a/nixosModules/ags/config/eslint.config.ts b/nixosModules/ags/config/eslint.config.ts deleted file mode 100644 index 9c6f19fa..00000000 --- a/nixosModules/ags/config/eslint.config.ts +++ /dev/null @@ -1,452 +0,0 @@ -import eslint from '@eslint/js'; -import jsdoc from 'eslint-plugin-jsdoc'; -import stylistic from '@stylistic/eslint-plugin'; -import tseslint from 'typescript-eslint'; - - -export default tseslint.config({ - // @ts-expect-error this should work - files: ['**/*.js', '**/*.ts'], - ignores: ['node_modules/**', 'types/**'], - - extends: [ - eslint.configs.recommended, - jsdoc.configs['flat/recommended-typescript'], - stylistic.configs['recommended-flat'], - ...tseslint.configs.recommended, - ...tseslint.configs.stylistic, - ], - - rules: { - // JSDoc settings - 'jsdoc/tag-lines': ['warn', 'any', { startLines: 1 }], - 'jsdoc/check-line-alignment': ['warn', 'always', { - tags: ['param', 'arg', 'argument', 'property', 'prop'], - }], - 'jsdoc/no-types': 'off', - - // Newer settings - '@typescript-eslint/no-extraneous-class': ['off'], - '@typescript-eslint/no-implied-eval': ['off'], - 'class-methods-use-this': 'off', - '@stylistic/no-multiple-empty-lines': 'off', - - // Pre-flat config - '@typescript-eslint/no-unused-vars': [ - 'error', - { - args: 'all', - argsIgnorePattern: '^_', - caughtErrors: 'all', - caughtErrorsIgnorePattern: '^_', - destructuredArrayIgnorePattern: '^_', - varsIgnorePattern: '^_', - ignoreRestSiblings: true, - }, - ], - - 'array-callback-return': [ - 'error', - { - allowImplicit: true, - checkForEach: true, - }, - ], - 'no-constructor-return': [ - 'error', - ], - 'no-unreachable-loop': [ - 'error', - { - ignore: [ - 'ForInStatement', - 'ForOfStatement', - ], - }, - ], - 'no-use-before-define': [ - 'error', - { - functions: false, - }, - ], - 'block-scoped-var': [ - 'error', - ], - 'curly': [ - 'warn', - ], - 'default-case-last': [ - 'warn', - ], - 'default-param-last': [ - 'error', - ], - 'eqeqeq': [ - 'error', - 'smart', - ], - 'func-names': [ - 'warn', - 'never', - ], - 'func-style': [ - 'warn', - 'expression', - ], - 'logical-assignment-operators': [ - 'warn', - 'always', - ], - 'no-array-constructor': [ - 'error', - ], - 'no-empty-function': [ - 'warn', - ], - 'no-empty-static-block': [ - 'warn', - ], - 'no-extend-native': [ - 'error', - ], - 'no-extra-bind': [ - 'warn', - ], - 'no-implicit-coercion': [ - 'warn', - ], - 'no-iterator': [ - 'error', - ], - 'no-labels': [ - 'error', - ], - 'no-lone-blocks': [ - 'error', - ], - 'no-lonely-if': [ - 'error', - ], - 'no-loop-func': [ - 'error', - ], - 'no-magic-numbers': [ - 'error', - { - ignore: [ - -1, - 0.1, - 0, - 1, - 2, - 3, - 4, - 5, - 10, - 12, - 33, - 66, - 100, - 255, - 360, - 450, - 500, - 1000, - ], - ignoreDefaultValues: true, - ignoreClassFieldInitialValues: true, - }, - ], - 'no-multi-assign': [ - 'error', - ], - 'no-new-wrappers': [ - 'error', - ], - 'no-object-constructor': [ - 'error', - ], - 'no-proto': [ - 'error', - ], - 'no-return-assign': [ - 'error', - ], - 'no-sequences': [ - 'error', - ], - 'no-shadow': [ - 'error', - { - builtinGlobals: true, - allow: [ - 'Window', - ], - }, - ], - 'no-undef-init': [ - 'warn', - ], - 'no-undefined': [ - 'error', - ], - 'no-useless-constructor': [ - 'warn', - ], - 'no-useless-escape': [ - 'off', - ], - 'no-useless-return': [ - 'error', - ], - 'no-var': [ - 'error', - ], - 'no-void': [ - 'off', - ], - 'no-with': [ - 'error', - ], - 'object-shorthand': [ - 'error', - 'always', - ], - 'one-var': [ - 'error', - 'never', - ], - 'operator-assignment': [ - 'warn', - 'always', - ], - 'prefer-arrow-callback': [ - 'error', - ], - 'prefer-const': [ - 'error', - ], - 'prefer-object-has-own': [ - 'error', - ], - 'prefer-regex-literals': [ - 'error', - ], - 'prefer-template': [ - 'warn', - ], - 'no-prototype-builtins': 'off', - '@typescript-eslint/no-var-requires': [ - 'off', - ], - '@stylistic/array-bracket-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/array-bracket-spacing': [ - 'warn', - 'never', - ], - '@stylistic/arrow-parens': [ - 'warn', - 'always', - ], - '@stylistic/brace-style': [ - 'warn', - 'stroustrup', - ], - '@stylistic/comma-dangle': [ - 'warn', - 'always-multiline', - ], - '@stylistic/comma-spacing': [ - 'warn', - { - before: false, - after: true, - }, - ], - '@stylistic/comma-style': [ - 'error', - 'last', - ], - '@stylistic/dot-location': [ - 'error', - 'property', - ], - '@stylistic/function-call-argument-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/function-paren-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/indent': [ - 'warn', - 4, - { - SwitchCase: 1, - ignoreComments: true, - ignoredNodes: ['TemplateLiteral > *'], - }, - ], - '@stylistic/key-spacing': [ - 'warn', - { - beforeColon: false, - afterColon: true, - }, - ], - '@stylistic/keyword-spacing': [ - 'warn', - { - before: true, - }, - ], - '@stylistic/linebreak-style': [ - 'error', - 'unix', - ], - '@stylistic/lines-between-class-members': [ - 'warn', - 'always', - { - exceptAfterSingleLine: true, - }, - ], - '@stylistic/max-len': [ - 'warn', - { - code: 105, - ignoreComments: true, - ignoreTrailingComments: true, - ignoreUrls: true, - }, - ], - '@stylistic/multiline-ternary': [ - 'warn', - 'always-multiline', - ], - '@stylistic/new-parens': [ - 'error', - ], - '@stylistic/no-mixed-operators': [ - 'warn', - ], - '@stylistic/no-mixed-spaces-and-tabs': [ - 'error', - ], - '@stylistic/no-multi-spaces': [ - 'error', - ], - '@stylistic/no-tabs': [ - 'error', - ], - '@stylistic/no-trailing-spaces': [ - 'error', - ], - '@stylistic/no-whitespace-before-property': [ - 'warn', - ], - '@stylistic/nonblock-statement-body-position': [ - 'error', - 'below', - ], - '@stylistic/object-curly-newline': [ - 'warn', - { - consistent: true, - }, - ], - '@stylistic/object-curly-spacing': [ - 'warn', - 'always', - ], - '@stylistic/operator-linebreak': [ - 'warn', - 'after', - ], - '@stylistic/padded-blocks': [ - 'error', - 'never', - ], - '@stylistic/padding-line-between-statements': [ - 'warn', - { - blankLine: 'always', - prev: '*', - next: 'return', - }, - { - blankLine: 'always', - prev: [ - 'const', - 'let', - 'var', - ], - next: '*', - }, - { - blankLine: 'any', - prev: [ - 'const', - 'let', - 'var', - ], - next: [ - 'const', - 'let', - 'var', - ], - }, - { - blankLine: 'always', - prev: [ - 'case', - 'default', - ], - next: '*', - }, - ], - '@stylistic/quote-props': [ - 'error', - 'consistent-as-needed', - ], - '@stylistic/quotes': [ - 'error', - 'single', - { - avoidEscape: true, - }, - ], - '@stylistic/semi': [ - 'error', - 'always', - ], - '@stylistic/semi-spacing': [ - 'warn', - ], - '@stylistic/space-before-blocks': [ - 'warn', - ], - '@stylistic/space-before-function-paren': [ - 'warn', - 'never', - ], - '@stylistic/space-infix-ops': [ - 'warn', - ], - '@stylistic/spaced-comment': [ - 'warn', - 'always', - ], - '@stylistic/switch-colon-spacing': [ - 'warn', - ], - '@stylistic/wrap-regex': [ - 'warn', - ], - }, -}); diff --git a/nixosModules/ags/config/global-types.d.ts b/nixosModules/ags/config/global-types.d.ts deleted file mode 100644 index 52855870..00000000 --- a/nixosModules/ags/config/global-types.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { Widget } from 'types/@girs/gtk-3.0/gtk-3.0.cjs'; -import GObject from 'types/@girs/gobject-2.0/gobject-2.0'; - -import { Variable as Var } from 'types/variable'; -import { Widget as agsWidget } from 'types/widgets/widget'; -export type AgsWidget = agsWidget & Widget; - -// Generic widgets -import AgsBox from 'types/widgets/box.ts'; -export type BoxGeneric = AgsBox; - -import AgsCenterBox, { CenterBoxProps } from 'types/widgets/centerbox'; -export type CenterBoxGeneric = AgsCenterBox< -unknown & Widget, unknown & Widget, unknown & Widget, unknown ->; -export type CenterBoxPropsGeneric = CenterBoxProps< -unknown & Widget, unknown & Widget, unknown & Widget, unknown ->; - -import AgsEventBox from 'types/widgets/eventbox'; -export type EventBoxGeneric = AgsEventBox; - -import AgsIcon, { IconProps } from 'types/widgets/icon'; -export type IconGeneric = AgsIcon; -export type IconPropsGeneric = IconProps; - -import AgsLabel from 'types/widgets/label'; -export type LabelGeneric = AgsLabel; - -import AgsOverlay, { OverlayProps } from 'types/widgets/overlay'; -export type OverlayGeneric = AgsOverlay; - -import AgsProgressBar from 'types/widgets/progressbar'; -export type ProgressBarGeneric = AgsProgressBar; - -import AgsRevealer, { RevealerProps } from 'types/widgets/revealer'; -export type RevealerGeneric = AgsRevealer; - -import AgsStack, { StackProps } from 'types/widgets/stack'; -export type StackGeneric = AgsStack, unknown>; - -import AgsScrollable from 'types/widgets/scrollable'; -export type ScrollableGeneric = AgsScrollable; - -import AgsWindow from 'types/widgets/window'; -export type WindowGeneric = AgsWindow; - - -// For ./ts/applauncher/main.ts -import { Application } from 'types/service/applications.ts'; -import { CursorBoxProps } from 'ts/misc/cursorbox'; -export type AgsAppItem = AgsEventBox>; - -// For ./ts/bar/hovers/keyboard.ts -export interface Keyboard { - address: string - name: string - rules: string - model: string - layout: string - variant: string - options: string - active_keymap: string - main: boolean -} - -// For ./ts/bar/items/workspaces.ts -// TODO: improve type -export type Workspace = AgsRevealer; - -// For ./ts/bar/fullscreen.ts -export type DefaultProps = RevealerProps; - -// For ./ts/media-player/gesture.ts -export interface Gesture { - attribute?: object - setup?(self: OverlayGeneric): void - props?: OverlayProps -} - -// For ./ts/media-player/mpris.ts -type PlayerDragProps = unknown & { dragging: boolean }; -export type PlayerDrag = AgsCenterBox< -unknown & Widget, unknown & Widget, unknown & Widget, unknown & PlayerDragProps ->; -interface Colors { - imageAccent: string - buttonAccent: string - buttonText: string - hoverAccent: string -} - -// For ./ts/media-player -export interface PlayerBoxProps { - bgStyle: string - player: MprisPlayer -} -export type PlayerBox = AgsCenterBox< -unknown & Widget, unknown & Widget, unknown & Widget, PlayerBoxProps ->; -export type PlayerOverlay = AgsOverlay; -export interface PlayerButtonType { - player: MprisPlayer - colors: Var - children: StackProps['children'] - onClick: string - prop: string -} - -// For ./ts/notifications/gesture.js -interface NotifGestureProps { - dragging: boolean - hovered: boolean - ready: boolean - id: number - slideAway(side: 'Left' | 'Right'): void -} -export type NotifGesture = AgsEventBox; - -// For ./ts/osd/ctor.ts -export type OSDStack = AgsStack; -export type ConnectFunc = (self?: ProgressBarGeneric) => void; -export interface OSD { - name: string - icon: IconPropsGeneric['icon'] - info: { - mod: GObject.Object - signal?: string | string[] - logic?(self: ProgressBarGeneric): void - widget?: AgsWidget - } -} - -// For ./ts/on-screen-keyboard -export type OskWindow = Window void - killGestureSigs: () => void - setSlideUp: () => void - setSlideDown: () => void -}>; - -// For CursorBox -import { CursorBox, CursorBoxProps } from 'ts/misc/cursorbox'; -export type CursorBox = CursorBox; -export type CursorBoxProps = CursorBoxProps; - -// For PopupWindow -export type HyprTransition = 'slide' | 'slide top' | 'slide bottom' | 'slide left' | - 'slide right' | 'popin' | 'fade'; -export type CloseType = 'none' | 'stay' | 'released' | 'clicked'; -import { PopupWindow } from 'ts/misc/popup'; -export type PopupWindow = PopupWindow; - -// For ./ts/quick-settings -import { BluetoothDevice as BTDev } from 'types/service/bluetooth.ts'; -export interface APType { - bssid: string - address: string - lastSeen: number - ssid: string - active: boolean - strength: number - iconName: string -} -export type APBox = AgsBox }>; -export type DeviceBox = AgsBox; diff --git a/nixosModules/ags/config/js/utils.js b/nixosModules/ags/config/js/utils.js deleted file mode 100644 index ed83a97a..00000000 --- a/nixosModules/ags/config/js/utils.js +++ /dev/null @@ -1,52 +0,0 @@ -const { execAsync, monitorFile } = Utils; - - -/** - * @param {string} host the name of the machine/user who's running ags - */ -const watchAndCompileSass = (host) => { - const reloadCss = () => { - const scss = `${App.configDir}/scss/${host}.scss`; - const css = `/tmp/ags-${host}/style.css`; - - execAsync(`sass ${scss} ${css}`).then(() => { - App.resetCss(); - App.applyCss(css); - }).catch(print); - }; - - monitorFile( - `${App.configDir}/scss`, - reloadCss, - ); - reloadCss(); -}; - -/** - * @param {string} host the name of the machine/user who's running ags - * @returns the config - */ -export const transpileTypeScript = async(host) => { - const outPath = `/tmp/ags-${host}/index.js`; - - await execAsync([ - 'bash', '-c', - // Create the dir if it doesn't exist - `mkdir -p /tmp/ags-${host}; ` + - - // Let bun see tsconfig.json - `cd ${App.configDir};` + - - `bun build ${App.configDir}/${host === 'lockscreen' ? 'ts/lockscreen/main' : host}.ts ` + - '--external resource:///* ' + - '--external gi://* ' + - '--external cairo ' + - - // Since bun wants to write in cwd, we just redirect stdin instead - `> ${outPath}`, - ]).catch(print); - - watchAndCompileSass(host); - - return await import(`file://${outPath}`); -}; diff --git a/nixosModules/ags/config/lockscreen.js b/nixosModules/ags/config/lockscreen.js deleted file mode 100644 index ebbbbe29..00000000 --- a/nixosModules/ags/config/lockscreen.js +++ /dev/null @@ -1,3 +0,0 @@ -import { transpileTypeScript } from './js/utils.js'; - -export default (await transpileTypeScript('lockscreen')).default; diff --git a/nixosModules/ags/config/package-lock.json b/nixosModules/ags/config/package-lock.json deleted file mode 100644 index 3b346eed..00000000 Binary files a/nixosModules/ags/config/package-lock.json and /dev/null differ diff --git a/nixosModules/ags/config/package.json b/nixosModules/ags/config/package.json deleted file mode 100644 index ec833960..00000000 --- a/nixosModules/ags/config/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ags-node-modules", - "version": "0.0.0", - "main": "config.js", - "type": "module", - "dependencies": { - "@eslint/js": "9.13.0", - "@stylistic/eslint-plugin": "2.9.0", - "@types/eslint__js": "8.42.3", - "@types/node": "22.7.7", - "eslint": "9.13.0", - "eslint-plugin-jsdoc": "50.4.3", - "fzf": "0.5.2", - "jiti": "2.3.3", - "typescript": "5.6.3", - "typescript-eslint": "8.10.0" - } -} diff --git a/nixosModules/ags/config/scss/binto-widgets/applauncher.scss b/nixosModules/ags/config/scss/binto-widgets/applauncher.scss deleted file mode 100644 index c4a141df..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/applauncher.scss +++ /dev/null @@ -1,95 +0,0 @@ -.applauncher { - all: unset; - border: 2px solid $contrast-bg; - background-color: $bg; - color: #f8f8f2; - padding: 2px; - - * { - font-size: 16px; - } - - list, - row { - all: unset; - } - - .header { - margin: 16.2px; - margin-bottom: 0; - - image, - entry { - all: unset; - border-radius: 9px; - color: #f8f8f2; - background-color: rgba(#44475a, 0.6); - border: 1px solid #44475a; - padding: 4.5px; - } - - image { - margin-right: 9px; - -gtk-icon-transform: scale(0.8); - font-size: 25.6px; - } - } - - scrolledwindow { - padding: 10px; - padding-bottom: 0; - min-width: 900px; - min-height: 650px; - } - - .placeholder { - margin-top: 9px; - color: #f8f8f2; - font-size: 1.2em; - } - - .app { - all: unset; - transition: 200ms; - border-radius: 9px; - - label { - transition: 200ms; - - &.title { - margin-top: 20px; - color: #f8f8f2; - } - - &.description { - color: rgba(238, 238, 238, 0.7); - } - } - - image { - transition: 200ms; - margin: 0 8px; - } - - &:active { - background-color: rgba($contrast-bg, 0.5); - box-shadow: inset 0 0 0 3px rgba(238, 238, 238, 0.03); - } - } - - *:selected, - .app:hover, - .app:focus { - * { - font-weight: unset; - } - - label.title { - color: $contrast-bg; - } - - image { - -gtk-icon-shadow: 2px 2px $contrast-bg; - } - } -} diff --git a/nixosModules/ags/config/scss/binto-widgets/bar.scss b/nixosModules/ags/config/scss/binto-widgets/bar.scss deleted file mode 100644 index 672b2e8c..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/bar.scss +++ /dev/null @@ -1,41 +0,0 @@ -.bar { - - .clock, - .notif-panel { - border: 2px solid $contrast-bg; - padding: 4.5px 7px; - background-color: $bgfull; - } - - .sys-tray { - border: 2px solid $contrast-bg; - - menubar { - background-color: $bgfull; - padding: 2.5px; - } - - menuitem { - image { - color: #CBA6F7; - } - - padding: 0 2px; - - * { - font-size: 25px; - } - } - - menuitem:first-child image { - padding-left: 4px; - } - } - - .current-window { - border: 2px solid $contrast-bg; - font-size: 18px; - padding-right: 7px; - background-color: $bgfull; - } -} diff --git a/nixosModules/ags/config/scss/binto-widgets/clipboard.scss b/nixosModules/ags/config/scss/binto-widgets/clipboard.scss deleted file mode 100644 index 79da8ea6..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/clipboard.scss +++ /dev/null @@ -1,62 +0,0 @@ -.clipboard { - all: unset; - border: 2px solid $contrast-bg; - background-color: $bg; - color: #f8f8f2; - padding: 2px; - - * { - font-size: 16px; - } - - list, - row { - all: unset; - } - - .header { - margin: 16.2px; - margin-bottom: 0; - - image, - entry { - all: unset; - border-radius: 9px; - color: #f8f8f2; - background-color: rgba(#44475a, 0.6); - border: 1px solid #44475a; - padding: 4.5px; - } - - image { - margin-right: 9px; - -gtk-icon-transform: scale(0.8); - font-size: 25.6px; - } - } - - scrolledwindow { - padding: 10px; - padding-bottom: 0; - min-width: 900px; - min-height: 750px; - } - - .item { - all: unset; - transition: 200ms; - border-radius: 9px; - padding: 10px; - } - - *:selected .item, - *:hover .item, - *:focus .item { - background-color: #363449; - } - - .down-arrow { - transition: all 500ms; - opacity: 0.5; - } -} diff --git a/nixosModules/ags/config/scss/binto-widgets/date.scss b/nixosModules/ags/config/scss/binto-widgets/date.scss deleted file mode 100644 index 967f5793..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/date.scss +++ /dev/null @@ -1,74 +0,0 @@ -.date { - background-color: $bg; - color: $fg; - border: 2px solid $contrast-bg; -} - -.timebox { - margin: 30px 0; - - .time-container { - .content { - font-weight: bolder; - font-size: 60px; - } - - .divider { - margin: 8px 15px; - padding: 0 1px; - background: linear-gradient($red, $magenta, $blue, $cyan); - } - } - - .date-container { - margin-top: 2px; - } -} - -.cal-box { - border-radius: 30px; - padding: 0 1rem .2rem; - color: $fg; - background-color: $bgfull; - border-bottom: 2px solid $contrast-bg; - border-top: 2px solid $contrast-bg; - margin: 0 12px 18px; - - .cal { - font-size: 20px; - background-color: inherit; - padding: .5rem .10rem 0; - margin-left: 10px; - border-radius: 30px; - - &>* { - border: solid 0 transparent; - } - - &.highlight { - padding: 10rem; - } - } -} - -calendar:selected { - color: $cyan; -} - -calendar.header { - color: $cyan; - font-weight: bold; -} - -calendar.button { - color: $cyan; -} - -calendar.highlight { - color: $green; - font-weight: bold; -} - -calendar:indeterminate { - color: $lightblack; -} diff --git a/nixosModules/ags/config/scss/binto-widgets/notification-center.scss b/nixosModules/ags/config/scss/binto-widgets/notification-center.scss deleted file mode 100644 index e8e4a7e2..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/notification-center.scss +++ /dev/null @@ -1,109 +0,0 @@ -.notification-center { - border: 2px solid $contrast-bg; - min-height: 700px; - min-width: 524px; - background: $bg; - padding: 0; - - * { - font-size: 16px; - } - - .header { - padding: 10px; - margin-top: 22px; - margin-bottom: 9px; - - label { - font-size: 22px; - } - - .clear { - box { - all: unset; - transition: 200ms; - color: #eee; - background-color: #664C90; - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - padding: 4.5px 9px; - } - - &:hover box { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: rgba(238, 238, 238, 0.154); - color: #f1f1f1; - } - - &.disabled box { - box-shadow: none; - background-color: rgba(#664C90, 0.3); - color: rgba(238, 238, 238, 0.3); - } - - label { - font-size: 1.2em; - } - } - } - - .notification-list-box { - background: $bgfull; - padding: 0 12px; - border-top: 2px solid $contrast-bg; - - scrollbar { - all: unset; - border-radius: 8px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - - * { - all: unset; - } - - &:hover { - border-radius: 8px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - } - - scrollbar.vertical { - transition: 200ms; - background-color: rgba(23, 23, 23, 0.3); - - &:hover { - background-color: rgba(23, 23, 23, 0.7); - - slider { - background-color: rgba(238, 238, 238, 0.7); - min-width: .6em; - } - } - - slider { - background-color: rgba(238, 238, 238, 0.5); - border-radius: 9px; - min-width: .4em; - min-height: 2em; - transition: 200ms; - } - } - } - - .placeholder { - color: white; - - image { - font-size: 7em; - text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - -gtk-icon-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - } - - label { - font-size: 1.2em; - text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - -gtk-icon-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - } - } -} diff --git a/nixosModules/ags/config/scss/binto-widgets/notification.scss b/nixosModules/ags/config/scss/binto-widgets/notification.scss deleted file mode 100644 index 24d37863..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/notification.scss +++ /dev/null @@ -1,207 +0,0 @@ -$background-color-1: rgba(238, 238, 238, 0.154); -$background-color-2: rgba(230, 112, 144, 0.5); -$background-color-3: rgba(238, 238, 238, 0.06); -$background-color-4: #51a4e7; -$background-color-5: transparent; -$background-color-6: #171717; -$background-color-7: rgba(23, 23, 23, 0.3); -$background-color-8: rgba(23, 23, 23, 0.7); -$background-color-9: rgba(238, 238, 238, 0.7); -$background-color-10: rgba(238, 238, 238, 0.5); - -.notification.critical { - >box { - box-shadow: inset 0 0 0.5em 0 #e67090; - } -} - -.notification { - >box { - all: unset; - box-shadow: 0 0 4.5px 0 rgba(0, 0, 0, 0.4); - margin: 9px 9px 0; - background-color: $bg; - padding: 16.2px; - border: 2px solid $contrast-bg; - - * { - font-size: 16px; - } - } - - &:hover { - .close-button { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-1; - background-color: $background-color-2; - } - } - - .title { - margin-right: 9px; - font-size: 1.1em; - } - - .description { - font-size: .9em; - min-width: 350px; - } - - .icon { - margin-right: 9px; - } - - .icon.img { - border: 1px solid rgba(238, 238, 238, 0.03); - } - - .actions { - button { - all: unset; - transition: all 500ms; - background-color: $background-color-3; - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - font-size: 1.2em; - padding: 4.5px 9px; - margin: 9px 4.5px 0; - - * { - font-size: 16px; - } - - &:focus { - box-shadow: inset 0 0 0 1px #51a4e7; - background-color: $background-color-1; - } - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-1; - } - - &:active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:checked { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:disabled { - box-shadow: none; - background-color: $background-color-5; - } - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - } - - button.on { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - button.active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - } - - button.close-button { - all: unset; - transition: all 500ms; - background-color: $background-color-5; - background-image: none; - box-shadow: none; - margin-left: 9px; - min-width: 1.2em; - min-height: 1.2em; - - * { - font-size: 16px; - } - - &:focus { - box-shadow: inset 0 0 0 1px #51a4e7; - background-color: $background-color-1; - } - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-1; - background-color: $background-color-2; - } - - &:active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-4; - background-image: linear-gradient(#e67090, #e67090); - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:checked { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:disabled { - box-shadow: none; - background-color: $background-color-5; - } - } - - button.close-button.on { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - button.close-button.active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } -} diff --git a/nixosModules/ags/config/scss/binto-widgets/osd.scss b/nixosModules/ags/config/scss/binto-widgets/osd.scss deleted file mode 100644 index ce667ce4..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/osd.scss +++ /dev/null @@ -1,40 +0,0 @@ -.osd { - padding: 12px 20px; - background: rgba(40, 42, 54, 0.8); - border: 2px solid $contrast-bg; - - label { - min-width: 170px; - } - - progressbar:disabled { - opacity: 0.5; - } - - progressbar { - min-height: 6px; - min-width: 170px; - border-radius: 999px; - background: transparent; - border: none; - - trough { - background: #363847; - min-height: inherit; - border: none; - } - - progress { - background: #79659f; - min-height: inherit; - border: none; - } - } - - image { - font-size: 2rem; - color: white; - margin-left: -0.4rem; - margin-right: 0.8rem; - } -} diff --git a/nixosModules/ags/config/scss/binto-widgets/powermenu.scss b/nixosModules/ags/config/scss/binto-widgets/powermenu.scss deleted file mode 100644 index 107eb4db..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/powermenu.scss +++ /dev/null @@ -1,48 +0,0 @@ -.powermenu { - background-color: $bg; - color: $fg; - padding: 10px; - font-family: "MesloLGS NF"; - - font-size: 70px; - border: 2px solid $contrast-bg; - - label { - min-width: 140px; - min-height: 130px; - } - - .button { - margin: 5px 10px; - min-width: 80px; - transition: all ease .2s; - - &:hover { - background-color: $bg-secondary; - } - - &:active { - background-color: $bg-secondary; - } - - .content { - padding: 0 15px; - } - } - - .shutdown { - color: $red; - } - - .reboot { - color: $magenta; - } - - .logout { - color: $yellow; - } -} - -.powermenu-clickhandler { - background-color: black; -} diff --git a/nixosModules/ags/config/scss/binto-widgets/screenshot.scss b/nixosModules/ags/config/scss/binto-widgets/screenshot.scss deleted file mode 100644 index 2bc191d6..00000000 --- a/nixosModules/ags/config/scss/binto-widgets/screenshot.scss +++ /dev/null @@ -1,66 +0,0 @@ -.screenshot { - background-color: $bg; - color: $fg; - border: 2px solid $contrast-bg; - - label { - font-size: 20pt; - } - - .header { - border-bottom: 2px solid $contrast-bg; - - .header-btn { - transition: 200ms; - - &:hover { - background-color: rgba(23, 23, 23, 0.7); - - image { - -gtk-icon-shadow: 1px 1px $contrast-bg; - } - } - - label { - margin: 10px; - font-weight: bold; - } - - image { - font-size: 30px; - } - } - } - - scrolledwindow { - min-height: 400px; - min-width: 800px; - padding: 0 10px; - - box { - .item-btn { - transition: 200ms; - - &:hover { - background-color: rgba(23, 23, 23, 0.7); - } - } - - label { - padding: 5px; - } - - image { - font-size: 30px; - } - - &:first-child label { - padding-top: 10px; - } - - &:last-child label { - padding-bottom: 10px; - } - } - } -} diff --git a/nixosModules/ags/config/scss/binto.scss b/nixosModules/ags/config/scss/binto.scss deleted file mode 100644 index c82b046e..00000000 --- a/nixosModules/ags/config/scss/binto.scss +++ /dev/null @@ -1,20 +0,0 @@ -window, -button, -eventbox, -box, -progressbar, -trough, -undershoot { - all: unset; -} - -@import './common'; -@import './binto-widgets/applauncher'; -@import './binto-widgets/bar'; -@import './binto-widgets/clipboard'; -@import './binto-widgets/date'; -@import './binto-widgets/notification'; -@import './binto-widgets/notification-center'; -@import './binto-widgets/osd'; -@import './binto-widgets/powermenu'; -@import './binto-widgets/screenshot'; diff --git a/nixosModules/ags/config/scss/common.scss b/nixosModules/ags/config/scss/common.scss deleted file mode 100644 index 81cef63b..00000000 --- a/nixosModules/ags/config/scss/common.scss +++ /dev/null @@ -1,65 +0,0 @@ -$darkbg: #0b0d16; -$bg: rgba(40, 42, 54, 0.8); // rgba(69, 71, 90, 0.3); #0d0f18; -$bgfull: rgb(40, 42, 54); -$contrast-bg: rgba(189, 147, 249, 0.8); -$contrast-bg-full: rgba(189, 147, 249, 1); -$bg-secondary: rgba(#382c4a, 0.8); -$bg-secondary-alt: #a5b6cf; -$fg: #a5b6cf; -$fg-dim: #a5b6cf; -$watermelon: #dd6777; - -// Aliases -$background: $bg; -$background-secondary: $bg-secondary; -$background-secondary-alt: $bg-secondary-alt; -$foreground: $fg; -$foreground-dim: $fg-dim; - -$black: #151720; -$dimblack: #1a1c25; -$lightblack: #262831; -$red: #dd6777; -$blue: #86aaec; -$cyan: #93cee9; -$blue-desaturated: #93cee9; -$magenta: #c296eb; -$purple: #c296eb; -$green: #90ceaa; -$aquamarine: #90ceaa; -$yellow: #ecd3a0; -$accent: $blue; -$javacafe-magenta: #c296eb; -$javacafe-blue: #86aaec; - - -scrolledwindow { - - scrollbar, - scrollbar * { - all: unset; - } - - scrollbar.vertical { - transition: 200ms; - background-color: rgba(23, 23, 23, 0.3); - margin: 20px 0; - - &:hover { - background-color: rgba(23, 23, 23, 0.7); - - slider { - background-color: rgba(238, 238, 238, 0.7); - min-width: .6em; - } - } - - slider { - background-color: rgba(238, 238, 238, 0.5); - border-radius: 9px; - min-width: .4em; - min-height: 2em; - transition: 200ms; - } - } -} diff --git a/nixosModules/ags/config/scss/lockscreen.scss b/nixosModules/ags/config/scss/lockscreen.scss deleted file mode 100644 index 8a428e53..00000000 --- a/nixosModules/ags/config/scss/lockscreen.scss +++ /dev/null @@ -1,10 +0,0 @@ -@import './common'; - -window { - background-color: transparent; -} - -.clock { - font-size: 80pt; - font-family: 'Ubuntu Mono'; -} diff --git a/nixosModules/ags/config/scss/wim-widgets/applauncher.scss b/nixosModules/ags/config/scss/wim-widgets/applauncher.scss deleted file mode 100644 index 026098a2..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/applauncher.scss +++ /dev/null @@ -1,95 +0,0 @@ -.applauncher { - all: unset; - border: 2px solid $contrast-bg; - border-radius: 25px; - background-color: $bg; - color: #f8f8f2; - padding: 2px; - - * { - font-size: 16px; - } - - list, - row { - all: unset; - } - - .header { - margin: 16.2px; - margin-bottom: 0; - - image, - entry { - all: unset; - border-radius: 9px; - color: #f8f8f2; - background-color: rgba(#44475a, 0.6); - border: 1px solid #44475a; - padding: 4.5px; - } - - image { - margin-right: 9px; - -gtk-icon-transform: scale(0.8); - font-size: 25.6px; - } - } - - scrolledwindow { - padding: 10px; - padding-bottom: 0; - min-width: 700px; - min-height: 450px; - } - - .placeholder { - margin-top: 9px; - color: #f8f8f2; - font-size: 1.2em; - } - - .app { - all: unset; - transition: 200ms; - border-radius: 9px; - - label { - transition: 200ms; - - &.title { - color: #f8f8f2; - } - - &.description { - color: rgba(238, 238, 238, 0.7); - } - } - - image { - transition: 200ms; - margin: 0 8px; - } - - &:active { - background-color: rgba($contrast-bg, 0.5); - box-shadow: inset 0 0 0 3px rgba(238, 238, 238, 0.03); - } - } - - *:selected, - .app:hover, - .app:focus { - * { - font-weight: unset; - } - - label.title { - color: $contrast-bg; - } - - image { - -gtk-icon-shadow: 2px 2px $contrast-bg; - } - } -} diff --git a/nixosModules/ags/config/scss/wim-widgets/clipboard.scss b/nixosModules/ags/config/scss/wim-widgets/clipboard.scss deleted file mode 100644 index 88a905fc..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/clipboard.scss +++ /dev/null @@ -1,63 +0,0 @@ -.clipboard { - all: unset; - border: 2px solid $contrast-bg; - border-radius: 25px; - background-color: $bg; - color: #f8f8f2; - padding: 2px; - - * { - font-size: 16px; - } - - list, - row { - all: unset; - } - - .header { - margin: 16.2px; - margin-bottom: 0; - - image, - entry { - all: unset; - border-radius: 9px; - color: #f8f8f2; - background-color: rgba(#44475a, 0.6); - border: 1px solid #44475a; - padding: 4.5px; - } - - image { - margin-right: 9px; - -gtk-icon-transform: scale(0.8); - font-size: 25.6px; - } - } - - scrolledwindow { - padding: 10px; - padding-bottom: 0; - min-width: 900px; - min-height: 750px; - } - - .item { - all: unset; - transition: 200ms; - border-radius: 9px; - padding: 10px; - } - - *:selected .item, - *:hover .item, - *:focus .item { - background-color: #363449; - } - - .down-arrow { - transition: all 500ms; - opacity: 0.5; - } -} diff --git a/nixosModules/ags/config/scss/wim-widgets/date.scss b/nixosModules/ags/config/scss/wim-widgets/date.scss deleted file mode 100644 index fc99e498..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/date.scss +++ /dev/null @@ -1,75 +0,0 @@ -.date { - background-color: $bg; - color: $fg; - border-radius: 30px; - border: 2px solid $contrast-bg; -} - -.timebox { - margin: 30px 0; - - .time-container { - .content { - font-weight: bolder; - font-size: 60px; - } - - .divider { - margin: 8px 15px; - padding: 0 1px; - background: linear-gradient($red, $magenta, $blue, $cyan); - } - } - - .date-container { - margin-top: 2px; - } -} - -.cal-box { - border-radius: 30px; - padding: 0 1rem .2rem; - color: $fg; - background-color: $bgfull; - border-bottom: 2px solid $contrast-bg; - border-top: 2px solid $contrast-bg; - margin: 0 12px 18px; - - .cal { - font-size: 20px; - background-color: inherit; - padding: .5rem .10rem 0; - margin-left: 10px; - border-radius: 30px; - - &>* { - border: solid 0 transparent; - } - - &.highlight { - padding: 10rem; - } - } -} - -calendar:selected { - color: $cyan; -} - -calendar.header { - color: $cyan; - font-weight: bold; -} - -calendar.button { - color: $cyan; -} - -calendar.highlight { - color: $green; - font-weight: bold; -} - -calendar:indeterminate { - color: $lightblack; -} diff --git a/nixosModules/ags/config/scss/wim-widgets/notification-center.scss b/nixosModules/ags/config/scss/wim-widgets/notification-center.scss deleted file mode 100644 index bc5bf3f4..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/notification-center.scss +++ /dev/null @@ -1,113 +0,0 @@ -.notification-center { - min-height: 700px; - min-width: 524px; - background: $bg; - border-radius: 30px; - border-top-right-radius: 0; - border: 2px solid $contrast-bg; - padding: 0; - - * { - font-size: 16px; - } - - .header { - padding: 10px; - margin-top: 22px; - margin-bottom: 9px; - - label { - font-size: 22px; - } - - .clear { - box { - all: unset; - transition: 200ms; - border-radius: 9px; - color: #eee; - background-color: #664C90; - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - padding: 4.5px 9px; - } - - &:hover box { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: rgba(238, 238, 238, 0.154); - color: #f1f1f1; - } - - &.disabled box { - box-shadow: none; - background-color: rgba(#664C90, 0.3); - color: rgba(238, 238, 238, 0.3); - } - - label { - font-size: 1.2em; - } - } - } - - .notification-list-box { - background: $bgfull; - padding: 0 12px; - border-radius: 30px; - border-top: 2px solid $contrast-bg; - - scrollbar { - all: unset; - border-radius: 8px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - - * { - all: unset; - } - - &:hover { - border-radius: 8px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - } - - scrollbar.vertical { - transition: 200ms; - background-color: rgba(23, 23, 23, 0.3); - - &:hover { - background-color: rgba(23, 23, 23, 0.7); - - slider { - background-color: rgba(238, 238, 238, 0.7); - min-width: .6em; - } - } - - slider { - background-color: rgba(238, 238, 238, 0.5); - border-radius: 9px; - min-width: .4em; - min-height: 2em; - transition: 200ms; - } - } - } - - .placeholder { - color: white; - - image { - font-size: 7em; - text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - -gtk-icon-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - } - - label { - font-size: 1.2em; - text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - -gtk-icon-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); - } - } -} diff --git a/nixosModules/ags/config/scss/wim-widgets/notification.scss b/nixosModules/ags/config/scss/wim-widgets/notification.scss deleted file mode 100644 index f4349110..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/notification.scss +++ /dev/null @@ -1,210 +0,0 @@ -$background-color-1: rgba(238, 238, 238, 0.154); -$background-color-2: rgba(230, 112, 144, 0.5); -$background-color-3: rgba(238, 238, 238, 0.06); -$background-color-4: #51a4e7; -$background-color-5: transparent; -$background-color-6: #171717; -$background-color-7: rgba(23, 23, 23, 0.3); -$background-color-8: rgba(23, 23, 23, 0.7); -$background-color-9: rgba(238, 238, 238, 0.7); -$background-color-10: rgba(238, 238, 238, 0.5); - -.notification.critical { - >box { - box-shadow: inset 0 0 0.5em 0 #e67090; - } -} - -.notification { - >box { - all: unset; - margin: 9px 9px 0; - border: 2px solid $contrast-bg; - border-radius: 15px; - background-color: $bg; - padding: 16.2px; - - * { - font-size: 16px; - } - } - - &:hover { - .close-button { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-1; - background-color: $background-color-2; - } - } - - .title { - margin-right: 9px; - font-size: 1.1em; - } - - .description { - font-size: .9em; - min-width: 350px; - } - - .icon { - border-radius: 7.2px; - margin-right: 9px; - } - - .icon.img { - border: 1px solid rgba(238, 238, 238, 0.03); - } - - .actions { - button { - all: unset; - transition: all 500ms; - background-color: $background-color-3; - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - border-radius: 7.2px; - font-size: 1.2em; - padding: 4.5px 9px; - margin: 9px 4.5px 0; - - * { - font-size: 16px; - } - - &:focus { - box-shadow: inset 0 0 0 1px #51a4e7; - background-color: $background-color-1; - } - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-1; - } - - &:active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:checked { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:disabled { - box-shadow: none; - background-color: $background-color-5; - } - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - } - - button.on { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - button.active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - } - - button.close-button { - all: unset; - transition: all 500ms; - background-color: $background-color-5; - background-image: none; - box-shadow: none; - margin-left: 9px; - border-radius: 7.2px; - min-width: 1.2em; - min-height: 1.2em; - - * { - font-size: 16px; - } - - &:focus { - box-shadow: inset 0 0 0 1px #51a4e7; - background-color: $background-color-1; - } - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-1; - background-color: $background-color-2; - } - - &:active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-color: $background-color-4; - background-image: linear-gradient(#e67090, #e67090); - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:checked { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - &:disabled { - box-shadow: none; - background-color: $background-color-5; - } - } - - button.close-button.on { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } - - button.close-button.active { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03); - background-image: linear-gradient(to right, #51a4e7, #6cb2eb); - background-color: $background-color-4; - - &:hover { - box-shadow: inset 0 0 0 1px rgba(238, 238, 238, 0.03), inset 0 0 0 99px rgba(238, 238, 238, 0.154); - } - } -} diff --git a/nixosModules/ags/config/scss/wim-widgets/osd.scss b/nixosModules/ags/config/scss/wim-widgets/osd.scss deleted file mode 100644 index a3a77cd6..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/osd.scss +++ /dev/null @@ -1,43 +0,0 @@ -.osd { - padding: 12px 20px; - border-radius: 999px; - background: rgba(40, 42, 54, 0.8); - border: 2px solid $contrast-bg; - - label { - min-width: 170px; - } - - progressbar:disabled { - opacity: 0.5; - } - - progressbar { - min-height: 6px; - min-width: 170px; - border-radius: 999px; - background: transparent; - border: none; - - trough { - background: #363847; - min-height: inherit; - border-radius: inherit; - border: none; - } - - progress { - background: #79659f; - min-height: inherit; - border-radius: inherit; - border: none; - } - } - - image { - font-size: 2rem; - color: white; - margin-left: -0.4rem; - margin-right: 0.8rem; - } -} diff --git a/nixosModules/ags/config/scss/wim-widgets/powermenu.scss b/nixosModules/ags/config/scss/wim-widgets/powermenu.scss deleted file mode 100644 index ad319269..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/powermenu.scss +++ /dev/null @@ -1,52 +0,0 @@ -.powermenu { - background-color: $bg; - color: $fg; - padding: 10px; - font-family: "MesloLGS NF"; - - /* font-family: Iosevka Nerd Font; */ - font-size: 70px; - border-radius: 30px; - border: 2px solid $contrast-bg; - - label { - min-width: 140px; - min-height: 130px; - } - - .button { - margin: 5px 10px; - border-radius: 12px; - min-width: 80px; - transition: all ease .2s; - - &:hover { - background-color: $bg-secondary; - } - - &:active { - background-color: $bg-secondary; - } - - .content { - border-radius: 4px; - padding: 0 15px; - } - } - - .shutdown { - color: $red; - } - - .reboot { - color: $magenta; - } - - .logout { - color: $yellow; - } -} - -.powermenu-clickhandler { - background-color: black; -} diff --git a/nixosModules/ags/config/scss/wim-widgets/screenshot.scss b/nixosModules/ags/config/scss/wim-widgets/screenshot.scss deleted file mode 100644 index b04bbcf3..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/screenshot.scss +++ /dev/null @@ -1,76 +0,0 @@ -.screenshot { - background-color: $bg; - color: $fg; - border: 2px solid $contrast-bg; - border-radius: 25px; - - label { - font-size: 20pt; - } - - .header { - border-bottom: 2px solid $contrast-bg; - - .header-btn { - transition: 200ms; - - &:hover, - &.active { - background-color: rgba(23, 23, 23, 0.7); - - image { - -gtk-icon-shadow: 1px 1px $contrast-bg; - } - } - - label { - margin: 10px; - font-weight: bold; - } - - image { - font-size: 30px; - } - - &:first-child { - border-top-left-radius: 25px; - } - - &:last-child { - border-top-right-radius: 25px; - } - } - } - - scrolledwindow { - min-height: 400px; - min-width: 800px; - padding: 0 10px; - - box { - .item-btn { - transition: 200ms; - - &:hover { - background-color: rgba(23, 23, 23, 0.7); - } - } - - label { - padding: 5px; - } - - image { - font-size: 30px; - } - - &:first-child label { - padding-top: 10px; - } - - &:last-child label { - padding-bottom: 10px; - } - } - } -} diff --git a/nixosModules/ags/config/scss/wim-widgets/systray.scss b/nixosModules/ags/config/scss/wim-widgets/systray.scss deleted file mode 100644 index 6e6a1d1b..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/systray.scss +++ /dev/null @@ -1,33 +0,0 @@ -.sys-tray { - padding: 5px; - background-color: $bg; - border-radius: 80px; - border: 2px solid $bg-secondary; - transition: background-color 0.5s ease-in-out, - border 0.5s ease-in-out; - - menuitem { - image { - color: #CBA6F7; - } - - background-color: transparent; - padding: 0 2px; - border-radius: 100%; - transition: all 0.5s ease-in-out; - - &:hover { - border-radius: 100%; - transition: all 0.5s ease-in-out; - } - - * { - font-size: 25px; - border-radius: 10px; - } - } - - menubar { - background-color: transparent; - } -} diff --git a/nixosModules/ags/config/scss/wim-widgets/traybuttons.scss b/nixosModules/ags/config/scss/wim-widgets/traybuttons.scss deleted file mode 100644 index d418b6bc..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/traybuttons.scss +++ /dev/null @@ -1,123 +0,0 @@ -.bar { - margin: 5px; -} - -.current-window { - color: #CBA6F7; - font-size: 18px; -} - -.osk-toggle, -.tablet-toggle, -.heart-toggle { - font-size: 28px; - min-height: 40px; - min-width: 53px; -} - -.heart-toggle { - font-size: 28px; - min-height: 40px; - color: #CBA6F7; -} - -.notif-panel { - font-size: 20px; - min-height: 37px; - min-width: 105px; -} - -.quick-settings-toggle { - font-size: 24px; - min-height: 40px; - min-width: 40px; - padding-right: 4px; - margin-left: -3px; -} - -.toggle-off { - background-color: $bg; - color: #CBA6F7; - border-radius: 80px; - border: 2px solid $bg-secondary; - transition: background-color 0.5s ease-in-out, - border 0.5s ease-in-out; -} - -.toggle-on { - background-color: $bg; - color: #CBA6F7; - border-radius: 80px; - border: 2px solid $contrast-bg; - transition: background-color 0.5s ease-in-out, - border 0.5s ease-in-out; -} - -.toggle-on:hover, -.toggle-off:hover { - background-color: rgba(127, 132, 156, 0.4); - transition: background-color 0.5s ease-in-out, - border 0.5s ease-in-out; -} - -.clock { - font-size: 20px; - padding: 0 15px; -} - -.audio, -.bluetooth, -.brightness, -.keyboard { - padding: 0 10px; - font-size: 20px; - margin-right: -10px; -} - -.network { - padding: 0 10px; - font-size: 20px; -} - -.bg-text { - color: $bg; - font-weight: bold; -} - -.battery { - padding: 0 10px; - font-size: 20px; - - .battery-indicator { - &.charging { - color: green; - } - - &.charged { - // TODO: charged battery style - } - - &.low { - color: red; - } - } - - icon { - .charging { - // TODO: charging battery style - } - - .discharging { - // TODO: discharging battery style - } - } - - label { - font-size: 20px; - } -} - -tooltip { - background: rgba(0, 0, 0, 0.6); - border-radius: 5px; -} diff --git a/nixosModules/ags/config/scss/wim-widgets/workspaces.scss b/nixosModules/ags/config/scss/wim-widgets/workspaces.scss deleted file mode 100644 index 3615bb6a..00000000 --- a/nixosModules/ags/config/scss/wim-widgets/workspaces.scss +++ /dev/null @@ -1,34 +0,0 @@ -.bar { - .workspaces { - background-color: $bg; - border-radius: 80px; - border: 2px solid $bg-secondary; - padding: 3px 12px; - } - - - .button { - margin: 0 2.5px; - min-height: 22px; - min-width: 22px; - border-radius: 100%; - border: 2px solid transparent; - } - - .occupied { - border: 2px solid $bg; - background: $contrast-bg; - transition: background-color 0.6s ease-in-out; - } - - .urgent { - border: 2px solid $bg; - background: red; - transition: background-color 0.6s ease-in-out; - } - - .active { - border: 2px solid #50fa7b; - transition: margin-left 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); - } -} diff --git a/nixosModules/ags/config/scss/wim.scss b/nixosModules/ags/config/scss/wim.scss deleted file mode 100644 index 94fc2001..00000000 --- a/nixosModules/ags/config/scss/wim.scss +++ /dev/null @@ -1,25 +0,0 @@ -window, -button, -eventbox, -box, -progressbar, -trough, -undershoot { - all: unset; -} - -@import './common'; -@import './wim-widgets/powermenu'; -@import './wim-widgets/traybuttons'; -@import './wim-widgets/workspaces'; -@import './wim-widgets/systray'; -@import './wim-widgets/notification-center'; -@import './wim-widgets/notification'; -@import './wim-widgets/date'; -@import './wim-widgets/quick-settings'; -@import './wim-widgets/player'; -@import './wim-widgets/applauncher'; -@import './wim-widgets/osd'; -@import './wim-widgets/osk'; -@import './wim-widgets/clipboard'; -@import './wim-widgets/screenshot'; diff --git a/nixosModules/ags/config/services/brightness.ts b/nixosModules/ags/config/services/brightness.ts deleted file mode 100644 index 48826c68..00000000 --- a/nixosModules/ags/config/services/brightness.ts +++ /dev/null @@ -1,151 +0,0 @@ -const { exec, execAsync } = Utils; - -const KBD = 'tpacpi::kbd_backlight'; -const INTERVAL = 500; -const SCREEN_ICONS = { - 90: 'display-brightness-high-symbolic', - 70: 'display-brightness-medium-symbolic', - 20: 'display-brightness-low-symbolic', - 5: 'display-brightness-off-symbolic', -}; - -class Brightness extends Service { - static { - Service.register(this, { - screen: ['float'], - kbd: ['float'], - caps: ['int'], - }, { - 'screen-icon': ['string', 'rw'], - 'caps-icon': ['string', 'rw'], - }); - } - - #kbd = 0; - #kbdMax = 0; - #screen = 0; - #screenIcon = 'display-brightness-symbolic'; - #capsName = 'input0::capslock'; - #caps = 0; - #capsIcon = 'caps-lock-symbolic'; - - get capsName() { - return this.#capsName; - } - - set capsName(value: string) { - this.#capsName = value; - } - - get kbd() { - return this.#kbd; - } - - set kbd(value) { - if (value < 0 || value > this.#kbdMax) { - return; - } - - execAsync(`brightnessctl -d ${KBD} s ${value} -q`) - .then(() => { - this.#kbd = value; - this.emit('kbd', this.#kbd); - }) - .catch(console.error); - } - - get screen() { - return this.#screen; - } - - set screen(percent) { - if (percent < 0) { - percent = 0; - } - - if (percent > 1) { - percent = 1; - } - - execAsync(`brightnessctl s ${percent * 100}% -q`) - .then(() => { - this.#screen = percent; - this.#getScreenIcon(); - this.emit('screen', this.#screen); - }) - .catch(console.error); - } - - get screenIcon() { - return this.#screenIcon; - } - - get caps() { - return this.#caps; - } - - get capsIcon() { - return this.#capsIcon; - } - - constructor() { - super(); - try { - this.#monitorKbdState(); - this.#kbdMax = Number(exec(`brightnessctl -d ${KBD} m`)); - this.#caps = Number(exec(`bash -c brightnessctl -d ${this.#capsName} g`)); - this.#screen = Number(exec('brightnessctl g')) / Number(exec('brightnessctl m')); - } - catch (_e) { - console.error('missing dependancy: brightnessctl'); - } - } - - #getScreenIcon() { - const brightness = this.#screen * 100; - - // eslint-disable-next-line - for (const threshold of [4, 19, 69, 89]) { - if (brightness > threshold + 1) { - this.#screenIcon = SCREEN_ICONS[threshold + 1]; - this.notify('screen-icon'); - } - } - } - - fetchCapsState() { - execAsync(`brightnessctl -d ${this.#capsName} g`) - .then((out) => { - this.#caps = Number(out); - this.#capsIcon = this.#caps ? - 'caps-lock-symbolic' : - 'capslock-disabled-symbolic'; - - this.notify('caps-icon'); - this.emit('caps', this.#caps); - }) - .catch(logError); - } - - #monitorKbdState() { - const interval = setInterval(() => { - execAsync(`brightnessctl -d ${KBD} g`).then( - (out) => { - if (parseInt(out) !== this.#kbd) { - this.#kbd = parseInt(out); - this.emit('kbd', this.#kbd); - - return this.#kbd; - } - }, - ).catch(() => { - // @ts-expect-error this works in ags - interval.destroy(); - }); - }, INTERVAL); - } -} - -const brightnessService = new Brightness(); - -export default brightnessService; diff --git a/nixosModules/ags/config/services/clipboard.ts b/nixosModules/ags/config/services/clipboard.ts deleted file mode 100644 index f4e866fc..00000000 --- a/nixosModules/ags/config/services/clipboard.ts +++ /dev/null @@ -1,147 +0,0 @@ -const { execAsync, subprocess } = Utils; - - -class Clipboard extends Service { - static { - Service.register(this, { - 'clip-added': ['jsobject'], - 'history-searched': [], - }, { - clips: ['jsobject'], - }); - } - - private static _MAX_CLIPS = 100; - - // Class Attributes - private _clips_left = 0; - - private _clips = new Map(); - - get clips() { - return this._clips; - } - - constructor() { - super(); - - this._getHistory(); - this._watchClipboard(); - } - - // Public Class Methods - public copyOldItem(key: string | number): void { - execAsync([ - 'bash', '-c', `cliphist list | grep '^${key}' | cliphist decode | wl-copy`, - ]); - } - - // Private Class Methods - private _decrementClipsLeft() { - if (--this._clips_left === 0) { - this.emit('history-searched'); - // this is necessary when not putting a cap on clip amount - // exec(`prlimit --pid ${exec('pgrep ags')} --nofile=1024:`); - } - } - - private async _decodeItem(index: string): Promise { - try { - const decodedItem = await execAsync([ - 'bash', '-c', `cliphist list | grep -a ${index} | cliphist decode`, - ]); - - this._decrementClipsLeft(); - - return decodedItem; - } - catch (error) { - console.error(error); - this._decrementClipsLeft(); - - return null; - } - } - - private _addClip(newClip: [number, { clip: string, isImage: boolean }]) { - if ( - ![...this.clips.values()] - .map((c) => c.clip) - .includes(newClip[1].clip) - ) { - this._clips.set(...newClip); - this.emit('clip-added', newClip); - } - else { - const oldClip = [...this.clips.entries()] - .find(([_, { clip }]) => clip === newClip[1].clip); - - if (oldClip && oldClip[0] < newClip[0]) { - this.clips.delete(oldClip[0]); - this._clips.set(...newClip); - this.emit('clip-added', newClip); - } - } - } - - private _getHistory(n = Clipboard._MAX_CLIPS) { - // this is necessary when not putting a cap on clip amount - // exec(`prlimit --pid ${exec('pgrep ags')} --nofile=10024:`); - - // This command comes from '../../clipboard/script.sh' - execAsync('clipboard-manager').then((out) => { - const rawClips = out.split('\n'); - - this._clips_left = Math.min(rawClips.length - 1, n); - - rawClips.forEach(async(clip, i) => { - if (i > n) { - return; - } - - if (clip.includes('img')) { - this._decrementClipsLeft(); - - const newClip: [number, { clip: string, isImage: boolean }] = [ - parseInt((clip.match('[0-9]+') ?? [''])[0]), - { - clip, - isImage: true, - }, - ]; - - this._addClip(newClip); - } - else { - const decodedClip = await this._decodeItem(clip); - - if (decodedClip) { - const newClip: [number, { clip: string, isImage: boolean }] = [ - parseInt(clip), - { - clip: decodedClip, - isImage: false, - }, - ]; - - this._addClip(newClip); - } - } - }); - }).catch((error) => console.error(error)); - } - - private _watchClipboard() { - subprocess( - ['wl-paste', '--watch', 'echo'], - () => { - this._getHistory(1); - }, - () => { /**/ }, - ); - } -} - -const clipboard = new Clipboard(); - -export default clipboard; diff --git a/nixosModules/ags/config/services/gpu-screen-recorder.ts b/nixosModules/ags/config/services/gpu-screen-recorder.ts deleted file mode 100644 index 4e62305d..00000000 --- a/nixosModules/ags/config/services/gpu-screen-recorder.ts +++ /dev/null @@ -1,80 +0,0 @@ -const { execAsync, subprocess } = Utils; - -const Notifications = await Service.import('notifications'); - -const APP_NAME = 'gpu-screen-recorder'; -const START_APP_ID = 2345; -const ICON_NAME = 'nvidia'; - - -class GSR extends Service { - static { - Service.register(this, {}, {}); - } - - #appID = START_APP_ID; - - constructor() { - super(); - - subprocess( - ['gsr-start'], - (path) => { - Notifications.getNotification(this.#appID)?.close(); - - const notifId = Notifications.Notify( - APP_NAME, - ++this.#appID, - ICON_NAME, - 'Replay Saved', - `Saved to ${path}`, - ['folder', 'Open Folder', 'video', 'Open Video', 'kdenlive', 'Edit in kdenlive'], - {}, - Notifications.popupTimeout, - ); - - Notifications.getNotification(notifId)?.connect( - 'invoked', - (_, actionId: string) => { - if (actionId === 'folder') { - execAsync([ - 'xdg-open', - path.substring(0, path.lastIndexOf('/')), - ]).catch(print); - } - - else if (actionId === 'video') { - execAsync(['xdg-open', path]).catch(print); - } - - else if (actionId === 'kdenlive') { - execAsync([ - 'bash', - '-c', - `kdenlive -i ${path}`, - ]).catch(print); - } - }, - ); - }, - () => { /**/ }, - ); - } - - saveReplay() { - execAsync(['gpu-save-replay']).then(() => { - Notifications.Notify( - APP_NAME, - this.#appID, - ICON_NAME, - 'Saving Replay', - 'Last 20 minutes', - [], - {}, - Notifications.popupTimeout, - ); - }).catch(console.error); - } -} - -export default GSR; diff --git a/nixosModules/ags/config/services/pointers.ts b/nixosModules/ags/config/services/pointers.ts deleted file mode 100644 index ee073ef3..00000000 --- a/nixosModules/ags/config/services/pointers.ts +++ /dev/null @@ -1,228 +0,0 @@ -const Hyprland = await Service.import('hyprland'); -const { subprocess } = Utils; - -const ON_RELEASE_TRIGGERS = [ - 'released', - 'TOUCH_UP', - 'HOLD_END', -]; -const ON_CLICK_TRIGGERS = [ - 'pressed', - 'TOUCH_DOWN', -]; - -// Types -import { PopupWindow } from 'global-types'; -import { Subprocess } from 'types/@girs/gio-2.0/gio-2.0.cjs'; -interface Layer { - address: string - x: number - y: number - w: number - h: number - namespace: string -} -interface Levels { - 0?: Layer[] | null - 1?: Layer[] | null - 2?: Layer[] | null - 3?: Layer[] | null -} -interface Layers { - levels: Levels -} -interface CursorPos { - x: number - y: number -} - - -class Pointers extends Service { - static { - Service.register(this, { - 'proc-started': ['boolean'], - 'proc-destroyed': ['boolean'], - 'device-fetched': ['boolean'], - 'new-line': ['string'], - 'released': ['string'], - 'clicked': ['string'], - }); - } - - #process = null as Subprocess | null; - #lastLine = ''; - #pointers = [] as string[]; - - get process() { - return this.#process; - } - - get lastLine() { - return this.#lastLine; - } - - get pointers() { - return this.#pointers; - } - - constructor() { - super(); - this.#initAppConnection(); - } - - startProc() { - if (this.#process) { - return; - } - - this.#process = subprocess( - ['libinput', 'debug-events'], - (output) => { - if (output.includes('cancelled')) { - return; - } - - if (ON_RELEASE_TRIGGERS.some((p) => output.includes(p))) { - this.#lastLine = output; - Pointers.detectClickedOutside('released'); - this.emit('released', output); - this.emit('new-line', output); - } - - if (ON_CLICK_TRIGGERS.some((p) => output.includes(p))) { - this.#lastLine = output; - Pointers.detectClickedOutside('clicked'); - this.emit('clicked', output); - this.emit('new-line', output); - } - }, - ); - this.emit('proc-started', true); - } - - killProc() { - if (this.#process) { - this.#process.force_exit(); - this.#process = null; - this.emit('proc-destroyed', true); - } - } - - #initAppConnection() { - App.connect('window-toggled', () => { - const anyVisibleAndClosable = - (App.windows as PopupWindow[]).some((w) => { - const closable = w.close_on_unfocus && - !( - w.close_on_unfocus === 'none' || - w.close_on_unfocus === 'stay' - ); - - return w.visible && closable; - }); - - if (anyVisibleAndClosable) { - this.startProc(); - } - - else { - this.killProc(); - } - }); - } - - static detectClickedOutside(clickStage: string) { - const toClose = ((App.windows as PopupWindow[])).some((w) => { - const closable = ( - w.close_on_unfocus && - w.close_on_unfocus === clickStage - ); - - return w.visible && closable; - }); - - if (!toClose) { - return; - } - - Hyprland.messageAsync('j/layers').then((response) => { - const layers = JSON.parse(response) as { Layers: Layers }; - - Hyprland.messageAsync('j/cursorpos').then((res) => { - const pos = JSON.parse(res) as CursorPos; - - Object.values(layers).forEach((key) => { - const overlayLayer = key.levels['3']; - - if (overlayLayer) { - const noCloseWidgetsNames = [ - 'bar-', - 'osk', - ]; - - const getNoCloseWidgets = (names: string[]) => { - const arr = [] as Layer[]; - - names.forEach((name) => { - arr.push( - overlayLayer.find( - (n) => n.namespace.startsWith(name), - ) || - // Return an empty Layer if widget doesn't exist - { - address: '', - x: 0, - y: 0, - w: 0, - h: 0, - namespace: '', - }, - ); - }); - - return arr; - }; - const clickIsOnWidget = (w: Layer) => { - return pos.x > w.x && pos.x < w.x + w.w && - pos.y > w.y && pos.y < w.y + w.h; - }; - - const noCloseWidgets = - getNoCloseWidgets(noCloseWidgetsNames); - - const widgets = overlayLayer.filter((n) => { - let window = null as null | PopupWindow; - - if (App.windows.some((win) => - win.name === n.namespace)) { - window = (App - .getWindow(n.namespace) as PopupWindow); - } - - return window && - window.close_on_unfocus && - window.close_on_unfocus === - clickStage; - }); - - if (noCloseWidgets.some(clickIsOnWidget)) { - // Don't handle clicks when on certain widgets - } - else { - widgets.forEach( - (w) => { - if (!(pos.x > w.x && pos.x < w.x + w.w && - pos.y > w.y && pos.y < w.y + w.h)) { - App.closeWindow(w.namespace); - } - }, - ); - } - } - }); - }).catch(print); - }).catch(print); - } -} - -export default new Pointers(); diff --git a/nixosModules/ags/config/services/touch-gestures.ts b/nixosModules/ags/config/services/touch-gestures.ts deleted file mode 100644 index 5b0b3935..00000000 --- a/nixosModules/ags/config/services/touch-gestures.ts +++ /dev/null @@ -1,143 +0,0 @@ -const { subprocess } = Utils; - -const SCREEN = '/dev/input/by-path/platform-AMDI0010\:00-event'; - -const GESTURE_VERIF = [ - 'LR', // Left to Right - 'RL', // Right to Left - 'DU', // Down to Up - 'UD', // Up to Down - 'DLUR', // Down to Left to Up to Right (clockwise motion from Down) - 'DRUL', // Down to Right to Up to Left (counter-clockwise from Down) - 'URDL', // Up to Right to Down to Left (clockwise motion from Up) - 'ULDR', // Up to Left to Down to Right (counter-clockwise from Up) -]; -const EDGE_VERIF = [ - '*', // Any - 'N', // None - 'L', // Left - 'R', // Right - 'T', // Top - 'B', // Bottom - 'TL', // Top left - 'TR', // Top right - 'BL', // Bottom left - 'BR', // Bottom right -]; -const DISTANCE_VERIF = [ - '*', // Any - 'S', // Short - 'M', // Medium - 'L', // Large -]; - -// Types -import { Subprocess } from 'types/@girs/gio-2.0/gio-2.0.cjs'; - - -// TODO: add actmode param -// TODO: support multiple daemons for different thresholds -class TouchGestures extends Service { - static { - Service.register(this, { - 'daemon-started': ['boolean'], - 'daemon-destroyed': ['boolean'], - }); - } - - #gestures = new Map(); - #gestureDaemon = null as Subprocess | null; - - get gestures() { - return this.#gestures; - } - - get gestureDaemon() { - return this.#gestureDaemon; - } - - addGesture({ - name, - nFingers = '1', - gesture, - edge = '*', - distance = '*', - command, - }) { - gesture = String(gesture).toUpperCase(); - if (!GESTURE_VERIF.includes(gesture)) { - logError('Wrong gesture id'); - - return; - } - - edge = String(edge).toUpperCase(); - if (!EDGE_VERIF.includes(edge)) { - logError('Wrong edge id'); - - return; - } - - distance = String(distance).toUpperCase(); - if (!DISTANCE_VERIF.includes(distance)) { - logError('Wrong distance id'); - - return; - } - - if (typeof command !== 'string') { - globalThis[name] = command; - command = `ags -r "${name}()"`; - } - - this.#gestures.set(name, [ - '-g', - `${nFingers},${gesture},${edge},${distance},${command}`, - ]); - - if (this.#gestureDaemon) { - this.killDaemon(); - } - this.startDaemon(); - } - - startDaemon() { - if (this.#gestureDaemon) { - return; - } - - let command = [ - 'lisgd', '-d', SCREEN, - // Orientation - '-o', '0', - // Threshold of gesture recognized - '-t', '125', - // Leniency of gesture angle - '-r', '25', - // Timeout time - '-m', '3200', - ]; - - this.#gestures.forEach((gesture) => { - command = command.concat(gesture); - }); - - this.#gestureDaemon = subprocess( - command, - () => { /**/ }, - ); - this.emit('daemon-started', true); - } - - killDaemon() { - if (this.#gestureDaemon) { - this.#gestureDaemon.force_exit(); - this.#gestureDaemon = null; - this.emit('daemon-destroyed', true); - } - } -} - -const touchGesturesService = new TouchGestures(); - -export default touchGesturesService; diff --git a/nixosModules/ags/config/ts/applauncher/app-item.ts b/nixosModules/ags/config/ts/applauncher/app-item.ts deleted file mode 100644 index 639b322e..00000000 --- a/nixosModules/ags/config/ts/applauncher/app-item.ts +++ /dev/null @@ -1,63 +0,0 @@ -const { Box, Icon, Label } = Widget; -const { lookUpIcon } = Utils; - -import CursorBox from '../misc/cursorbox.ts'; - -/* Types */ -import { Application } from 'types/service/applications.ts'; - - -export default (app: Application) => { - const icon = Icon({ size: 42 }); - const iconString = app.app.get_string('Icon'); - - if (app.icon_name) { - if (lookUpIcon(app.icon_name)) { - icon.icon = app.icon_name; - } - else if (iconString && iconString !== 'nix-snowflake') { - icon.icon = iconString; - } - else { - icon.icon = ''; - } - } - - const textBox = Box({ - vertical: true, - vpack: 'start', - - children: [ - Label({ - class_name: 'title', - label: app.name, - xalign: 0, - truncate: 'end', - }), - - Label({ - class_name: 'description', - label: app.description || '', - wrap: true, - xalign: 0, - justification: 'left', - }), - - Label(), - ], - }); - - return CursorBox({ - hexpand: true, - class_name: 'app', - - attribute: { app }, - - child: Box({ - children: [ - icon, - textBox, - ], - }), - }); -}; diff --git a/nixosModules/ags/config/ts/applauncher/launch.ts b/nixosModules/ags/config/ts/applauncher/launch.ts deleted file mode 100644 index 26323887..00000000 --- a/nixosModules/ags/config/ts/applauncher/launch.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* Types */ -import { Application } from 'types/service/applications.ts'; - - -const bash = async(strings: TemplateStringsArray | string, ...values: unknown[]) => { - const cmd = typeof strings === 'string' ? - strings : - strings.flatMap((str, i) => `${str}${values[i] ?? ''}`) - .join(''); - - return Utils.execAsync(['bash', '-c', cmd]).catch((err) => { - console.error(cmd, err); - - return ''; - }); -}; - -export const launchApp = (app: Application) => { - const exe = app.executable - .split(/\s+/) - .filter((str) => !str.startsWith('%') && !str.startsWith('@')) - .join(' '); - - bash(`${exe} &`); - app.frequency += 1; -}; diff --git a/nixosModules/ags/config/ts/applauncher/main.ts b/nixosModules/ags/config/ts/applauncher/main.ts deleted file mode 100644 index cda40e68..00000000 --- a/nixosModules/ags/config/ts/applauncher/main.ts +++ /dev/null @@ -1,76 +0,0 @@ -const Applications = await Service.import('applications'); - -import { Fzf, FzfResultItem } from 'fzf'; - -import SortedList from '../misc/sorted-list.ts'; -import AppItem from './app-item.ts'; - -import { launchApp } from './launch.ts'; - -/* Types */ -import { Application } from 'types/service/applications.ts'; -import { AgsAppItem } from 'global-types'; - - -export default () => { - let fzfResults = [] as FzfResultItem[]; - - return SortedList({ - name: 'applauncher', - class_name: 'applauncher', - transition: 'slide top', - - on_select: (r) => { - App.closeWindow('win-applauncher'); - launchApp((r.get_child() as AgsAppItem).attribute.app); - }, - - setup_list: (list, entry) => { - Applications.query('') - .flatMap((app) => AppItem(app)) - .forEach((ch) => { - list.add(ch); - }); - - list.show_all(); - - list.set_sort_func((a, b) => { - const row1 = (a.get_children()[0] as AgsAppItem).attribute.app; - const row2 = (b.get_children()[0] as AgsAppItem).attribute.app; - - if (entry.text === '' || entry.text === '-') { - a.set_visible(true); - b.set_visible(true); - - return row2.frequency - row1.frequency; - } - else { - const s1 = fzfResults.find((r) => r.item.name === row1.name)?.score ?? 0; - const s2 = fzfResults.find((r) => r.item.name === row2.name)?.score ?? 0; - - a.set_visible(s1 !== 0); - b.set_visible(s2 !== 0); - - return s2 - s1; - } - }); - }, - - on_text_change: (text, list, placeholder) => { - const fzf = new Fzf(Applications.list, { - selector: (app) => app.name + app.executable, - - tiebreakers: [ - (a, b) => b.item.frequency - a.item.frequency, - ], - }); - - fzfResults = fzf.find(text); - list.invalidate_sort(); - - const visibleApps = list.get_children().filter((row) => row.visible).length; - - placeholder.reveal_child = visibleApps <= 0; - }, - }); -}; diff --git a/nixosModules/ags/config/ts/bar/binto.ts b/nixosModules/ags/config/ts/bar/binto.ts deleted file mode 100644 index d7e376b8..00000000 --- a/nixosModules/ags/config/ts/bar/binto.ts +++ /dev/null @@ -1,57 +0,0 @@ -const { Box, CenterBox } = Widget; - -import Separator from '../misc/separator.ts'; -import { get_gdkmonitor_from_desc } from '../lib.ts'; - -import BarRevealer from './fullscreen.ts'; - -import Clock from './items/cal-opener.ts'; -import CurrentWindow from './items/current-window'; -import NotifButton from './items/notif-button.ts'; -import SysTray from './items/systray.ts'; - -const PADDING = 20; - -export default () => BarRevealer({ - gdkmonitor: get_gdkmonitor_from_desc('desc:Acer Technologies Acer K212HQL T3EAA0014201'), - exclusivity: 'exclusive', - anchor: ['bottom', 'left', 'right'], - bar: Box({ - vertical: true, - children: [ - CenterBox({ - class_name: 'bar', - hexpand: true, - - start_widget: Box({ - hpack: 'start', - children: [ - Separator(PADDING), - - SysTray(), - ], - }), - - center_widget: Box({ - children: [ - CurrentWindow(), - - Separator(PADDING / 2), - ], - }), - - end_widget: Box({ - hpack: 'end', - children: [ - NotifButton(), - Separator(PADDING / 2), - Clock(), - - Separator(PADDING), - ], - }), - }), - Separator(PADDING, { vertical: true }), - ], - }), -}); diff --git a/nixosModules/ags/config/ts/bar/fullscreen.ts b/nixosModules/ags/config/ts/bar/fullscreen.ts deleted file mode 100644 index f628b310..00000000 --- a/nixosModules/ags/config/ts/bar/fullscreen.ts +++ /dev/null @@ -1,156 +0,0 @@ -const Hyprland = await Service.import('hyprland'); -const { Box, EventBox, Revealer, Window } = Widget; - -import Gdk from 'gi://Gdk?version=3.0'; - -import { - get_hyprland_monitor_desc, - get_monitor_desc_from_id, -} from '../lib.ts'; - - -const FullscreenState = Variable({ - monitors: [] as string[], - clientAddrs: new Map() as Map, -}); - -Hyprland.connect('event', (hyprObj) => { - const arrayEquals = (a1: unknown[], a2: unknown[]) => - a1.sort().toString() === a2.sort().toString(); - - const mapEquals = (m1: Map, m2: Map) => - m1.size === m2.size && - Array.from(m1.keys()).every((key) => m1.get(key) === m2.get(key)); - - const fs = FullscreenState.value; - const fsClients = hyprObj.clients.filter((c) => { - const mon = Hyprland.getMonitor(c.monitor); - - return c.fullscreen && - c.workspace.id === mon?.activeWorkspace.id; - }); - - const monitors = fsClients.map((c) => - get_monitor_desc_from_id(c.monitor)); - - const clientAddrs = new Map(fsClients.map((c) => [ - get_monitor_desc_from_id(c.monitor), - c.address, - ])); - - const hasChanged = - !arrayEquals(monitors, fs.monitors) || - !mapEquals(clientAddrs, fs.clientAddrs); - - if (hasChanged) { - FullscreenState.setValue({ - monitors, - clientAddrs, - }); - } -}); - -export default ({ - anchor, - bar, - gdkmonitor = Gdk.Display.get_default()?.get_monitor(0) as Gdk.Monitor, - ...rest -}) => { - const monitor = get_hyprland_monitor_desc(gdkmonitor); - const BarVisible = Variable(true); - - FullscreenState.connect('changed', (v) => { - BarVisible.setValue(!v.value.monitors.includes(monitor)); - }); - - const barCloser = Window({ - name: `bar-${monitor}-closer`, - visible: false, - gdkmonitor, - anchor: ['top', 'bottom', 'left', 'right'], - layer: 'overlay', - - child: EventBox({ - on_hover: () => { - barCloser.set_visible(false); - BarVisible.setValue(false); - }, - - child: Box({ - css: 'padding: 1px;', - }), - }), - }); - - // Hide bar instantly when out of focus - Hyprland.active.workspace.connect('changed', () => { - const addr = FullscreenState.value.clientAddrs.get(monitor); - - if (addr) { - const client = Hyprland.getClient(addr); - - if (client!.workspace.id !== Hyprland.active.workspace.id) { - BarVisible.setValue(false); - barCloser.visible = false; - } - } - }); - - const buffer = Box({ - css: 'min-height: 10px', - visible: BarVisible.bind().as((v) => !v), - }); - - const vertical = anchor.includes('left') && anchor.includes('right'); - const isBottomOrLeft = ( - anchor.includes('left') && anchor.includes('right') && anchor.includes('bottom') - ) || ( - anchor.includes('top') && anchor.includes('bottom') && anchor.includes('left') - ); - - let transition: 'slide_up' | 'slide_down' | 'slide_left' | 'slide_right'; - - if (vertical) { - transition = isBottomOrLeft ? 'slide_up' : 'slide_down'; - } - else { - transition = isBottomOrLeft ? 'slide_right' : 'slide_left'; - } - - const barWrap = Revealer({ - reveal_child: BarVisible.bind(), - transition, - child: bar, - }); - - return Window({ - name: `bar-${monitor}`, - layer: 'overlay', - gdkmonitor, - margins: [-1, -1, -1, -1], - anchor, - ...rest, - - attribute: { - barCloser, - }, - - child: EventBox({ - child: Box({ - css: 'min-height: 1px; padding: 1px;', - hexpand: true, - hpack: 'fill', - vertical, - - children: isBottomOrLeft ? - [buffer, barWrap] : - [barWrap, buffer], - }), - }).on('enter-notify-event', () => { - if (!BarVisible.value) { - barCloser.visible = true; - BarVisible.setValue(true); - } - }), - }); -}; diff --git a/nixosModules/ags/config/ts/bar/hovers/audio.ts b/nixosModules/ags/config/ts/bar/hovers/audio.ts deleted file mode 100644 index 9e011939..00000000 --- a/nixosModules/ags/config/ts/bar/hovers/audio.ts +++ /dev/null @@ -1,21 +0,0 @@ -const Audio = await Service.import('audio'); -const { Label, Icon } = Widget; - -import { SpeakerIcon } from '../../misc/audio-icons.ts'; -import HoverRevealer from './hover-revealer.ts'; - - -export default () => HoverRevealer({ - class_name: 'audio', - - icon: Icon({ - icon: SpeakerIcon.bind(), - }), - - label: Label().hook(Audio, (self) => { - if (Audio.speaker.volume) { - self.label = - `${Math.round(Audio.speaker.volume * 100)}%`; - } - }, 'speaker-changed'), -}); diff --git a/nixosModules/ags/config/ts/bar/hovers/bluetooth.ts b/nixosModules/ags/config/ts/bar/hovers/bluetooth.ts deleted file mode 100644 index fe6a5a1a..00000000 --- a/nixosModules/ags/config/ts/bar/hovers/bluetooth.ts +++ /dev/null @@ -1,26 +0,0 @@ -const Bluetooth = await Service.import('bluetooth'); -const { Label, Icon } = Widget; - -import HoverRevealer from './hover-revealer.ts'; - - -export default () => HoverRevealer({ - class_name: 'bluetooth', - - icon: Icon().hook(Bluetooth, (self) => { - if (Bluetooth.enabled) { - self.icon = Bluetooth.connected_devices[0] ? - Bluetooth.connected_devices[0].icon_name : - 'bluetooth-active-symbolic'; - } - else { - self.icon = 'bluetooth-disabled-symbolic'; - } - }), - - label: Label().hook(Bluetooth, (self) => { - self.label = Bluetooth.connected_devices[0] ? - `${Bluetooth.connected_devices[0]}` : - 'Disconnected'; - }, 'notify::connected-devices'), -}); diff --git a/nixosModules/ags/config/ts/bar/hovers/brightness.ts b/nixosModules/ags/config/ts/bar/hovers/brightness.ts deleted file mode 100644 index 74b936db..00000000 --- a/nixosModules/ags/config/ts/bar/hovers/brightness.ts +++ /dev/null @@ -1,17 +0,0 @@ -const { Icon, Label } = Widget; - -import Brightness from '../../../services/brightness.ts'; -import HoverRevealer from './hover-revealer.ts'; - - -export default () => HoverRevealer({ - class_name: 'brightness', - - icon: Icon({ - icon: Brightness.bind('screenIcon'), - }), - - label: Label().hook(Brightness, (self) => { - self.label = `${Math.round(Brightness.screen * 100)}%`; - }, 'screen'), -}); diff --git a/nixosModules/ags/config/ts/bar/hovers/hover-revealer.ts b/nixosModules/ags/config/ts/bar/hovers/hover-revealer.ts deleted file mode 100644 index 33a9fc1f..00000000 --- a/nixosModules/ags/config/ts/bar/hovers/hover-revealer.ts +++ /dev/null @@ -1,48 +0,0 @@ -const { Box, Revealer } = Widget; - -import Gtk from 'gi://Gtk?version=3.0'; - -import Separator from '../../misc/separator.ts'; -import CursorBox from '../../misc/cursorbox.ts'; - - -export default ({ - class_name, - icon, - label, - spacing = 5, -}) => { - const hoverRevLabel = Revealer({ - transition: 'slide_right', - attribute: { - var: Variable(Box()), - }, - - child: Box({ - - children: [ - Separator(spacing), - - label, - ], - }), - }); - - const widget = CursorBox({ - on_hover: () => { - hoverRevLabel.reveal_child = true; - hoverRevLabel.attribute.var.value.set_state_flags(Gtk.StateFlags.PRELIGHT, false); - }, - - child: Box({ - class_name, - - children: [ - icon, - hoverRevLabel, - ], - }), - }); - - return widget; -}; diff --git a/nixosModules/ags/config/ts/bar/hovers/network.ts b/nixosModules/ags/config/ts/bar/hovers/network.ts deleted file mode 100644 index 5ced3d93..00000000 --- a/nixosModules/ags/config/ts/bar/hovers/network.ts +++ /dev/null @@ -1,37 +0,0 @@ -const Network = await Service.import('network'); -const { Label, Icon } = Widget; - -import HoverRevealer from './hover-revealer.ts'; - - -export default () => HoverRevealer({ - class_name: 'network', - - icon: Icon().hook(Network, (self) => { - if (Network.wifi.internet === 'connected' || - Network.wifi.internet === 'connecting') { - self.icon = Network.wifi.icon_name; - } - else if (Network.wired.internet === 'connected' || - Network.wired.internet === 'connecting') { - self.icon = Network.wired.icon_name; - } - else { - self.icon = Network.wifi.icon_name; - } - }), - - label: Label().hook(Network, (self) => { - if (Network.wifi.internet === 'connected' || - Network.wifi.internet === 'connecting') { - self.label = Network.wifi.ssid || 'Unknown'; - } - else if (Network.wired.internet === 'connected' || - Network.wired.internet === 'connecting') { - self.label = 'Connected'; - } - else { - self.label = 'Disconnected'; - } - }), -}); diff --git a/nixosModules/ags/config/ts/bar/items/battery.ts b/nixosModules/ags/config/ts/bar/items/battery.ts deleted file mode 100644 index d2662313..00000000 --- a/nixosModules/ags/config/ts/bar/items/battery.ts +++ /dev/null @@ -1,30 +0,0 @@ -const Battery = await Service.import('battery'); -const { Label, Icon, Box } = Widget; - -import Separator from '../../misc/separator.ts'; - -const LOW_BATT = 20; -const SPACING = 5; - - -export default () => Box({ - class_name: 'toggle-off battery', - - children: [ - Icon({ - class_name: 'battery-indicator', - icon: Battery.bind('icon_name'), - }).hook(Battery, (self) => { - self.toggleClassName('charging', Battery.charging); - self.toggleClassName('charged', Battery.charged); - self.toggleClassName('low', Battery.percent < LOW_BATT); - }), - - Separator(SPACING), - - Label({ - label: Battery.bind('percent') - .transform((v) => `${v}%`), - }), - ], -}); diff --git a/nixosModules/ags/config/ts/bar/items/cal-opener.ts b/nixosModules/ags/config/ts/bar/items/cal-opener.ts deleted file mode 100644 index e8b764d7..00000000 --- a/nixosModules/ags/config/ts/bar/items/cal-opener.ts +++ /dev/null @@ -1,19 +0,0 @@ -import CursorBox from '../../misc/cursorbox.ts'; -import Clock from './clock'; - - -export default () => CursorBox({ - class_name: 'toggle-off', - - on_primary_click_release: () => App.toggleWindow('win-calendar'), - - setup: (self) => { - self.hook(App, (_, windowName, visible) => { - if (windowName === 'win-calendar') { - self.toggleClassName('toggle-on', visible); - } - }); - }, - - child: Clock(), -}); diff --git a/nixosModules/ags/config/ts/bar/items/clock.ts b/nixosModules/ags/config/ts/bar/items/clock.ts deleted file mode 100644 index b557b69c..00000000 --- a/nixosModules/ags/config/ts/bar/items/clock.ts +++ /dev/null @@ -1,23 +0,0 @@ -const { Label } = Widget; -const { new_now_local } = imports.gi.GLib.DateTime; - - -export default () => Label({ class_name: 'clock' }) - .poll(1000, (self) => { - const time = new_now_local(); - - const dayName = time.format('%a. '); - const dayNum = time.get_day_of_month(); - const date = time.format(' %b. '); - const hour = (new Date().toLocaleString([], { - hour: 'numeric', - minute: 'numeric', - hour12: true, - }) ?? '') - .replace('a.m.', 'AM') - .replace('p.m.', 'PM'); - - if (dayNum && dayName && date) { - self.label = dayName + dayNum + date + hour; - } - }); diff --git a/nixosModules/ags/config/ts/bar/items/current-window.ts b/nixosModules/ags/config/ts/bar/items/current-window.ts deleted file mode 100644 index 3ce5bfd8..00000000 --- a/nixosModules/ags/config/ts/bar/items/current-window.ts +++ /dev/null @@ -1,33 +0,0 @@ -const Applications = await Service.import('applications'); -const Hyprland = await Service.import('hyprland'); -const { Box, Icon, Label } = Widget; - -import Separator from '../../misc/separator.ts'; - -const SPACING = 8; - - -export default () => Box({ - class_name: 'current-window', - - children: [ - Separator(SPACING / 2), - - Icon({ size: 30 }) - .hook(Hyprland.active.client, (self) => { - const app = Applications - .query(Hyprland.active.client.class)[0]; - - self.icon = app?.icon_name || ''; - }), - - Separator(SPACING), - - Label({ - truncate: 'end', - label: Hyprland.active.client.bind('title'), - }), - ], -}).hook(Hyprland.active.client, (self) => { - self.visible = Hyprland.active.client.title !== ''; -}); diff --git a/nixosModules/ags/config/ts/bar/items/notif-button.ts b/nixosModules/ags/config/ts/bar/items/notif-button.ts deleted file mode 100644 index 6221790b..00000000 --- a/nixosModules/ags/config/ts/bar/items/notif-button.ts +++ /dev/null @@ -1,60 +0,0 @@ -const Notifications = await Service.import('notifications'); -const { Box, CenterBox, Icon, Label } = Widget; - -import CursorBox from '../../misc/cursorbox.ts'; -import Separator from '../../misc/separator.ts'; - -const SPACING = 4; - -// Types -import { PopupWindow } from 'global-types'; - - -export default () => CursorBox({ - class_name: 'toggle-off', - - on_primary_click_release: (self) => { - (App.getWindow('win-notification-center') as PopupWindow) - .set_x_pos( - self.get_allocation(), - 'right', - ); - - App.toggleWindow('win-notification-center'); - }, - - setup: (self) => { - self.hook(App, (_, windowName, visible) => { - if (windowName === 'win-notification-center') { - self.toggleClassName('toggle-on', visible); - } - }); - }, - - child: CenterBox({ - class_name: 'notif-panel', - - center_widget: Box({ - children: [ - Icon().hook(Notifications, (self) => { - if (Notifications.dnd) { - self.icon = 'notification-disabled-symbolic'; - } - else if (Notifications.notifications.length > 0) { - self.icon = 'notification-new-symbolic'; - } - else { - self.icon = 'notification-symbolic'; - } - }), - - Separator(SPACING), - - Label({ - label: Notifications.bind('notifications') - .transform((n) => String(n.length)), - }), - ], - }), - }), -}); diff --git a/nixosModules/ags/config/ts/bar/items/osk-toggle.ts b/nixosModules/ags/config/ts/bar/items/osk-toggle.ts deleted file mode 100644 index 76f8383b..00000000 --- a/nixosModules/ags/config/ts/bar/items/osk-toggle.ts +++ /dev/null @@ -1,23 +0,0 @@ -const { Label } = Widget; - -import Tablet from '../../../services/tablet.ts'; -import CursorBox from '../../misc/cursorbox.ts'; - - -export default () => CursorBox({ - class_name: 'toggle-off', - - on_primary_click_release: () => Tablet.toggleOsk(), - - setup: (self) => { - self.hook(Tablet, () => { - self.toggleClassName('toggle-on', Tablet.oskState); - }, 'osk-toggled'); - }, - - child: Label({ - class_name: 'osk-toggle', - xalign: 0.6, - label: '๓ฐŒŒ ', - }), -}); diff --git a/nixosModules/ags/config/ts/bar/items/quick-settings.ts b/nixosModules/ags/config/ts/bar/items/quick-settings.ts deleted file mode 100644 index 2f36d47b..00000000 --- a/nixosModules/ags/config/ts/bar/items/quick-settings.ts +++ /dev/null @@ -1,85 +0,0 @@ -const { Box, Icon } = Widget; - -import Audio from '../hovers/audio.ts'; -import Bluetooth from '../hovers/bluetooth.ts'; -import Brightness from '../hovers/brightness.ts'; -import KeyboardLayout from '../hovers/keyboard-layout.ts'; -import Network from '../hovers/network.ts'; - -import CursorBox from '../../misc/cursorbox.ts'; -import Separator from '../../misc/separator.ts'; - -const SPACING = 4; - -// Types -import { PopupWindow } from 'global-types'; - - -export default () => { - const hoverRevealers = [ - KeyboardLayout(), - - Brightness(), - - Audio(), - - Bluetooth(), - - Network(), - ]; - - const widget = CursorBox({ - class_name: 'toggle-off', - - on_primary_click_release: (self) => { - (App.getWindow('win-quick-settings') as PopupWindow) - .set_x_pos( - self.get_allocation(), - 'right', - ); - - App.toggleWindow('win-quick-settings'); - }, - - setup: (self) => { - self.hook(App, (_, windowName, visible) => { - if (windowName === 'win-quick-settings') { - self.toggleClassName('toggle-on', visible); - } - }); - }, - - attribute: { - hoverRevealers: hoverRevealers.map((rev) => { - const box = rev.child; - - return box.children[1]; - }), - }, - on_hover_lost: (self) => { - self.attribute.hoverRevealers.forEach((rev) => { - rev.reveal_child = false; - }); - }, - - child: Box({ - class_name: 'quick-settings-toggle', - vertical: false, - children: [ - Separator(SPACING), - - ...hoverRevealers, - - Icon('nixos-logo-symbolic'), - - Separator(SPACING), - ], - }), - }); - - widget.attribute.hoverRevealers.forEach((hv) => { - hv.attribute.var.setValue(widget); - }); - - return widget; -}; diff --git a/nixosModules/ags/config/ts/bar/items/systray.ts b/nixosModules/ags/config/ts/bar/items/systray.ts deleted file mode 100644 index 56ab4a5c..00000000 --- a/nixosModules/ags/config/ts/bar/items/systray.ts +++ /dev/null @@ -1,100 +0,0 @@ -import AstalTray from 'gi://AstalTray?version=0.1'; -const SystemTray = AstalTray.Tray.get_default(); - - -const { timeout } = Utils; -const { Box, Icon, MenuItem, MenuBar, Revealer } = Widget; - -import Separator from '../../misc/separator.ts'; - -const REVEAL_DURATION = 500; -const SPACING = 12; - - -const SysTrayItem = (item: AstalTray.TrayItem) => { - if (item.id === 'spotify-client') { - return; - } - - return MenuItem({ - submenu: item.create_menu(), - child: Revealer({ - transition: 'slide_right', - transition_duration: REVEAL_DURATION, - - child: Icon({ - size: 24, - icon: Utils.watch( - item.iconPixbuf || item.iconName || 'image-missing', - item, - () => item.iconPixbuf || item.iconName || 'image-missing', - ), - }), - }), - }).bind('tooltip_markup', item, 'tooltipMarkup'); -}; - -const SysTray = () => MenuBar({ - attribute: { items: new Map() }, - - setup: (self) => { - self - .hook(SystemTray, (_, id) => { - if (!id) { - return; - } - - const item = SystemTray.get_item(id); - - if (self.attribute.items.has(id) || !item) { - return; - } - - const w = SysTrayItem(item); - - // Early return if item is in blocklist - if (!w) { - return; - } - - self.attribute.items.set(id, w); - self.add(w); - self.show_all(); - - w.child.reveal_child = true; - }, 'item_added') - - .hook(SystemTray, (_, id) => { - if (!id || !self.attribute.items.has(id)) { - return; - } - - self.attribute.items.get(id).child.reveal_child = false; - timeout(REVEAL_DURATION, () => { - self.attribute.items.get(id).destroy(); - self.attribute.items.delete(id); - }); - }, 'item_removed'); - }, -}); - -export default () => { - const systray = SysTray(); - - return Revealer({ - transition: 'slide_right', - - child: Box({ - children: [ - Box({ - class_name: 'sys-tray', - children: [systray], - }), - - Separator(SPACING), - ], - }), - }).hook(SystemTray, (self) => { - self.reveal_child = systray.get_children().length > 0; - }, 'item_added'); -}; diff --git a/nixosModules/ags/config/ts/bar/items/tablet-toggle.ts b/nixosModules/ags/config/ts/bar/items/tablet-toggle.ts deleted file mode 100644 index 80d67957..00000000 --- a/nixosModules/ags/config/ts/bar/items/tablet-toggle.ts +++ /dev/null @@ -1,24 +0,0 @@ -const { Box, Label } = Widget; - -import Tablet from '../../../services/tablet.ts'; -import CursorBox from '../../misc/cursorbox.ts'; - - -export default () => CursorBox({ - class_name: 'toggle-off', - - on_primary_click_release: () => Tablet.toggleMode(), - - setup: (self) => { - self.hook(Tablet, () => { - self.toggleClassName('toggle-on', Tablet.tabletMode); - }, 'mode-toggled'); - }, - - child: Box({ - class_name: 'tablet-toggle', - vertical: false, - children: [Label(' ๓ฐฆง ')], - }), - -}); diff --git a/nixosModules/ags/config/ts/bar/items/workspaces.ts b/nixosModules/ags/config/ts/bar/items/workspaces.ts deleted file mode 100644 index f46c6d6e..00000000 --- a/nixosModules/ags/config/ts/bar/items/workspaces.ts +++ /dev/null @@ -1,179 +0,0 @@ -const Hyprland = await Service.import('hyprland'); - -const { timeout } = Utils; -const { Box, Overlay, Revealer } = Widget; - -import CursorBox from '../../misc/cursorbox.ts'; - -const URGENT_DURATION = 1000; - -// Types -import { - BoxGeneric, - EventBoxGeneric, - OverlayGeneric, - RevealerGeneric, - Workspace, -} from 'global-types'; - - -const Workspace = ({ id }: { id: number }) => { - return Revealer({ - transition: 'slide_right', - attribute: { id }, - - child: CursorBox({ - tooltip_text: `${id}`, - - on_primary_click_release: () => { - Hyprland.messageAsync(`dispatch workspace ${id}`); - }, - - child: Box({ - vpack: 'center', - class_name: 'button', - - setup: (self) => { - const update = ( - _: BoxGeneric, - addr: string | undefined, - ) => { - const workspace = Hyprland.getWorkspace(id); - const occupied = workspace && workspace.windows > 0; - - self.toggleClassName('occupied', occupied); - - if (!addr) { - return; - } - - // Deal with urgent windows - const client = Hyprland.getClient(addr); - const isThisUrgent = client && - client.workspace.id === id; - - if (isThisUrgent) { - self.toggleClassName('urgent', true); - - // Only show for a sec when urgent is current workspace - if (Hyprland.active.workspace.id === id) { - timeout(URGENT_DURATION, () => { - self.toggleClassName('urgent', false); - }); - } - } - }; - - self - .hook(Hyprland, update) - - // Deal with urgent windows - .hook(Hyprland, update, 'urgent-window') - - .hook(Hyprland.active.workspace, () => { - if (Hyprland.active.workspace.id === id) { - self.toggleClassName('urgent', false); - } - }); - }, - }), - }), - }); -}; - -export default () => { - const L_PADDING = 16; - const WS_WIDTH = 30; - - const updateHighlight = (self: BoxGeneric) => { - const currentId = Hyprland.active.workspace.id; - - const indicators = (((self.get_parent() as OverlayGeneric) - .child as EventBoxGeneric) - .child as BoxGeneric) - .children as Workspace[]; - - const currentIndex = indicators - .findIndex((w) => w.attribute.id === currentId); - - if (currentIndex < 0) { - return; - } - - self.setCss(`margin-left: ${L_PADDING + (currentIndex * WS_WIDTH)}px`); - }; - - const highlight = Box({ - vpack: 'center', - hpack: 'start', - class_name: 'button active', - - }).hook(Hyprland.active.workspace, updateHighlight); - - const widget = Overlay({ - pass_through: true, - overlays: [highlight], - child: CursorBox({ - child: Box({ - class_name: 'workspaces', - - attribute: { workspaces: [] as Workspace[] }, - - setup: (self) => { - const refresh = () => { - (self.children as RevealerGeneric[]) - .forEach((rev) => { - rev.reveal_child = false; - }); - - self.attribute.workspaces - .forEach((ws) => { - ws.reveal_child = true; - }); - }; - - const updateWorkspaces = () => { - Hyprland.workspaces.forEach((ws) => { - const currentWs = - (self.children as Workspace[]) - .find((ch) => ch.attribute.id === ws.id); - - if (!currentWs && ws.id > 0) { - self.add(Workspace({ id: ws.id })); - } - }); - self.show_all(); - - // Make sure the order is correct - self.attribute.workspaces.forEach((workspace, i) => { - (workspace.get_parent() as BoxGeneric) - .reorder_child(workspace, i); - }); - }; - - self.hook(Hyprland, () => { - self.attribute.workspaces = - (self.children as Workspace[]) - .filter((ch) => { - return Hyprland.workspaces.find((ws) => { - return ws.id === ch.attribute.id; - }); - }) - .sort((a, b) => - a.attribute.id - b.attribute.id); - - updateWorkspaces(); - refresh(); - - // Make sure the highlight doesn't go too far - const TEMP_TIMEOUT = 10; - - timeout(TEMP_TIMEOUT, () => updateHighlight(highlight)); - }); - }, - }), - }), - }); - - return widget; -}; diff --git a/nixosModules/ags/config/ts/bar/wim.ts b/nixosModules/ags/config/ts/bar/wim.ts deleted file mode 100644 index 7c188a0d..00000000 --- a/nixosModules/ags/config/ts/bar/wim.ts +++ /dev/null @@ -1,80 +0,0 @@ -const { CenterBox, Box } = Widget; - -import Separator from '../misc/separator.ts'; - -import Battery from './items/battery.ts'; -import Clock from './items/cal-opener.ts'; -import CurrentWindow from './items/current-window.ts'; -import Heart from './items/heart.ts'; -import NotifButton from './items/notif-button.ts'; -import OskToggle from './items/osk-toggle.ts'; -import QsToggle from './items/quick-settings.ts'; -import SysTray from './items/systray.ts'; -import TabletToggle from './items/tablet-toggle.ts'; -import Workspaces from './items/workspaces.ts'; - -import BarRevealer from './fullscreen.ts'; - -const SPACING = 12; - - -export default () => BarRevealer({ - anchor: ['top', 'left', 'right'], - exclusivity: 'exclusive', - bar: CenterBox({ - css: 'margin: 5px 5px 5px 5px', - class_name: 'bar', - - start_widget: Box({ - hpack: 'start', - children: [ - - OskToggle(), - - Separator(SPACING), - - TabletToggle(), - - Separator(SPACING), - - SysTray(), - - Workspaces(), - - Separator(SPACING), - - CurrentWindow(), - - ], - }), - - center_widget: Box({ - children: [ - Separator(SPACING), - - Clock(), - - Separator(SPACING), - ], - }), - - end_widget: Box({ - hpack: 'end', - children: [ - Heart(), - - Separator(SPACING), - - Battery(), - - Separator(SPACING), - - NotifButton(), - - Separator(SPACING), - - QsToggle(), - ], - }), - }), -}); diff --git a/nixosModules/ags/config/ts/clipboard/clip.ts b/nixosModules/ags/config/ts/clipboard/clip.ts deleted file mode 100644 index d3e472c2..00000000 --- a/nixosModules/ags/config/ts/clipboard/clip.ts +++ /dev/null @@ -1,80 +0,0 @@ -const { Box, Button, Icon, Label, Revealer } = Widget; - - -const ImageClip = (key: number, val: string) => Box({ - class_name: 'item', - name: key.toString(), - - child: Icon({ - icon: val.replace('img:', ''), - size: 100 * 2, - }), -}); - -const TextClip = (key: number, val: string) => { - const lines = val.split('\n'); - - if (lines.length <= 5) { - return Box({ - class_name: 'item', - name: key.toString(), - - child: Label({ - label: val, - truncate: 'end', - max_width_chars: 100, - }), - }); - } - else { - const revText = Revealer({ - hpack: 'start', - child: Label({ - label: lines.slice(2, lines.length).join('\n'), - truncate: 'end', - max_width_chars: 100, - }), - }); - - return Box({ - class_name: 'item', - name: key.toString(), - - vertical: true, - children: [ - Label({ - label: lines.slice(0, 2).join('\n'), - truncate: 'end', - max_width_chars: 100, - hpack: 'start', - }), - - revText, - - Button({ - child: Icon({ - class_name: 'down-arrow', - icon: 'down-large-symbolic', - size: 24, - }), - - on_primary_click_release: (self) => { - const state = !revText.reveal_child; - - revText.reveal_child = state; - - self.child.setCss(` - -gtk-icon-transform: rotate(${state ? '180' : '0'}deg); - `); - }, - }), - ], - }); - } -}; - -export default ({ - key = 0, - isImage = false, - val = '', -}) => isImage ? ImageClip(key, val) : TextClip(key, val); diff --git a/nixosModules/ags/config/ts/clipboard/main.ts b/nixosModules/ags/config/ts/clipboard/main.ts deleted file mode 100644 index bdb5d12e..00000000 --- a/nixosModules/ags/config/ts/clipboard/main.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Fzf, FzfResultItem } from 'fzf'; -import Gtk from 'gi://Gtk?version=3.0'; -import Clipboard from '../../services/clipboard.ts'; - -import SortedList from '../misc/sorted-list.ts'; - -import ClipWidget from './clip.ts'; - - -const getKey = (r: Gtk.ListBoxRow): number => parseInt(r.get_child()?.name ?? '0'); - -export default () => { - let fzfResults = [] as FzfResultItem<[number, { clip: string, isImage: boolean }]>[]; - - return SortedList({ - name: 'clipboard', - class_name: 'clipboard', - transition: 'slide top', - - on_select: (r) => { - Clipboard.copyOldItem(getKey(r)); - App.closeWindow('win-clipboard'); - }, - - setup_list: (list, entry) => { - list.cursor = 'pointer'; - - const CONNECT_ID = Clipboard.connect('history-searched', () => { - // Do every clip that existed before this widget - Clipboard.clips.forEach((clip, key) => { - const widget = ClipWidget({ key, isImage: clip.isImage, val: clip.clip }); - - list.add(widget); - widget.show_all(); - }); - - // Setup connection for new clips - Clipboard.connect('clip-added', (_, [key, clip]) => { - const widget = ClipWidget({ key, isImage: clip.isImage, val: clip.clip }); - - list.add(widget); - widget.show_all(); - }); - - list.set_sort_func((a, b) => { - if (entry.text === '' || entry.text === '-') { - a.set_visible(true); - b.set_visible(true); - - return getKey(b) - getKey(a); - } - else { - const ROW_1 = fzfResults.find((f) => f.item[0] === getKey(a))?.score ?? 0; - const ROW_2 = fzfResults.find((f) => f.item[0] === getKey(b))?.score ?? 0; - - a.set_visible(ROW_1 !== 0); - b.set_visible(ROW_2 !== 0); - - return ROW_2 - ROW_1; - } - }); - - // Trigger on_text_change after init - entry.text = '-'; - - Clipboard.disconnect(CONNECT_ID); - }); - }, - - on_text_change: (text, list, placeholder) => { - const fzf = new Fzf([...Clipboard.clips.entries()], { - selector: ([_key, { clip }]) => clip, - - tiebreakers: [(a, b) => b[0] - a[0]], - }); - - fzfResults = fzf.find(text); - list.invalidate_sort(); - - const visibleApps = list.get_children().filter((row) => row.visible).length; - - placeholder.reveal_child = visibleApps <= 0; - }, - }); -}; diff --git a/nixosModules/ags/config/ts/corners/main.ts b/nixosModules/ags/config/ts/corners/main.ts deleted file mode 100644 index 921e4c74..00000000 --- a/nixosModules/ags/config/ts/corners/main.ts +++ /dev/null @@ -1,52 +0,0 @@ -const { Window } = Widget; - -import RoundedCorner from './screen-corners.ts'; - - -const TopLeft = () => Window({ - name: 'cornertl', - layer: 'overlay', - exclusivity: 'ignore', - anchor: ['top', 'left'], - visible: true, - click_through: true, - child: RoundedCorner('topleft'), -}); - -const TopRight = () => Window({ - name: 'cornertr', - layer: 'overlay', - exclusivity: 'ignore', - anchor: ['top', 'right'], - visible: true, - click_through: true, - child: RoundedCorner('topright'), -}); - -const BottomLeft = () => Window({ - name: 'cornerbl', - layer: 'overlay', - exclusivity: 'ignore', - anchor: ['bottom', 'left'], - visible: true, - click_through: true, - child: RoundedCorner('bottomleft'), -}); - -const BottomRight = () => Window({ - name: 'cornerbr', - layer: 'overlay', - exclusivity: 'ignore', - anchor: ['bottom', 'right'], - visible: true, - click_through: true, - child: RoundedCorner('bottomright'), -}); - - -export default () => [ - TopLeft(), - TopRight(), - BottomLeft(), - BottomRight(), -]; diff --git a/nixosModules/ags/config/ts/corners/screen-corners.ts b/nixosModules/ags/config/ts/corners/screen-corners.ts deleted file mode 100644 index 16ed64e5..00000000 --- a/nixosModules/ags/config/ts/corners/screen-corners.ts +++ /dev/null @@ -1,79 +0,0 @@ -const { Box, DrawingArea } = Widget; - -const { Gtk } = imports.gi; - -export default ( - place = 'top left', - css = 'background-color: black;', -) => Box({ - hpack: place.includes('left') ? 'start' : 'end', - vpack: place.includes('top') ? 'start' : 'end', - css: ` - padding: 1px; margin: - ${place.includes('top') ? '-1px' : '0'} - ${place.includes('right') ? '-1px' : '0'} - ${place.includes('bottom') ? '-1px' : '0'} - ${place.includes('left') ? '-1px' : '0'}; - `, - child: DrawingArea({ - css: ` - border-radius: 18px; - border-width: 0.068rem; - ${css} - `, - setup: (widget) => { - let r = widget.get_style_context() - .get_property('border-radius', Gtk.StateFlags.NORMAL); - - widget.set_size_request(r, r); - widget.connect('draw', (_, cr) => { - const c = widget.get_style_context() - .get_property('background-color', Gtk.StateFlags.NORMAL); - - r = widget.get_style_context() - .get_property('border-radius', Gtk.StateFlags.NORMAL); - - const borderColor = widget.get_style_context() - .get_property('color', Gtk.StateFlags.NORMAL); - - // You're going to write border-width: something anyway - const borderWidth = widget.get_style_context() - .get_border(Gtk.StateFlags.NORMAL).left; - - widget.set_size_request(r, r); - - switch (place) { - case 'topleft': - cr.arc(r, r, r, Math.PI, 3 * Math.PI / 2); - cr.lineTo(0, 0); - break; - - case 'topright': - cr.arc(0, r, r, 3 * Math.PI / 2, 2 * Math.PI); - cr.lineTo(r, 0); - break; - - case 'bottomleft': - cr.arc(r, 0, r, Math.PI / 2, Math.PI); - cr.lineTo(0, r); - break; - - case 'bottomright': - cr.arc(0, 0, r, 0, Math.PI / 2); - cr.lineTo(r, r); - break; - } - - cr.closePath(); - cr.setSourceRGBA(c.red, c.green, c.blue, c.alpha); - cr.fill(); - cr.setLineWidth(borderWidth); - cr.setSourceRGBA(borderColor.red, - borderColor.green, - borderColor.blue, - borderColor.alpha); - cr.stroke(); - }); - }, - }), -}); diff --git a/nixosModules/ags/config/ts/date/binto.ts b/nixosModules/ags/config/ts/date/binto.ts deleted file mode 100644 index d3f34ec8..00000000 --- a/nixosModules/ags/config/ts/date/binto.ts +++ /dev/null @@ -1,16 +0,0 @@ -import PopupWindow from '../misc/popup.ts'; -import CalendarWidget from './main.ts'; -import { get_gdkmonitor_from_desc } from '../lib.ts'; - - -const RIGHT_MARGIN = 20; - -export default () => PopupWindow({ - name: 'calendar', - anchor: ['bottom', 'right'], - margins: [0, RIGHT_MARGIN, 0, 0], - transition: 'slide bottom', - gdkmonitor: get_gdkmonitor_from_desc('desc:Acer Technologies Acer K212HQL T3EAA0014201'), - - child: CalendarWidget(), -}); diff --git a/nixosModules/ags/config/ts/date/main.ts b/nixosModules/ags/config/ts/date/main.ts deleted file mode 100644 index 4d8efbde..00000000 --- a/nixosModules/ags/config/ts/date/main.ts +++ /dev/null @@ -1,92 +0,0 @@ -const { Box, Calendar, Label } = Widget; - -const { new_now_local } = imports.gi.GLib.DateTime; - - -const Divider = () => Box({ - class_name: 'divider', - vertical: true, -}); - -const Time = () => Box({ - class_name: 'timebox', - vertical: true, - - children: [ - Box({ - class_name: 'time-container', - hpack: 'center', - vpack: 'center', - - children: [ - Label({ - class_name: 'content', - label: 'hour', - setup: (self) => { - self.poll(1000, () => { - self.label = new_now_local().format('%H') || ''; - }); - }, - }), - - Divider(), - - Label({ - class_name: 'content', - label: 'minute', - setup: (self) => { - self.poll(1000, () => { - self.label = new_now_local().format('%M') || ''; - }); - }, - }), - - ], - }), - - Box({ - class_name: 'date-container', - hpack: 'center', - - child: Label({ - css: 'font-size: 20px', - label: 'complete date', - - setup: (self) => { - self.poll(1000, () => { - const time = new_now_local(); - - const dayNameMonth = time.format('%A, %B '); - const dayNum = time.get_day_of_month(); - const date = time.format(', %Y'); - - if (dayNum && dayNameMonth && date) { - self.label = dayNameMonth + dayNum + date; - } - }); - }, - }), - }), - - ], -}); - -const CalendarWidget = () => Box({ - class_name: 'cal-box', - - child: Calendar({ - show_day_names: true, - show_heading: true, - class_name: 'cal', - }), -}); - -export default () => Box({ - class_name: 'date', - vertical: true, - - children: [ - Time(), - CalendarWidget(), - ], -}); diff --git a/nixosModules/ags/config/ts/date/wim.ts b/nixosModules/ags/config/ts/date/wim.ts deleted file mode 100644 index 6a2ecc59..00000000 --- a/nixosModules/ags/config/ts/date/wim.ts +++ /dev/null @@ -1,12 +0,0 @@ -import PopupWindow from '../misc/popup.ts'; -import CalendarWidget from './main.ts'; - -const TOP_MARGIN = 6; - -export default () => PopupWindow({ - name: 'calendar', - anchor: ['top'], - margins: [TOP_MARGIN, 0, 0, 0], - - child: CalendarWidget(), -}); diff --git a/nixosModules/ags/config/ts/lib.ts b/nixosModules/ags/config/ts/lib.ts deleted file mode 100644 index cc9ec921..00000000 --- a/nixosModules/ags/config/ts/lib.ts +++ /dev/null @@ -1,43 +0,0 @@ -const Hyprland = await Service.import('hyprland'); - -import Gdk from 'gi://Gdk?version=3.0'; - -/* Types */ -import { Monitor } from 'types/service/hyprland'; - - -export const get_hyprland_monitor = (monitor: Gdk.Monitor): Monitor | undefined => { - const manufacturer = monitor.manufacturer?.replace(',', ''); - const model = monitor.model?.replace(',', ''); - const start = `${manufacturer} ${model}`; - - return Hyprland.monitors.find((m) => m.description.startsWith(start)); -}; - -export const get_hyprland_monitor_desc = (monitor: Gdk.Monitor): string => { - const manufacturer = monitor.manufacturer?.replace(',', ''); - const model = monitor.model?.replace(',', ''); - const start = `${manufacturer} ${model}`; - - return `desc:${Hyprland.monitors.find((m) => m.description.startsWith(start))?.description}`; -}; - -export const get_gdkmonitor_from_desc = (desc: string): Gdk.Monitor => { - const display = Gdk.Display.get_default(); - - for (let m = 0; m < (display?.get_n_monitors() ?? 0); m++) { - const monitor = display?.get_monitor(m); - - if (monitor && desc === get_hyprland_monitor_desc(monitor)) { - return monitor; - } - } - - throw Error(`Monitor ${desc} not found`); -}; - -export const get_monitor_desc_from_id = (id: number): string => { - const monitor = Hyprland.monitors.find((m) => m.id === id); - - return `desc:${monitor?.description}`; -}; diff --git a/nixosModules/ags/config/ts/lockscreen/lock.ts b/nixosModules/ags/config/ts/lockscreen/lock.ts deleted file mode 100644 index 859b0898..00000000 --- a/nixosModules/ags/config/ts/lockscreen/lock.ts +++ /dev/null @@ -1,211 +0,0 @@ -const { Box, Entry, Label, Window } = Widget; - -import Gdk from 'gi://Gdk?version=3.0'; -import Gtk from 'gi://Gtk?version=3.0'; -import Lock from 'gi://GtkSessionLock?version=0.1'; - -// This file is generated by Nix -import Vars from './vars.ts'; - -import Separator from '../misc/separator.ts'; -import { get_hyprland_monitor_desc } from '../lib.ts'; - -/* Types */ -import { Box as AgsBox } from 'types/widgets/box'; - - -const lock = Lock.prepare_lock(); -const windows = new Map(); -const blurBGs: AgsBox[] = []; - -const transition_duration = 1000; -const WINDOW_MARGINS = -2; -const ENTRY_SPACING = 20; -const CLOCK_SPACING = 60; - -const bgCSS = ({ w = 1, h = 1 } = {}) => ` - border: 2px solid rgba(189, 147, 249, 0.8); - background: rgba(0, 0, 0, 0.2); - min-height: ${h}px; - min-width: ${w}px; - transition: min-height ${transition_duration / 2}ms, - min-width ${transition_duration / 2}ms; -`; - -const unlock = () => { - blurBGs.forEach((b) => { - b.css = bgCSS({ - w: b.attribute.geometry.w, - h: 1, - }); - - Utils.timeout(transition_duration / 2, () => { - b.css = bgCSS({ - w: 1, - h: 1, - }); - }); - }); - Utils.timeout(transition_duration, () => { - lock.unlock_and_destroy(); - Gdk.Display.get_default()?.sync(); - App.quit(); - }); -}; - -const Clock = () => Label({ class_name: 'clock' }) - .poll(1000, (self) => { - self.label = (new Date().toLocaleString([], { - hour: 'numeric', - minute: 'numeric', - hour12: true, - }) ?? '') - .replace('a.m.', 'AM') - .replace('p.m.', 'PM'); - }); - -const PasswordPrompt = (monitor: Gdk.Monitor, visible: boolean) => { - const rev = Box({ - css: bgCSS(), - attribute: { - geometry: {} as { w: number, h: number }, - }, - - setup: (self) => Utils.idle(() => { - self.attribute.geometry = { - w: monitor.geometry.width, - h: monitor.geometry.height, - }; - - self.css = bgCSS({ - w: self.attribute.geometry.w, - h: 1, - }); - - Utils.timeout(transition_duration / 2, () => { - self.css = bgCSS({ - w: self.attribute.geometry.w, - h: self.attribute.geometry.h, - }); - }); - }), - }); - - blurBGs.push(rev); - - Window({ - name: `blur-bg-${monitor.get_model()}`, - gdkmonitor: monitor, - layer: 'overlay', - anchor: ['top', 'bottom', 'right', 'left'], - margins: [WINDOW_MARGINS], - exclusivity: 'ignore', - - child: Box({ - hexpand: false, - vexpand: false, - hpack: 'center', - vpack: 'center', - child: rev, - }), - }); - - const label = Label('Enter password:'); - - return new Gtk.Window({ - child: visible ? - Box({ - vertical: true, - vpack: 'center', - hpack: 'center', - spacing: 16, - - children: [ - Clock(), - - Separator(CLOCK_SPACING, { vertical: true }), - - Box({ - hpack: 'center', - class_name: 'avatar', - }), - - Box({ - class_name: 'entry-box', - vertical: true, - children: [ - label, - - Separator(ENTRY_SPACING, { vertical: true }), - - Entry({ - hpack: 'center', - xalign: 0.5, - visibility: false, - placeholder_text: 'password', - - on_accept: (self) => { - self.sensitive = false; - - Utils.authenticate(self.text ?? '') - .then(() => unlock()) - .catch((e) => { - self.text = ''; - label.label = e.message; - self.sensitive = true; - }); - }, - }).on('realize', (entry) => entry.grab_focus()), - ], - }), - ], - }) : - Box(), - }); -}; - -const createWindow = (monitor: Gdk.Monitor) => { - const hyprDesc = get_hyprland_monitor_desc(monitor); - const entryVisible = Vars.mainMonitor === hyprDesc || Vars.dupeLockscreen; - const win = PasswordPrompt(monitor, entryVisible); - - windows.set(monitor, win); -}; - -const lock_screen = () => { - const display = Gdk.Display.get_default(); - - for (let m = 0; m < (display?.get_n_monitors() ?? 0); m++) { - const monitor = display?.get_monitor(m); - - if (monitor) { - createWindow(monitor); - } - } - display?.connect('monitor-added', (_, monitor) => { - createWindow(monitor); - }); - lock.lock_lock(); - windows.forEach((win, monitor) => { - lock.new_surface(win, monitor); - win.show(); - }); -}; - -const on_finished = () => { - lock.destroy(); - Gdk.Display.get_default()?.sync(); - App.quit(); -}; - -lock.connect('finished', on_finished); - -if (Vars.hasFprintd) { - globalThis.authFinger = () => Utils.authenticate('') - .then(() => unlock()) - .catch(logError); - globalThis.authFinger(); -} - - -export default () => lock_screen(); diff --git a/nixosModules/ags/config/ts/lockscreen/main.ts b/nixosModules/ags/config/ts/lockscreen/main.ts deleted file mode 100644 index 629fe150..00000000 --- a/nixosModules/ags/config/ts/lockscreen/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import LaunchLockscreen from './lock.ts'; - - -LaunchLockscreen(); diff --git a/nixosModules/ags/config/ts/misc/audio-icons.ts b/nixosModules/ags/config/ts/misc/audio-icons.ts deleted file mode 100644 index fbbd7e05..00000000 --- a/nixosModules/ags/config/ts/misc/audio-icons.ts +++ /dev/null @@ -1,57 +0,0 @@ -const Audio = await Service.import('audio'); - -const speakerIcons = { - 101: 'audio-volume-overamplified-symbolic', - 67: 'audio-volume-high-symbolic', - 34: 'audio-volume-medium-symbolic', - 1: 'audio-volume-low-symbolic', - 0: 'audio-volume-muted-symbolic', -}; - -const micIcons = { - 67: 'audio-input-microphone-high-symbolic', - 34: 'audio-input-microphone-medium-symbolic', - 1: 'audio-input-microphone-low-symbolic', - 0: 'audio-input-microphone-muted-symbolic', -}; - - -export const SpeakerIcon = Variable(''); -Audio.connect('speaker-changed', () => { - if (!Audio.speaker) { - return; - } - - if (Audio.speaker.stream?.is_muted) { - SpeakerIcon.setValue(speakerIcons[0]); - } - else { - const vol = Audio.speaker.volume * 100; - - for (const threshold of [-1, 0, 33, 66, 100]) { - if (vol > threshold + 1) { - SpeakerIcon.setValue(speakerIcons[threshold + 1]); - } - } - } -}); - -export const MicIcon = Variable(''); -Audio.connect('microphone-changed', () => { - if (!Audio.microphone) { - return; - } - - if (Audio.microphone.stream?.is_muted) { - MicIcon.setValue(micIcons[0]); - } - else { - const vol = Audio.microphone.volume * 100; - - for (const threshold of [-1, 0, 33, 66]) { - if (vol > threshold + 1) { - MicIcon.setValue(micIcons[threshold + 1]); - } - } - } -}); diff --git a/nixosModules/ags/config/ts/misc/background-fade.ts b/nixosModules/ags/config/ts/misc/background-fade.ts deleted file mode 100644 index a990cdec..00000000 --- a/nixosModules/ags/config/ts/misc/background-fade.ts +++ /dev/null @@ -1,15 +0,0 @@ -const { Window } = Widget; - - -export default () => Window({ - name: 'bg-gradient', - layer: 'background', - exclusivity: 'ignore', - anchor: ['top', 'bottom', 'left', 'right'], - css: ` - background-image: -gtk-gradient (linear, - left top, left bottom, - from(rgba(0, 0, 0, 0.5)), - to(rgba(0, 0, 0, 0))); - `, -}); diff --git a/nixosModules/ags/config/ts/misc/closer.ts b/nixosModules/ags/config/ts/misc/closer.ts deleted file mode 100644 index 60a7c300..00000000 --- a/nixosModules/ags/config/ts/misc/closer.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Types -import { PopupWindow } from 'global-types'; - - -export default () => { - (App.windows as PopupWindow[]) - .filter((w) => w && - w.close_on_unfocus && - w.close_on_unfocus !== 'stay') - .forEach((w) => { - App.closeWindow(w.name); - }); -}; diff --git a/nixosModules/ags/config/ts/misc/cursorbox.ts b/nixosModules/ags/config/ts/misc/cursorbox.ts deleted file mode 100644 index 39bfad58..00000000 --- a/nixosModules/ags/config/ts/misc/cursorbox.ts +++ /dev/null @@ -1,270 +0,0 @@ -import Gtk from 'gi://Gtk?version=3.0'; -import Gdk from 'gi://Gdk?version=3.0'; - -// Types -import { BaseProps, Widget as AgsWidget } from 'types/widgets/widget'; -type EventHandler = (self: Self, event: Gdk.Event) => boolean | unknown; - -// eslint-disable-next-line -export interface CursorBox extends AgsWidget { } - -export type CursorBoxProps< - Child extends Gtk.Widget, - Attr = unknown, - Self = CursorBox, -> = BaseProps - on_hover_lost?: EventHandler - - on_scroll_up?: EventHandler - on_scroll_down?: EventHandler - - on_primary_click?: EventHandler - on_middle_click?: EventHandler - on_secondary_click?: EventHandler - - on_primary_click_release?: EventHandler - on_middle_click_release?: EventHandler - on_secondary_click_release?: EventHandler -}, Attr>; - - -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -export class CursorBox extends Gtk.EventBox { - static { - Widget.register(this, { - properties: { - 'on-clicked': ['jsobject', 'rw'], - - 'on-hover': ['jsobject', 'rw'], - 'on-hover-lost': ['jsobject', 'rw'], - - 'on-scroll-up': ['jsobject', 'rw'], - 'on-scroll-down': ['jsobject', 'rw'], - - 'on-primary-click': ['jsobject', 'rw'], - 'on-secondary-click': ['jsobject', 'rw'], - 'on-middle-click': ['jsobject', 'rw'], - - 'on-primary-click-release': ['jsobject', 'rw'], - 'on-secondary-click-release': ['jsobject', 'rw'], - 'on-middle-click-release': ['jsobject', 'rw'], - }, - }); - } - - constructor(props: CursorBoxProps = {}) { - super(props as Gtk.EventBox.ConstructorProperties); - this.add_events(Gdk.EventMask.SCROLL_MASK); - this.add_events(Gdk.EventMask.SMOOTH_SCROLL_MASK); - - // Gesture stuff - const gesture = Gtk.GestureMultiPress.new(this); - - this.hook(gesture, (_, _n, x, y) => { - if (!x || !y) { - return; - } - - this.#canRun.setValue(!( - x > this.get_allocated_width() || - x <= 0 || - y > this.get_allocated_height() || - y <= 0 - )); - }, 'released'); - - this.connect('enter-notify-event', (_, event: Gdk.Event) => { - this.set_state_flags(Gtk.StateFlags.PRELIGHT, false); - - if (!this.#display) { - return; - } - this.window.set_cursor(Gdk.Cursor.new_from_name( - this.#display, - this.#disabled.value ? - 'not-allowed' : - 'pointer', - )); - - return this.on_hover?.(this, event); - }); - - this.connect('leave-notify-event', (_, event: Gdk.Event) => { - this.unset_state_flags(Gtk.StateFlags.PRELIGHT); - - this.window.set_cursor(null); - - return this.on_hover_lost?.(this, event); - }); - - this.connect('button-press-event', (_, event: Gdk.Event) => { - this.set_state_flags(Gtk.StateFlags.ACTIVE, false); - if (this.#disabled.value) { - return; - } - - if (event.get_button()[1] === Gdk.BUTTON_PRIMARY) { - return this.on_primary_click?.(this, event); - } - - else if (event.get_button()[1] === Gdk.BUTTON_MIDDLE) { - return this.on_middle_click?.(this, event); - } - - else if (event.get_button()[1] === Gdk.BUTTON_SECONDARY) { - return this.on_secondary_click?.(this, event); - } - }); - - this.connect('button-release-event', (_, event: Gdk.Event) => { - this.unset_state_flags(Gtk.StateFlags.ACTIVE); - if (this.#disabled.value) { - return; - } - - if (event.get_button()[1] === Gdk.BUTTON_PRIMARY) { - // Every click, do a one shot connect to - // CanRun to wait for location of click - const id = this.#canRun.connect('changed', () => { - if (this.#canRun.value) { - this.on_primary_click_release?.(this, event); - } - - this.#canRun.disconnect(id); - }); - } - - else if (event.get_button()[1] === Gdk.BUTTON_MIDDLE) { - return this.on_middle_click_release?.(this, event); - } - - else if (event.get_button()[1] === Gdk.BUTTON_SECONDARY) { - return this.on_secondary_click_release?.(this, event); - } - }); - - this.connect('scroll-event', (_, event: Gdk.Event) => { - if (event.get_scroll_deltas()[2] < 0) { - return this.on_scroll_up?.(this, event); - } - - else if (event.get_scroll_deltas()[2] > 0) { - return this.on_scroll_down?.(this, event); - } - }); - - this.hook(this.#disabled, () => { - this.toggleClassName('disabled', this.#disabled.value); - }); - } - - #display = Gdk.Display.get_default(); - - // Make this variable to know if the function should - // be executed depending on where the click is released - #canRun = Variable(true); - #disabled = Variable(false); - - get disabled() { - return this.#disabled.value; - } - - set disabled(value: boolean) { - this.#disabled.setValue(value); - } - - get child() { - return super.child as Child; - } - - set child(child: Child) { - super.child = child; - } - - - get on_hover() { - return this._get('on-hover'); - } - - set on_hover(callback: EventHandler) { - this._set('on-hover', callback); - } - - get on_hover_lost() { - return this._get('on-hover-lost'); - } - - set on_hover_lost(callback: EventHandler) { - this._set('on-hover-lost', callback); - } - - get on_scroll_up() { - return this._get('on-scroll-up'); - } - - set on_scroll_up(callback: EventHandler) { - this._set('on-scroll-up', callback); - } - - get on_scroll_down() { - return this._get('on-scroll-down'); - } - - set on_scroll_down(callback: EventHandler) { - this._set('on-scroll-down', callback); - } - - get on_primary_click() { - return this._get('on-primary-click'); - } - - set on_primary_click(callback: EventHandler) { - this._set('on-primary-click', callback); - } - - get on_middle_click() { - return this._get('on-middle-click'); - } - - set on_middle_click(callback: EventHandler) { - this._set('on-middle-click', callback); - } - - get on_secondary_click() { - return this._get('on-secondary-click'); - } - - set on_secondary_click(callback: EventHandler) { - this._set('on-secondary-click', callback); - } - - get on_primary_click_release() { - return this._get('on-primary-click-release'); - } - - set on_primary_click_release(callback: EventHandler) { - this._set('on-primary-click-release', callback); - } - - get on_middle_click_release() { - return this._get('on-middle-click-release'); - } - - set on_middle_click_release(callback: EventHandler) { - this._set('on-middle-click-release', callback); - } - - get on_secondary_click_release() { - return this._get('on-secondary-click-release'); - } - - set on_secondary_click_release(callback: EventHandler) { - this._set('on-secondary-click-release', callback); - } -} - -export default ( - props?: CursorBoxProps, -) => new CursorBox(props ?? {}); diff --git a/nixosModules/ags/config/ts/misc/persist.ts b/nixosModules/ags/config/ts/misc/persist.ts deleted file mode 100644 index 9ad566a4..00000000 --- a/nixosModules/ags/config/ts/misc/persist.ts +++ /dev/null @@ -1,54 +0,0 @@ -const { execAsync, readFileAsync, timeout } = Utils; -const { get_home_dir } = imports.gi.GLib; - -import GObject from 'types/@girs/gobject-2.0/gobject-2.0'; - -interface Persist { - name: string - gobject: GObject.Object - prop: string - condition?: boolean | string // If string, compare following props to this - whenTrue?: boolean | string - whenFalse?: boolean | string - signal?: string -} - - -export default ({ - name, - gobject, - prop, - condition = true, - whenTrue = condition, - whenFalse = false, - signal = 'changed', -}: Persist) => { - const cacheFile = `${get_home_dir()}/.cache/ags/.${name}`; - - const stateCmd = () => ['bash', '-c', - `echo ${gobject[prop] === condition} > ${cacheFile}`]; - - const monitorState = () => { - gobject.connect(signal, () => { - execAsync(stateCmd()).catch(print); - }); - }; - - readFileAsync(cacheFile) - .then((content) => { - // JSON.parse was the only way I found to reliably - // convert a string of 'true' or 'false' into a bool - gobject[prop] = JSON.parse(content) ? whenTrue : whenFalse; - - timeout(1000, () => { - monitorState(); - }); - }) - .catch(() => { - execAsync(stateCmd()) - .then(() => { - monitorState(); - }) - .catch(print); - }); -}; diff --git a/nixosModules/ags/config/ts/misc/popup.ts b/nixosModules/ags/config/ts/misc/popup.ts deleted file mode 100644 index 37021299..00000000 --- a/nixosModules/ags/config/ts/misc/popup.ts +++ /dev/null @@ -1,183 +0,0 @@ -import Gtk from 'gi://Gtk?version=3.0'; -const Hyprland = await Service.import('hyprland'); - -import { get_hyprland_monitor } from '../lib.ts'; - -/* Types */ -import { Window } from 'resource:///com/github/Aylur/ags/widgets/window.js'; -import type { WindowProps } from 'types/widgets/window'; -import type { Widget as AgsWidget } from 'types/widgets/widget'; - -// eslint-disable-next-line -export interface PopupWindow extends AgsWidget { } - -import { - CloseType, - HyprTransition, -} from 'global-types'; - -export type PopupWindowProps< - Child extends Gtk.Widget, - Attr = unknown, - Self = PopupWindow, -> = WindowProps & { - transition?: HyprTransition - on_open?(self: PopupWindow): void - on_close?(self: PopupWindow): void - close_on_unfocus?: CloseType - anchor?: ('top' | 'bottom' | 'right' | 'left')[] -}; - - -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -export class PopupWindow< - Child extends Gtk.Widget, - Attr, -> extends Window { - static { - Widget.register(this, { - properties: { - close_on_unfocus: ['string', 'rw'], - transition: ['string', 'rw'], - }, - }); - } - - - private _close_on_unfocus: CloseType; - - get close_on_unfocus() { - return this._close_on_unfocus; - } - - set close_on_unfocus(value: CloseType) { - this._close_on_unfocus = value; - } - - - private _transition = 'unset' as HyprTransition; - - get transition() { - return this._transition; - } - - set transition(t: HyprTransition) { - Hyprland.messageAsync( - `keyword layerrule animation ${t}, ${this.name}`, - ).catch(logError); - this._transition = t; - } - - - // eslint-disable-next-line no-use-before-define - protected _on_open: (self: PopupWindow) => void; - - get on_open() { - return this._on_open; - } - - set on_open(fun: (self: PopupWindow) => void) { - this._on_open = fun; - } - - - // eslint-disable-next-line no-use-before-define - private _on_close: (self: PopupWindow) => void; - - get on_close() { - return this._on_close; - } - - set on_close(fun: (self: PopupWindow) => void) { - this._on_close = fun; - } - - - constructor({ - transition = 'slide top', - on_open = () => { /**/ }, - on_close = () => { /**/ }, - - // Window props - name, - visible = false, - anchor = [], - layer = 'overlay', - close_on_unfocus = 'released', - ...rest - }: PopupWindowProps) { - super({ - ...rest, - name: `win-${name}`, - visible, - anchor, - layer, - setup: () => { - const id = App.connect('config-parsed', () => { - // Add way to make window open on startup - if (visible) { - App.openWindow(`win-${name}`); - } - - // This connection should always run only once - App.disconnect(id); - }); - }, - }); - - this._close_on_unfocus = close_on_unfocus; - this._on_open = on_open; - this._on_close = on_close; - - this.hook(App, (_, currentName, isOpen) => { - if (currentName === `win-${name}`) { - // Make sure we have the right animation - this.transition = transition; - - if (isOpen) { - this._on_open(this); - } - else { - this._on_close(this); - } - } - }); - } - - set_x_pos( - alloc: Gtk.Allocation, - side = 'right' as 'left' | 'right', - ) { - const monitor = this.gdkmonitor ?? - this.get_display().get_monitor_at_point(alloc.x, alloc.y); - - const transform = get_hyprland_monitor(monitor)?.transform; - - let width: number; - - if (transform && (transform === 1 || transform === 3)) { - width = monitor.get_geometry().height; - } - else { - width = monitor.get_geometry().width; - } - - this.margins = [ - this.margins[0], - - side === 'right' ? - (width - alloc.x - alloc.width) : - this.margins[1], - - this.margins[2], - - side === 'right' ? - this.margins[3] : - (alloc.x - alloc.width), - ]; - } -} - -export default ( - props: PopupWindowProps, -) => new PopupWindow(props); diff --git a/nixosModules/ags/config/ts/misc/separator.ts b/nixosModules/ags/config/ts/misc/separator.ts deleted file mode 100644 index cbdba272..00000000 --- a/nixosModules/ags/config/ts/misc/separator.ts +++ /dev/null @@ -1,13 +0,0 @@ -const { Box } = Widget; - - -export default (size: number, { - vertical = false, - css = '', - ...props -} = {}) => { - return Box({ - css: `${vertical ? 'min-height' : 'min-width'}: ${size}px; ${css}`, - ...props, - }); -}; diff --git a/nixosModules/ags/config/ts/misc/sorted-list.ts b/nixosModules/ags/config/ts/misc/sorted-list.ts deleted file mode 100644 index 8541c6f0..00000000 --- a/nixosModules/ags/config/ts/misc/sorted-list.ts +++ /dev/null @@ -1,201 +0,0 @@ -const Hyprland = await Service.import('hyprland'); - -const { Box, Entry, Icon, Label, ListBox, Revealer, Scrollable } = Widget; - -/* Types */ -import { PopupWindow, PopupWindowProps } from '../misc/popup.ts'; -import type { Widget as AgsWidget } from 'types/widgets/widget'; -import { ListBoxRow } from 'types/@girs/gtk-3.0/gtk-3.0.cjs'; -import { Monitor } from 'types/service/hyprland'; -import { Binding } from 'types/service'; - -// eslint-disable-next-line @typescript-eslint/no-empty-object-type -export interface SortedList extends AgsWidget { } - -// eslint-disable-next-line no-use-before-define -type MakeChild = ReturnType; - -type SortedListProps> = - PopupWindowProps & { - on_select?: (row: ListBoxRow) => void - init_rows?: (list: MakeChild['list']) => void - on_text_change?: ( - text: string, - list: MakeChild['list'], - placeholder: MakeChild['placeholder'], - ) => void - setup_list?: (list: MakeChild['list'], entry: MakeChild['entry']) => void - }; - - - -const centerCursor = async(): Promise => { - let x: number; - let y: number; - const monitor = (JSON.parse(await Hyprland.messageAsync('j/monitors')) as Monitor[]) - .find((m) => m.focused) as Monitor; - - switch (monitor.transform) { - case 1: - x = monitor.x - (monitor.height / 2); - y = monitor.y - (monitor.width / 2); - break; - - case 2: - x = monitor.x - (monitor.width / 2); - y = monitor.y - (monitor.height / 2); - break; - - case 3: - x = monitor.x + (monitor.height / 2); - y = monitor.y + (monitor.width / 2); - break; - - default: - x = monitor.x + (monitor.width / 2); - y = monitor.y + (monitor.height / 2); - break; - } - - await Hyprland.messageAsync(`dispatch movecursor ${x} ${y}`); -}; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const makeChild = (class_name: string | Binding) => { - const list = ListBox(); - - const placeholder = Revealer({ - child: Label({ - label: "๏”ฐ Couldn't find a match", - class_name: 'placeholder', - }), - }); - - const entry = Entry({ - // Set some text so on-change works the first time - text: '-', - hexpand: true, - }); - - const scrollable = Scrollable({ - hscroll: 'never', - vscroll: 'automatic', - child: Box({ - vertical: true, - children: [list, placeholder], - }), - }); - - return { - list, - entry, - placeholder, - scrollable, - - child: Box({ - class_name, - vertical: true, - children: [ - Box({ - class_name: 'header', - children: [ - Icon('preferences-system-search-symbolic'), - entry, - ], - }), - - scrollable, - ], - }), - }; -}; - -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -export class SortedList< - Attr, -> extends PopupWindow { - static { - Widget.register(this, { - properties: { - }, - }); - } - - private _list: MakeChild['list']; - private _entry: MakeChild['entry']; - private _placeholder: MakeChild['placeholder']; - private _scrollable: MakeChild['scrollable']; - private _on_select: (row: ListBoxRow) => void; - private _init_rows: (list: MakeChild['list']) => void; - private _on_text_change: ( - text: string, - list: MakeChild['list'], - placeholder: MakeChild['placeholder'], - ) => void; - - set on_open(fun: (self: PopupWindow) => void) { - this._on_open = () => { - this._entry.text = ''; - fun(this); - this._init_rows(this._list); - centerCursor(); - - const adjustScroll = this._scrollable.vadjustment; - - this._scrollable.vadjustment.set_value(adjustScroll.lower); - this._entry.grab_focus(); - }; - } - - constructor({ - on_select = () => { /**/ }, - init_rows = () => { /**/ }, - on_text_change = () => { /**/ }, - setup_list = () => { /**/ }, - on_open = () => { /**/ }, - class_name = '', - keymode = 'on-demand', - ...rest - }: SortedListProps>) { - const makeChildResult = makeChild(class_name); - - // PopupWindow - super({ - child: makeChildResult.child, - keymode, - ...rest, - }); - - this.on_open = on_open; - - // SortedList - this._on_select = on_select; - this._init_rows = init_rows; - this._on_text_change = on_text_change; - - this._placeholder = makeChildResult.placeholder; - this._scrollable = makeChildResult.scrollable; - - this._list = makeChildResult.list; - this._list.on('row-activated', (_, row) => { - this._on_select(row); - }); - - this._entry = makeChildResult.entry; - - this._entry.on_change = ({ text }) => { - if (text !== null || typeof text === 'string') { - this._on_text_change(text, this._list, this._placeholder); - } - }; - // TODO: add on_accept where it just selects the first visible one - - setup_list(this._list, this._entry); - this._init_rows(this._list); - this._on_text_change('', this._list, this._placeholder); - } -} - -export default ( - props: SortedListProps>, -) => new SortedList(props); diff --git a/nixosModules/ags/config/ts/notifications/base.ts b/nixosModules/ags/config/ts/notifications/base.ts deleted file mode 100644 index b6db822e..00000000 --- a/nixosModules/ags/config/ts/notifications/base.ts +++ /dev/null @@ -1,289 +0,0 @@ -const Applications = await Service.import('applications'); -const Hyprland = await Service.import('hyprland'); -const Notifications = await Service.import('notifications'); - -const { Box, Icon, Label, Button } = Widget; -const { lookUpIcon } = Utils; - -const { GLib } = imports.gi; - -import Gesture from './gesture.ts'; -import CursorBox from '../misc/cursorbox.ts'; -import { launchApp } from '../applauncher/launch.ts'; - -// Types -import { Notification as NotifObj } from 'types/service/notifications.ts'; -import { Client } from 'types/service/hyprland.ts'; -interface NotificationWidget { - notif: NotifObj - slideIn?: 'Left' | 'Right' - command?(): void -} -import { - CursorBox as CBox, - EventBoxGeneric, - NotifGesture, -} from 'global-types'; - - -// Set Notifications settings -Notifications.popupTimeout = 5000; -Notifications.cacheActions = true; - -const setTime = (time: number) => { - return GLib.DateTime - .new_from_unix_local(time) - .format('%H:%M'); -}; - -const getDragState = (box: EventBoxGeneric) => (box - .get_parent() - ?.get_parent() - ?.get_parent() - ?.get_parent() - ?.get_parent() as NotifGesture) - ?.attribute.dragging; - - -const NotificationIcon = (notif: NotifObj) => { - let iconCmd = (box: CBox): void => { - if (!box) { - console.log(); - } - }; - - if (notif.app_entry && Applications.query(notif.app_entry).length > 0) { - const app = Applications.query(notif.app_entry)[0]; - - let wmClass = app.app.get_string('StartupWMClass'); - - if (app.app?.get_filename()?.includes('discord')) { - wmClass = 'discord'; - } - - if (wmClass != null) { - iconCmd = (box) => { - if (!getDragState(box)) { - if (wmClass === 'Proton Mail') { - Hyprland.messageAsync('dispatch ' + - 'togglespecialworkspace thunder'); - } - else if (wmClass === 'Spotify') { - Hyprland.messageAsync('dispatch ' + - 'togglespecialworkspace spot'); - } - else { - Hyprland.messageAsync('j/clients').then((msg) => { - const clients = JSON.parse(msg) as Client[]; - const classes = [] as string[]; - - for (const key of clients) { - if (key.class) { - classes.push(key.class); - } - } - - if (wmClass && classes.includes(wmClass)) { - Hyprland.messageAsync('dispatch ' + - `focuswindow ^(${wmClass})`); - } - else { - Hyprland.messageAsync('dispatch workspace empty') - .then(() => { - launchApp(app); - }); - } - }); - } - - globalThis.closeAll(); - } - }; - } - } - - if (notif.image) { - return CursorBox({ - on_primary_click_release: (self) => { - iconCmd(self); - }, - - child: Box({ - vpack: 'start', - hexpand: false, - class_name: 'icon img', - css: ` - background-image: url("${notif.image}"); - background-size: contain; - background-repeat: no-repeat; - background-position: center; - min-width: 78px; - min-height: 78px; - `, - }), - }); - } - - let icon = 'dialog-information-symbolic'; - - if (lookUpIcon(notif.app_icon)) { - icon = notif.app_icon; - } - - - if (notif.app_entry && lookUpIcon(notif.app_entry)) { - icon = notif.app_entry; - } - - - return CursorBox({ - on_primary_click_release: (self) => { - iconCmd(self); - }, - - child: Box({ - vpack: 'start', - hexpand: false, - class_name: 'icon', - css: ` - min-width: 78px; - min-height: 78px; - `, - children: [Icon({ - icon, - size: 58, - hpack: 'center', - hexpand: true, - vpack: 'center', - vexpand: true, - })], - }), - }); -}; - -// Make a variable to connect to for Widgets -// to know when there are notifs or not -export const HasNotifs = Variable(false); - -export const Notification = ({ - notif, - slideIn = 'Left', - command = () => { /**/ }, -}: NotificationWidget) => { - if (!notif) { - return; - } - - const BlockedApps = [ - 'Spotify', - ]; - - if (BlockedApps.find((app) => app === notif.app_name)) { - notif.close(); - - return; - } - - HasNotifs.setValue(Notifications.notifications.length > 0); - - // Init notif - const notifWidget = Gesture({ - command, - slideIn, - id: notif.id, - }); - - // Add body to notif - (notifWidget.child as EventBoxGeneric).add(Box({ - class_name: `notification ${notif.urgency}`, - vexpand: false, - - // Notification - child: Box({ - vertical: true, - children: [ - - // Content - Box({ - children: [ - NotificationIcon(notif), - - Box({ - hexpand: true, - vertical: true, - children: [ - - // Top of Content - Box({ - children: [ - - // Title - Label({ - class_name: 'title', - xalign: 0, - justification: 'left', - hexpand: true, - max_width_chars: 24, - truncate: 'end', - wrap: true, - label: notif.summary, - use_markup: notif.summary - .startsWith('<'), - }), - - // Time - Label({ - class_name: 'time', - vpack: 'start', - label: setTime(notif.time), - }), - - // Close button - CursorBox({ - child: Button({ - class_name: 'close-button', - vpack: 'start', - - on_primary_click_release: () => - notif.close(), - - child: Icon('window-close' + - '-symbolic'), - }), - }), - ], - }), - - // Description - Label({ - class_name: 'description', - hexpand: true, - use_markup: true, - xalign: 0, - justification: 'left', - label: notif.body, - wrap: true, - }), - ], - }), - ], - }), - - // Actions - Box({ - class_name: 'actions', - children: notif.actions.map((action) => Button({ - class_name: 'action-button', - hexpand: true, - - on_primary_click_release: () => notif.invoke(action.id), - - child: Label(action.label), - })), - }), - ], - }), - })); - - return notifWidget; -}; diff --git a/nixosModules/ags/config/ts/notifications/binto.ts b/nixosModules/ags/config/ts/notifications/binto.ts deleted file mode 100644 index 4c6ae186..00000000 --- a/nixosModules/ags/config/ts/notifications/binto.ts +++ /dev/null @@ -1,27 +0,0 @@ -const { Window } = Widget; - -import NotifCenterWidget from './center.ts'; -import PopUpsWidget from './popup.ts'; - -import PopupWindow from '../misc/popup.ts'; -import { get_gdkmonitor_from_desc } from '../lib.ts'; - - -export const NotifPopups = () => Window({ - name: 'notifications', - anchor: ['bottom', 'left'], - layer: 'overlay', - gdkmonitor: get_gdkmonitor_from_desc('desc:Acer Technologies Acer K212HQL T3EAA0014201'), - - child: PopUpsWidget(), -}); - - -export const NotifCenter = () => PopupWindow({ - name: 'notification-center', - anchor: ['bottom', 'right'], - transition: 'slide bottom', - gdkmonitor: get_gdkmonitor_from_desc('desc:Acer Technologies Acer K212HQL T3EAA0014201'), - - child: NotifCenterWidget(), -}); diff --git a/nixosModules/ags/config/ts/notifications/center.ts b/nixosModules/ags/config/ts/notifications/center.ts deleted file mode 100644 index 73b25d1b..00000000 --- a/nixosModules/ags/config/ts/notifications/center.ts +++ /dev/null @@ -1,167 +0,0 @@ -const Notifications = await Service.import('notifications'); - -const { Label, Box, Icon, Scrollable, Revealer } = Widget; -const { timeout } = Utils; - -import { Notification, HasNotifs } from './base.ts'; -import CursorBox from '../misc/cursorbox.ts'; - -// Types -import { Notification as NotifObj } from 'resource:///com/github/Aylur/ags/service/notifications.js'; -import { BoxGeneric, NotifGesture } from 'global-types'; - - -const addNotif = (box: BoxGeneric, notif: NotifObj) => { - if (notif) { - const NewNotif = Notification({ - notif, - slideIn: 'Right', - command: () => notif.close(), - }); - - if (NewNotif) { - box.pack_end(NewNotif, false, false, 0); - box.show_all(); - } - } -}; - -const NotificationList = () => Box({ - vertical: true, - vexpand: true, - vpack: 'start', - visible: HasNotifs.bind(), - - setup: (self) => { - const initNotifId = 1337; - const delay = 2000; - - // Fix the no notif placement with a fake notif - Notifications.Notify('', initNotifId, '', '', '', [''], {}, 0); - setTimeout(() => { - Notifications.getNotification(initNotifId)?.close(); - }, delay); - - self - .hook(Notifications, (box, id) => { - // Handle cached notifs - if (box.children.length === 0) { - Notifications.notifications.forEach((n) => { - addNotif(box, n); - }); - } - - else if (id) { - const notifObj = Notifications.getNotification(id); - - if (notifObj) { - addNotif(box, notifObj); - } - } - }, 'notified') - - .hook(Notifications, (box, id) => { - const notif = (box.children as NotifGesture[]) - .find((ch) => ch.attribute.id === id); - - if (notif?.sensitive) { - notif.attribute.slideAway('Right'); - } - }, 'closed'); - }, -}); - -const ClearButton = () => CursorBox({ - class_name: 'clear', - - on_primary_click_release: () => { - Notifications.clear(); - timeout(1000, () => App.closeWindow('win-notification-center')); - }, - - setup: (self) => { - self.hook(HasNotifs, () => { - self.disabled = !HasNotifs.value; - }); - }, - - child: Box({ - - children: [ - Label('Clear '), - - Icon({ - setup: (self) => { - self.hook(Notifications, () => { - self.icon = Notifications.notifications.length > 0 ? - 'user-trash-full-symbolic' : - 'user-trash-symbolic'; - }); - }, - }), - ], - }), -}); - -const Header = () => Box({ - class_name: 'header', - children: [ - Label({ - label: 'Notifications', - hexpand: true, - xalign: 0, - }), - ClearButton(), - ], -}); - -const Placeholder = () => Revealer({ - transition: 'crossfade', - reveal_child: HasNotifs.bind() - .transform((v) => !v), - - child: Box({ - class_name: 'placeholder', - vertical: true, - vpack: 'center', - hpack: 'center', - vexpand: true, - hexpand: true, - - children: [ - Icon('notification-disabled-symbolic'), - Label('Your inbox is empty'), - ], - }), -}); - -export default () => Box({ - class_name: 'notification-center', - vertical: true, - children: [ - Header(), - - Box({ - class_name: 'notification-wallpaper-box', - - children: [ - Scrollable({ - class_name: 'notification-list-box', - hscroll: 'never', - vscroll: 'automatic', - - child: Box({ - class_name: 'notification-list', - vertical: true, - - children: [ - NotificationList(), - - Placeholder(), - ], - }), - }), - ], - }), - ], -}); diff --git a/nixosModules/ags/config/ts/notifications/gesture.ts b/nixosModules/ags/config/ts/notifications/gesture.ts deleted file mode 100644 index 237fbc81..00000000 --- a/nixosModules/ags/config/ts/notifications/gesture.ts +++ /dev/null @@ -1,223 +0,0 @@ -const Notifications = await Service.import('notifications'); - -const { Box, EventBox } = Widget; -const { timeout } = Utils; - -import { HasNotifs } from './base.ts'; - -const { Gdk, Gtk } = imports.gi; -const display = Gdk.Display.get_default(); - -// Types -import { BoxGeneric } from 'global-types'; - -const MAX_OFFSET = 200; -const OFFSCREEN = 300; -const ANIM_DURATION = 500; -const SLIDE_MIN_THRESHOLD = 10; -const TRANSITION = 'transition: margin 0.5s ease, opacity 0.5s ease;'; -const SQUEEZED = 'margin-bottom: -70px; margin-top: -70px;'; -const MAX_LEFT = ` - margin-left: -${Number(MAX_OFFSET + OFFSCREEN)}px; - margin-right: ${Number(MAX_OFFSET + OFFSCREEN)}px; -`; -const MAX_RIGHT = ` - margin-left: ${Number(MAX_OFFSET + OFFSCREEN)}px; - margin-right: -${Number(MAX_OFFSET + OFFSCREEN)}px; -`; - -const slideLeft = `${TRANSITION} ${MAX_LEFT} - margin-top: 0px; - margin-bottom: 0px; - opacity: 0;`; -const squeezeLeft = `${TRANSITION} ${MAX_LEFT} ${SQUEEZED} opacity: 0;`; - -const slideRight = `${TRANSITION} ${MAX_RIGHT} - margin-top: 0px; - margin-bottom: 0px; - opacity: 0;`; -const squeezeRight = `${TRANSITION} ${MAX_RIGHT} ${SQUEEZED} opacity: 0;`; - -const defaultStyle = `${TRANSITION} margin: unset; opacity: 1;`; - - -export default ({ - id, - slideIn = 'Left', - command = () => { /**/ }, - ...props -}) => { - const widget = EventBox({ - ...props, - - setup: (self) => { - self - // OnClick - .on('button-press-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'grabbing', - )); - }) - - // OnRelease - .on('button-release-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'grab', - )); - }) - - // OnHover - .on('enter-notify-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'grab', - )); - self.toggleClassName('hover', true); - if (!self.attribute.hovered) { - self.attribute.hovered = true; - } - }) - - // OnHoverLost - .on('leave-notify-event', () => { - self.window.set_cursor(null); - self.toggleClassName('hover', false); - - if (self.attribute.hovered) { - self.attribute.hovered = false; - } - }); - }, - - attribute: { - dragging: false, - hovered: false, - ready: false, - id, - - slideAway: (side: 'Left' | 'Right') => { - (widget.child as BoxGeneric) - .setCss(side === 'Left' ? slideLeft : slideRight); - - // Make it uninteractable - widget.sensitive = false; - - timeout(ANIM_DURATION - 100, () => { - // Reduce height after sliding away - (widget.child as BoxGeneric)?.setCss(side === 'Left' ? - squeezeLeft : - squeezeRight); - - timeout(ANIM_DURATION, () => { - // Kill notif and update HasNotifs after anim is done - command(); - - HasNotifs.setValue(Notifications - .notifications.length > 0); - - (widget.get_parent() as BoxGeneric)?.remove(widget); - }); - }); - }, - }, - }); - - const gesture = Gtk.GestureDrag.new(widget); - - widget.add(Box({ - css: squeezeLeft, - setup: (self) => { - self - // When dragging - .hook(gesture, () => { - let offset = gesture.get_offset()[1]; - - if (!offset || offset === 0) { - return; - } - - // Slide right - if (offset > 0) { - self.setCss(` - margin-top: 0px; margin-bottom: 0px; - opacity: 1; transition: none; - margin-left: ${offset}px; - margin-right: -${offset}px; - `); - } - - // Slide left - else { - offset = Math.abs(offset); - self.setCss(` - margin-top: 0px; margin-bottom: 0px; - opacity: 1; transition: none; - margin-right: ${offset}px; - margin-left: -${offset}px; - `); - } - - // Put a threshold on if a click is actually dragging - widget.attribute.dragging = - Math.abs(offset) > SLIDE_MIN_THRESHOLD; - - widget.cursor = 'grabbing'; - }, 'drag-update') - - // On drag end - .hook(gesture, () => { - // Make it slide in on init - if (!widget.attribute.ready) { - // Reverse of slideAway, so it started at squeeze, then we go to slide - self.setCss(slideIn === 'Left' ? - slideLeft : - slideRight); - - timeout(ANIM_DURATION, () => { - // Then we go to center - self.setCss(defaultStyle); - timeout(ANIM_DURATION, () => { - widget.attribute.ready = true; - }); - }); - - return; - } - - const offset = gesture.get_offset()[1]; - - if (!offset) { - return; - } - - // If crosses threshold after letting go, slide away - if (Math.abs(offset) > MAX_OFFSET) { - if (offset > 0) { - widget.attribute.slideAway('Right'); - } - else { - widget.attribute.slideAway('Left'); - } - } - else { - self.setCss(defaultStyle); - widget.cursor = 'grab'; - widget.attribute.dragging = false; - } - }, 'drag-end'); - }, - })); - - return widget; -}; diff --git a/nixosModules/ags/config/ts/notifications/popup.ts b/nixosModules/ags/config/ts/notifications/popup.ts deleted file mode 100644 index 253cd1d6..00000000 --- a/nixosModules/ags/config/ts/notifications/popup.ts +++ /dev/null @@ -1,77 +0,0 @@ -const Notifications = await Service.import('notifications'); - -const { Box } = Widget; -const { interval } = Utils; - -const { GLib } = imports.gi; - -import { Notification } from './base.ts'; - -const DELAY = 2000; - -// Types -import { NotifGesture } from 'global-types'; - - -export default () => Box({ - vertical: true, - // Needed so it occupies space at the start - css: 'padding: 1px;', - - setup: (self) => { - const addPopup = (id: number) => { - if (!id) { - return; - } - - const notif = Notifications.getNotification(id); - - if (notif) { - const NewNotif = Notification({ - notif, - command: () => { - if (notif.popup) { - notif.dismiss(); - } - }, - }); - - if (NewNotif) { - // Use this instead of add to put it at the top - self.pack_end(NewNotif, false, false, 0); - self.show_all(); - } - } - }; - - const handleDismiss = (id: number, force = false) => { - const notif = (self.children as NotifGesture[]) - .find((ch) => ch.attribute.id === id); - - if (!notif) { - return; - } - - // If notif isn't hovered or was closed, slide away - if (!notif.attribute.hovered || force) { - notif.attribute.slideAway('Left'); - } - - // If notif is hovered, delay close - else if (notif.attribute.hovered) { - const intervalId = interval(DELAY, () => { - if (!notif.attribute.hovered && intervalId) { - notif.attribute.slideAway('Left'); - - GLib.source_remove(intervalId); - } - }); - } - }; - - self - .hook(Notifications, (_, id) => addPopup(id), 'notified') - .hook(Notifications, (_, id) => handleDismiss(id), 'dismissed') - .hook(Notifications, (_, id) => handleDismiss(id, true), 'closed'); - }, -}); diff --git a/nixosModules/ags/config/ts/notifications/wim.ts b/nixosModules/ags/config/ts/notifications/wim.ts deleted file mode 100644 index eead7d75..00000000 --- a/nixosModules/ags/config/ts/notifications/wim.ts +++ /dev/null @@ -1,25 +0,0 @@ -const { Window } = Widget; - -import NotifCenterWidget from './center.ts'; -import PopUpsWidget from './popup.ts'; - -import PopupWindow from '../misc/popup.ts'; - - -export const NotifPopups = () => Window({ - name: 'notifications', - layer: 'overlay', - anchor: ['top', 'left'], - child: PopUpsWidget(), -}); - - -const TOP_MARGIN = 6; - -export const NotifCenter = () => PopupWindow({ - name: 'notification-center', - anchor: ['top', 'right'], - margins: [TOP_MARGIN, 0, 0, 0], - - child: NotifCenterWidget(), -}); diff --git a/nixosModules/ags/config/ts/osd/ctor.ts b/nixosModules/ags/config/ts/osd/ctor.ts deleted file mode 100644 index 8537bdeb..00000000 --- a/nixosModules/ags/config/ts/osd/ctor.ts +++ /dev/null @@ -1,62 +0,0 @@ -const { Box, Icon, ProgressBar } = Widget; - -const Y_POS = 80; - -// Types -import { ConnectFunc, OSD, OSDStack } from 'global-types'; - - -export default ({ name, icon, info }: OSD) => { - let connectFunc: ConnectFunc; - const status = info.widget ? - info.widget : - ProgressBar({ vpack: 'center' }); - - // Wrapper to get sliding up anim - const osd = Box({ - name, - css: `margin-bottom: ${Y_POS}px;`, - children: [ - // Actual OSD - Box({ - class_name: 'osd', - children: [ - Icon({ - hpack: 'start', - icon, - }), - status, - ], - }), - ], - }); - - // Handle requests to show the OSD - // Different wether it's a bar or static - if (info.logic) { - connectFunc = (self) => new Promise((r) => { - if (info.logic && self) { - info.logic(self); - } - r(); - }).then(() => (osd.get_parent() as OSDStack)?.attribute?.popup(name)) - .catch(console.error); - } - else { - connectFunc = () => (osd.get_parent() as OSDStack) - ?.attribute?.popup(name); - } - - if (info.signal) { - if (typeof info.signal === 'string') { - status.hook(info.mod, connectFunc, info.signal); - } - else { - info.signal.forEach((sig) => { - status.hook(info.mod, connectFunc, sig); - }); - } - } - - return osd; -}; diff --git a/nixosModules/ags/config/ts/osd/main.ts b/nixosModules/ags/config/ts/osd/main.ts deleted file mode 100644 index f1d0195f..00000000 --- a/nixosModules/ags/config/ts/osd/main.ts +++ /dev/null @@ -1,78 +0,0 @@ -const { timeout } = Utils; -const { Stack } = Widget; - -import PopupWindow from '../misc/popup.ts'; - -// Types -import { BoxGeneric } from 'global-types'; - -// Import all the OSDs as an array -const OSDList = [] as (() => BoxGeneric)[]; - -import * as Modules from './osds.ts'; -for (const osd in Modules) { - OSDList.push(Modules[osd]); -} // Array - -const HIDE_DELAY = 2000; -const transition_duration = 300; - - -const OSDs = () => { - const stack = Stack({ - transition: 'over_up_down', - transition_duration, - - attribute: { - popup: (osd: string) => { - if (!osd) { - // - } - }, - }, - }); - - // Send reference of stack to all children - stack.children = Object.fromEntries( - OSDList.map((osd) => { - const widget = osd(); - - return [widget.name, widget]; - }), - ); - - stack.show_all(); - - // Delay popup method so it - // doesn't show any OSDs at launch - timeout(1000, () => { - let count = 0; - - stack.attribute.popup = (osd: string) => { - ++count; - stack.shown = osd; - App.openWindow('win-osd'); - - timeout(HIDE_DELAY, () => { - --count; - - if (count === 0) { - App.closeWindow('win-osd'); - } - }); - }; - - globalThis['popup_osd'] = stack.attribute.popup; - }); - - return stack; -}; - -export default () => PopupWindow({ - name: 'osd', - anchor: ['bottom'], - exclusivity: 'ignore', - close_on_unfocus: 'stay', - transition: 'slide bottom', - child: OSDs(), -}); diff --git a/nixosModules/ags/config/ts/osd/osds.ts b/nixosModules/ags/config/ts/osd/osds.ts deleted file mode 100644 index 49ec96c7..00000000 --- a/nixosModules/ags/config/ts/osd/osds.ts +++ /dev/null @@ -1,96 +0,0 @@ -const Audio = await Service.import('audio'); - -const { Label } = Widget; - -import OSD from './ctor.ts'; - -import Brightness from '../../services/brightness.ts'; -import { SpeakerIcon } from '../misc/audio-icons.ts'; -import { MicIcon } from '../misc/audio-icons.ts'; - -const AUDIO_MAX = 1.5; - - -export const SpeakerOSD = () => OSD({ - name: 'speaker', - icon: SpeakerIcon.bind(), - info: { - mod: Audio.speaker, - signal: ['notify::volume', 'notify::is-muted'], - - logic: (self) => { - if (!Audio.speaker) { - return; - } - - self.value = Audio.speaker ? - Audio.speaker.volume / AUDIO_MAX : - 0; - - self.sensitive = !Audio.speaker.stream?.is_muted; - }, - }, -}); - -export const ScreenBrightnessOSD = () => OSD({ - name: 'screen', - icon: Brightness.bind('screenIcon'), - info: { - mod: Brightness, - signal: 'screen', - - logic: (self) => { - self.value = Brightness.screen; - }, - }, -}); - -export const KbdBrightnessOSD = () => OSD({ - name: 'kbd', - icon: 'keyboard-brightness-symbolic', - info: { - mod: Brightness, - signal: 'kbd', - - logic: (self) => { - if (!self.value) { - self.value = Brightness.kbd / 2; - - return; - } - self.value = Brightness.kbd / 2; - self.sensitive = Brightness.kbd !== 0; - }, - }, -}); - -export const MicOSD = () => OSD({ - name: 'mic', - icon: MicIcon.bind(), - info: { - mod: Audio.microphone, - signal: ['notify::volume', 'notify::is-muted'], - - logic: (self) => { - if (!Audio.microphone) { - return; - } - - self.value = Audio.microphone ? Audio.microphone.volume : 0; - self.sensitive = !Audio.microphone.stream?.is_muted; - }, - }, -}); - -export const CapsLockOSD = () => OSD({ - name: 'caps', - icon: Brightness.bind('capsIcon'), - info: { - mod: Brightness, - signal: 'caps', - widget: Label({ - vpack: 'center', - label: 'Caps Lock', - }), - }, -}); diff --git a/nixosModules/ags/config/ts/powermenu.ts b/nixosModules/ags/config/ts/powermenu.ts deleted file mode 100644 index 56dad1cb..00000000 --- a/nixosModules/ags/config/ts/powermenu.ts +++ /dev/null @@ -1,49 +0,0 @@ -const Hyprland = await Service.import('hyprland'); - -const { CenterBox, Label } = Widget; -const { execAsync } = Utils; - -import PopupWindow from './misc/popup.ts'; -import CursorBox from './misc/cursorbox.ts'; - - -const PowermenuWidget = () => CenterBox({ - class_name: 'powermenu', - vertical: false, - - start_widget: CursorBox({ - class_name: 'shutdown button', - on_primary_click_release: () => execAsync(['systemctl', 'poweroff']) - .catch(print), - - child: Label({ - label: '๏คค', - }), - }), - - center_widget: CursorBox({ - class_name: 'reboot button', - on_primary_click_release: () => execAsync(['systemctl', 'reboot']) - .catch(print), - - child: Label({ - label: '๏ฅ’', - }), - }), - - end_widget: CursorBox({ - class_name: 'logout button', - on_primary_click_release: () => Hyprland.messageAsync('dispatch exit') - .catch(print), - - child: Label({ - label: '๏œ…', - }), - }), -}); - -export default () => PopupWindow({ - name: 'powermenu', - transition: 'slide bottom', - child: PowermenuWidget(), -}); diff --git a/nixosModules/ags/config/ts/quick-settings/bluetooth.ts b/nixosModules/ags/config/ts/quick-settings/bluetooth.ts deleted file mode 100644 index 824beb63..00000000 --- a/nixosModules/ags/config/ts/quick-settings/bluetooth.ts +++ /dev/null @@ -1,213 +0,0 @@ -const Bluetooth = await Service.import('bluetooth'); - -const { Box, Icon, Label, ListBox, Overlay, Revealer, Scrollable } = Widget; - -import CursorBox from '../misc/cursorbox.ts'; - -const SCROLL_THRESH_H = 200; -const SCROLL_THRESH_N = 7; - -// Types -import { ListBoxRow } from 'types/@girs/gtk-3.0/gtk-3.0.cjs'; -import { BluetoothDevice as BTDev } from 'types/service/bluetooth.ts'; -import { DeviceBox, ScrollableGeneric } from 'global-types'; - - -const BluetoothDevice = (dev: BTDev) => Box({ - class_name: 'menu-item', - - attribute: { dev }, - - children: [Revealer({ - reveal_child: true, - transition: 'slide_down', - - child: CursorBox({ - on_primary_click_release: () => dev.setConnection(true), - - child: Box({ - hexpand: true, - - children: [ - Icon({ - icon: dev.bind('icon_name'), - }), - - Label({ - label: dev.bind('name'), - }), - - Icon({ - icon: 'object-select-symbolic', - hexpand: true, - hpack: 'end', - - }).hook(dev, (self) => { - self.setCss(`opacity: ${dev.paired ? - '1' : - '0'}; - `); - }), - ], - }), - }), - })], -}); - -export const BluetoothMenu = () => { - const DevList = new Map(); - - const topArrow = Revealer({ - transition: 'slide_down', - - child: Icon({ - icon: 'down-large-symbolic', - class_name: 'scrolled-indicator', - size: 16, - css: '-gtk-icon-transform: rotate(180deg);', - }), - }); - - const bottomArrow = Revealer({ - transition: 'slide_up', - - child: Icon({ - icon: 'down-large-symbolic', - class_name: 'scrolled-indicator', - size: 16, - }), - }); - - return Overlay({ - pass_through: true, - - overlays: [ - Box({ - vpack: 'start', - hpack: 'center', - css: 'margin-top: 12px', - children: [topArrow], - }), - - Box({ - vpack: 'end', - hpack: 'center', - css: 'margin-bottom: 12px', - children: [bottomArrow], - }), - ], - - child: Box({ - class_name: 'menu', - - child: Scrollable({ - hscroll: 'never', - vscroll: 'never', - - setup: (self) => { - self.on('edge-reached', (_, pos) => { - // Manage scroll indicators - if (pos === 2) { - topArrow.reveal_child = false; - bottomArrow.reveal_child = true; - } - else if (pos === 3) { - topArrow.reveal_child = true; - bottomArrow.reveal_child = false; - } - }); - }, - - child: ListBox({ - setup: (self) => { - self.set_sort_func((a, b) => { - const bState = (b.get_children()[0] as DeviceBox) - .attribute.dev.paired; - - const aState = (a.get_children()[0] as DeviceBox) - .attribute.dev.paired; - - return bState - aState; - }); - - self.hook(Bluetooth, () => { - // Get all devices - const Devices = Bluetooth.devices.concat( - Bluetooth.connected_devices, - ); - - // Add missing devices - Devices.forEach((dev) => { - if (!DevList.has(dev) && dev.name) { - DevList.set(dev, BluetoothDevice(dev)); - - self.add(DevList.get(dev)); - self.show_all(); - } - }); - - // Delete ones that don't exist anymore - const difference = Array.from(DevList.keys()) - .filter((dev) => !Devices - .find((d) => dev === d) && - dev.name); - - difference.forEach((dev) => { - const devWidget = DevList.get(dev); - - if (devWidget) { - if (devWidget.toDestroy) { - devWidget.get_parent().destroy(); - DevList.delete(dev); - } - else { - devWidget.child.reveal_child = false; - devWidget.toDestroy = true; - } - } - }); - - // Start scrolling after a specified height - // is reached by the children - const height = Math.max( - self.get_parent()?.get_allocated_height() || 0, - SCROLL_THRESH_H, - ); - - const scroll = (self.get_parent() as ListBoxRow) - ?.get_parent() as ScrollableGeneric; - - if (scroll) { - const n_child = self.get_children().length; - - if (n_child > SCROLL_THRESH_N) { - scroll.vscroll = 'always'; - scroll.setCss(`min-height: ${height}px;`); - - // Make bottom scroll indicator appear only - // when first getting overflowing children - if (!(bottomArrow.reveal_child === true || - topArrow.reveal_child === true)) { - bottomArrow.reveal_child = true; - } - } - else { - scroll.vscroll = 'never'; - scroll.setCss(''); - topArrow.reveal_child = false; - bottomArrow.reveal_child = false; - } - } - - // Trigger sort_func - (self.get_children() as ListBoxRow[]) - .forEach((ch) => { - ch.changed(); - }); - }); - }, - }), - }), - }), - }); -}; diff --git a/nixosModules/ags/config/ts/quick-settings/button-grid.ts b/nixosModules/ags/config/ts/quick-settings/button-grid.ts deleted file mode 100644 index cc6ae4a7..00000000 --- a/nixosModules/ags/config/ts/quick-settings/button-grid.ts +++ /dev/null @@ -1,354 +0,0 @@ -const Bluetooth = await Service.import('bluetooth'); -const Network = await Service.import('network'); - -import Tablet from '../../services/tablet.ts'; - -const { Box, Icon, Label, Revealer } = Widget; -const { execAsync } = Utils; - -import { SpeakerIcon, MicIcon } from '../misc/audio-icons.ts'; -import CursorBox from '../misc/cursorbox.ts'; -import Separator from '../misc/separator.ts'; - -import { NetworkMenu } from './network.ts'; -import { BluetoothMenu } from './bluetooth.ts'; - -/* Types */ -import GObject from 'types/@girs/gobject-2.0/gobject-2.0'; -import { Variable as Var } from 'types/variable.ts'; - -import { - BoxGeneric, - IconGeneric, - LabelGeneric, - RevealerGeneric, -} from 'global-types'; - -type IconTuple = [ - GObject.Object, - (self: IconGeneric, state?: boolean) => void, - signal?: string, -]; - -type IndicatorTuple = [ - GObject.Object, - (self: LabelGeneric) => void, - signal?: string, -]; - -interface GridButtonType { - command?(): void - secondary_command?(): void - on_open?(menu: RevealerGeneric): void - icon: string | IconTuple - indicator?: IndicatorTuple - // @ts-expect-error me is lazy - menu?: Widget -} - - -// TODO: do vpn button -const SPACING = 28; -const ButtonStates = [] as Var[]; - -const GridButton = ({ - command = () => { /**/ }, - secondary_command = () => { /**/ }, - on_open = () => { /**/ }, - icon, - indicator, - menu, -}: GridButtonType) => { - const Activated = Variable(false); - - ButtonStates.push(Activated); - let iconWidget = Icon(); - let indicatorWidget = Label(); - - // Allow setting icon dynamically or statically - if (typeof icon === 'string') { - iconWidget = Icon({ - class_name: 'grid-label', - icon, - setup: (self) => { - self.hook(Activated, () => { - self.setCss(`color: ${Activated.value ? - 'rgba(189, 147, 249, 0.8)' : - 'unset'};`); - }); - }, - }); - } - else if (Array.isArray(icon)) { - iconWidget = Icon({ - class_name: 'grid-label', - setup: (self) => { - self - .hook(...icon) - .hook(Activated, () => { - self.setCss(`color: ${Activated.value ? - 'rgba(189, 147, 249, 0.8)' : - 'unset'};`); - }); - }, - }); - } - - if (indicator) { - indicatorWidget = Label({ - class_name: 'sub-label', - justification: 'left', - truncate: 'end', - max_width_chars: 12, - setup: (self) => { - self.hook(...indicator); - }, - }); - } - - if (menu) { - menu = Revealer({ - transition: 'slide_down', - child: menu, - reveal_child: Activated.bind(), - }); - } - - const widget = Box({ - vertical: true, - children: [ - Box({ - class_name: 'grid-button', - children: [ - - CursorBox({ - class_name: 'left-part', - - on_primary_click_release: () => { - if (Activated.value) { - secondary_command(); - } - else { - command(); - } - }, - - child: iconWidget, - }), - - CursorBox({ - class_name: 'right-part', - - on_primary_click_release: () => { - ButtonStates.forEach((state) => { - if (state !== Activated) { - state.setValue(false); - } - }); - Activated.setValue(!Activated.value); - }, - - on_hover: (self) => { - if (menu) { - const rowMenu = - ((((self.get_parent() as BoxGeneric) - ?.get_parent() as BoxGeneric) - ?.get_parent() as BoxGeneric) - ?.get_parent() as BoxGeneric) - ?.children[1] as BoxGeneric; - - const isSetup = (rowMenu - .get_children() as BoxGeneric[]) - .find((ch) => ch === menu); - - if (!isSetup) { - rowMenu.add(menu); - rowMenu.show_all(); - } - } - }, - - child: Icon({ - icon: 'down-large-symbolic', - class_name: 'grid-chev', - - setup: (self) => { - self.hook(Activated, () => { - let deg = 270; - - if (Activated.value) { - deg = menu ? 360 : 450; - on_open(menu); - } - self.setCss(` - -gtk-icon-transform: rotate(${deg}deg); - `); - }); - }, - }), - }), - - ], - }), - indicatorWidget, - ], - }); - - return widget; -}; - -const Row = ({ buttons }) => { - const child = Box({ - class_name: 'button-row', - hpack: 'center', - }); - - const widget = Box({ - vertical: true, - - children: [ - child, - Box({ vertical: true }), - ], - }); - - for (let i = 0; i < buttons.length; ++i) { - if (i === buttons.length - 1) { - child.add(buttons[i]); - } - else { - child.add(buttons[i]); - child.add(Separator(SPACING)); - } - } - - return widget; -}; - -const FirstRow = () => Row({ - buttons: [ - - GridButton({ - command: () => Network.toggleWifi(), - - secondary_command: () => { - // TODO: connection editor - }, - - icon: [Network, (self) => { - self.icon = Network.wifi?.icon_name; - }], - - indicator: [Network, (self) => { - self.label = Network.wifi?.ssid || Network.wired?.internet; - }], - - menu: NetworkMenu(), - on_open: () => Network.wifi.scan(), - }), - - GridButton({ - command: () => Bluetooth.toggle(), - - secondary_command: () => { - // TODO: bluetooth connection editor - }, - - icon: [Bluetooth, (self) => { - if (Bluetooth.enabled) { - self.icon = Bluetooth.connected_devices[0] ? - Bluetooth.connected_devices[0].icon_name : - 'bluetooth-active-symbolic'; - } - else { - self.icon = 'bluetooth-disabled-symbolic'; - } - }], - - indicator: [Bluetooth, (self) => { - self.label = Bluetooth.connected_devices[0] ? - `${Bluetooth.connected_devices[0]}` : - 'Disconnected'; - }, 'notify::connected-devices'], - - menu: BluetoothMenu(), - on_open: (menu) => { - execAsync(`bluetoothctl scan ${menu.reveal_child ? - 'on' : - 'off'}`).catch(print); - }, - }), - - GridButton({ - command: () => { - execAsync(['lock']).catch(print); - }, - secondary_command: () => App.openWindow('win-powermenu'), - icon: 'system-lock-screen-symbolic', - }), - ], -}); - -const SecondRow = () => Row({ - buttons: [ - GridButton({ - command: () => { - execAsync(['pactl', 'set-sink-mute', - '@DEFAULT_SINK@', 'toggle']).catch(print); - }, - - secondary_command: () => { - execAsync(['bash', '-c', 'pavucontrol']) - .catch(print); - }, - - icon: [SpeakerIcon, (self) => { - self.icon = SpeakerIcon.value; - }], - }), - - GridButton({ - command: () => { - execAsync(['pactl', 'set-source-mute', - '@DEFAULT_SOURCE@', 'toggle']).catch(print); - }, - - secondary_command: () => { - execAsync(['bash', '-c', 'pavucontrol']) - .catch(print); - }, - - icon: [MicIcon, (self) => { - self.icon = MicIcon.value; - }], - }), - - GridButton({ - command: () => { - if (Tablet.autorotateState) { - Tablet.killAutorotate(); - } - else { - Tablet.startAutorotate(); - } - }, - - icon: [Tablet, (self, state) => { - self.icon = state ? - 'screen-rotate-auto-on-symbolic' : - 'screen-rotate-auto-off-symbolic'; - }, 'autorotate-toggled'], - }), - ], -}); - -export default () => Box({ - class_name: 'button-grid', - vertical: true, - hpack: 'center', - children: [ - FirstRow(), - Separator(10, { vertical: true }), - SecondRow(), - ], -}); diff --git a/nixosModules/ags/config/ts/quick-settings/main.ts b/nixosModules/ags/config/ts/quick-settings/main.ts deleted file mode 100644 index 84eb7d9b..00000000 --- a/nixosModules/ags/config/ts/quick-settings/main.ts +++ /dev/null @@ -1,58 +0,0 @@ -const { Box, Label, Revealer } = Widget; - -import ButtonGrid from './button-grid.ts'; -import SliderBox from './slider-box.ts'; -import Player from '../media-player/player.ts'; -import PopupWindow from '../misc/popup.ts'; -import ToggleButton from './toggle-button.ts'; - - -const QuickSettingsWidget = () => { - const rev = Revealer({ - transition: 'slide_down', - child: Player(), - }); - - return Box({ - class_name: 'qs-container', - vertical: true, - children: [ - - Box({ - class_name: 'quick-settings', - vertical: true, - children: [ - - Label({ - label: 'Control Center', - class_name: 'title', - hpack: 'start', - css: ` - margin-left: 20px; - margin-bottom: 30px; - `, - }), - - ButtonGrid(), - - SliderBox(), - - ToggleButton(rev), - - ], - }), - - rev, - - ], - }); -}; - -const TOP_MARGIN = 6; - -export default () => PopupWindow({ - name: 'quick-settings', - anchor: ['top', 'right'], - margins: [TOP_MARGIN, 0, 0, 0], - child: QuickSettingsWidget(), -}); diff --git a/nixosModules/ags/config/ts/quick-settings/network.ts b/nixosModules/ags/config/ts/quick-settings/network.ts deleted file mode 100644 index 482fd123..00000000 --- a/nixosModules/ags/config/ts/quick-settings/network.ts +++ /dev/null @@ -1,240 +0,0 @@ -const Network = await Service.import('network'); - -const { Box, Icon, Label, ListBox, Overlay, Revealer, Scrollable } = Widget; -const { execAsync } = Utils; - -import CursorBox from '../misc/cursorbox.ts'; - -const SCROLL_THRESH_H = 200; -const SCROLL_THRESH_N = 7; - -// Types -import { APType, APBox, ScrollableGeneric } from 'global-types'; -import { ListBoxRow } from 'types/@girs/gtk-3.0/gtk-3.0.cjs'; - - -const AccessPoint = (ap: APType) => { - const widget = Box({ - class_name: 'menu-item', - attribute: { - ap: Variable(ap), - }, - }); - - - const child = Box({ - hexpand: true, - children: [ - Icon().hook(widget.attribute.ap, (self) => { - self.icon = widget.attribute.ap.value.iconName; - }), - - Label().hook(widget.attribute.ap, (self) => { - self.label = widget.attribute.ap.value.ssid || ''; - }), - - Icon({ - icon: 'object-select-symbolic', - hexpand: true, - hpack: 'end', - - setup: (self) => { - self.hook(Network, () => { - self.setCss( - `opacity: ${ - widget.attribute.ap.value.ssid === - Network.wifi.ssid ? - '1' : - '0' - }; - `, - ); - }); - }, - }), - ], - }); - - widget.add(Revealer({ - reveal_child: true, - transition: 'slide_down', - - child: CursorBox({ - on_primary_click_release: () => { - execAsync(`nmcli device wifi connect - ${widget.attribute.ap.value.bssid}`).catch(print); - }, - child, - }), - })); - - return widget; -}; - -export const NetworkMenu = () => { - const APList = new Map(); - - const topArrow = Revealer({ - transition: 'slide_down', - - child: Icon({ - icon: 'down-large-symbolic', - class_name: 'scrolled-indicator', - size: 16, - css: '-gtk-icon-transform: rotate(180deg);', - }), - }); - - const bottomArrow = Revealer({ - transition: 'slide_up', - - child: Icon({ - icon: 'down-large-symbolic', - class_name: 'scrolled-indicator', - size: 16, - }), - }); - - return Overlay({ - pass_through: true, - - overlays: [ - Box({ - vpack: 'start', - hpack: 'center', - css: 'margin-top: 12px', - children: [topArrow], - }), - - Box({ - vpack: 'end', - hpack: 'center', - css: 'margin-bottom: 12px', - children: [bottomArrow], - }), - ], - - child: Box({ - class_name: 'menu', - - child: Scrollable({ - hscroll: 'never', - vscroll: 'never', - - setup: (self) => { - self.on('edge-reached', (_, pos) => { - // Manage scroll indicators - if (pos === 2) { - topArrow.reveal_child = false; - bottomArrow.reveal_child = true; - } - else if (pos === 3) { - topArrow.reveal_child = true; - bottomArrow.reveal_child = false; - } - }); - }, - - child: ListBox({ - setup: (self) => { - self.set_sort_func((a, b) => { - const bState = (b.get_children()[0] as APBox) - .attribute.ap.value.strength; - - const aState = (a.get_children()[0] as APBox) - .attribute.ap.value.strength; - - return bState - aState; - }); - - self.hook(Network, () => { - // Add missing APs - const currentAPs = Network.wifi - ?.access_points as APType[]; - - currentAPs.forEach((ap) => { - if (ap.ssid !== 'Unknown') { - if (APList.has(ap.ssid)) { - const accesPoint = APList.get(ap.ssid) - .attribute.ap.value; - - if (accesPoint.strength < ap.strength) { - APList.get(ap.ssid).attribute - .ap.setValue(ap); - } - } - else { - APList.set(ap.ssid, AccessPoint(ap)); - - self.add(APList.get(ap.ssid)); - self.show_all(); - } - } - }); - - // Delete ones that don't exist anymore - const difference = Array.from(APList.keys()) - .filter((ssid) => !Network.wifi.access_points - .find((ap) => ap.ssid === ssid) && - ssid !== 'Unknown'); - - difference.forEach((ssid) => { - const apWidget = APList.get(ssid); - - if (apWidget) { - if (apWidget.toDestroy) { - apWidget.get_parent().destroy(); - APList.delete(ssid); - } - else { - apWidget.children[0] - .reveal_child = false; - apWidget.toDestroy = true; - } - } - }); - - // Start scrolling after a specified height - // is reached by the children - const height = Math.max( - self.get_parent()?.get_allocated_height() || 0, - SCROLL_THRESH_H, - ); - - const scroll = (self.get_parent() as ListBoxRow) - ?.get_parent() as ScrollableGeneric; - - if (scroll) { - const n_child = self.get_children().length; - - if (n_child > SCROLL_THRESH_N) { - scroll.vscroll = 'always'; - scroll.setCss(`min-height: ${height}px;`); - - // Make bottom scroll indicator appear only - // when first getting overflowing children - if (!(bottomArrow.reveal_child === true || - topArrow.reveal_child === true)) { - bottomArrow.reveal_child = true; - } - } - else { - scroll.vscroll = 'never'; - scroll.setCss(''); - topArrow.reveal_child = false; - bottomArrow.reveal_child = false; - } - } - - // Trigger sort_func - (self.get_children() as ListBoxRow[]) - .forEach((ch) => { - ch.changed(); - }); - }); - }, - }), - }), - }), - }); -}; diff --git a/nixosModules/ags/config/ts/quick-settings/slider-box.ts b/nixosModules/ags/config/ts/quick-settings/slider-box.ts deleted file mode 100644 index 22f55886..00000000 --- a/nixosModules/ags/config/ts/quick-settings/slider-box.ts +++ /dev/null @@ -1,161 +0,0 @@ -const Audio = await Service.import('audio'); - -const { Box, Slider, Icon } = Widget; - -const { Gdk } = imports.gi; -const display = Gdk.Display.get_default(); - -import Brightness from '../../services/brightness.ts'; -import { SpeakerIcon } from '../misc/audio-icons.ts'; - - -export default () => Box({ - class_name: 'slider-box', - vertical: true, - hpack: 'center', - children: [ - - Box({ - class_name: 'slider', - vpack: 'start', - hpack: 'center', - - children: [ - Icon({ - size: 26, - class_name: 'slider-label', - icon: SpeakerIcon.bind(), - }), - - Slider({ - vpack: 'center', - max: 0.999, - draw_value: false, - - on_change: ({ value }) => { - if (Audio.speaker) { - Audio.speaker.volume = value; - } - }, - - setup: (self) => { - self - .hook(Audio, () => { - self.value = Audio.speaker.volume || 0; - }, 'speaker-changed') - - // OnClick - .on('button-press-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'grabbing', - )); - }) - - // OnRelease - .on('button-release-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'pointer', - )); - }) - - // OnHover - .on('enter-notify-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'pointer', - )); - self.toggleClassName('hover', true); - }) - - // OnHoverLost - .on('leave-notify-event', () => { - self.window.set_cursor(null); - self.toggleClassName('hover', false); - }); - }, - }), - ], - }), - - Box({ - class_name: 'slider', - vpack: 'start', - hpack: 'center', - - children: [ - Icon({ - class_name: 'slider-label', - icon: Brightness.bind('screenIcon'), - }), - - Slider({ - vpack: 'center', - draw_value: false, - - on_change: ({ value }) => { - Brightness.screen = value; - }, - - setup: (self) => { - self - .hook(Brightness, () => { - self.value = Brightness.screen; - }, 'screen') - - // OnClick - .on('button-press-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'grabbing', - )); - }) - - // OnRelease - .on('button-release-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'pointer', - )); - }) - - // OnHover - .on('enter-notify-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'pointer', - )); - self.toggleClassName('hover', true); - }) - - // OnHoverLost - .on('leave-notify-event', () => { - self.window.set_cursor(null); - self.toggleClassName('hover', false); - }); - }, - }), - ], - }), - - ], -}); diff --git a/nixosModules/ags/config/ts/quick-settings/toggle-button.ts b/nixosModules/ags/config/ts/quick-settings/toggle-button.ts deleted file mode 100644 index 2134349a..00000000 --- a/nixosModules/ags/config/ts/quick-settings/toggle-button.ts +++ /dev/null @@ -1,66 +0,0 @@ -const Mpris = await Service.import('mpris'); - -const { CenterBox, Icon, ToggleButton } = Widget; - -const { Gdk } = imports.gi; -const display = Gdk.Display.get_default(); - -// Types -import { RevealerGeneric } from 'global-types'; - - -export default (rev: RevealerGeneric) => { - const child = Icon({ - icon: 'down-large-symbolic', - class_name: 'arrow', - css: '-gtk-icon-transform: rotate(180deg);', - }); - - const button = CenterBox({ - center_widget: ToggleButton({ - setup: (self) => { - // Open at startup if there are players - const id = Mpris.connect('changed', () => { - self.set_active(Mpris.players.length > 0); - Mpris.disconnect(id); - }); - - self - .on('toggled', () => { - if (self.get_active()) { - child - .setCss('-gtk-icon-transform: rotate(0deg);'); - rev.reveal_child = true; - } - else { - child - .setCss('-gtk-icon-transform: rotate(180deg);'); - rev.reveal_child = false; - } - }) - - // OnHover - .on('enter-notify-event', () => { - if (!display) { - return; - } - self.window.set_cursor(Gdk.Cursor.new_from_name( - display, - 'pointer', - )); - self.toggleClassName('hover', true); - }) - - // OnHoverLost - .on('leave-notify-event', () => { - self.window.set_cursor(null); - self.toggleClassName('hover', false); - }); - }, - - child, - }), - }); - - return button; -}; diff --git a/nixosModules/ags/config/ts/screenshot/main.ts b/nixosModules/ags/config/ts/screenshot/main.ts deleted file mode 100644 index 600db58d..00000000 --- a/nixosModules/ags/config/ts/screenshot/main.ts +++ /dev/null @@ -1,183 +0,0 @@ -const Applications = await Service.import('applications'); -const Hyprland = await Service.import('hyprland'); - -const { Box, Icon, Label, Scrollable, Stack } = Widget; -const { execAsync, timeout } = Utils; - -import PopupWindow from '../misc/popup.ts'; -import CursorBox from '../misc/cursorbox.ts'; -import { Client } from 'types/service/hyprland'; - - -const takeScreenshot = (selector: string, delay = 1000): void => { - App.closeWindow('win-screenshot'); - timeout(delay, () => { - execAsync(['bash', '-c', `grim ${selector} - | satty -f -`]) - .catch(console.error); - }); -}; - -export default () => { - const windowList = Box({ - vertical: true, - }); - - const updateWindows = async() => { - if (!App.getWindow('win-screenshot')?.visible) { - return; - } - - windowList.children = (JSON.parse( - await Hyprland.messageAsync('j/clients'), - ) as Client[]) - .filter((client) => client.workspace.id === Hyprland.active.workspace.id) - .map((client) => CursorBox({ - class_name: 'item-btn', - - on_primary_click_release: () => { - takeScreenshot(`-w ${client.address}`); - }, - - child: Box({ - hpack: 'center', - - children: [ - Icon(Applications - .query(client.class)[0]?.app.get_string('Icon') ?? ''), - - Label({ - label: client.title, - truncate: 'end', - max_width_chars: 50, - }), - ], - }), - })); - }; - - - const stack = Stack({ - transition: 'slide_left_right', - - children: { - monitors: Scrollable({ - child: Box({ - vertical: true, - }).hook(Hyprland, (self) => { - self.children = Hyprland.monitors.map((monitor) => CursorBox({ - class_name: 'item-btn', - - on_primary_click_release: () => { - takeScreenshot(`-o ${monitor.name}`); - }, - - child: Label({ - label: `${monitor.name}: ${monitor.description}`, - truncate: 'end', - max_width_chars: 50, - }), - })); - }, 'notify::monitors'), - }), - - windows: Scrollable({ - child: windowList - .hook(Hyprland, updateWindows, 'notify::clients') - .hook(Hyprland.active.workspace, updateWindows), - }), - }, - }); - - // TODO: highlight monitor when hovered - const monitorsButton = CursorBox({ - class_name: 'header-btn', - - on_primary_click_release: () => { - stack.shown = 'monitors'; - }, - - child: Box({ - hpack: 'center', - - children: [ - Icon('display-symbolic'), - Label('monitors'), - ], - }), - }); - - const windowsButton = CursorBox({ - class_name: 'header-btn', - - on_primary_click_release: () => { - stack.shown = 'windows'; - }, - - child: Box({ - hpack: 'center', - - children: [ - Icon('window-symbolic'), - Label('windows'), - ], - }), - }); - - const regionButton = CursorBox({ - class_name: 'header-btn', - - on_primary_click_release: () => { - takeScreenshot('-g "$(slurp)"', 0); - }, - - child: Box({ - hpack: 'center', - - children: [ - Icon('tool-pencil-symbolic'), - Label('region'), - ], - }), - }); - - return PopupWindow({ - name: 'screenshot', - on_open: () => { - updateWindows(); - }, - child: Box({ - class_name: 'screenshot', - vertical: true, - - children: [ - Box({ - class_name: 'header', - homogeneous: true, - - children: [ - monitorsButton, - windowsButton, - regionButton, - ], - }).hook(stack, () => { - switch (stack.shown) { - case 'monitors': - monitorsButton.toggleClassName('active', true); - windowsButton.toggleClassName('active', false); - break; - - case 'windows': - monitorsButton.toggleClassName('active', false); - windowsButton.toggleClassName('active', true); - break; - - default: - break; - } - }, 'notify::shown'), - - stack, - ], - }), - }); -}; diff --git a/nixosModules/ags/config/ts/setup.ts b/nixosModules/ags/config/ts/setup.ts deleted file mode 100644 index 7fec5acb..00000000 --- a/nixosModules/ags/config/ts/setup.ts +++ /dev/null @@ -1,56 +0,0 @@ -const Bluetooth = await Service.import('bluetooth'); - -import Brightness from '../services/brightness.ts'; -import Pointers from '../services/pointers.ts'; -import Tablet from '../services/tablet.ts'; -import TouchGestures from '../services/touch-gestures.ts'; - -import closeAll from './misc/closer.ts'; -import Persist from './misc/persist.ts'; - - -export default () => { - globalThis.Brightness = Brightness; - globalThis.Pointers = Pointers; - globalThis.Tablet = Tablet; - globalThis.closeAll = closeAll; - - Persist({ - name: 'bluetooth', - gobject: Bluetooth, - prop: 'enabled', - signal: 'notify::enabled', - }); - - TouchGestures.addGesture({ - name: 'openAppLauncher', - gesture: 'UD', - edge: 'T', - command: () => App.openWindow('win-applauncher'), - }); - - TouchGestures.addGesture({ - name: 'oskOn', - gesture: 'DU', - edge: 'B', - command: () => { - Tablet.oskState = true; - }, - }); - - TouchGestures.addGesture({ - name: 'oskOff', - gesture: 'UD', - edge: 'B', - command: () => { - Tablet.oskState = false; - }, - }); - - TouchGestures.addGesture({ - name: 'openOverview', - nFingers: '3', - gesture: 'UD', - command: 'hyprctl dispatch hyprexpo:expo on', - }); -}; diff --git a/nixosModules/ags/config/tsconfig.json b/nixosModules/ags/config/tsconfig.json deleted file mode 100644 index d429a672..00000000 --- a/nixosModules/ags/config/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2022", - "module": "ES2022", - "lib": ["ES2022"], - "noEmit": true, - "allowImportingTsExtensions": true, - "allowSyntheticDefaultImports": true, - "allowJs": true, - "checkJs": true, - "strict": true, - "noImplicitAny": false, - "baseUrl": ".", - "paths": { - "fzf": ["./node_modules/fzf/dist/types"] - }, - "typeRoots": [ - "./types", - "./global-types.d.ts", - "./node_modules" - ], - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/nixosModules/ags/config/wim.ts b/nixosModules/ags/config/wim.ts deleted file mode 100644 index a7a9770d..00000000 --- a/nixosModules/ags/config/wim.ts +++ /dev/null @@ -1,40 +0,0 @@ -import Setup from './ts/setup.ts'; -import AppLauncher from './ts/applauncher/main.ts'; -import Bar from './ts/bar/wim.ts'; -import BgFade from './ts/misc/background-fade.ts'; -import Calendar from './ts/date/wim.ts'; -import Clipboard from './ts/clipboard/main.ts'; -import Corners from './ts/corners/main.ts'; -import { NotifPopups, NotifCenter } from './ts/notifications/wim.ts'; -import OSD from './ts/osd/main.ts'; -import OSK from './ts/on-screen-keyboard/main.ts'; -import Powermenu from './ts/powermenu.ts'; -import QSettings from './ts/quick-settings/main.ts'; -import Screenshot from './ts/screenshot/main.ts'; - - -App.config({ - icons: './icons', - - onConfigParsed: () => { - Setup(); - }, - - windows: () => [ - ...Corners(), - - AppLauncher(), - Calendar(), - Clipboard(), - NotifCenter(), - OSD(), - OSK(), - Powermenu(), - QSettings(), - Screenshot(), - - Bar(), - BgFade(), - NotifPopups(), - ], -}); diff --git a/nixosModules/ags/default.nix b/nixosModules/ags/default.nix deleted file mode 100644 index 1eceafdd..00000000 --- a/nixosModules/ags/default.nix +++ /dev/null @@ -1,194 +0,0 @@ -self: { - config, - lib, - pkgs, - ... -}: let - inherit (self.inputs) ags astal gtk-session-lock; -in { - config = let - inherit (lib) boolToString mkIf; - - # Configs - inherit (config.vars) hostName; - cfgDesktop = config.roles.desktop; - flakeDir = config.environment.variables.FLAKE; - - # Packages - astalTray = astal.packages.${pkgs.system}.tray; - gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default; - in - mkIf cfgDesktop.ags.enable { - security.pam.services.ags = {}; - services.upower.enable = true; - - home-manager.users.${cfgDesktop.user}.imports = [ - ags.homeManagerModules.default - - ({ - config, - lib, - ... - }: let - inherit (config.lib.file) mkOutOfStoreSymlink; - inherit (lib) hasPrefix optionals removePrefix; - - configJs = - # javascript - '' - Utils.execAsync('hyprpaper'); - - import { transpileTypeScript } from './js/utils.js'; - - export default (await transpileTypeScript('${hostName}')).default; - ''; - - agsPkg = config.programs.ags.finalPackage; - agsConfigDir = "${removePrefix "/home/${cfgDesktop.user}/" flakeDir}/nixosModules/ags"; - in { - assertions = [ - { - assertion = hasPrefix "/home/${cfgDesktop.user}/" flakeDir; - message = '' - Your $FLAKE environment variable needs to point to a directory in - the main users' home to use the AGS module. - ''; - } - ]; - - programs.ags = { - enable = true; - extraPackages = [ - astalTray - gtkSessionLock - ]; - }; - - home = { - file = let - inherit - (import "${self}/lib" {inherit pkgs self;}) - buildNodeModules - buildNodeTypes - ; - in ( - { - # Generated types - "${agsConfigDir}/config/types" = { - source = "${agsPkg}/share/com.github.Aylur.ags/types"; - recursive = true; # To add other types inside the folder - }; - } - // (buildNodeTypes { - pname = "gtk-session-lock"; - configPath = "${agsConfigDir}/config/types/@girs"; - packages = [gtkSessionLock]; - }) - // (buildNodeTypes { - pname = "astal-tray"; - configPath = "${agsConfigDir}/config/types/@girs"; - packages = [astalTray]; - }) - // { - # Out of store symlinks - ".config/ags".source = mkOutOfStoreSymlink "${flakeDir}/nixosModules/ags/config"; - - # Generated JavaScript files - "${agsConfigDir}/config/config.js".text = configJs; - "${agsConfigDir}/config/ts/lockscreen/vars.ts".text = - # javascript - '' - export default { - mainMonitor: '${cfgDesktop.mainMonitor}', - dupeLockscreen: ${boolToString cfgDesktop.displayManager.duplicateScreen}, - hasFprintd: ${boolToString (hostName == "wim")}, - }; - ''; - - "${agsConfigDir}/config/node_modules".source = - buildNodeModules ./config "sha256-PDfS8hDxE+DMACXexSYng0COOCM5q6y250VSis/IAO8="; - } - // (import ./icons.nix {inherit pkgs agsConfigDir;}) - ); - - packages = - [ - (pkgs.callPackage ./clipboard {}) - # TODO: replace with matugen - self.packages.${pkgs.system}.coloryou - ] - ++ (builtins.attrValues { - inherit - (pkgs) - dart-sass - bun - playerctl - pavucontrol # TODO: replace with ags widget - ; - }) - ++ (optionals cfgDesktop.isTouchscreen (builtins.attrValues { - inherit - (pkgs) - lisgd - ydotool - ; - })); - }; - - wayland.windowManager.hyprland = let - runAgs = cmd: "pgrep ags -a | grep '/bin/gjs' && ags ${cmd} || agsV2 ${cmd}"; - runAgsJs = cmd: "pgrep ags -a | grep '/bin/gjs' && ags -r ${cmd} || agsV2 -m ${cmd}"; - in { - settings = { - animations = { - bezier = [ - "easeInOutQuart, 0.77, 0 , 0.175, 1" - "easeInExpo , 0.95, 0.05, 0.795, 0.035" - ]; - - animation = [ - "fadeLayersIn , 0" - "fadeLayersOut, 1, 3000, easeInExpo" - "layers , 1, 4 , easeInOutQuart, slide left" - ]; - }; - - layerrule = [ - "noanim, ^(?!win-).*" - - # Lockscreen blur - "blur, ^(blur-bg.*)" - "ignorealpha 0.19, ^(blur-bg.*)" - ]; - - exec-once = [ - "ags" - "sleep 3; ags -r 'App.openWindow(\"win-applauncher\")'" - ]; - - bind = [ - "$mainMod SHIFT, E , exec, ${runAgs "-t win-powermenu"}" - "$mainMod , D , exec, ${runAgs "-t win-applauncher"}" - "$mainMod , V , exec, ${runAgs "-t win-clipboard"}" - " , Print, exec, ${runAgs "-t win-screenshot"}" - ]; - binde = [ - ## Brightness control - ", XF86MonBrightnessUp , exec, ${runAgsJs "'Brightness.screen += 0.05'"}" - ", XF86MonBrightnessDown, exec, ${runAgsJs "'Brightness.screen -= 0.05'"}" - - ## Volume control - ", XF86AudioRaiseVolume , exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ & ${runAgsJs "'popup_osd(\"speaker\")'"} &" - ", XF86AudioLowerVolume , exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- & ${runAgsJs "'popup_osd(\"speaker\")'"} &" - ]; - bindn = [" , Escape , exec, ${runAgsJs "'closeAll()'"}"]; - bindr = ["CAPS, Caps_Lock, exec, ${runAgsJs "'Brightness.fetchCapsState()'"}"]; - }; - }; - }) - ]; - }; - - # For accurate stack trace - _file = ./default.nix; -} diff --git a/nixosModules/desktop/default.nix b/nixosModules/desktop/default.nix index 1f1e91be..6390f949 100644 --- a/nixosModules/desktop/default.nix +++ b/nixosModules/desktop/default.nix @@ -36,14 +36,6 @@ in { ''; }; - ags.enable = mkOption { - type = types.bool; - default = false; - description = '' - Whether we want to enable AGS for the DE shell. - ''; - }; - ags-v2.enable = mkOption { type = types.bool; default = false; @@ -92,6 +84,14 @@ in { }; displayManager = { + enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether we want to enable the Display Manager. + ''; + }; + duplicateScreen = mkOption { type = types.bool; description = '' diff --git a/nixosModules/desktop/environment/default.nix b/nixosModules/desktop/environment/default.nix index 70ad4d81..44005e92 100644 --- a/nixosModules/desktop/environment/default.nix +++ b/nixosModules/desktop/environment/default.nix @@ -7,7 +7,6 @@ self: { inherit (self.inputs) hyprgrass hyprland hyprland-plugins; in { imports = [ - (import ../../ags self) (import ../../ags-v2 self) ./modules/dconf.nix diff --git a/nixosModules/desktop/environment/home/hyprgrass.nix b/nixosModules/desktop/environment/home/hyprgrass.nix index 11977024..5ba3694c 100644 --- a/nixosModules/desktop/environment/home/hyprgrass.nix +++ b/nixosModules/desktop/environment/home/hyprgrass.nix @@ -46,7 +46,6 @@ in { hyprgrass-bind = [ ", edge:u:d, exec, ags request 'open win-applauncher'" ", edge:d:u, exec, ags request 'osk open'" - ", swipe:3:d, exec, hyprctl dispatch hyprexpo:expo on" ]; hyprgrass-bindm = [", longpress:2, movewindow"]; }; diff --git a/nixosModules/desktop/environment/modules/security.nix b/nixosModules/desktop/environment/modules/security.nix index 9814d580..c157e384 100644 --- a/nixosModules/desktop/environment/modules/security.nix +++ b/nixosModules/desktop/environment/modules/security.nix @@ -12,19 +12,8 @@ hmCfg = config.home-manager.users.${cfg.user}; hyprPkg = hmCfg.wayland.windowManager.hyprland.finalPackage; - lockPkg = - if cfg.ags.enable - then - pkgs.writeShellApplication { - name = "lock"; - runtimeInputs = [hmCfg.programs.ags.finalPackage]; - - text = '' - ags -r 'Tablet.setLaptopMode()' - ags -b lockscreen -c /home/${cfg.user}/.config/ags/lockscreen.js - ''; - } - else hmCfg.programs.ags-v2.lockPkg; + # See nixosModules/ags-v2/packages.nix + lockPkg = hmCfg.programs.ags-v2.lockPkg; runInDesktop = pkgs.writeShellApplication { name = "runInDesktop"; diff --git a/nixosModules/desktop/manager/ags.nix b/nixosModules/desktop/manager/ags.nix index 43152918..7eb6c298 100644 --- a/nixosModules/desktop/manager/ags.nix +++ b/nixosModules/desktop/manager/ags.nix @@ -3,62 +3,24 @@ self: { lib, pkgs, ... -}: let - # TODO: clean this up - inherit (self.inputs) agsV2 gtk-session-lock; -in { +}: { config = let # Libs - inherit (lib) attrValues boolToString removeAttrs; + inherit (lib) removePrefix; - # Cfg info - inherit (config.networking) hostName; - cfgDesktop = config.roles.desktop; + cfg = config.roles.desktop; + hmCfg = config.home-manager.users.${cfg.user}; - # Astal libraries - gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default; - agsV2Packages = agsV2.packages.${pkgs.system}; - astalLibs = attrValues (removeAttrs agsV2.inputs.astal.packages.${pkgs.system} ["docs" "gjs"]) ++ [gtkSessionLock]; - - # Final ags package - agsFull = agsV2Packages.ags.override {extraPackages = astalLibs;}; + ags = hmCfg.programs.ags-v2.package; + hyprland = hmCfg.wayland.windowManager.hyprland.finalPackage; agsConfig = let - tsconfig = pkgs.writers.writeJSON "tsconfig.json" { - "$schema" = "https://json.schemastore.org/tsconfig"; - "compilerOptions" = { - "experimentalDecorators" = true; - "strict" = true; - "target" = "ES2023"; - "moduleResolution" = "Bundler"; - "jsx" = "react-jsx"; - "jsxImportSource" = "${agsV2Packages.gjs}/share/astal/gjs/gtk3"; - "paths" = { - "astal" = ["${agsV2Packages.gjs}/share/astal/gjs"]; - "astal/*" = ["${agsV2Packages.gjs}/share/astal/gjs/*"]; - }; - "skipLibCheck" = true; - "module" = "ES2022"; - "lib" = ["ES2023"]; - }; - }; + homeFiles = config.home-manager.users.${cfg.user}.home.file; + agsDir = "${removePrefix "/home/${cfg.user}/" config.environment.variables.FLAKE}/nixosModules/ags-v2/config"; - varsTs = - pkgs.writeText "vars.ts" - # javascript - '' - export default { - mainMonitor: '${cfgDesktop.mainMonitor}', - dupeLockscreen: ${boolToString cfgDesktop.displayManager.duplicateScreen}, - hasFprintd: ${boolToString (hostName == "wim")}, - }; - ''; - - flakeDir = config.environment.variables.FLAKE; - modulesDir = "${lib.removePrefix "/home/${cfg.user}/" flakeDir}/nixosModules"; - nodeModules = - config.home-manager.users.${cfg.user}.home.file."${modulesDir}/ags/config/node_modules".source - or config.home-manager.users.${cfg.user}.home.file."${modulesDir}/ags-v2/config/node_modules".source; + nodeModules = homeFiles."${agsDir}/node_modules".source; + tsconfig = homeFiles."${agsDir}/tsconfig.json".source; + varsTs = homeFiles."${agsDir}/widgets/lockscreen/vars.ts".source; in pkgs.runCommandLocal "agsConfig" {} '' cp -ar ${tsconfig} ./tsconfig.json @@ -66,21 +28,18 @@ in { chmod +w -R ./. cp -ar ${varsTs} ./widgets/lockscreen/vars.ts cp -ar ${nodeModules} ./node_modules - ${agsFull}/bin/ags bundle ./app.ts $out + ${ags}/bin/ags bundle ./app.ts $out ''; - - cfg = config.roles.desktop; - - hyprland = - config - .home-manager - .users - .${cfg.user} - .wayland - .windowManager - .hyprland - .finalPackage; in { + assertions = [ + { + assertion = cfg.ags-v2.enable; + message = '' + The Display Manager requires AGSv2 to be enabled. + ''; + } + ]; + # Add home folder for home-manager to work users.users.greeter = { home = "/var/lib/greeter"; @@ -95,7 +54,7 @@ in { name = "agsGreeter"; runtimeInputs = [ - agsFull + ags hyprland ]; diff --git a/nixosModules/desktop/manager/default.nix b/nixosModules/desktop/manager/default.nix index 0c8df6db..7947588e 100644 --- a/nixosModules/desktop/manager/default.nix +++ b/nixosModules/desktop/manager/default.nix @@ -1,5 +1,6 @@ self: { config, + lib, pkgs, ... }: { @@ -9,6 +10,8 @@ self: { ]; config = let + inherit (lib) mkIf; + cfg = config.roles.desktop; hyprland = @@ -26,30 +29,31 @@ self: { trap 'systemctl --user stop hyprland-session.target; sleep 1' EXIT exec Hyprland >/dev/null ''); - in { - services = { - displayManager.sessionPackages = [hyprland]; + in + mkIf cfg.displayManager.enable { + services = { + displayManager.sessionPackages = [hyprland]; - greetd = { - enable = true; - settings = { - default_session = { - command = cmd; - user = "greeter"; - }; + greetd = { + enable = true; + settings = { + default_session = { + command = cmd; + user = "greeter"; + }; - initial_session = { - command = cmd; - user = cfg.user; + initial_session = { + command = cmd; + user = cfg.user; + }; }; }; }; - }; - # unlock GPG keyring on login - services.gnome.gnome-keyring.enable = true; - security.pam.services.greetd.enableGnomeKeyring = true; - }; + # unlock GPG keyring on login + services.gnome.gnome-keyring.enable = true; + security.pam.services.greetd.enableGnomeKeyring = true; + }; # For accurate stack trace _file = ./default.nix; diff --git a/packages/README.md b/packages/README.md index c2fa6a04..2952ffdb 100644 --- a/packages/README.md +++ b/packages/README.md @@ -6,7 +6,6 @@ This directory encompasses every derivations for packages exposed by my flake. | Name | Source / Description | | ------------------------------ | -------------------- | -| `coloryou` | A custom package to get the main colors from a picture I forked from [here](https://github.com/dharmx/vile/blob/7d486c128c7e553912673755f97b118aaab0193d/src/shell/playerctl.py#L2) | | `gpu-screen-recorder` | [Git](https://git.dec05eba.com/gpu-screen-recorder/about) | | `pam-fprint-grosshack` | [GitLab](https://gitlab.com/mishakmak/pam-fprint-grosshack) | | `pokemon-colorscripts` | [GitLab](https://gitlab.com/phoneybadger/pokemon-colorscripts) | diff --git a/packages/coloryou/LICENSE b/packages/coloryou/LICENSE deleted file mode 100644 index 6daeddff..00000000 --- a/packages/coloryou/LICENSE +++ /dev/null @@ -1 +0,0 @@ -{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"assets","path":"assets","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"themes","path":"themes","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"eww.scss","path":"eww.scss","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"}],"totalCount":8}},"fileTreeProcessingTime":2.7951590000000004,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":431466930,"defaultBranch":"main","name":"vile","ownerLogin":"dharmx","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-11-24T12:00:36.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/80379926?v=4","public":true,"private":false,"isOrgOwned":false},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"7d486c128c7e553912673755f97b118aaab0193d","listCacheKey":"v0:1687098971.987066","canEdit":false,"refType":"tree","currentOid":"7d486c128c7e553912673755f97b118aaab0193d"},"path":"LICENSE","currentUser":null,"blob":{"rawLines":[" GNU GENERAL PUBLIC LICENSE"," Version 3, 29 June 2007",""," Copyright (C) 2007 Free Software Foundation, Inc. "," Everyone is permitted to copy and distribute verbatim copies"," of this license document, but changing it is not allowed.",""," Preamble",""," The GNU General Public License is a free, copyleft license for","software and other kinds of works.",""," The licenses for most software and other practical works are designed","to take away your freedom to share and change the works. By contrast,","the GNU General Public License is intended to guarantee your freedom to","share and change all versions of a program--to make sure it remains free","software for all its users. We, the Free Software Foundation, use the","GNU General Public License for most of our software; it applies also to","any other work released this way by its authors. You can apply it to","your programs, too.",""," When we speak of free software, we are referring to freedom, not","price. Our General Public Licenses are designed to make sure that you","have the freedom to distribute copies of free software (and charge for","them if you wish), that you receive source code or can get it if you","want it, that you can change the software or use pieces of it in new","free programs, and that you know you can do these things.",""," To protect your rights, we need to prevent others from denying you","these rights or asking you to surrender the rights. Therefore, you have","certain responsibilities if you distribute copies of the software, or if","you modify it: responsibilities to respect the freedom of others.",""," For example, if you distribute copies of such a program, whether","gratis or for a fee, you must pass on to the recipients the same","freedoms that you received. You must make sure that they, too, receive","or can get the source code. And you must show them these terms so they","know their rights.",""," Developers that use the GNU GPL protect your rights with two steps:","(1) assert copyright on the software, and (2) offer you this License","giving you legal permission to copy, distribute and/or modify it.",""," For the developers' and authors' protection, the GPL clearly explains","that there is no warranty for this free software. For both users' and","authors' sake, the GPL requires that modified versions be marked as","changed, so that their problems will not be attributed erroneously to","authors of previous versions.",""," Some devices are designed to deny users access to install or run","modified versions of the software inside them, although the manufacturer","can do so. This is fundamentally incompatible with the aim of","protecting users' freedom to change the software. The systematic","pattern of such abuse occurs in the area of products for individuals to","use, which is precisely where it is most unacceptable. Therefore, we","have designed this version of the GPL to prohibit the practice for those","products. If such problems arise substantially in other domains, we","stand ready to extend this provision to those domains in future versions","of the GPL, as needed to protect the freedom of users.",""," Finally, every program is threatened constantly by software patents.","States should not allow patents to restrict development and use of","software on general-purpose computers, but in those that do, we wish to","avoid the special danger that patents applied to a free program could","make it effectively proprietary. To prevent this, the GPL assures that","patents cannot be used to render the program non-free.",""," The precise terms and conditions for copying, distribution and","modification follow.",""," TERMS AND CONDITIONS",""," 0. Definitions.",""," \"This License\" refers to version 3 of the GNU General Public License.",""," \"Copyright\" also means copyright-like laws that apply to other kinds of","works, such as semiconductor masks.",""," \"The Program\" refers to any copyrightable work licensed under this","License. Each licensee is addressed as \"you\". \"Licensees\" and","\"recipients\" may be individuals or organizations.",""," To \"modify\" a work means to copy from or adapt all or part of the work","in a fashion requiring copyright permission, other than the making of an","exact copy. The resulting work is called a \"modified version\" of the","earlier work or a work \"based on\" the earlier work.",""," A \"covered work\" means either the unmodified Program or a work based","on the Program.",""," To \"propagate\" a work means to do anything with it that, without","permission, would make you directly or secondarily liable for","infringement under applicable copyright law, except executing it on a","computer or modifying a private copy. Propagation includes copying,","distribution (with or without modification), making available to the","public, and in some countries other activities as well.",""," To \"convey\" a work means any kind of propagation that enables other","parties to make or receive copies. Mere interaction with a user through","a computer network, with no transfer of a copy, is not conveying.",""," An interactive user interface displays \"Appropriate Legal Notices\"","to the extent that it includes a convenient and prominently visible","feature that (1) displays an appropriate copyright notice, and (2)","tells the user that there is no warranty for the work (except to the","extent that warranties are provided), that licensees may convey the","work under this License, and how to view a copy of this License. If","the interface presents a list of user commands or options, such as a","menu, a prominent item in the list meets this criterion.",""," 1. Source Code.",""," The \"source code\" for a work means the preferred form of the work","for making modifications to it. \"Object code\" means any non-source","form of a work.",""," A \"Standard Interface\" means an interface that either is an official","standard defined by a recognized standards body, or, in the case of","interfaces specified for a particular programming language, one that","is widely used among developers working in that language.",""," The \"System Libraries\" of an executable work include anything, other","than the work as a whole, that (a) is included in the normal form of","packaging a Major Component, but which is not part of that Major","Component, and (b) serves only to enable use of the work with that","Major Component, or to implement a Standard Interface for which an","implementation is available to the public in source code form. A","\"Major Component\", in this context, means a major essential component","(kernel, window system, and so on) of the specific operating system","(if any) on which the executable work runs, or a compiler used to","produce the work, or an object code interpreter used to run it.",""," The \"Corresponding Source\" for a work in object code form means all","the source code needed to generate, install, and (for an executable","work) run the object code and to modify the work, including scripts to","control those activities. However, it does not include the work's","System Libraries, or general-purpose tools or generally available free","programs which are used unmodified in performing those activities but","which are not part of the work. For example, Corresponding Source","includes interface definition files associated with source files for","the work, and the source code for shared libraries and dynamically","linked subprograms that the work is specifically designed to require,","such as by intimate data communication or control flow between those","subprograms and other parts of the work.",""," The Corresponding Source need not include anything that users","can regenerate automatically from other parts of the Corresponding","Source.",""," The Corresponding Source for a work in source code form is that","same work.",""," 2. Basic Permissions.",""," All rights granted under this License are granted for the term of","copyright on the Program, and are irrevocable provided the stated","conditions are met. This License explicitly affirms your unlimited","permission to run the unmodified Program. The output from running a","covered work is covered by this License only if the output, given its","content, constitutes a covered work. This License acknowledges your","rights of fair use or other equivalent, as provided by copyright law.",""," You may make, run and propagate covered works that you do not","convey, without conditions so long as your license otherwise remains","in force. You may convey covered works to others for the sole purpose","of having them make modifications exclusively for you, or provide you","with facilities for running those works, provided that you comply with","the terms of this License in conveying all material for which you do","not control copyright. Those thus making or running the covered works","for you must do so exclusively on your behalf, under your direction","and control, on terms that prohibit them from making any copies of","your copyrighted material outside their relationship with you.",""," Conveying under any other circumstances is permitted solely under","the conditions stated below. Sublicensing is not allowed; section 10","makes it unnecessary.",""," 3. Protecting Users' Legal Rights From Anti-Circumvention Law.",""," No covered work shall be deemed part of an effective technological","measure under any applicable law fulfilling obligations under article","11 of the WIPO copyright treaty adopted on 20 December 1996, or","similar laws prohibiting or restricting circumvention of such","measures.",""," When you convey a covered work, you waive any legal power to forbid","circumvention of technological measures to the extent such circumvention","is effected by exercising rights under this License with respect to","the covered work, and you disclaim any intention to limit operation or","modification of the work as a means of enforcing, against the work's","users, your or third parties' legal rights to forbid circumvention of","technological measures.",""," 4. Conveying Verbatim Copies.",""," You may convey verbatim copies of the Program's source code as you","receive it, in any medium, provided that you conspicuously and","appropriately publish on each copy an appropriate copyright notice;","keep intact all notices stating that this License and any","non-permissive terms added in accord with section 7 apply to the code;","keep intact all notices of the absence of any warranty; and give all","recipients a copy of this License along with the Program.",""," You may charge any price or no price for each copy that you convey,","and you may offer support or warranty protection for a fee.",""," 5. Conveying Modified Source Versions.",""," You may convey a work based on the Program, or the modifications to","produce it from the Program, in the form of source code under the","terms of section 4, provided that you also meet all of these conditions:",""," a) The work must carry prominent notices stating that you modified"," it, and giving a relevant date.",""," b) The work must carry prominent notices stating that it is"," released under this License and any conditions added under section"," 7. This requirement modifies the requirement in section 4 to"," \"keep intact all notices\".",""," c) You must license the entire work, as a whole, under this"," License to anyone who comes into possession of a copy. This"," License will therefore apply, along with any applicable section 7"," additional terms, to the whole of the work, and all its parts,"," regardless of how they are packaged. This License gives no"," permission to license the work in any other way, but it does not"," invalidate such permission if you have separately received it.",""," d) If the work has interactive user interfaces, each must display"," Appropriate Legal Notices; however, if the Program has interactive"," interfaces that do not display Appropriate Legal Notices, your"," work need not make them do so.",""," A compilation of a covered work with other separate and independent","works, which are not by their nature extensions of the covered work,","and which are not combined with it such as to form a larger program,","in or on a volume of a storage or distribution medium, is called an","\"aggregate\" if the compilation and its resulting copyright are not","used to limit the access or legal rights of the compilation's users","beyond what the individual works permit. Inclusion of a covered work","in an aggregate does not cause this License to apply to the other","parts of the aggregate.",""," 6. Conveying Non-Source Forms.",""," You may convey a covered work in object code form under the terms","of sections 4 and 5, provided that you also convey the","machine-readable Corresponding Source under the terms of this License,","in one of these ways:",""," a) Convey the object code in, or embodied in, a physical product"," (including a physical distribution medium), accompanied by the"," Corresponding Source fixed on a durable physical medium"," customarily used for software interchange.",""," b) Convey the object code in, or embodied in, a physical product"," (including a physical distribution medium), accompanied by a"," written offer, valid for at least three years and valid for as"," long as you offer spare parts or customer support for that product"," model, to give anyone who possesses the object code either (1) a"," copy of the Corresponding Source for all the software in the"," product that is covered by this License, on a durable physical"," medium customarily used for software interchange, for a price no"," more than your reasonable cost of physically performing this"," conveying of source, or (2) access to copy the"," Corresponding Source from a network server at no charge.",""," c) Convey individual copies of the object code with a copy of the"," written offer to provide the Corresponding Source. This"," alternative is allowed only occasionally and noncommercially, and"," only if you received the object code with such an offer, in accord"," with subsection 6b.",""," d) Convey the object code by offering access from a designated"," place (gratis or for a charge), and offer equivalent access to the"," Corresponding Source in the same way through the same place at no"," further charge. You need not require recipients to copy the"," Corresponding Source along with the object code. If the place to"," copy the object code is a network server, the Corresponding Source"," may be on a different server (operated by you or a third party)"," that supports equivalent copying facilities, provided you maintain"," clear directions next to the object code saying where to find the"," Corresponding Source. Regardless of what server hosts the"," Corresponding Source, you remain obligated to ensure that it is"," available for as long as needed to satisfy these requirements.",""," e) Convey the object code using peer-to-peer transmission, provided"," you inform other peers where the object code and Corresponding"," Source of the work are being offered to the general public at no"," charge under subsection 6d.",""," A separable portion of the object code, whose source code is excluded","from the Corresponding Source as a System Library, need not be","included in conveying the object code work.",""," A \"User Product\" is either (1) a \"consumer product\", which means any","tangible personal property which is normally used for personal, family,","or household purposes, or (2) anything designed or sold for incorporation","into a dwelling. In determining whether a product is a consumer product,","doubtful cases shall be resolved in favor of coverage. For a particular","product received by a particular user, \"normally used\" refers to a","typical or common use of that class of product, regardless of the status","of the particular user or of the way in which the particular user","actually uses, or expects or is expected to use, the product. A product","is a consumer product regardless of whether the product has substantial","commercial, industrial or non-consumer uses, unless such uses represent","the only significant mode of use of the product.",""," \"Installation Information\" for a User Product means any methods,","procedures, authorization keys, or other information required to install","and execute modified versions of a covered work in that User Product from","a modified version of its Corresponding Source. The information must","suffice to ensure that the continued functioning of the modified object","code is in no case prevented or interfered with solely because","modification has been made.",""," If you convey an object code work under this section in, or with, or","specifically for use in, a User Product, and the conveying occurs as","part of a transaction in which the right of possession and use of the","User Product is transferred to the recipient in perpetuity or for a","fixed term (regardless of how the transaction is characterized), the","Corresponding Source conveyed under this section must be accompanied","by the Installation Information. But this requirement does not apply","if neither you nor any third party retains the ability to install","modified object code on the User Product (for example, the work has","been installed in ROM).",""," The requirement to provide Installation Information does not include a","requirement to continue to provide support service, warranty, or updates","for a work that has been modified or installed by the recipient, or for","the User Product in which it has been modified or installed. Access to a","network may be denied when the modification itself materially and","adversely affects the operation of the network or violates the rules and","protocols for communication across the network.",""," Corresponding Source conveyed, and Installation Information provided,","in accord with this section must be in a format that is publicly","documented (and with an implementation available to the public in","source code form), and must require no special password or key for","unpacking, reading or copying.",""," 7. Additional Terms.",""," \"Additional permissions\" are terms that supplement the terms of this","License by making exceptions from one or more of its conditions.","Additional permissions that are applicable to the entire Program shall","be treated as though they were included in this License, to the extent","that they are valid under applicable law. If additional permissions","apply only to part of the Program, that part may be used separately","under those permissions, but the entire Program remains governed by","this License without regard to the additional permissions.",""," When you convey a copy of a covered work, you may at your option","remove any additional permissions from that copy, or from any part of","it. (Additional permissions may be written to require their own","removal in certain cases when you modify the work.) You may place","additional permissions on material, added by you to a covered work,","for which you have or can give appropriate copyright permission.",""," Notwithstanding any other provision of this License, for material you","add to a covered work, you may (if authorized by the copyright holders of","that material) supplement the terms of this License with terms:",""," a) Disclaiming warranty or limiting liability differently from the"," terms of sections 15 and 16 of this License; or",""," b) Requiring preservation of specified reasonable legal notices or"," author attributions in that material or in the Appropriate Legal"," Notices displayed by works containing it; or",""," c) Prohibiting misrepresentation of the origin of that material, or"," requiring that modified versions of such material be marked in"," reasonable ways as different from the original version; or",""," d) Limiting the use for publicity purposes of names of licensors or"," authors of the material; or",""," e) Declining to grant rights under trademark law for use of some"," trade names, trademarks, or service marks; or",""," f) Requiring indemnification of licensors and authors of that"," material by anyone who conveys the material (or modified versions of"," it) with contractual assumptions of liability to the recipient, for"," any liability that these contractual assumptions directly impose on"," those licensors and authors.",""," All other non-permissive additional terms are considered \"further","restrictions\" within the meaning of section 10. If the Program as you","received it, or any part of it, contains a notice stating that it is","governed by this License along with a term that is a further","restriction, you may remove that term. If a license document contains","a further restriction but permits relicensing or conveying under this","License, you may add to a covered work material governed by the terms","of that license document, provided that the further restriction does","not survive such relicensing or conveying.",""," If you add terms to a covered work in accord with this section, you","must place, in the relevant source files, a statement of the","additional terms that apply to those files, or a notice indicating","where to find the applicable terms.",""," Additional terms, permissive or non-permissive, may be stated in the","form of a separately written license, or stated as exceptions;","the above requirements apply either way.",""," 8. Termination.",""," You may not propagate or modify a covered work except as expressly","provided under this License. Any attempt otherwise to propagate or","modify it is void, and will automatically terminate your rights under","this License (including any patent licenses granted under the third","paragraph of section 11).",""," However, if you cease all violation of this License, then your","license from a particular copyright holder is reinstated (a)","provisionally, unless and until the copyright holder explicitly and","finally terminates your license, and (b) permanently, if the copyright","holder fails to notify you of the violation by some reasonable means","prior to 60 days after the cessation.",""," Moreover, your license from a particular copyright holder is","reinstated permanently if the copyright holder notifies you of the","violation by some reasonable means, this is the first time you have","received notice of violation of this License (for any work) from that","copyright holder, and you cure the violation prior to 30 days after","your receipt of the notice.",""," Termination of your rights under this section does not terminate the","licenses of parties who have received copies or rights from you under","this License. If your rights have been terminated and not permanently","reinstated, you do not qualify to receive new licenses for the same","material under section 10.",""," 9. Acceptance Not Required for Having Copies.",""," You are not required to accept this License in order to receive or","run a copy of the Program. Ancillary propagation of a covered work","occurring solely as a consequence of using peer-to-peer transmission","to receive a copy likewise does not require acceptance. However,","nothing other than this License grants you permission to propagate or","modify any covered work. These actions infringe copyright if you do","not accept this License. Therefore, by modifying or propagating a","covered work, you indicate your acceptance of this License to do so.",""," 10. Automatic Licensing of Downstream Recipients.",""," Each time you convey a covered work, the recipient automatically","receives a license from the original licensors, to run, modify and","propagate that work, subject to this License. You are not responsible","for enforcing compliance by third parties with this License.",""," An \"entity transaction\" is a transaction transferring control of an","organization, or substantially all assets of one, or subdividing an","organization, or merging organizations. If propagation of a covered","work results from an entity transaction, each party to that","transaction who receives a copy of the work also receives whatever","licenses to the work the party's predecessor in interest had or could","give under the previous paragraph, plus a right to possession of the","Corresponding Source of the work from the predecessor in interest, if","the predecessor has it or can get it with reasonable efforts.",""," You may not impose any further restrictions on the exercise of the","rights granted or affirmed under this License. For example, you may","not impose a license fee, royalty, or other charge for exercise of","rights granted under this License, and you may not initiate litigation","(including a cross-claim or counterclaim in a lawsuit) alleging that","any patent claim is infringed by making, using, selling, offering for","sale, or importing the Program or any portion of it.",""," 11. Patents.",""," A \"contributor\" is a copyright holder who authorizes use under this","License of the Program or a work on which the Program is based. The","work thus licensed is called the contributor's \"contributor version\".",""," A contributor's \"essential patent claims\" are all patent claims","owned or controlled by the contributor, whether already acquired or","hereafter acquired, that would be infringed by some manner, permitted","by this License, of making, using, or selling its contributor version,","but do not include claims that would be infringed only as a","consequence of further modification of the contributor version. For","purposes of this definition, \"control\" includes the right to grant","patent sublicenses in a manner consistent with the requirements of","this License.",""," Each contributor grants you a non-exclusive, worldwide, royalty-free","patent license under the contributor's essential patent claims, to","make, use, sell, offer for sale, import and otherwise run, modify and","propagate the contents of its contributor version.",""," In the following three paragraphs, a \"patent license\" is any express","agreement or commitment, however denominated, not to enforce a patent","(such as an express permission to practice a patent or covenant not to","sue for patent infringement). To \"grant\" such a patent license to a","party means to make such an agreement or commitment not to enforce a","patent against the party.",""," If you convey a covered work, knowingly relying on a patent license,","and the Corresponding Source of the work is not available for anyone","to copy, free of charge and under the terms of this License, through a","publicly available network server or other readily accessible means,","then you must either (1) cause the Corresponding Source to be so","available, or (2) arrange to deprive yourself of the benefit of the","patent license for this particular work, or (3) arrange, in a manner","consistent with the requirements of this License, to extend the patent","license to downstream recipients. \"Knowingly relying\" means you have","actual knowledge that, but for the patent license, your conveying the","covered work in a country, or your recipient's use of the covered work","in a country, would infringe one or more identifiable patents in that","country that you have reason to believe are valid.",""," If, pursuant to or in connection with a single transaction or","arrangement, you convey, or propagate by procuring conveyance of, a","covered work, and grant a patent license to some of the parties","receiving the covered work authorizing them to use, propagate, modify","or convey a specific copy of the covered work, then the patent license","you grant is automatically extended to all recipients of the covered","work and works based on it.",""," A patent license is \"discriminatory\" if it does not include within","the scope of its coverage, prohibits the exercise of, or is","conditioned on the non-exercise of one or more of the rights that are","specifically granted under this License. You may not convey a covered","work if you are a party to an arrangement with a third party that is","in the business of distributing software, under which you make payment","to the third party based on the extent of your activity of conveying","the work, and under which the third party grants, to any of the","parties who would receive the covered work from you, a discriminatory","patent license (a) in connection with copies of the covered work","conveyed by you (or copies made from those copies), or (b) primarily","for and in connection with specific products or compilations that","contain the covered work, unless you entered into that arrangement,","or that patent license was granted, prior to 28 March 2007.",""," Nothing in this License shall be construed as excluding or limiting","any implied license or other defenses to infringement that may","otherwise be available to you under applicable patent law.",""," 12. No Surrender of Others' Freedom.",""," If conditions are imposed on you (whether by court order, agreement or","otherwise) that contradict the conditions of this License, they do not","excuse you from the conditions of this License. If you cannot convey a","covered work so as to satisfy simultaneously your obligations under this","License and any other pertinent obligations, then as a consequence you may","not convey it at all. For example, if you agree to terms that obligate you","to collect a royalty for further conveying from those to whom you convey","the Program, the only way you could satisfy both those terms and this","License would be to refrain entirely from conveying the Program.",""," 13. Use with the GNU Affero General Public License.",""," Notwithstanding any other provision of this License, you have","permission to link or combine any covered work with a work licensed","under version 3 of the GNU Affero General Public License into a single","combined work, and to convey the resulting work. The terms of this","License will continue to apply to the part which is the covered work,","but the special requirements of the GNU Affero General Public License,","section 13, concerning interaction through a network will apply to the","combination as such.",""," 14. Revised Versions of this License.",""," The Free Software Foundation may publish revised and/or new versions of","the GNU General Public License from time to time. Such new versions will","be similar in spirit to the present version, but may differ in detail to","address new problems or concerns.",""," Each version is given a distinguishing version number. If the","Program specifies that a certain numbered version of the GNU General","Public License \"or any later version\" applies to it, you have the","option of following the terms and conditions either of that numbered","version or of any later version published by the Free Software","Foundation. If the Program does not specify a version number of the","GNU General Public License, you may choose any version ever published","by the Free Software Foundation.",""," If the Program specifies that a proxy can decide which future","versions of the GNU General Public License can be used, that proxy's","public statement of acceptance of a version permanently authorizes you","to choose that version for the Program.",""," Later license versions may give you additional or different","permissions. However, no additional obligations are imposed on any","author or copyright holder as a result of your choosing to follow a","later version.",""," 15. Disclaimer of Warranty.",""," THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY","APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT","HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY","OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,","THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR","PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM","IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF","ALL NECESSARY SERVICING, REPAIR OR CORRECTION.",""," 16. Limitation of Liability.",""," IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING","WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS","THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY","GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE","USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF","DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD","PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),","EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF","SUCH DAMAGES.",""," 17. Interpretation of Sections 15 and 16.",""," If the disclaimer of warranty and limitation of liability provided","above cannot be given local legal effect according to their terms,","reviewing courts shall apply local law that most closely approximates","an absolute waiver of all civil liability in connection with the","Program, unless a warranty or assumption of liability accompanies a","copy of the Program in return for a fee.",""," END OF TERMS AND CONDITIONS",""," How to Apply These Terms to Your New Programs",""," If you develop a new program, and you want it to be of the greatest","possible use to the public, the best way to achieve this is to make it","free software which everyone can redistribute and change under these terms.",""," To do so, attach the following notices to the program. It is safest","to attach them to the start of each source file to most effectively","state the exclusion of warranty; and each file should have at least","the \"copyright\" line and a pointer to where the full notice is found.",""," "," Copyright (C) ",""," This program is free software: you can redistribute it and/or modify"," it under the terms of the GNU General Public License as published by"," the Free Software Foundation, either version 3 of the License, or"," (at your option) any later version.",""," This program is distributed in the hope that it will be useful,"," but WITHOUT ANY WARRANTY; without even the implied warranty of"," MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"," GNU General Public License for more details.",""," You should have received a copy of the GNU General Public License"," along with this program. If not, see .","","Also add information on how to contact you by electronic and paper mail.",""," If the program does terminal interaction, make it output a short","notice like this when it starts in an interactive mode:",""," Copyright (C) "," This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'."," This is free software, and you are welcome to redistribute it"," under certain conditions; type `show c' for details.","","The hypothetical commands `show w' and `show c' should show the appropriate","parts of the General Public License. Of course, your program's commands","might be different; for a GUI interface, you would use an \"about box\".",""," You should also get your employer (if you work as a programmer) or school,","if any, to sign a \"copyright disclaimer\" for the program, if necessary.","For more information on this, and how to apply and follow the GNU GPL, see",".",""," The GNU General Public License does not permit incorporating your program","into proprietary programs. If your program is a subroutine library, you","may consider it more useful to permit linking proprietary applications with","the library. If this is what you want to do, use the GNU Lesser General","Public License instead of this License. But first, please read","."],"stylingDirectives":[[{"start":20,"end":23,"cssClass":"pl-smi"},{"start":24,"end":31,"cssClass":"pl-c1"},{"start":32,"end":38,"cssClass":"pl-smi"},{"start":39,"end":46,"cssClass":"pl-c1"}],[{"start":23,"end":30,"cssClass":"pl-s1"},{"start":31,"end":32,"cssClass":"pl-c1"},{"start":34,"end":36,"cssClass":"pl-c1"},{"start":37,"end":41,"cssClass":"pl-s1"},{"start":42,"end":46,"cssClass":"pl-c1"}],[],[{"start":1,"end":10,"cssClass":"pl-s1"},{"start":12,"end":13,"cssClass":"pl-smi"},{"start":15,"end":19,"cssClass":"pl-c1"},{"start":20,"end":24,"cssClass":"pl-smi"},{"start":25,"end":33,"cssClass":"pl-s1"},{"start":34,"end":44,"cssClass":"pl-s1"},{"start":46,"end":49,"cssClass":"pl-s1"},{"start":52,"end":57,"cssClass":"pl-s1"},{"start":58,"end":69,"cssClass":"pl-c"}],[{"start":1,"end":9,"cssClass":"pl-s1"},{"start":10,"end":12,"cssClass":"pl-smi"},{"start":13,"end":22,"cssClass":"pl-s1"},{"start":23,"end":25,"cssClass":"pl-smi"},{"start":26,"end":30,"cssClass":"pl-s1"},{"start":31,"end":34,"cssClass":"pl-smi"},{"start":35,"end":45,"cssClass":"pl-s1"},{"start":46,"end":54,"cssClass":"pl-smi"},{"start":55,"end":61,"cssClass":"pl-s1"}],[{"start":1,"end":3,"cssClass":"pl-smi"},{"start":4,"end":8,"cssClass":"pl-s1"},{"start":9,"end":16,"cssClass":"pl-smi"},{"start":17,"end":25,"cssClass":"pl-s1"},{"start":27,"end":30,"cssClass":"pl-s1"},{"start":31,"end":39,"cssClass":"pl-smi"},{"start":40,"end":42,"cssClass":"pl-s1"},{"start":43,"end":45,"cssClass":"pl-smi"},{"start":46,"end":49,"cssClass":"pl-s1"},{"start":50,"end":57,"cssClass":"pl-smi"}],[],[{"start":28,"end":36,"cssClass":"pl-smi"}],[],[{"start":2,"end":5,"cssClass":"pl-s1"},{"start":6,"end":9,"cssClass":"pl-smi"},{"start":10,"end":17,"cssClass":"pl-s1"},{"start":18,"end":24,"cssClass":"pl-smi"},{"start":25,"end":32,"cssClass":"pl-s1"},{"start":33,"end":35,"cssClass":"pl-smi"},{"start":36,"end":37,"cssClass":"pl-s1"},{"start":38,"end":42,"cssClass":"pl-s1"},{"start":44,"end":52,"cssClass":"pl-s1"},{"start":53,"end":60,"cssClass":"pl-smi"},{"start":61,"end":64,"cssClass":"pl-s1"}],[{"start":0,"end":8,"cssClass":"pl-smi"},{"start":9,"end":12,"cssClass":"pl-s1"},{"start":13,"end":18,"cssClass":"pl-smi"},{"start":19,"end":24,"cssClass":"pl-s1"},{"start":25,"end":27,"cssClass":"pl-smi"},{"start":28,"end":33,"cssClass":"pl-s1"}],[],[{"start":2,"end":5,"cssClass":"pl-s1"},{"start":6,"end":14,"cssClass":"pl-smi"},{"start":15,"end":18,"cssClass":"pl-s1"},{"start":19,"end":23,"cssClass":"pl-smi"},{"start":24,"end":32,"cssClass":"pl-s1"},{"start":33,"end":36,"cssClass":"pl-smi"},{"start":37,"end":42,"cssClass":"pl-s1"},{"start":43,"end":52,"cssClass":"pl-smi"},{"start":53,"end":58,"cssClass":"pl-s1"},{"start":59,"end":62,"cssClass":"pl-smi"},{"start":63,"end":71,"cssClass":"pl-s1"}],[{"start":0,"end":2,"cssClass":"pl-smi"},{"start":3,"end":7,"cssClass":"pl-s1"},{"start":8,"end":12,"cssClass":"pl-smi"},{"start":13,"end":17,"cssClass":"pl-s1"},{"start":18,"end":25,"cssClass":"pl-smi"},{"start":26,"end":28,"cssClass":"pl-s1"},{"start":29,"end":34,"cssClass":"pl-smi"},{"start":35,"end":38,"cssClass":"pl-s1"},{"start":39,"end":45,"cssClass":"pl-smi"},{"start":46,"end":49,"cssClass":"pl-s1"},{"start":50,"end":55,"cssClass":"pl-smi"},{"start":58,"end":60,"cssClass":"pl-smi"},{"start":61,"end":69,"cssClass":"pl-s1"}],[{"start":0,"end":3,"cssClass":"pl-s1"},{"start":4,"end":7,"cssClass":"pl-smi"},{"start":8,"end":15,"cssClass":"pl-s1"},{"start":16,"end":22,"cssClass":"pl-smi"},{"start":23,"end":30,"cssClass":"pl-s1"},{"start":31,"end":33,"cssClass":"pl-smi"},{"start":34,"end":42,"cssClass":"pl-s1"},{"start":43,"end":45,"cssClass":"pl-smi"},{"start":46,"end":55,"cssClass":"pl-s1"},{"start":56,"end":60,"cssClass":"pl-smi"},{"start":61,"end":68,"cssClass":"pl-s1"},{"start":69,"end":71,"cssClass":"pl-smi"}],[{"start":0,"end":5,"cssClass":"pl-s1"},{"start":6,"end":9,"cssClass":"pl-smi"},{"start":10,"end":16,"cssClass":"pl-s1"},{"start":17,"end":20,"cssClass":"pl-smi"},{"start":21,"end":29,"cssClass":"pl-s1"},{"start":30,"end":32,"cssClass":"pl-smi"},{"start":33,"end":34,"cssClass":"pl-s1"},{"start":35,"end":42,"cssClass":"pl-s1"},{"start":44,"end":46,"cssClass":"pl-s1"},{"start":47,"end":51,"cssClass":"pl-smi"},{"start":52,"end":56,"cssClass":"pl-s1"},{"start":57,"end":59,"cssClass":"pl-smi"},{"start":60,"end":67,"cssClass":"pl-s1"},{"start":68,"end":72,"cssClass":"pl-smi"}],[{"start":0,"end":8,"cssClass":"pl-s1"},{"start":9,"end":12,"cssClass":"pl-s1"},{"start":13,"end":16,"cssClass":"pl-s1"},{"start":17,"end":20,"cssClass":"pl-s1"},{"start":21,"end":26,"cssClass":"pl-s1"},{"start":29,"end":31,"cssClass":"pl-s1"},{"start":33,"end":36,"cssClass":"pl-s1"},{"start":37,"end":41,"cssClass":"pl-smi"},{"start":42,"end":50,"cssClass":"pl-s1"},{"start":51,"end":61,"cssClass":"pl-s1"},{"start":63,"end":66,"cssClass":"pl-s1"},{"start":67,"end":70,"cssClass":"pl-smi"}],[{"start":0,"end":3,"cssClass":"pl-c1"},{"start":4,"end":11,"cssClass":"pl-smi"},{"start":12,"end":18,"cssClass":"pl-s1"},{"start":19,"end":26,"cssClass":"pl-smi"},{"start":27,"end":30,"cssClass":"pl-s1"},{"start":31,"end":35,"cssClass":"pl-smi"},{"start":36,"end":38,"cssClass":"pl-s1"},{"start":39,"end":42,"cssClass":"pl-smi"},{"start":43,"end":51,"cssClass":"pl-s1"},{"start":53,"end":55,"cssClass":"pl-smi"},{"start":56,"end":63,"cssClass":"pl-s1"},{"start":64,"end":68,"cssClass":"pl-smi"},{"start":69,"end":71,"cssClass":"pl-s1"}],[{"start":0,"end":3,"cssClass":"pl-smi"},{"start":4,"end":9,"cssClass":"pl-s1"},{"start":10,"end":14,"cssClass":"pl-smi"},{"start":15,"end":23,"cssClass":"pl-s1"},{"start":24,"end":28,"cssClass":"pl-s1"},{"start":29,"end":32,"cssClass":"pl-s1"},{"start":33,"end":35,"cssClass":"pl-s1"},{"start":36,"end":39,"cssClass":"pl-s1"},{"start":40,"end":47,"cssClass":"pl-s1"},{"start":50,"end":53,"cssClass":"pl-s1"},{"start":54,"end":57,"cssClass":"pl-s1"},{"start":58,"end":63,"cssClass":"pl-s1"},{"start":64,"end":66,"cssClass":"pl-s1"},{"start":67,"end":69,"cssClass":"pl-k"}],[{"start":0,"end":4,"cssClass":"pl-s1"},{"start":5,"end":13,"cssClass":"pl-s1"},{"start":15,"end":18,"cssClass":"pl-s1"}],[],[{"start":2,"end":6,"cssClass":"pl-s1"},{"start":7,"end":9,"cssClass":"pl-s1"},{"start":10,"end":15,"cssClass":"pl-s1"},{"start":16,"end":18,"cssClass":"pl-s1"},{"start":19,"end":23,"cssClass":"pl-s1"},{"start":24,"end":32,"cssClass":"pl-s1"},{"start":34,"end":36,"cssClass":"pl-s1"},{"start":37,"end":40,"cssClass":"pl-smi"},{"start":41,"end":50,"cssClass":"pl-s1"},{"start":51,"end":53,"cssClass":"pl-smi"},{"start":54,"end":61,"cssClass":"pl-s1"},{"start":63,"end":66,"cssClass":"pl-s1"}],[{"start":0,"end":5,"cssClass":"pl-smi"},{"start":8,"end":11,"cssClass":"pl-smi"},{"start":12,"end":19,"cssClass":"pl-s1"},{"start":20,"end":26,"cssClass":"pl-smi"},{"start":27,"end":35,"cssClass":"pl-s1"},{"start":36,"end":39,"cssClass":"pl-smi"},{"start":40,"end":48,"cssClass":"pl-s1"},{"start":49,"end":51,"cssClass":"pl-smi"},{"start":52,"end":56,"cssClass":"pl-s1"},{"start":57,"end":61,"cssClass":"pl-smi"},{"start":62,"end":66,"cssClass":"pl-s1"},{"start":67,"end":70,"cssClass":"pl-smi"}],[{"start":0,"end":4,"cssClass":"pl-s1"},{"start":5,"end":8,"cssClass":"pl-smi"},{"start":9,"end":16,"cssClass":"pl-s1"},{"start":17,"end":19,"cssClass":"pl-smi"},{"start":20,"end":30,"cssClass":"pl-s1"},{"start":31,"end":37,"cssClass":"pl-smi"},{"start":38,"end":40,"cssClass":"pl-s1"},{"start":41,"end":45,"cssClass":"pl-smi"},{"start":46,"end":54,"cssClass":"pl-s1"},{"start":56,"end":59,"cssClass":"pl-smi"},{"start":60,"end":66,"cssClass":"pl-s1"},{"start":67,"end":70,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-s1"},{"start":5,"end":7,"cssClass":"pl-s1"},{"start":8,"end":11,"cssClass":"pl-s1"},{"start":12,"end":16,"cssClass":"pl-s1"},{"start":19,"end":23,"cssClass":"pl-s1"},{"start":24,"end":27,"cssClass":"pl-smi"},{"start":28,"end":35,"cssClass":"pl-s1"},{"start":36,"end":42,"cssClass":"pl-smi"},{"start":43,"end":47,"cssClass":"pl-s1"},{"start":48,"end":50,"cssClass":"pl-smi"},{"start":51,"end":54,"cssClass":"pl-s1"},{"start":55,"end":58,"cssClass":"pl-smi"},{"start":59,"end":61,"cssClass":"pl-s1"},{"start":62,"end":64,"cssClass":"pl-s1"},{"start":65,"end":68,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-s1"},{"start":5,"end":7,"cssClass":"pl-s1"},{"start":9,"end":13,"cssClass":"pl-s1"},{"start":14,"end":17,"cssClass":"pl-smi"},{"start":18,"end":21,"cssClass":"pl-s1"},{"start":22,"end":28,"cssClass":"pl-smi"},{"start":29,"end":32,"cssClass":"pl-s1"},{"start":33,"end":41,"cssClass":"pl-smi"},{"start":42,"end":44,"cssClass":"pl-s1"},{"start":45,"end":48,"cssClass":"pl-smi"},{"start":49,"end":55,"cssClass":"pl-s1"},{"start":56,"end":58,"cssClass":"pl-smi"},{"start":59,"end":61,"cssClass":"pl-s1"},{"start":62,"end":64,"cssClass":"pl-smi"},{"start":65,"end":68,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-smi"},{"start":5,"end":13,"cssClass":"pl-s1"},{"start":15,"end":18,"cssClass":"pl-s1"},{"start":19,"end":23,"cssClass":"pl-smi"},{"start":24,"end":27,"cssClass":"pl-s1"},{"start":28,"end":32,"cssClass":"pl-smi"},{"start":33,"end":36,"cssClass":"pl-s1"},{"start":37,"end":40,"cssClass":"pl-smi"},{"start":41,"end":43,"cssClass":"pl-s1"},{"start":44,"end":49,"cssClass":"pl-smi"},{"start":50,"end":56,"cssClass":"pl-s1"}],[],[{"start":2,"end":4,"cssClass":"pl-s1"},{"start":5,"end":12,"cssClass":"pl-s1"},{"start":13,"end":17,"cssClass":"pl-s1"},{"start":18,"end":24,"cssClass":"pl-s1"},{"start":26,"end":28,"cssClass":"pl-s1"},{"start":29,"end":33,"cssClass":"pl-smi"},{"start":34,"end":36,"cssClass":"pl-s1"},{"start":37,"end":44,"cssClass":"pl-smi"},{"start":45,"end":51,"cssClass":"pl-s1"},{"start":52,"end":56,"cssClass":"pl-smi"},{"start":57,"end":64,"cssClass":"pl-s1"},{"start":65,"end":68,"cssClass":"pl-smi"}],[{"start":0,"end":5,"cssClass":"pl-s1"},{"start":6,"end":12,"cssClass":"pl-smi"},{"start":13,"end":15,"cssClass":"pl-s1"},{"start":16,"end":22,"cssClass":"pl-smi"},{"start":23,"end":26,"cssClass":"pl-s1"},{"start":27,"end":29,"cssClass":"pl-smi"},{"start":30,"end":39,"cssClass":"pl-s1"},{"start":40,"end":43,"cssClass":"pl-smi"},{"start":44,"end":50,"cssClass":"pl-s1"},{"start":53,"end":62,"cssClass":"pl-s1"},{"start":64,"end":67,"cssClass":"pl-s1"},{"start":68,"end":72,"cssClass":"pl-smi"}],[{"start":0,"end":7,"cssClass":"pl-s1"},{"start":8,"end":24,"cssClass":"pl-smi"},{"start":25,"end":27,"cssClass":"pl-s1"},{"start":28,"end":31,"cssClass":"pl-smi"},{"start":32,"end":42,"cssClass":"pl-s1"},{"start":43,"end":49,"cssClass":"pl-smi"},{"start":50,"end":52,"cssClass":"pl-s1"},{"start":53,"end":56,"cssClass":"pl-smi"},{"start":57,"end":65,"cssClass":"pl-s1"},{"start":67,"end":69,"cssClass":"pl-s1"},{"start":70,"end":72,"cssClass":"pl-s1"}],[{"start":0,"end":3,"cssClass":"pl-s1"},{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":13,"cssClass":"pl-s1"},{"start":15,"end":31,"cssClass":"pl-s1"},{"start":32,"end":34,"cssClass":"pl-s1"},{"start":35,"end":42,"cssClass":"pl-s1"},{"start":43,"end":46,"cssClass":"pl-s1"},{"start":47,"end":54,"cssClass":"pl-s1"},{"start":55,"end":57,"cssClass":"pl-s1"},{"start":58,"end":64,"cssClass":"pl-s1"}],[],[{"start":2,"end":5,"cssClass":"pl-s1"},{"start":6,"end":13,"cssClass":"pl-s1"},{"start":15,"end":17,"cssClass":"pl-s1"},{"start":18,"end":21,"cssClass":"pl-smi"},{"start":22,"end":32,"cssClass":"pl-s1"},{"start":33,"end":39,"cssClass":"pl-smi"},{"start":40,"end":42,"cssClass":"pl-s1"},{"start":43,"end":47,"cssClass":"pl-smi"},{"start":48,"end":49,"cssClass":"pl-s1"},{"start":50,"end":57,"cssClass":"pl-s1"},{"start":59,"end":66,"cssClass":"pl-s1"}],[{"start":0,"end":6,"cssClass":"pl-smi"},{"start":7,"end":9,"cssClass":"pl-s1"},{"start":10,"end":13,"cssClass":"pl-s1"},{"start":14,"end":15,"cssClass":"pl-s1"},{"start":16,"end":19,"cssClass":"pl-s1"},{"start":21,"end":24,"cssClass":"pl-s1"},{"start":25,"end":29,"cssClass":"pl-smi"},{"start":30,"end":34,"cssClass":"pl-s1"},{"start":35,"end":37,"cssClass":"pl-smi"},{"start":38,"end":40,"cssClass":"pl-s1"},{"start":41,"end":44,"cssClass":"pl-smi"},{"start":45,"end":55,"cssClass":"pl-s1"},{"start":56,"end":59,"cssClass":"pl-smi"},{"start":60,"end":64,"cssClass":"pl-s1"}],[{"start":0,"end":8,"cssClass":"pl-smi"},{"start":9,"end":13,"cssClass":"pl-s1"},{"start":14,"end":17,"cssClass":"pl-smi"},{"start":18,"end":26,"cssClass":"pl-s1"},{"start":29,"end":32,"cssClass":"pl-s1"},{"start":33,"end":37,"cssClass":"pl-s1"},{"start":38,"end":42,"cssClass":"pl-s1"},{"start":43,"end":47,"cssClass":"pl-s1"},{"start":48,"end":52,"cssClass":"pl-s1"},{"start":53,"end":57,"cssClass":"pl-s1"},{"start":59,"end":62,"cssClass":"pl-s1"},{"start":64,"end":71,"cssClass":"pl-s1"}],[{"start":0,"end":2,"cssClass":"pl-smi"},{"start":3,"end":6,"cssClass":"pl-s1"},{"start":7,"end":10,"cssClass":"pl-smi"},{"start":11,"end":14,"cssClass":"pl-s1"},{"start":15,"end":21,"cssClass":"pl-smi"},{"start":22,"end":26,"cssClass":"pl-s1"},{"start":29,"end":32,"cssClass":"pl-s1"},{"start":33,"end":36,"cssClass":"pl-s1"},{"start":37,"end":41,"cssClass":"pl-s1"},{"start":42,"end":46,"cssClass":"pl-s1"},{"start":47,"end":51,"cssClass":"pl-s1"},{"start":52,"end":57,"cssClass":"pl-s1"},{"start":58,"end":63,"cssClass":"pl-s1"},{"start":64,"end":66,"cssClass":"pl-s1"},{"start":67,"end":71,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-s1"},{"start":5,"end":10,"cssClass":"pl-s1"},{"start":11,"end":17,"cssClass":"pl-smi"}],[],[{"start":2,"end":12,"cssClass":"pl-smi"},{"start":13,"end":17,"cssClass":"pl-s1"},{"start":18,"end":21,"cssClass":"pl-smi"},{"start":22,"end":25,"cssClass":"pl-s1"},{"start":26,"end":29,"cssClass":"pl-smi"},{"start":30,"end":33,"cssClass":"pl-c1"},{"start":34,"end":41,"cssClass":"pl-smi"},{"start":42,"end":46,"cssClass":"pl-s1"},{"start":47,"end":53,"cssClass":"pl-smi"},{"start":54,"end":58,"cssClass":"pl-s1"},{"start":59,"end":62,"cssClass":"pl-smi"},{"start":63,"end":68,"cssClass":"pl-s1"}],[{"start":1,"end":2,"cssClass":"pl-c1"},{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":20,"cssClass":"pl-smi"},{"start":21,"end":23,"cssClass":"pl-s1"},{"start":24,"end":27,"cssClass":"pl-smi"},{"start":28,"end":36,"cssClass":"pl-s1"},{"start":38,"end":41,"cssClass":"pl-s1"},{"start":43,"end":44,"cssClass":"pl-c1"},{"start":46,"end":51,"cssClass":"pl-s1"},{"start":52,"end":55,"cssClass":"pl-smi"},{"start":56,"end":60,"cssClass":"pl-s1"},{"start":61,"end":68,"cssClass":"pl-smi"}],[{"start":0,"end":6,"cssClass":"pl-s1"},{"start":7,"end":10,"cssClass":"pl-smi"},{"start":11,"end":16,"cssClass":"pl-s1"},{"start":17,"end":27,"cssClass":"pl-smi"},{"start":28,"end":30,"cssClass":"pl-s1"},{"start":31,"end":35,"cssClass":"pl-s1"},{"start":37,"end":47,"cssClass":"pl-s1"},{"start":48,"end":51,"cssClass":"pl-s1"},{"start":52,"end":54,"cssClass":"pl-smi"},{"start":55,"end":61,"cssClass":"pl-s1"},{"start":62,"end":64,"cssClass":"pl-smi"}],[],[{"start":2,"end":5,"cssClass":"pl-smi"},{"start":6,"end":9,"cssClass":"pl-s1"},{"start":10,"end":20,"cssClass":"pl-s1"},{"start":20,"end":34,"cssClass":"pl-s"},{"start":35,"end":45,"cssClass":"pl-s1"},{"start":47,"end":50,"cssClass":"pl-smi"},{"start":51,"end":54,"cssClass":"pl-c1"},{"start":55,"end":62,"cssClass":"pl-smi"},{"start":63,"end":71,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-smi"},{"start":5,"end":10,"cssClass":"pl-s1"},{"start":11,"end":13,"cssClass":"pl-smi"},{"start":14,"end":16,"cssClass":"pl-s1"},{"start":17,"end":25,"cssClass":"pl-smi"},{"start":26,"end":29,"cssClass":"pl-s1"},{"start":30,"end":34,"cssClass":"pl-smi"},{"start":35,"end":39,"cssClass":"pl-s1"},{"start":40,"end":48,"cssClass":"pl-smi"},{"start":51,"end":54,"cssClass":"pl-smi"},{"start":55,"end":59,"cssClass":"pl-s1"},{"start":60,"end":65,"cssClass":"pl-smi"}],[{"start":0,"end":7,"cssClass":"pl-s1"}],[{"start":0,"end":7,"cssClass":"pl-s1"},{"start":9,"end":11,"cssClass":"pl-s1"},{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":22,"cssClass":"pl-s1"},{"start":23,"end":31,"cssClass":"pl-smi"},{"start":32,"end":36,"cssClass":"pl-s1"},{"start":37,"end":40,"cssClass":"pl-smi"},{"start":41,"end":43,"cssClass":"pl-s1"},{"start":44,"end":54,"cssClass":"pl-smi"},{"start":55,"end":66,"cssClass":"pl-smi"},{"start":67,"end":69,"cssClass":"pl-s1"}],[{"start":0,"end":7,"cssClass":"pl-smi"},{"start":8,"end":10,"cssClass":"pl-s1"},{"start":11,"end":19,"cssClass":"pl-smi"},{"start":20,"end":28,"cssClass":"pl-smi"}],[],[{"start":2,"end":6,"cssClass":"pl-smi"},{"start":7,"end":14,"cssClass":"pl-s1"},{"start":15,"end":18,"cssClass":"pl-smi"},{"start":19,"end":27,"cssClass":"pl-smi"},{"start":28,"end":30,"cssClass":"pl-s1"},{"start":31,"end":35,"cssClass":"pl-smi"},{"start":36,"end":41,"cssClass":"pl-s1"},{"start":42,"end":48,"cssClass":"pl-smi"},{"start":49,"end":51,"cssClass":"pl-s1"},{"start":52,"end":59,"cssClass":"pl-smi"},{"start":60,"end":62,"cssClass":"pl-s1"},{"start":63,"end":66,"cssClass":"pl-smi"}],[{"start":0,"end":8,"cssClass":"pl-s1"},{"start":9,"end":17,"cssClass":"pl-smi"},{"start":18,"end":20,"cssClass":"pl-s1"},{"start":21,"end":24,"cssClass":"pl-smi"},{"start":25,"end":33,"cssClass":"pl-s1"},{"start":34,"end":40,"cssClass":"pl-smi"},{"start":41,"end":45,"cssClass":"pl-s1"},{"start":47,"end":55,"cssClass":"pl-smi"},{"start":56,"end":59,"cssClass":"pl-s1"},{"start":60,"end":72,"cssClass":"pl-smi"}],[{"start":0,"end":3,"cssClass":"pl-s1"},{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":9,"cssClass":"pl-smi"},{"start":12,"end":16,"cssClass":"pl-smi"},{"start":17,"end":19,"cssClass":"pl-s1"},{"start":20,"end":33,"cssClass":"pl-smi"},{"start":34,"end":46,"cssClass":"pl-smi"},{"start":47,"end":51,"cssClass":"pl-s1"},{"start":52,"end":55,"cssClass":"pl-smi"},{"start":56,"end":59,"cssClass":"pl-s1"},{"start":60,"end":62,"cssClass":"pl-smi"}],[{"start":0,"end":10,"cssClass":"pl-s1"},{"start":11,"end":16,"cssClass":"pl-smi"}],[{"start":0,"end":7,"cssClass":"pl-s1"},{"start":8,"end":10,"cssClass":"pl-s1"},{"start":11,"end":15,"cssClass":"pl-s1"},{"start":16,"end":21,"cssClass":"pl-s1"},{"start":22,"end":28,"cssClass":"pl-s1"},{"start":29,"end":31,"cssClass":"pl-s1"},{"start":32,"end":35,"cssClass":"pl-s1"},{"start":36,"end":40,"cssClass":"pl-smi"},{"start":41,"end":43,"cssClass":"pl-s1"},{"start":44,"end":52,"cssClass":"pl-smi"},{"start":53,"end":56,"cssClass":"pl-s1"},{"start":57,"end":68,"cssClass":"pl-smi"},{"start":69,"end":71,"cssClass":"pl-s1"}],[{"start":0,"end":3,"cssClass":"pl-s1"},{"start":5,"end":10,"cssClass":"pl-s1"},{"start":11,"end":13,"cssClass":"pl-s1"},{"start":14,"end":23,"cssClass":"pl-s1"},{"start":24,"end":29,"cssClass":"pl-s1"},{"start":30,"end":32,"cssClass":"pl-s1"},{"start":33,"end":35,"cssClass":"pl-s1"},{"start":36,"end":40,"cssClass":"pl-s1"},{"start":41,"end":53,"cssClass":"pl-s1"},{"start":56,"end":65,"cssClass":"pl-s1"},{"start":67,"end":69,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-s1"},{"start":5,"end":13,"cssClass":"pl-s1"},{"start":14,"end":18,"cssClass":"pl-smi"},{"start":19,"end":26,"cssClass":"pl-s1"},{"start":27,"end":29,"cssClass":"pl-s1"},{"start":30,"end":33,"cssClass":"pl-s1"},{"start":34,"end":37,"cssClass":"pl-c1"},{"start":38,"end":40,"cssClass":"pl-k"},{"start":41,"end":49,"cssClass":"pl-s1"},{"start":50,"end":53,"cssClass":"pl-s1"},{"start":54,"end":62,"cssClass":"pl-s1"},{"start":63,"end":66,"cssClass":"pl-k"},{"start":67,"end":72,"cssClass":"pl-s1"}],[{"start":0,"end":8,"cssClass":"pl-s1"},{"start":11,"end":13,"cssClass":"pl-s1"},{"start":14,"end":18,"cssClass":"pl-s1"},{"start":19,"end":27,"cssClass":"pl-s1"},{"start":28,"end":33,"cssClass":"pl-s1"},{"start":34,"end":47,"cssClass":"pl-s1"},{"start":48,"end":50,"cssClass":"pl-s1"},{"start":51,"end":56,"cssClass":"pl-s1"},{"start":57,"end":64,"cssClass":"pl-s1"},{"start":66,"end":68,"cssClass":"pl-s1"}],[{"start":0,"end":5,"cssClass":"pl-s1"},{"start":6,"end":11,"cssClass":"pl-s1"},{"start":12,"end":14,"cssClass":"pl-k"},{"start":15,"end":21,"cssClass":"pl-s1"},{"start":22,"end":26,"cssClass":"pl-smi"},{"start":27,"end":36,"cssClass":"pl-s1"},{"start":37,"end":39,"cssClass":"pl-k"},{"start":40,"end":45,"cssClass":"pl-s1"},{"start":46,"end":53,"cssClass":"pl-s1"},{"start":54,"end":56,"cssClass":"pl-s1"},{"start":57,"end":63,"cssClass":"pl-s1"},{"start":64,"end":72,"cssClass":"pl-s1"}],[{"start":0,"end":2,"cssClass":"pl-s1"},{"start":3,"end":6,"cssClass":"pl-s1"},{"start":7,"end":10,"cssClass":"pl-c1"},{"start":12,"end":14,"cssClass":"pl-s1"},{"start":15,"end":21,"cssClass":"pl-s1"},{"start":22,"end":24,"cssClass":"pl-k"},{"start":25,"end":32,"cssClass":"pl-s1"},{"start":33,"end":36,"cssClass":"pl-s1"},{"start":37,"end":44,"cssClass":"pl-s1"},{"start":45,"end":47,"cssClass":"pl-s1"},{"start":48,"end":53,"cssClass":"pl-s1"}],[],[{"start":2,"end":9,"cssClass":"pl-s1"},{"start":11,"end":16,"cssClass":"pl-s1"},{"start":17,"end":24,"cssClass":"pl-s1"},{"start":25,"end":27,"cssClass":"pl-s1"},{"start":28,"end":38,"cssClass":"pl-s1"},{"start":39,"end":49,"cssClass":"pl-s1"},{"start":50,"end":52,"cssClass":"pl-s1"},{"start":53,"end":61,"cssClass":"pl-s1"},{"start":62,"end":69,"cssClass":"pl-s1"}],[{"start":0,"end":6,"cssClass":"pl-s1"},{"start":7,"end":13,"cssClass":"pl-s1"},{"start":14,"end":17,"cssClass":"pl-s1"},{"start":18,"end":23,"cssClass":"pl-s1"},{"start":24,"end":31,"cssClass":"pl-s1"},{"start":32,"end":34,"cssClass":"pl-k"},{"start":35,"end":43,"cssClass":"pl-s1"},{"start":44,"end":55,"cssClass":"pl-s1"},{"start":56,"end":59,"cssClass":"pl-s1"},{"start":60,"end":63,"cssClass":"pl-s1"},{"start":64,"end":66,"cssClass":"pl-s1"}],[{"start":0,"end":8,"cssClass":"pl-s1"},{"start":9,"end":11,"cssClass":"pl-s1"},{"start":12,"end":19,"cssClass":"pl-s1"},{"start":20,"end":27,"cssClass":"pl-smi"},{"start":28,"end":37,"cssClass":"pl-s1"},{"start":39,"end":42,"cssClass":"pl-s1"},{"start":43,"end":45,"cssClass":"pl-s1"},{"start":46,"end":51,"cssClass":"pl-s1"},{"start":52,"end":56,"cssClass":"pl-s1"},{"start":57,"end":59,"cssClass":"pl-k"},{"start":61,"end":63,"cssClass":"pl-s1"},{"start":64,"end":68,"cssClass":"pl-s1"},{"start":69,"end":71,"cssClass":"pl-k"}],[{"start":0,"end":5,"cssClass":"pl-smi"},{"start":6,"end":9,"cssClass":"pl-s1"},{"start":10,"end":17,"cssClass":"pl-smi"},{"start":18,"end":24,"cssClass":"pl-s1"},{"start":25,"end":29,"cssClass":"pl-smi"},{"start":30,"end":37,"cssClass":"pl-s1"},{"start":38,"end":45,"cssClass":"pl-smi"},{"start":46,"end":48,"cssClass":"pl-s1"},{"start":49,"end":50,"cssClass":"pl-smi"},{"start":51,"end":55,"cssClass":"pl-s1"},{"start":56,"end":63,"cssClass":"pl-smi"},{"start":64,"end":69,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-smi"},{"start":5,"end":7,"cssClass":"pl-s1"},{"start":8,"end":19,"cssClass":"pl-smi"},{"start":20,"end":31,"cssClass":"pl-smi"},{"start":34,"end":36,"cssClass":"pl-smi"},{"start":37,"end":44,"cssClass":"pl-s1"},{"start":45,"end":49,"cssClass":"pl-smi"},{"start":51,"end":54,"cssClass":"pl-s1"},{"start":55,"end":58,"cssClass":"pl-c1"},{"start":59,"end":66,"cssClass":"pl-s1"},{"start":67,"end":71,"cssClass":"pl-s1"}],[{"start":0,"end":7,"cssClass":"pl-s1"},{"start":8,"end":14,"cssClass":"pl-s1"},{"start":15,"end":17,"cssClass":"pl-s1"},{"start":18,"end":22,"cssClass":"pl-s1"},{"start":23,"end":25,"cssClass":"pl-k"},{"start":26,"end":32,"cssClass":"pl-s1"},{"start":33,"end":36,"cssClass":"pl-s1"},{"start":37,"end":44,"cssClass":"pl-s1"},{"start":45,"end":48,"cssClass":"pl-s1"},{"start":49,"end":53,"cssClass":"pl-smi"}],[],[{"start":2,"end":5,"cssClass":"pl-smi"},{"start":6,"end":13,"cssClass":"pl-s1"},{"start":14,"end":19,"cssClass":"pl-s1"},{"start":20,"end":23,"cssClass":"pl-s1"},{"start":24,"end":34,"cssClass":"pl-s1"},{"start":35,"end":38,"cssClass":"pl-k"},{"start":39,"end":46,"cssClass":"pl-s1"},{"start":48,"end":60,"cssClass":"pl-s1"},{"start":61,"end":64,"cssClass":"pl-s1"}],[{"start":0,"end":12,"cssClass":"pl-s1"},{"start":13,"end":19,"cssClass":"pl-smi"}],[],[{"start":23,"end":28,"cssClass":"pl-smi"},{"start":29,"end":32,"cssClass":"pl-c1"},{"start":33,"end":43,"cssClass":"pl-c1"}],[],[{"start":2,"end":4,"cssClass":"pl-c1"},{"start":5,"end":16,"cssClass":"pl-s1"}],[],[{"start":2,"end":16,"cssClass":"pl-s"},{"start":17,"end":23,"cssClass":"pl-smi"},{"start":24,"end":26,"cssClass":"pl-s1"},{"start":27,"end":34,"cssClass":"pl-s1"},{"start":35,"end":36,"cssClass":"pl-c1"},{"start":37,"end":39,"cssClass":"pl-s1"},{"start":40,"end":43,"cssClass":"pl-s1"},{"start":44,"end":47,"cssClass":"pl-c1"},{"start":48,"end":55,"cssClass":"pl-s1"},{"start":56,"end":62,"cssClass":"pl-s1"},{"start":63,"end":70,"cssClass":"pl-s1"}],[],[{"start":3,"end":12,"cssClass":"pl-s1"},{"start":12,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":35,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":3,"cssClass":"pl-s"},{"start":3,"end":6,"cssClass":"pl-smi"},{"start":7,"end":14,"cssClass":"pl-s1"},{"start":14,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":41,"cssClass":"pl-s"},{"start":41,"end":44,"cssClass":"pl-s1"},{"start":48,"end":59,"cssClass":"pl-s"},{"start":60,"end":63,"cssClass":"pl-s1"}],[{"start":0,"end":12,"cssClass":"pl-s"},{"start":13,"end":16,"cssClass":"pl-s1"},{"start":17,"end":19,"cssClass":"pl-smi"},{"start":20,"end":31,"cssClass":"pl-s1"},{"start":32,"end":34,"cssClass":"pl-smi"},{"start":35,"end":48,"cssClass":"pl-s1"}],[],[{"start":2,"end":4,"cssClass":"pl-s1"},{"start":5,"end":13,"cssClass":"pl-s"},{"start":14,"end":15,"cssClass":"pl-s1"},{"start":16,"end":20,"cssClass":"pl-smi"},{"start":21,"end":26,"cssClass":"pl-s1"},{"start":27,"end":29,"cssClass":"pl-smi"},{"start":30,"end":34,"cssClass":"pl-s1"},{"start":35,"end":39,"cssClass":"pl-smi"},{"start":40,"end":42,"cssClass":"pl-s1"},{"start":43,"end":48,"cssClass":"pl-smi"},{"start":49,"end":52,"cssClass":"pl-s1"},{"start":53,"end":55,"cssClass":"pl-smi"},{"start":56,"end":60,"cssClass":"pl-s1"},{"start":61,"end":63,"cssClass":"pl-smi"},{"start":64,"end":67,"cssClass":"pl-s1"},{"start":68,"end":72,"cssClass":"pl-smi"}],[{"start":0,"end":2,"cssClass":"pl-s1"},{"start":3,"end":4,"cssClass":"pl-smi"},{"start":5,"end":12,"cssClass":"pl-s1"},{"start":13,"end":22,"cssClass":"pl-smi"},{"start":23,"end":32,"cssClass":"pl-s1"},{"start":33,"end":43,"cssClass":"pl-s1"},{"start":45,"end":50,"cssClass":"pl-s1"},{"start":51,"end":55,"cssClass":"pl-smi"},{"start":56,"end":59,"cssClass":"pl-s1"},{"start":60,"end":66,"cssClass":"pl-smi"},{"start":67,"end":69,"cssClass":"pl-s1"},{"start":70,"end":72,"cssClass":"pl-smi"}],[{"start":0,"end":5,"cssClass":"pl-s1"},{"start":6,"end":10,"cssClass":"pl-smi"},{"start":13,"end":16,"cssClass":"pl-smi"},{"start":17,"end":26,"cssClass":"pl-s1"},{"start":27,"end":31,"cssClass":"pl-smi"},{"start":32,"end":34,"cssClass":"pl-s1"},{"start":35,"end":41,"cssClass":"pl-smi"},{"start":42,"end":43,"cssClass":"pl-s1"},{"start":44,"end":62,"cssClass":"pl-s"},{"start":63,"end":65,"cssClass":"pl-s1"},{"start":66,"end":69,"cssClass":"pl-smi"}],[{"start":0,"end":7,"cssClass":"pl-s1"},{"start":8,"end":12,"cssClass":"pl-smi"},{"start":13,"end":15,"cssClass":"pl-s1"},{"start":16,"end":17,"cssClass":"pl-smi"},{"start":18,"end":22,"cssClass":"pl-s1"},{"start":23,"end":33,"cssClass":"pl-s"},{"start":34,"end":37,"cssClass":"pl-s1"},{"start":38,"end":45,"cssClass":"pl-smi"},{"start":46,"end":50,"cssClass":"pl-s1"}],[],[{"start":2,"end":3,"cssClass":"pl-s1"},{"start":4,"end":18,"cssClass":"pl-s"},{"start":19,"end":24,"cssClass":"pl-s1"},{"start":25,"end":31,"cssClass":"pl-smi"},{"start":32,"end":35,"cssClass":"pl-s1"},{"start":36,"end":46,"cssClass":"pl-smi"},{"start":47,"end":54,"cssClass":"pl-s1"},{"start":55,"end":57,"cssClass":"pl-smi"},{"start":58,"end":59,"cssClass":"pl-s1"},{"start":60,"end":64,"cssClass":"pl-smi"},{"start":65,"end":70,"cssClass":"pl-s1"}],[{"start":0,"end":2,"cssClass":"pl-smi"},{"start":3,"end":6,"cssClass":"pl-s1"},{"start":7,"end":14,"cssClass":"pl-smi"}],[],[{"start":2,"end":4,"cssClass":"pl-smi"},{"start":5,"end":16,"cssClass":"pl-s"},{"start":17,"end":18,"cssClass":"pl-s1"},{"start":19,"end":23,"cssClass":"pl-smi"},{"start":24,"end":29,"cssClass":"pl-s1"},{"start":30,"end":32,"cssClass":"pl-s1"},{"start":33,"end":35,"cssClass":"pl-k"},{"start":36,"end":44,"cssClass":"pl-smi"},{"start":45,"end":49,"cssClass":"pl-s1"},{"start":50,"end":52,"cssClass":"pl-s1"},{"start":53,"end":57,"cssClass":"pl-s1"},{"start":59,"end":66,"cssClass":"pl-s1"}],[{"start":0,"end":10,"cssClass":"pl-s1"},{"start":12,"end":17,"cssClass":"pl-s1"},{"start":18,"end":22,"cssClass":"pl-s1"},{"start":23,"end":26,"cssClass":"pl-s1"},{"start":27,"end":35,"cssClass":"pl-s1"},{"start":36,"end":38,"cssClass":"pl-s1"},{"start":39,"end":50,"cssClass":"pl-s1"},{"start":51,"end":57,"cssClass":"pl-s1"},{"start":58,"end":61,"cssClass":"pl-k"}],[{"start":0,"end":12,"cssClass":"pl-s1"},{"start":13,"end":18,"cssClass":"pl-s1"},{"start":19,"end":29,"cssClass":"pl-s1"},{"start":30,"end":39,"cssClass":"pl-s1"},{"start":40,"end":43,"cssClass":"pl-s1"},{"start":45,"end":51,"cssClass":"pl-s1"},{"start":52,"end":61,"cssClass":"pl-s1"},{"start":62,"end":64,"cssClass":"pl-s1"},{"start":65,"end":67,"cssClass":"pl-s1"},{"start":68,"end":69,"cssClass":"pl-s1"}],[{"start":0,"end":8,"cssClass":"pl-s1"},{"start":9,"end":11,"cssClass":"pl-s1"},{"start":12,"end":21,"cssClass":"pl-s1"},{"start":22,"end":23,"cssClass":"pl-s1"},{"start":24,"end":31,"cssClass":"pl-k"},{"start":32,"end":36,"cssClass":"pl-s1"},{"start":39,"end":50,"cssClass":"pl-s1"},{"start":51,"end":59,"cssClass":"pl-s1"},{"start":60,"end":67,"cssClass":"pl-s1"}],[{"start":0,"end":12,"cssClass":"pl-s1"},{"start":14,"end":18,"cssClass":"pl-k"},{"start":19,"end":21,"cssClass":"pl-s1"},{"start":22,"end":29,"cssClass":"pl-s1"},{"start":30,"end":42,"cssClass":"pl-s1"},{"start":45,"end":51,"cssClass":"pl-s1"},{"start":52,"end":61,"cssClass":"pl-s1"},{"start":62,"end":64,"cssClass":"pl-k"},{"start":65,"end":68,"cssClass":"pl-s1"}],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":8,"end":11,"cssClass":"pl-s1"},{"start":12,"end":14,"cssClass":"pl-s1"},{"start":15,"end":19,"cssClass":"pl-s1"},{"start":20,"end":29,"cssClass":"pl-s1"},{"start":30,"end":35,"cssClass":"pl-s1"},{"start":36,"end":46,"cssClass":"pl-s1"},{"start":47,"end":49,"cssClass":"pl-s1"},{"start":50,"end":54,"cssClass":"pl-s1"}],[],[{"start":2,"end":4,"cssClass":"pl-s1"},{"start":6,"end":12,"cssClass":"pl-s1"},{"start":12,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":42,"cssClass":"pl-s"},{"start":42,"end":53,"cssClass":"pl-s1"},{"start":54,"end":59,"cssClass":"pl-smi"},{"start":60,"end":67,"cssClass":"pl-s1"},{"start":67,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":56,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":17,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"},{"start":7,"end":13,"cssClass":"pl-s1"},{"start":14,"end":18,"cssClass":"pl-s1"},{"start":18,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":34,"cssClass":"pl-s"},{"start":34,"end":40,"cssClass":"pl-smi"},{"start":41,"end":45,"cssClass":"pl-s1"},{"start":45,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":15,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":5,"cssClass":"pl-s"},{"start":5,"end":13,"cssClass":"pl-smi"},{"start":14,"end":23,"cssClass":"pl-s1"},{"start":23,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":57,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"},{"start":7,"end":13,"cssClass":"pl-smi"},{"start":14,"end":23,"cssClass":"pl-s1"},{"start":23,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":1,"cssClass":"pl-s"},{"start":1,"end":6,"cssClass":"pl-smi"},{"start":7,"end":16,"cssClass":"pl-s1"},{"start":16,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"},{"start":7,"end":20,"cssClass":"pl-smi"},{"start":21,"end":27,"cssClass":"pl-s1"},{"start":27,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":40,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":10,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":23,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":21,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":61,"cssClass":"pl-s"}],[{"start":0,"end":9,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":23,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":31,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":57,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":57,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":40,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":35,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":5,"cssClass":"pl-s"},{"start":5,"end":9,"cssClass":"pl-s1"},{"start":10,"end":16,"cssClass":"pl-s1"},{"start":17,"end":20,"cssClass":"pl-s1"},{"start":21,"end":28,"cssClass":"pl-s1"},{"start":28,"end":30,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":34,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":1,"cssClass":"pl-s"},{"start":1,"end":10,"cssClass":"pl-s1"},{"start":10,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":23,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":32,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":54,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":21,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":46,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":50,"cssClass":"pl-s"}],[{"start":0,"end":60,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":60,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":23,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":31,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":43,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":5,"cssClass":"pl-s"},{"start":5,"end":9,"cssClass":"pl-s1"},{"start":10,"end":17,"cssClass":"pl-s1"},{"start":17,"end":36,"cssClass":"pl-s"},{"start":36,"end":44,"cssClass":"pl-smi"},{"start":45,"end":52,"cssClass":"pl-s1"},{"start":52,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":40,"cssClass":"pl-s"},{"start":40,"end":48,"cssClass":"pl-smi"},{"start":49,"end":53,"cssClass":"pl-s1"},{"start":53,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":48,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":3,"cssClass":"pl-s"},{"start":3,"end":15,"cssClass":"pl-s1"},{"start":16,"end":27,"cssClass":"pl-s1"},{"start":27,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":27,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":23,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":47,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":30,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":22,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":3,"cssClass":"pl-s"},{"start":3,"end":13,"cssClass":"pl-s1"},{"start":14,"end":25,"cssClass":"pl-s1"},{"start":25,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":58,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":51,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":48,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":31,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":49,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":32,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":60,"cssClass":"pl-s"},{"start":60,"end":67,"cssClass":"pl-s1"}],[{"start":0,"end":12,"cssClass":"pl-s1"},{"start":12,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":60,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":42,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":60,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":35,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":40,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":17,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":25,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":60,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":37,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":27,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":26,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":47,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":51,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":60,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":6,"cssClass":"pl-s"},{"start":6,"end":12,"cssClass":"pl-s1"},{"start":13,"end":24,"cssClass":"pl-s1"},{"start":24,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":61,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":52,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":14,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":5,"cssClass":"pl-s"},{"start":5,"end":16,"cssClass":"pl-s1"},{"start":16,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":48,"cssClass":"pl-s"},{"start":48,"end":59,"cssClass":"pl-smi"},{"start":60,"end":67,"cssClass":"pl-s1"},{"start":67,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":19,"cssClass":"pl-s"},{"start":19,"end":28,"cssClass":"pl-s1"},{"start":29,"end":35,"cssClass":"pl-smi"},{"start":36,"end":42,"cssClass":"pl-s1"},{"start":42,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":30,"cssClass":"pl-s"},{"start":30,"end":37,"cssClass":"pl-s1"},{"start":37,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":50,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":40,"cssClass":"pl-s"},{"start":40,"end":46,"cssClass":"pl-s1"},{"start":47,"end":54,"cssClass":"pl-s1"},{"start":54,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":35,"cssClass":"pl-s"},{"start":35,"end":40,"cssClass":"pl-s1"},{"start":40,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":25,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":36,"cssClass":"pl-s"},{"start":36,"end":45,"cssClass":"pl-s1"},{"start":46,"end":53,"cssClass":"pl-s1"},{"start":53,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":50,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":27,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":23,"cssClass":"pl-s"},{"start":23,"end":37,"cssClass":"pl-s1"},{"start":37,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":58,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":38,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":74,"cssClass":"pl-s"}],[{"start":0,"end":75,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":53,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":20,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":39,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":33,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":16,"cssClass":"pl-s"},{"start":16,"end":18,"cssClass":"pl-s1"},{"start":19,"end":22,"cssClass":"pl-s1"},{"start":23,"end":28,"cssClass":"pl-s1"},{"start":29,"end":36,"cssClass":"pl-s1"},{"start":36,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":32,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":63,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":39,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":61,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":14,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":29,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":50,"cssClass":"pl-s"},{"start":50,"end":52,"cssClass":"pl-c1"},{"start":53,"end":55,"cssClass":"pl-c1"},{"start":55,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":74,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":46,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":30,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":75,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":74,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":43,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":40,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":48,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":57,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":75,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":5,"cssClass":"pl-s"},{"start":5,"end":14,"cssClass":"pl-s1"},{"start":14,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":75,"cssClass":"pl-s"}],[{"start":0,"end":42,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":39,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":67,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":48,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":69,"cssClass":"pl-s"}],[{"start":0,"end":74,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":66,"cssClass":"pl-s"}],[{"start":0,"end":55,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":53,"cssClass":"pl-s"}],[{"start":0,"end":78,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":56,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":75,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"},{"start":59,"end":64,"cssClass":"pl-s1"},{"start":65,"end":68,"cssClass":"pl-s1"},{"start":68,"end":70,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":76,"cssClass":"pl-s"}],[{"start":0,"end":19,"cssClass":"pl-s"},{"start":19,"end":28,"cssClass":"pl-smi"},{"start":29,"end":39,"cssClass":"pl-s1"}],[],[],[],[],[],[],[],[],[]],"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/dharmx/vile/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null,"repoAlertsPath":"/dharmx/vile/security/dependabot","repoSecurityAndAnalysisPath":"/dharmx/vile/settings/security_analysis","repoOwnerIsOrg":false,"currentUserCanAdminRepo":false},"displayName":"LICENSE","displayUrl":"https://github.com/dharmx/vile/blob/7d486c128c7e553912673755f97b118aaab0193d/LICENSE?raw=true","headerInfo":{"blobSize":"34.3 KB","deleteInfo":{"deleteTooltip":"You must be signed in to make or propose changes"},"editInfo":{"editTooltip":"You must be signed in to make or propose changes"},"ghDesktopPath":null,"gitLfsPath":null,"onBranch":false,"shortPath":"f288702","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fdharmx%2Fvile%2Fblob%2F7d486c128c7e553912673755f97b118aaab0193d%2FLICENSE","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"674","truncatedSloc":"553"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":"Text","languageID":372,"large":false,"loggedIn":false,"newDiscussionPath":"/dharmx/vile/discussions/new","newIssuePath":"/dharmx/vile/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/dharmx/vile/blob/7d486c128c7e553912673755f97b118aaab0193d/LICENSE","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/dharmx/vile/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"dharmx","repoName":"vile","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":false,"actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timedOut":false,"notAnalyzed":true,"symbols":[]}},"copilotInfo":null,"csrf_tokens":{"/dharmx/vile/branches":{"post":"T46ZxI9vugnYwyahV7LWMlPwT8fVSeG0fQSZ9Lfedo_7wt6ofl0UZ3YQ-75elsRht19kp7Zv3AblGyLkzxk-BQ"},"/repos/preferences":{"post":"RsBit38jLeVClMaMiA-l4S_WMsHln0EAAtPA4bt3spZjZTK7kmAUxtkYXWBcKsEu8ZDe8JrsbXCE6ySxAz3Lfg"}}},"title":"vile/LICENSE at 7d486c128c7e553912673755f97b118aaab0193d ยท dharmx/vile"} \ No newline at end of file diff --git a/packages/coloryou/coloryou.py b/packages/coloryou/coloryou.py deleted file mode 100755 index 66c8efbb..00000000 --- a/packages/coloryou/coloryou.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python - -""" -The original script: -https://github.com/dharmx/vile/blob/7d486c128c7e553912673755f97b118aaab0193d/src/shell/playerctl.py#L2 -""" - -import argparse -import json -from material_color_utilities_python import themeFromImage, hexFromArgb, Image - -def range_type(value_string): - value = int(value_string) - if value not in range(0, 101): - raise argparse.ArgumentTypeError("%s is out of range, choose in [0-100]" % value) - return value - -parser = argparse.ArgumentParser( - prog='coloryou', - description='This program extract Material You colors from an image. It returns them as a JSON object for scripting.') - -parser.add_argument("image_path", help="A full path to your image", type=str) -parser.add_argument('-i', '--image', dest='image', default=40, type=range_type, metavar='i', choices=range(0,101), help="Value should be within [0, 100] (default: %(default)s). Set the tone for the main image accent.") - -parser.add_argument('-b', '--button', dest='button', default=90, type=range_type, metavar='i', choices=range(0,101), help="Value should be within [0, 100] (default: %(default)s). Set the tone for the button accent.") - -parser.add_argument('-t', '--text', dest='text', default=10, type=range_type, metavar='i', choices=range(0,101), help="Value should be within [0, 100] (default: %(default)s). Set the tone for the button text accent.") - -parser.add_argument('-o', '--hover', dest='hover', default=80, type=range_type, metavar='i', choices=range(0,101), help="Value should be within [0, 100] (default: %(default)s). Set the tone for the hovering effect accent.") -args = parser.parse_args() - - -img = Image.open(args.image_path) -basewidth = 64 -wpercent = (basewidth/float(img.size[0])) -hsize = int((float(img.size[1])*float(wpercent))) -img = img.resize((basewidth,hsize),Image.Resampling.LANCZOS) - -theme = themeFromImage(img).get("palettes").get("primary") -parsed_colors = {"imageAccent": hexFromArgb(theme.tone(args.image)), - "buttonAccent": hexFromArgb(theme.tone(args.button)), - "buttonText": hexFromArgb(theme.tone(args.text)), - "hoverAccent": hexFromArgb(theme.tone(args.hover))} - -print(json.dumps(parsed_colors)) diff --git a/packages/coloryou/default.nix b/packages/coloryou/default.nix deleted file mode 100644 index f61755de..00000000 --- a/packages/coloryou/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{python3Packages, ...}: let - inherit (python3Packages) buildPythonPackage utils material-color-utilities; -in - buildPythonPackage { - pname = "coloryou"; - version = "0.0.1"; - - src = ./.; - - propagatedBuildInputs = [utils material-color-utilities]; - - postInstall = '' - mv -v $out/bin/coloryou.py $out/bin/coloryou - ''; - - meta = { - description = '' - Get Material You colors from an image. - ''; - }; - } diff --git a/packages/coloryou/requirements.txt b/packages/coloryou/requirements.txt deleted file mode 100644 index 4bbea0b8..00000000 --- a/packages/coloryou/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -material-color-utilities -utils diff --git a/packages/coloryou/setup.py b/packages/coloryou/setup.py deleted file mode 100644 index 24704abc..00000000 --- a/packages/coloryou/setup.py +++ /dev/null @@ -1,7 +0,0 @@ -from distutils.core import setup - -setup( - name='coloryou', - version='0.0.1', - scripts=['coloryou.py',], -) diff --git a/packages/default.nix b/packages/default.nix index cbedac85..7bc8645a 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -4,8 +4,6 @@ pkgs, ... }: { - coloryou = pkgs.callPackage ./coloryou {}; - gpu-screen-recorder = pkgs.callPackage ./gpu-screen-recorder { inherit (inputs) gpu-screen-recorder-src; };