Skip to content

Commit b29b84a

Browse files
committed
Update readme and assets
1 parent 30706a1 commit b29b84a

File tree

4 files changed

+193
-44
lines changed

4 files changed

+193
-44
lines changed

README.md

+53-16
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,64 @@
1-
# ChiliKeys
1+
# ChiliKeys 🎮
2+
> Armenian and Russian phonetic keyboard layouts for macOS, inspired by KDWin
23
3-
Armenian and Russian phonetic keyboard layout (KDWin style) for macOS.
4+
![Keyboard Layouts](assets/keyboards.png)
45

5-
## Installation
6+
## ✨ Key Features
67

7-
### Homebrew
8+
🔤 **Phonetic Layouts**
9+
- Armenian and Russian layouts following KDWin style
10+
- Familiar typing experience for KDWin users
811

9-
🚀 One-Step Installation
12+
**Quick Language Switch**
13+
- Hold **Option** key for instant English access
14+
- Hold **Option** + **Shift** to access Special Characters like Parentheses ( )
15+
- Perfect for mixed-language typing
1016

17+
## 🚀 Quick Install
1118

12-
```shell
13-
brew tap sergchil/chilikeys https://github.com/sergchil/chilikeys && brew update && brew install chilikeys
19+
```bash
20+
brew tap sergchil/chilikeys https://github.com/sergchil/chilikeys && brew install chilikeys
1421
```
1522

16-
🗑️ Uninstalling Chilikeys
23+
## 📖 Installation Options
1724

18-
```shell
19-
brew uninstall chilikeys && brew untap sergchil/chilikeys
20-
```
25+
<details>
26+
<summary>📦 Homebrew (Recommended)</summary>
27+
28+
1. Install with Homebrew:
29+
```bash
30+
brew tap sergchil/chilikeys https://github.com/sergchil/chilikeys
31+
brew install chilikeys
32+
```
33+
34+
2. To uninstall:
35+
```bash
36+
brew uninstall chilikeys
37+
brew untap sergchil/chilikeys
38+
```
39+
</details>
40+
41+
<details>
42+
<summary>💿 Manual Installation (DMG)</summary>
43+
44+
1. Download [latest release](https://github.com/sergchil/chilikeys/releases)
45+
2. Open the DMG file
46+
3. Copy bundles to `~/Library/Keyboard Layouts/`
47+
4. Restart your Mac
48+
</details>
49+
50+
## 🛠️ For Developers
51+
52+
<details>
53+
<summary>Release Process</summary>
2154

22-
### DMG
55+
1. Run version bump script:
56+
```bash
57+
./bump_version.sh
58+
```
59+
- Use ↑/↓ to choose version
60+
- Press Enter to select
61+
- Confirm with 'y'
2362

24-
1. Go to the [Releases page](https://github.com/sergchil/chilikeys/releases)
25-
2. Download the latest version of the `.dmg` Apple Disk Image
26-
3. Double-click on the `.dmg` file to mount it
27-
4. Drag the contained files into `~/Library/Keyboard\ Layouts/`
63+
2. GitHub Actions will handle the release automatically
64+
</details>

assets/keyboards.png

733 KB
Loading

bump_version.sh

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
#!/bin/bash
2+
3+
# Read current version from VERSION file
4+
current_version=$(cat VERSION)
5+
6+
# Function to increment version
7+
bump_version() {
8+
local version="$1"
9+
local type="$2"
10+
local IFS="."
11+
local -a parts=(${version})
12+
13+
case "$type" in
14+
"major")
15+
parts[0]=$((parts[0] + 1))
16+
parts[1]=0
17+
parts[2]=0
18+
;;
19+
"minor")
20+
parts[1]=$((parts[1] + 1))
21+
parts[2]=0
22+
;;
23+
"patch")
24+
parts[2]=$((parts[2] + 1))
25+
;;
26+
*)
27+
echo "Invalid bump type: $type"
28+
return 1
29+
;;
30+
esac
31+
32+
echo "${parts[0]}.${parts[1]}.${parts[2]}"
33+
}
34+
35+
# Calculate new versions
36+
new_patch_version=$(bump_version "$current_version" "patch")
37+
new_minor_version=$(bump_version "$current_version" "minor")
38+
new_major_version=$(bump_version "$current_version" "major")
39+
40+
# Menu items
41+
menu_items=(
42+
"patch (${current_version}${new_patch_version})"
43+
"minor (${current_version}${new_minor_version})"
44+
"major (${current_version}${new_major_version})"
45+
"exit"
46+
)
47+
48+
# Function to draw menu
49+
draw_menu() {
50+
local selected=$1
51+
clear
52+
echo "Current version: $current_version"
53+
echo "Use ↑/↓ arrows to navigate, Enter to select"
54+
echo
55+
56+
for i in "${!menu_items[@]}"; do
57+
if [ $i -eq $selected ]; then
58+
echo "${menu_items[$i]}"
59+
else
60+
echo " ${menu_items[$i]}"
61+
fi
62+
done
63+
}
64+
65+
# Initialize selection
66+
selected=0
67+
68+
# Hide cursor and configure terminal
69+
tput civis
70+
stty -echo
71+
72+
# Cleanup function
73+
cleanup() {
74+
tput cnorm
75+
stty echo
76+
}
77+
trap cleanup EXIT
78+
79+
# Main menu loop
80+
while true; do
81+
draw_menu $selected
82+
83+
# Read a key
84+
IFS= read -r -n1 key
85+
86+
case "$key" in
87+
$'\x1b') # ESC sequence
88+
read -r -n2 rest
89+
case "$rest" in
90+
'[A') # Up arrow
91+
if [ $selected -gt 0 ]; then
92+
selected=$((selected - 1))
93+
fi
94+
;;
95+
'[B') # Down arrow
96+
if [ $selected -lt $((${#menu_items[@]} - 1)) ]; then
97+
selected=$((selected + 1))
98+
fi
99+
;;
100+
esac
101+
;;
102+
"") # Enter key
103+
clear
104+
stty echo
105+
tput cnorm
106+
107+
case $selected in
108+
0) new_version="$new_patch_version" ;;
109+
1) new_version="$new_minor_version" ;;
110+
2) new_version="$new_major_version" ;;
111+
3) echo "Exiting..."; exit 0 ;;
112+
esac
113+
114+
read -p "Confirm version bump to $new_version? [y/N] " confirm
115+
if [[ ! "$confirm" =~ ^[Yy] ]]; then
116+
echo "Cancelled"
117+
exit 0
118+
fi
119+
120+
# Update VERSION file
121+
echo "$new_version" > VERSION
122+
123+
# Update the cask file with the new version
124+
sed -i "" "s/version \".*\"/version \"$new_version\"/g" Casks/chilikeys.rb
125+
126+
# Commit the changes
127+
git add Casks/chilikeys.rb VERSION
128+
git commit -m "Update cask version to $new_version"
129+
130+
# Add the new tag
131+
git tag "v$new_version"
132+
133+
# Push the tags
134+
git push origin --tags
135+
136+
echo "Version bumped to $new_version and tag v$new_version added and pushed successfully."
137+
exit 0
138+
;;
139+
esac
140+
done

tag_and_push.sh

-28
This file was deleted.

0 commit comments

Comments
 (0)