-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
545 additions
and
467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,35 @@ | ||
{ | ||
"env": { | ||
"es2021": true | ||
}, | ||
"extends": "airbnb/base", | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"ignorePatterns": ["@types/", "node_modules/"], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
4 | ||
], | ||
"arrow-parens": ["error", "as-needed"], | ||
"no-underscore-dangle": [ | ||
"error", | ||
{ | ||
"allowAfterThis": true, | ||
"allowAfterSuper": true | ||
} | ||
], | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"varsIgnorePattern": "^(init|enable|disable|buildPrefsWidget)$" | ||
} | ||
], | ||
"eol-last": ["error", "never"], | ||
"strict": "off", | ||
"no-plusplus": "off", | ||
"max-len": [ | ||
"error", | ||
120 | ||
] | ||
}, | ||
"globals": { | ||
"imports": "readonly", | ||
"log": "readonly" | ||
} | ||
"env": { "es2021": true }, | ||
"plugins": ["import"], | ||
"extends": ["eslint:recommended"], | ||
"parserOptions": { | ||
"ecmaVersion": 2022, | ||
"sourceType": "module" | ||
}, | ||
"ignorePatterns": ["@types/", "node_modules/"], | ||
"rules": { | ||
"quotes": ["error", "single"], | ||
"no-tabs": "off", | ||
"indent": ["error", "tab"], | ||
"semi": ["error", "never"], | ||
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }], | ||
"no-trailing-spaces": "error", | ||
"comma-dangle": ["error", "always-multiline"], | ||
"newline-before-return": "error", | ||
"no-underscore-dangle": ["error", { "allowAfterThis": true, "allowAfterSuper": true }], | ||
"no-unused-vars": "error", | ||
"eol-last": ["error", "always"], | ||
"strict": "off", | ||
"no-plusplus": "off", | ||
"max-len": ["error", 120], | ||
"import/extensions": 0, | ||
"import/newline-after-import": ["error", { "count": 2 }], | ||
"import/no-unresolved": [2, { "ignore": ["^(resource|gi)"] }], | ||
"no-warning-comments": ["error", { "terms": ["fixme"], "location": "anywhere" }] | ||
}, | ||
"globals": { | ||
"log": "readonly", | ||
"logError": "readonly", | ||
"TextDecoder": "readonly" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,6 @@ yarn.lock | |
package-lock.json | ||
docs-lock.json | ||
src/schemas/gschemas.compiled | ||
po/*~ | ||
po/*~ | ||
tsconfig.alias.json | ||
.#* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
{ | ||
"environments": [ | ||
"gjs" | ||
], | ||
"modules": [ | ||
"Gtk-4.0", | ||
"Gtk-3.0", | ||
"Soup-2.4", | ||
"Shell-0.1", | ||
"St-1.0", | ||
"Adw-1", | ||
"Clutter-10", | ||
"Meta-10" | ||
], | ||
"prettify": true, | ||
"girDirectories": [ | ||
"/usr/share/gir-1.0", | ||
"/usr/share/gnome-shell", | ||
"/usr/lib64/mutter-10/" | ||
], | ||
"outdir": "node_modules/@types" | ||
} | ||
"environments": ["gjs"], | ||
"ignoreVersionConflicts": true, | ||
"buildType": "types", | ||
"generateAlias": true, | ||
"prettify": true, | ||
"outdir": "./@types" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,16 +32,16 @@ $ gnome-extensions install path/to/[email protected] --fo | |
|
||
#### After installation: | ||
1. Restart the GNOME Shell: | ||
- <kbd>ALT</kbd>+<kbd>F2</kbd> to open the command prompt, and enter <kbd>r</kbd> to restart the GNOME Shell; | ||
- <kbd>ALT</kbd>+<kbd>F2</kbd> to open the command prompt, and enter <kbd>r</kbd> to restart the GNOME Shell (available on Xorg only); | ||
- or Log Out, then Log In, if GNOME Shell won't restart; | ||
2. Enable the extension: | ||
- Open GNOME Tweaks → Extensions → RunCat → On; | ||
- Open GNOME Extensions → RunCat → On; | ||
- or Run in terminal: `gnome-extensions enable [email protected]`. | ||
|
||
|
||
### Manage RunCat preferences | ||
- Right-click on the extension button on the top bar → Settings; | ||
- or Open GNOME Tweaks → Extensions → RunCat → ⚙️; | ||
- or Open GNOME Extensions → RunCat → ⚙️; | ||
- or Open [RunCat on GNOME Extensions portal](https://extensions.gnome.org/extension/2986/runcat/) → ⚙️; | ||
- or Manage directly in `dconf`: `dconf list /org/gnome/shell/extensions/runcat/`. | ||
|
||
|
@@ -64,6 +64,13 @@ To create a new translation file, use the following command: \ | |
**Spanish** locale: `msginit -i po/messages.pot -l es --no-translator -o po/es.po`. \ | ||
**Spanish (Argentina)** locale: `msginit -i po/messages.pot -l es_AR --no-translator -o po/es_AR.po`. | ||
|
||
### Useful commands for developers | ||
|
||
You need to install project JS dependencies first: `npm i` | ||
|
||
- `npm run types:generate` — generate type definition for GJS environment; | ||
- `npm run test:lint` — lint project files. | ||
|
||
## macOS version | ||
Thanks to [Takuto Nakamura](https://github.com/Kyome22/menubar_runcat) for [the macOS version](https://kyome.io/runcat/index.html) and cat images. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2022", | ||
"allowJs": true, | ||
"noEmit": true, | ||
"skipLibCheck": true, | ||
"module": "ES2022", | ||
"baseUrl": ".", | ||
"paths": { | ||
"gi://Adw": ["@types/adw-1.d.ts"], | ||
"gi://Gtk": ["@types/gtk-4.0.d.ts"], | ||
"gi://GLib": ["@types/glib-2.0.d.ts"], | ||
"gi://Gio": ["@types/gio-2.0.d.ts"], | ||
"gi://Shell": ["@types/shell-12.d.ts"], | ||
"gi://St": ["@types/st-12.d.ts"], | ||
"gi://Gdk": ["@types/gdk-4.0.d.ts"], | ||
"gi://GObject": ["@types/gobject-2.0.d.ts"] | ||
}, | ||
"rootDirs": ["src"] | ||
}, | ||
"include": [ | ||
"src/**/*", | ||
"@types/gjs.d.ts", | ||
"@types/dom.d.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,16 @@ | |
"name": "runcat", | ||
"private": true, | ||
"scripts": { | ||
"generate:types": "ts-for-gir generate --configName=.ts-for-girrc.json --ignoreVersionConflicts", | ||
"lint": "eslint src/" | ||
"types:generate": "ts-for-gir generate --configName=.ts-for-girrc.json", | ||
"test:lint": "eslint src/" | ||
}, | ||
"repository": "win0err/gnome-runcat", | ||
"author": "Sergei Kolesnikov <[email protected]>", | ||
"license": "GPL-3.0", | ||
"devDependencies": { | ||
"@ts-for-gir/cli": "^3.0.0-beta.2", | ||
"eslint": "^8.24.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.26.0" | ||
"@ts-for-gir/cli": "^3.2.0", | ||
"eslint": "^8.47.0", | ||
"eslint-plugin-import": "^2.28.0", | ||
"eslint-import-resolver-typescript": "^3.6.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,9 @@ | |
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: gnome-runcat-extension 23\n" | ||
"Project-Id-Version: gnome-runcat-extension 24\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-03-26 17:49+0300\n" | ||
"POT-Creation-Date: 2023-08-21 11:27+0300\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -17,19 +17,19 @@ msgstr "" | |
"Content-Type: text/plain; charset=CHARSET\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
|
||
#: src/panelMenuButton.js:95 | ||
#: src/indicator.js:160 | ||
msgid "Open System Monitor" | ||
msgstr "" | ||
|
||
#: src/panelMenuButton.js:99 | ||
#: src/indicator.js:164 | ||
msgid "Settings" | ||
msgstr "" | ||
|
||
#: src/prefs.js:48 | ||
#: src/prefs.js:54 | ||
msgid "RunCat Settings" | ||
msgstr "" | ||
|
||
#: src/prefs.js:59 | ||
#: src/prefs.js:98 | ||
msgid "Version" | ||
msgstr "" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: gnome-runcat-extension 20\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-10-05 02:43+0300\n" | ||
"POT-Creation-Date: 2023-08-21 11:13+0300\n" | ||
"PO-Revision-Date: 2022-09-30 19:16+0300\n" | ||
"Last-Translator: Sergei Kolesnikov <[email protected]>\n" | ||
"Language-Team: Russian\n" | ||
|
@@ -18,19 +18,19 @@ msgstr "" | |
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " | ||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" | ||
|
||
#: src/panelMenuButton.js:95 | ||
#: src/indicator.js:160 | ||
msgid "Open System Monitor" | ||
msgstr "Открыть Системный монитор" | ||
|
||
#: src/panelMenuButton.js:99 | ||
#: src/indicator.js:164 | ||
msgid "Settings" | ||
msgstr "Настройки" | ||
|
||
#: src/prefs.js:48 | ||
#: src/prefs.js:54 | ||
msgid "RunCat Settings" | ||
msgstr "Настройки RunCat" | ||
|
||
#: src/prefs.js:59 | ||
#: src/prefs.js:98 | ||
msgid "Version" | ||
msgstr "Версия" | ||
|
||
|
@@ -72,7 +72,7 @@ msgstr "Сбросить настройки RunCat к значениям по у | |
|
||
#: src/resources/ui/preferences.ui:65 | ||
msgid "Reset" | ||
msgstr "Сбрость" | ||
msgstr "Сбросить" | ||
|
||
#: src/resources/ui/preferences.ui:84 | ||
msgid "The cat tells you the CPU usage by running speed" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
/* eslint-disable no-var, no-unused-vars */ | ||
export const LOG_PREFIX = 'RuncatExtension' | ||
export const LOG_ERROR_PREFIX = 'RuncatExtensionError' | ||
|
||
var SCHEMA_PATH = 'org.gnome.shell.extensions.runcat'; | ||
var LOG_ERROR_PREFIX = 'RuncatExtensionError'; | ||
const CHARACTER_AND_PERCENTAGE = 0 | ||
const PERCENTAGE_ONLY = 1 | ||
const CHARACTER_ONLY = 2 | ||
|
||
const CHARACTER_AND_PERCENTAGE = 0; | ||
const PERCENTAGE_ONLY = 1; | ||
const CHARACTER_ONLY = 2; | ||
export const displayingItems = { | ||
[CHARACTER_AND_PERCENTAGE]: { character: true, percentage: true }, | ||
[PERCENTAGE_ONLY]: { character: false, percentage: true }, | ||
[CHARACTER_ONLY]: { character: true, percentage: false }, | ||
} | ||
|
||
var PanelMenuButtonVisibility = { | ||
[CHARACTER_AND_PERCENTAGE]: { character: true, percentage: true }, | ||
[PERCENTAGE_ONLY]: { character: false, percentage: true }, | ||
[CHARACTER_ONLY]: { character: true, percentage: false }, | ||
}; | ||
export const gioSettingsKeys = { | ||
IDLE_THRESHOLD: 'idle-threshold', | ||
DISPLAYING_ITEMS: 'displaying-items', | ||
} | ||
|
||
var Settings = { | ||
IDLE_THRESHOLD: 'idle-threshold', | ||
DISPLAYING_ITEMS: 'displaying-items', | ||
}; | ||
|
||
var SYSTEM_MONITOR_COMMAND = 'gnome-system-monitor -r'; | ||
export const SYSTEM_MONITOR_COMMAND = 'gnome-system-monitor -r' |
Oops, something went wrong.