├── .gitignore
├── icon.png
├── example.png
├── .prettierrc.json
├── .editorconfig
├── Makefile
├── metadata.json
├── extension.js
├── CHANGELOG.md
├── README.md
├── LICENSE
└── .github
└── workflows
└── release.yml
/.gitignore:
--------------------------------------------------------------------------------
1 | *.zip
2 | node_modules
3 |
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ai/hide-keyboard-layout/HEAD/icon.png
--------------------------------------------------------------------------------
/example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ai/hide-keyboard-layout/HEAD/example.png
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "arrowParens": "avoid",
3 | "jsxSingleQuote": false,
4 | "quoteProps": "consistent",
5 | "semi": false,
6 | "singleQuote": true,
7 | "trailingComma": "none"
8 | }
9 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | end_of_line = lf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [Makefile]
12 | indent_style = tab
13 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: test clean build local
2 |
3 | test: build
4 |
5 | clean:
6 | rm -f *.zip
7 |
8 | build: clean
9 | gnome-extensions pack ./
10 |
11 | local: build
12 | gnome-extensions install -f *.zip
13 |
14 | debug: local
15 | dbus-run-session -- gnome-shell --nested --wayland
16 |
--------------------------------------------------------------------------------
/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Hide Keyboard Layout",
3 | "description": "Hide keyboard layout indicator in status bar",
4 | "url": "https://github.com/ai/hide-keyboard-layout",
5 | "uuid": "hide-keyboard-layout@sitnik.ru",
6 | "shell-version": ["48", "49"],
7 | "donations": {
8 | "github": "ai"
9 | },
10 | "version": 12
11 | }
12 |
--------------------------------------------------------------------------------
/extension.js:
--------------------------------------------------------------------------------
1 | import { panel } from 'resource:///org/gnome/shell/ui/main.js'
2 |
3 | let keyboard = panel.statusArea.keyboard
4 |
5 | export default class HideKeyboardLayoutExtension {
6 | #watching = null
7 |
8 | disable() {
9 | if (this.#watching) keyboard.disconnect(this.#watching)
10 | keyboard.show()
11 | }
12 |
13 | enable() {
14 | keyboard.hide()
15 | this.#watching = keyboard.connect('notify::visible', () => {
16 | keyboard.hide()
17 | })
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | ## 12
4 | * Added GNOME 49 support.
5 |
6 | ## 11
7 | * Fixed deprecated warning.
8 |
9 | ## 10
10 | * Added GNOME 48 support.
11 |
12 | ## 9
13 | * Added GNOME 47 support.
14 |
15 | ## 8
16 | * Added GNOME 46 support.
17 |
18 | ## 7
19 | * Moved to GNOME 45 API.
20 |
21 | ## 6
22 | * Added GNOME 44 support.
23 |
24 | ## 5
25 | * Added GNOME 43 support.
26 |
27 | ## 4
28 | * Added GNOME 42 support.
29 |
30 | ## 3
31 | * Added GNOME 41 support.
32 |
33 | ## 2
34 | * Added GNOME 40 support.
35 |
36 | ## 1
37 | * Initial release.
38 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hide Keyboard Layout
2 |
3 |
4 |
5 | GNOME Shell extension to hide keyboard layout indicator in status bar.
6 |
7 | [
](https://extensions.gnome.org/extension/2848/hide-keyboard-layout/)
8 |
9 | See also [Autohide Battery].
10 |
11 | [Autohide Battery]: https://github.com/ai/autohide-battery/
12 |
13 |
14 | ## Install
15 |
16 | 1. Open [Hide Keyboard Layout] on GNOME Shell Extensions site.
17 | 2. Click slider to install extension.
18 |
19 | [Hide Keyboard Layout]: https://extensions.gnome.org/extension/2848/hide-keyboard-layout/
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright 2020 Andrey Sitnik
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 | on:
3 | push:
4 | tags:
5 | - '*'
6 | permissions:
7 | contents: write
8 | jobs:
9 | release:
10 | name: Release On Tag
11 | if: startsWith(github.ref, 'refs/tags/')
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout the repository
15 | uses: actions/checkout@v4
16 | - name: Extract the changelog
17 | id: changelog
18 | run: |
19 | TAG_NAME=${GITHUB_REF/refs\/tags\//}
20 | READ_SECTION=false
21 | CHANGELOG=""
22 | while IFS= read -r line; do
23 | if [[ "$line" =~ ^#+\ +(.*) ]]; then
24 | if [[ "${BASH_REMATCH[1]}" == "$TAG_NAME" ]]; then
25 | READ_SECTION=true
26 | elif [[ "$READ_SECTION" == true ]]; then
27 | break
28 | fi
29 | elif [[ "$READ_SECTION" == true ]]; then
30 | CHANGELOG+="$line"$'\n'
31 | fi
32 | done < "CHANGELOG.md"
33 | CHANGELOG=$(echo "$CHANGELOG" | awk '/./ {$1=$1;print}')
34 | echo "changelog_content<> $GITHUB_OUTPUT
35 | echo "$CHANGELOG" >> $GITHUB_OUTPUT
36 | echo "EOF" >> $GITHUB_OUTPUT
37 | - name: Create the release
38 | if: steps.changelog.outputs.changelog_content != ''
39 | uses: softprops/action-gh-release@v1
40 | with:
41 | name: ${{ github.ref_name }}
42 | body: '${{ steps.changelog.outputs.changelog_content }}'
43 | draft: false
44 | prerelease: false
45 |
--------------------------------------------------------------------------------