diff --git a/CHANGELOG.md b/CHANGELOG.md index 5482d8b..7beccac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## [Unreleased] + +## [1.2.0] - 2024-07-29 +### Changed +- Plugin settings moved to Tools: `File` > `Settings` > `Tools` > `Kursor`. +- Fix German keyboard layout abbreviation for Windows. + + ## [1.1.1] - 2024-07-25 ### Changed - Improved keyboard layout detection for Windows users, including detection of different input methods within the same language. Previously, Kursor would not detect different input methods within one language, but now it does. diff --git a/README.md b/README.md index 875856e..57ec6bc 100644 --- a/README.md +++ b/README.md @@ -14,23 +14,40 @@ +## What is Kursor? +Avoid typos and coding errors caused by language switching. + Kursor simplifies language tracking directly on your IntelliJ IDE. It dynamically displays the current keyboard language on your cursor, offering the added functionality of changing the cursor's color to match the language in use. This feature is particularly beneficial for developers juggling multiple languages, significantly reducing the likelihood of typing errors. - -## Installation +### Features +- **🎨 Cursor Color Change:** Automatically changes the cursor color based on the current language. +- **🔤 Language Indicator:** Displays the current language on the cursor. +- **🔒 Caps Lock Indicator:** Shows the Caps Lock status on the cursor. +- **🔧 Customization:** Customize the language indicator's font, size, opacity, and position. +- **🖥️ Supported Operating Systems:** Available on Windows, Mac, and Linux. -[![Install Kursor](https://user-images.githubusercontent.com/12044174/123105697-94066100-d46a-11eb-9832-338cdf4e0612.png)](https://plugins.jetbrains.com/plugin/22072-kursor) -Alternatively, you can install it directly inside your IDE: +## Installation +[Get from marketplace](https://plugins.jetbrains.com/plugin/22072-kursor) or install it directly inside your IDE: - **For Windows & Linux:** `File` > `Settings` > `Plugins` > `Marketplace` > Search for "Kursor" > `Install Plugin` > Restart IntelliJ IDEA - **For Mac:** `IntelliJ IDEA` > `Preferences` > `Plugins` > `Marketplace` > Search for "Kursor" > `Install Plugin` > Restart IntelliJ IDEA -## Features and Settings + +## Usage +Once installed, Kursor will automatically run when you open your project in IntelliJ IDEA. + + +## Customization +You can customize Kursor's settings to suit your preferences: + +1. Go to `File` > `Settings` > `Tools` > `Kursor`. +2. Adjust the settings to your liking. +3. Click `Apply` to save the changes. ![Settings Screenshot](./screenshots/settings.png) @@ -45,8 +62,8 @@ Alternatively, you can install it directly inside your IDE: - **Vertical Position:** Vertical position of the language indicator (top, middle, or bottom). - **Horizontal Offset:** Horizontal offset of the language indicator. -## Feedback and Suggestions +## Feedback and Suggestions I value your feedback and suggestions to improve Kursor. If you have any ideas, issues, or feature requests, please share them with me on GitHub. Your input helps me make Kursor better for everyone. To post your feedback or suggestions, visit our GitHub Issues page: @@ -55,7 +72,14 @@ To post your feedback or suggestions, visit our GitHub Issues page: Thank you for supporting Kursor and helping me enhance your coding experience. + + -## Support +## License +Kursor is open-source and available under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0). + +## Support [![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ivan.seredkin) + + diff --git a/gradle.properties b/gradle.properties index cc7a3b0..7697e1f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.siropkin.kursor pluginName = Kursor pluginRepositoryUrl = https://github.com/siropkin/kursor # SemVer format -> https://semver.org -pluginVersion = 1.1.1 +pluginVersion = 1.2.0 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 232 diff --git a/screenshots/settings.png b/screenshots/settings.png index ad0e998..8fb58ef 100644 Binary files a/screenshots/settings.png and b/screenshots/settings.png differ diff --git a/src/main/kotlin/com/github/siropkin/kursor/KeyboardLayoutInfo.kt b/src/main/kotlin/com/github/siropkin/kursor/KeyboardLayoutInfo.kt index 613c41c..200f224 100644 --- a/src/main/kotlin/com/github/siropkin/kursor/KeyboardLayoutInfo.kt +++ b/src/main/kotlin/com/github/siropkin/kursor/KeyboardLayoutInfo.kt @@ -1,5 +1,6 @@ package com.github.siropkin.kursor +import com.sun.jna.Platform import com.sun.jna.platform.win32.User32 import com.sun.jna.platform.win32.WinDef import com.sun.jna.platform.win32.WinDef.HKL @@ -16,7 +17,7 @@ private val windowsKeyboardLayoutMap = mapOf( "00000404" to "CH", "00000405" to "CZ", "00000406" to "DK", - "00000407" to "GR", + "00000407" to "DE", "00000408" to "GK", "00000409" to "US", "0000040A" to "SP", @@ -57,7 +58,7 @@ private val windowsKeyboardLayoutMap = mapOf( "00001809" to "US", "00010402" to "US", "00010405" to "CZ", - "00010407" to "GR", + "00010407" to "DEI", "00010408" to "GK", "00010409" to "DV", "0001040A" to "SP", @@ -78,7 +79,7 @@ private val windowsKeyboardLayoutMap = mapOf( ) // https://www.autoitscript.com/autoit3/docs/appendix/OSLangCodes.htm -val windowsKeyboardCountryCodeMap = mapOf( +private val windowsKeyboardCountryCodeMap = mapOf( "0004" to "zh-CHS", "0401" to "ar-SA", "0402" to "bg-BG", @@ -210,16 +211,15 @@ class KeyboardLayout(private val layout: String, private val country: String, pr } class KeyboardLayoutInfo { - private val os: String = System.getProperty("os.name").lowercase() private var linuxDistribution: String = System.getenv("DESKTOP_SESSION")?.lowercase() ?: "" private var linuxDesktopGroup: String = System.getenv("XDG_SESSION_TYPE")?.lowercase() ?: "" private var linuxNonUbuntuKeyboardLayouts: List = emptyList() fun getLayout(): KeyboardLayout { return when { - os.startsWith("linux") -> getLinuxKeyboardLayout() - os.startsWith("win") -> getWindowsKeyboardLayout() - os.startsWith("mac") -> getMacKeyboardLayout() + Platform.isLinux() -> getLinuxKeyboardLayout() + Platform.isWindows() -> getWindowsKeyboardLayout() + Platform.isMac() -> getMacKeyboardLayout() else -> KeyboardLayout(unknown, unknown, unknown) } } @@ -333,6 +333,9 @@ class KeyboardLayoutInfo { "0xfffffffff014" -> { "0001041F" } + "0xfffffffff012" -> { + "00010407" + } else -> { layoutId.substring(2).padStart(8, '0') } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 993d21c..9013aea 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,16 +1,24 @@ com.github.siropkin.kursor Kursor - 1.1.1 + 1.2.0 Ivan Seredkin Kursor simplifies language tracking directly on your IntelliJ IDE.
It dynamically displays the current keyboard language on your cursor, offering the added functionality of changing the cursor's color to match the language in use.
This feature is particularly beneficial for developers juggling multiple languages, significantly reducing the likelihood of typing errors. ]]>
+ ++++++++++++++++++
+ Changed:
+ - Plugin settings moved to Tools: `File` > `Settings` > `Tools` > `Kursor`.
+ - Fix German keyboard layout abbreviation for Windows.
+
+
1.1.1 (2024-07-25)
++++++++++++++++++
Changed:
@@ -64,9 +72,12 @@ com.intellij.modules.platform - +