-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
30 changed files
with
109 additions
and
121 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,10 +1,7 @@ | ||
.github/workflows/ci/skiplist_os_Windows.txt | ||
.github/workflows/ci/skiplist_os_macOS.txt | ||
osx/* | ||
plover/oslayer/log_osx.py | ||
plover/oslayer/osxkeyboardcontrol.py | ||
plover/oslayer/osxkeyboardlayout.py | ||
plover/oslayer/winkeyboardcontrol.py | ||
plover/oslayer/winkeyboardlayout.py | ||
plover/oslayer/osx/* | ||
plover/oslayer/windows/* | ||
windows/* | ||
{EOF} |
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,10 +1,7 @@ | ||
.github/workflows/ci/skiplist_os_Linux.txt | ||
.github/workflows/ci/skiplist_os_Windows.txt | ||
linux/* | ||
plover/oslayer/log_dbus.py | ||
plover/oslayer/winkeyboardcontrol.py | ||
plover/oslayer/winkeyboardlayout.py | ||
plover/oslayer/xkeyboardcontrol.py | ||
plover/oslayer/xwmctrl.py | ||
plover/oslayer/linux/* | ||
plover/oslayer/windows/* | ||
windows/* | ||
{EOF} |
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
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
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 was deleted.
Oops, something went wrong.
Empty file.
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,12 @@ | ||
import locale | ||
import os | ||
|
||
|
||
# Note: highest priority first. | ||
LANG_ENV_VARS = ('LC_ALL', 'LC_MESSAGES', 'LANG') | ||
|
||
def get_system_language(): | ||
try: | ||
return next(filter(None, map(os.environ.get, LANG_ENV_VARS))) | ||
except StopIteration: | ||
return locale.getdefaultlocale()[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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from .keyboardcontrol_x11 import KeyboardCapture, KeyboardEmulation # pylint: disable=unused-import |
File renamed without changes.
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 @@ | ||
from .log_dbus import DbusNotificationHandler as NotificationHandler # pylint: disable=unused-import |
File renamed without changes.
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,7 @@ | ||
from .wmctrl_x11 import WmCtrl | ||
|
||
|
||
_wmctrl = WmCtrl() | ||
|
||
GetForegroundWindow = _wmctrl.get_foreground_window | ||
SetForegroundWindow = _wmctrl.set_foreground_window |
File renamed without changes.
Empty file.
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,6 @@ | ||
from AppKit import NSLocale | ||
|
||
|
||
def get_system_language(): | ||
lang_list = NSLocale.preferredLanguages() | ||
return lang_list[0] if lang_list else None |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from Cocoa import NSWorkspace, NSRunningApplication, NSApplicationActivateIgnoringOtherApps | ||
|
||
|
||
def GetForegroundWindow(): | ||
return NSWorkspace.sharedWorkspace().frontmostApplication().processIdentifier() | ||
|
||
def SetForegroundWindow(pid): | ||
target_window = NSRunningApplication.runningApplicationWithProcessIdentifier_(pid) | ||
target_window.activateWithOptions_(NSApplicationActivateIgnoringOtherApps) |
Empty file.
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,7 @@ | ||
import locale | ||
|
||
from ctypes import windll | ||
|
||
|
||
def get_system_language(): | ||
return locale.windows_locale[windll.kernel32.GetUserDefaultUILanguage()] |
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
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 @@ | ||
from ..log_plyer import PlyerNotificationHandler as NotificationHandler # pylint: disable=unused-import |
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,12 @@ | ||
from ctypes import windll, wintypes | ||
|
||
|
||
GetForegroundWindow = windll.user32.GetForegroundWindow | ||
GetForegroundWindow.argtypes = [] | ||
GetForegroundWindow.restype = wintypes.HWND | ||
|
||
SetForegroundWindow = windll.user32.SetForegroundWindow | ||
SetForegroundWindow.argtypes = [ | ||
wintypes.HWND, # hWnd | ||
] | ||
SetForegroundWindow.restype = wintypes.BOOL |
This file was deleted.
Oops, something went wrong.
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