From b20af7a24fd685b15987badf05a0a7ccc0248816 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 08:05:08 -0300 Subject: [PATCH 01/16] feature: adding pt-br to the options of keyboards --- README.md | 1 + main.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 013e722..2237a17 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,5 @@ Currently it only supports 2 layouts (the ones I use) - ES - FR - PL + - PT-BR - DE diff --git a/main.py b/main.py index bf45e16..5ba3a00 100644 --- a/main.py +++ b/main.py @@ -53,8 +53,10 @@ def on_event(self, event, extension): subprocess.Popen(['setxkbmap', 'da']) elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) + elif query == extension.preferences['br']: + subprocess.Popen(['setxkbmap', 'br']) return HideWindowAction() - + if __name__ == '__main__': KeyboardLayoutChange().run() From 98f9ce93c11d660b15b4bdaf449813c6afc7f9eb Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 08:43:43 -0300 Subject: [PATCH 02/16] feature: adding qwerty us keyboard --- README.md | 1 + main.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 2237a17..50e9b30 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Currently it only supports 2 layouts (the ones I use) #### Layout supported +- US Qwerty - US ALT INT - US Colemak-DH - IT diff --git a/main.py b/main.py index 5ba3a00..5ebcbbe 100644 --- a/main.py +++ b/main.py @@ -19,6 +19,8 @@ def on_event(self, event, extension): query = event.get_query().strip() if query == extension.preferences['kus']: subprocess.Popen(['setxkbmap', 'us', '-variant', 'alt-intl']) + if query == extension.preferences['us']: + subprocess.Popen(['setxkbmap', 'us']) elif query == extension.preferences['kit']: subprocess.Popen(['setxkbmap', 'it']) elif query == extension.preferences['kes']: From 839452a80ab8e0cd815e74fec1511384ed92a4cc Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 13:39:33 -0300 Subject: [PATCH 03/16] mend --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50e9b30..014a96c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Currently it only supports 2 layouts (the ones I use) #### Layout supported -- US Qwerty + - US Qwerty - US ALT INT - US Colemak-DH - IT From 96e3b3e64aa8b0e84f5a3db15a64b36f1f443232 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 21:25:25 -0300 Subject: [PATCH 04/16] feature: adding english and brazillian to manifest.json --- manifest.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d4bd663..d57d668 100644 --- a/manifest.json +++ b/manifest.json @@ -126,6 +126,20 @@ "name": "nl", "description": "Switch to Dutch iso keyboard layout", "default_value": "nl" - } + }, + { + "id": "us", + "type": "keyword", + "name": "us", + "description": "Switch to Qwerty US iso keyboard layout", + "default_value": "us" + }, + { + "id": "kbr", + "type": "keyword", + "name": "kbr", + "description": "Switch to Qwerty Brazillian iso keyboard layout", + "default_value": "kbr" + }, ] } From 2b32bd24ed4ad31e759522d699808ea4a28cd8cd Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 21:37:41 -0300 Subject: [PATCH 05/16] fix: change us keys to usa to avoid error --- main.py | 4 ++-- manifest.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 5ebcbbe..0cd8a69 100644 --- a/main.py +++ b/main.py @@ -19,8 +19,8 @@ def on_event(self, event, extension): query = event.get_query().strip() if query == extension.preferences['kus']: subprocess.Popen(['setxkbmap', 'us', '-variant', 'alt-intl']) - if query == extension.preferences['us']: - subprocess.Popen(['setxkbmap', 'us']) + if query == extension.preferences['usa']: + subprocess.Popen(['setxkbmap', 'usa']) elif query == extension.preferences['kit']: subprocess.Popen(['setxkbmap', 'it']) elif query == extension.preferences['kes']: diff --git a/manifest.json b/manifest.json index d57d668..70c1d92 100644 --- a/manifest.json +++ b/manifest.json @@ -128,11 +128,11 @@ "default_value": "nl" }, { - "id": "us", + "id": "usa", "type": "keyword", - "name": "us", + "name": "usa", "description": "Switch to Qwerty US iso keyboard layout", - "default_value": "us" + "default_value": "usa" }, { "id": "kbr", @@ -140,6 +140,6 @@ "name": "kbr", "description": "Switch to Qwerty Brazillian iso keyboard layout", "default_value": "kbr" - }, + } ] } From d6a94f3bb354273fba197e9f1ad639128358c4b6 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 21:44:32 -0300 Subject: [PATCH 06/16] fix: mismatch of manifest keys --- manifest.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 70c1d92..b758d70 100644 --- a/manifest.json +++ b/manifest.json @@ -135,11 +135,11 @@ "default_value": "usa" }, { - "id": "kbr", + "id": "br", "type": "keyword", - "name": "kbr", + "name": "br", "description": "Switch to Qwerty Brazillian iso keyboard layout", - "default_value": "kbr" + "default_value": "br" } ] } From 1ecb2aaa8f41a6cd84a2a5c4efb3a530e6ce1e5f Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 21:58:23 -0300 Subject: [PATCH 07/16] fix: mismatch of configuration --- main.py | 6 +++--- manifest.json | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index 0cd8a69..55a7831 100644 --- a/main.py +++ b/main.py @@ -19,8 +19,8 @@ def on_event(self, event, extension): query = event.get_query().strip() if query == extension.preferences['kus']: subprocess.Popen(['setxkbmap', 'us', '-variant', 'alt-intl']) - if query == extension.preferences['usa']: - subprocess.Popen(['setxkbmap', 'usa']) + if query == extension.preferences['kusa']: + subprocess.Popen(['setxkbmap', 'us']) elif query == extension.preferences['kit']: subprocess.Popen(['setxkbmap', 'it']) elif query == extension.preferences['kes']: @@ -55,7 +55,7 @@ def on_event(self, event, extension): subprocess.Popen(['setxkbmap', 'da']) elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) - elif query == extension.preferences['br']: + elif query == extension.preferences['kbr']: subprocess.Popen(['setxkbmap', 'br']) return HideWindowAction() diff --git a/manifest.json b/manifest.json index b758d70..67b0f92 100644 --- a/manifest.json +++ b/manifest.json @@ -128,18 +128,18 @@ "default_value": "nl" }, { - "id": "usa", + "id": "kusa", "type": "keyword", - "name": "usa", + "name": "kusa", "description": "Switch to Qwerty US iso keyboard layout", - "default_value": "usa" + "default_value": "kusa" }, { - "id": "br", + "id": "kbr", "type": "keyword", - "name": "br", + "name": "kbr", "description": "Switch to Qwerty Brazillian iso keyboard layout", - "default_value": "br" + "default_value": "kbr" } ] } From 78ffae962c71919215f1da65c72aa70b03ee652a Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 22:15:38 -0300 Subject: [PATCH 08/16] fix: pt-br error config in setxkbmap --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 55a7831..89d5dfd 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,7 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', 'br']) + subprocess.Popen(['setxkbmap', 'br', '-model', 'abnt2',]) return HideWindowAction() From bd99ab5c06075bb58d7c438821b896c37a378feb Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 22:18:24 -0300 Subject: [PATCH 09/16] fix: pt-br error config in setxkbmap --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 89d5dfd..44d742d 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,7 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', 'br', '-model', 'abnt2',]) + subprocess.Popen(['setxkbmap', '-model', 'abnt2', '-layout', 'br']) return HideWindowAction() From 25d715f174691c6ea5112acb724c3250731d01d4 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 22:23:29 -0300 Subject: [PATCH 10/16] fix: pt-br error config in setxkbmap --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 44d742d..46ddebe 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,7 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', '-model', 'abnt2', '-layout', 'br']) + subprocess.Popen(['setxkbmap', 'br', '-variant', 'abnt2']) return HideWindowAction() From 589e1bee21054692c5fb4033bde613b57ef971f8 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 22:28:51 -0300 Subject: [PATCH 11/16] fix: pt-br error config in setxkbmap --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 46ddebe..161a610 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,8 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', 'br', '-variant', 'abnt2']) + subprocess.Popen(['setxkbmap', '-model', 'abnt2', + '-layout', 'br', '-variant', 'abnt2']) return HideWindowAction() From 3684ae03ddd2772ebd97a1ae0167d5163a59dd22 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Tue, 6 Feb 2024 22:33:44 -0300 Subject: [PATCH 12/16] fix: pt-br error config in setxkbmap --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 161a610..645ff00 100644 --- a/main.py +++ b/main.py @@ -56,8 +56,7 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', '-model', 'abnt2', - '-layout', 'br', '-variant', 'abnt2']) + subprocess.Popen(['setxkbmap', '-layout', 'br', ]) return HideWindowAction() From 91a33a81f479893d64bc9707d721204b3705e414 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Wed, 7 Feb 2024 09:26:17 -0300 Subject: [PATCH 13/16] fix: pt-br error config in setxkbmap --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 645ff00..55a7831 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,7 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', '-layout', 'br', ]) + subprocess.Popen(['setxkbmap', 'br']) return HideWindowAction() From 5459ba80f125641222ccacb2de1924fbbfae98fb Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Wed, 7 Feb 2024 09:28:09 -0300 Subject: [PATCH 14/16] fix: pt-br error config in setxkbmap --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 55a7831..3343ba4 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,7 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', 'br']) + subprocess.Popen(['setxkbmap', 'br', '-model', 'pc105']) return HideWindowAction() From 8ac12df62ba68ca07152d75cb77e07be326c2395 Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Wed, 7 Feb 2024 09:35:21 -0300 Subject: [PATCH 15/16] fix: pt-br error config in setxkbmap --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 3343ba4..55a7831 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,7 @@ def on_event(self, event, extension): elif query == extension.preferences['nl']: subprocess.Popen(['setxkbmap', 'nl']) elif query == extension.preferences['kbr']: - subprocess.Popen(['setxkbmap', 'br', '-model', 'pc105']) + subprocess.Popen(['setxkbmap', 'br']) return HideWindowAction() From cf65b2c27bd3fa48e2e041106208512055ce631e Mon Sep 17 00:00:00 2001 From: carlos fonseca Date: Wed, 7 Feb 2024 09:51:52 -0300 Subject: [PATCH 16/16] fix: updated README with supported languages and edit manifest.json with a value to ch layout --- README.md | 10 ++++++++++ manifest.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 014a96c..0f31a9b 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,13 @@ Currently it only supports 2 layouts (the ones I use) - PL - PT-BR - DE + - JP + - HEB + - RU + - SE + - SLV + - CH + - ALB + - BLR + - DK + - NL diff --git a/manifest.json b/manifest.json index 67b0f92..f2ceb8c 100644 --- a/manifest.json +++ b/manifest.json @@ -96,7 +96,7 @@ "id": "ch", "type": "keyword", "name": "ch", - "description": "Switch to ch iso keyboard layout", + "description": "Switch to Switzerland iso keyboard layout", "default_value": "ch" }, {