Skip to content

Commit

Permalink
Update for Ubuntu 14.04
Browse files Browse the repository at this point in the history
  • Loading branch information
naingyeminn committed Oct 2, 2014
1 parent 380a30b commit 8650de1
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 56 deletions.
37 changes: 30 additions & 7 deletions README.md
Expand Up @@ -3,17 +3,40 @@ Myanmar Keyboards

##Introduction

- This package contains two types of Burmese Keyboard, Myanmar3 and ZawGyi-One.
- This package contains two types of Burmese Keyboard, Unicode and ZawGyi-One.

##Installation/Uninstallation
##Installation

- Download mm-kb zip file and extract it.
- Type the following command one after another.
```
$ git clone https://github.com/naingyeminn/mm-kb.git
$ cd mm-kb
$ sudo make install
$ ibus-daemon -rdx
$ im-config -n ibus
$ gsettings set org.freedesktop.ibus.panel show 0
```
Now you can add the keyboard as follow.

- Click on **Text Entry Settings...**
![Text Entry Setting](https://dl.dropboxusercontent.com/u/26716001/Ubuntu/ScreenShots/mm-kb/Ubuntu%2064-bit-2014-10-01-22-11-27.png)

- Click on **"+"** button and search **Burmese** input. You will see Burmese, Burmese (mm-myanmar3), and Burmese (mm-zawgyi).
![input](https://dl.dropboxusercontent.com/u/26716001/Ubuntu/ScreenShots/mm-kb/Ubuntu%2064-bit-2014-10-01-22-12-22.png)

- Add **Burmese (mm-myanmar3)** for ***Unicode*** keyboard and **Burmese (mm-zawgyi)** for ***ZawGyi-One*** keyboard.

- Double click the script, "install"
- Now you can change keyboard layout by pressing (**Super + Space**) key.

- Click on "Run"
- Whatever you are using, Burmese (mm-myanmar3) or Burmese (mm-zawgyi), you can switch between Burmese and English characters by a single press of **Left Shift** key.

- Choose the Option You want and Click "Ok"
##Changing System Fallback Font

After installation, your system font will be changed into **ZawGyi-One**. If you want to switch to **Unicode** fonts, search **Myanmar Font Switcher** in Unity Dashboard and open it. You can change the font you want in there.

![myanmar-font-switcher](https://dl.dropboxusercontent.com/u/26716001/Ubuntu/ScreenShots/mm-kb/myanmar-font-switcher.png)

![myanmar-font-switcher](https://dl.dropboxusercontent.com/u/26716001/Ubuntu/ScreenShots/mm-kb/Screenshot%20from%202014-10-02%2015%3A07%3A32.png)

##Contact

Expand All @@ -23,4 +46,4 @@ naingyeminn@gmail.com
nym@ubuntu-mm.net
FreeNode IRC : yeminn
website : http://nym.ubuntu-mm.net
```
```
49 changes: 0 additions & 49 deletions install

This file was deleted.

6 changes: 6 additions & 0 deletions makefile
Expand Up @@ -3,11 +3,17 @@ install: uninstall
ibus-table-createdb -n /usr/share/ibus-table/tables/mm-zawgyi.db -s ./src/tables/mm-zawgyi.txt
cp -fv ./src/icons/*.svg /usr/share/ibus-table/icons
test -d /usr/share/fonts/mm || mkdir -p /usr/share/fonts/mm && cp ./src/fonts/*.ttf /usr/share/fonts/mm
test -d /usr/share/mmfs || mkdir -p /usr/share/mmfs && cp ./src/mmfs/* /usr/share/mmfs/
ln -s /usr/share/mmfs/mmfs /usr/local/bin/mmfs
cp ./src/mmfs/myanmar-font-switcher.desktop /usr/share/applications/

uninstall:
rm -fv /usr/share/ibus-table/tables/mm*
rm -fv /usr/share/ibus-table/icons/mm-myanmar3.svg
rm -fv /usr/share/ibus-table/icons/mm-zawgyi.svg
rm -rfv /usr/share/fonts/mm
rm -rfv /usr/share/mmfs
rm -fv /usr/share/applications/myanmar-font-switcher.desktop
rm -fv /usr/local/bin/mmfs

.PHONY: install uninstall
Binary file added src/fonts/NotoSansMyanmar-Regular.ttf
Binary file not shown.
Binary file added src/fonts/mmrCensus.v4.sh.mif.ttf
Binary file not shown.
Binary file added src/fonts/mon3.ttf
Binary file not shown.
Empty file modified src/icons/mm-myanmar3.svg 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/icons/mm-zawgyi.svg 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/mmfs/fonts.conf
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE fontconfig SYSTEM 'fonts.dtd'><fontconfig>
<!--- Myanmar Font Switcher configuration. -->
<match target="pattern">
<test compare="eq" name="lang" qual="any"><string>my</string></test>
<edit mode="assign" name="family">
<string>Noto Sans Myanmar</string>
</edit>
</match>
<!--- Please do not modify the above lines. You can add additional configuration below. -->
</fontconfig>
22 changes: 22 additions & 0 deletions src/mmfs/mmfs
@@ -0,0 +1,22 @@
#!/bin/bash
FONT=$(zenity --list --radiolist --title="Myanmar Font Switcher" --text="Choose a System Fallback Font you like..." --column="Check:" --column="Font Name:" TRUE "Myanmar3" FALSE "TharLon" FALSE "Zawgyi-One" FALSE "Noto Sans Myanmar" FALSE "Myanmar Census" FALSE "MON3 Anonta 1")

CONFIG=~/.config/fontconfig/fonts.conf
if [[ $FONT ]]; then
if [ -f ~/.fonts.conf ]; then
rm ~/.fonts.conf
cp /usr/share/mmfs/fonts.conf $CONFIG
echo ".fonts.conf is deprecated. Replaced new config in .config/fontconfig"
fi
if [ ! -f $CONFIG ]; then
mkdir -p ~/.config/fontconfig
cp /usr/share/mmfs/fonts.conf $CONFIG
echo "Found no config. Created new."
fi
sed -i "s/Myanmar3/$FONT/g" $CONFIG
sed -i "s/TharLon/$FONT/g" $CONFIG
sed -i "s/Zawgyi-One/$FONT/g" $CONFIG
sed -i "s/Noto Sans Myanmar/$FONT/g" $CONFIG
sed -i "s/Myanmar Census/$FONT/g" $CONFIG
sed -i "s/MON3 Anonta 1/$FONT/g" $CONFIG
fi
10 changes: 10 additions & 0 deletions src/mmfs/myanmar-font-switcher.desktop
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=Myanmar Font Switcher
Comment=Change Myanmar fonts as System Fallback Font
Keywords=fonts;switcher;myanmar;unicode;
Icon=preferences-desktop-font
Exec=mmfs %u
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;GNOME;Utility;
Empty file modified src/tables/mm-myanmar3.txt 100755 → 100644
Empty file.
Empty file modified src/tables/mm-zawgyi.txt 100755 → 100644
Empty file.

0 comments on commit 8650de1

Please sign in to comment.