summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran S. Diao (刁浩然) <0@hairydiode.xyz>2023-06-30 09:29:15 -0700
committerHaoran S. Diao (刁浩然) <0@hairydiode.xyz>2023-06-30 09:29:15 -0700
commitcf56fb2cb7ef2fb9515ff85a9cb96ec72ad55cdd (patch)
treee9ac17a7fd804ac1198b8b7e2cc38edba353375f
parente69e265f78025b80f4dc33409aa851a351ebe3bb (diff)
Typos
-rw-r--r--cont/jankime.html33
-rw-r--r--jankime.html33
2 files changed, 32 insertions, 34 deletions
diff --git a/cont/jankime.html b/cont/jankime.html
index 64a6d0d..25d295c 100644
--- a/cont/jankime.html
+++ b/cont/jankime.html
@@ -7,13 +7,13 @@
UPDATE: This IME is now tmux based, old xdotool version is still <a href="https://hairydiode.xyz/cgit/dotfiles.git/tree/scripts/ims">here</a>
UPDATE2: I have created the most cursed thing in existance. Full unicode display
-and input support in the linux console using only bash/busybox and tmux.
-See <a href="https://hairydiode.xyz/unihome/">we have unicode at home</a>
+and input support in the linux console using only userland bash/busybox and
+tmux. See <a href="https://hairydiode.xyz/unihome/">we have unicode at home</a>
A new python version came out, so of course that means every python package on
my rolling-release system has broken. This includes ibus, which I need for my
input method. I'm currently running some web-crawling scripts that I don't want
-to stop, so while I wait for my machine to finish downloading all <a href="https://www.rcsb.org/">PDB</a>, I decided
+to stop, so while I wait for my machine to finish downloading all of <a href="https://www.rcsb.org/">PDB</a>, I decided
to write a janky bashscript implementation of ibus table so that I can still use
嘸蝦米.
@@ -25,10 +25,8 @@ Background:
table from <a href="https://github.com/jdh8/ibus-boshiamy">here</a>.
However, I urge that people pay for the license anyways as most of the
- actual work in creating an IME is organizing ways to decompose
- characters into componentd and compiling inputs codes off of that, and
- not the technical implementation I'm doing here, which is fairly
- trivial.
+ actual work in creating an IME is organizational. The technical aspects
+ of IMEs are fairly trivial as you'll see here.
In technical terms, it's just a very large TSV file with the first
column being the input code, the 2nd being the character, and the 3rd
@@ -45,8 +43,8 @@ Background:
The Implementation:
I want this to work in the terminal, and I want it to only require bash,
- and xorg, and it needs to work on all programs running in the terminal
- regardless of whether they used cooked input(bash) or raw input(vim)
+ and tmux, and it needs to work on all programs running in the terminal
+ regardless of whether they use cooked input(bash) or raw input(vim).
So what I ended up on is a bash script that runs in a seperate tmux
panel and sends input to the previously active panel
@@ -61,10 +59,11 @@ The Implementation:
IFS="" is done to make it read spaces as input, but this makes this
implementation very brittle and probably not portable depending on bash
versions. This also passes along control and special characters such as
- delete and move left, and it seems tmux handles most of these
- differences
+ delete and move left, and it seems tmux handles most of the differences
+ between terminals. An older version of this ime using xdotool did not
+ handle these control characters well.
- I then simple run grep ^$code\s, rearrange the columns with awk, sort,
+ I then simply run grep ^$code\s, rearrange the columns with awk and sort,
then take out the ranking column
<a href="https://hairydiode.xyz/cgit/dotfiles.git/tree/scripts/imt">CODE:</a>
@@ -75,11 +74,10 @@ The Implementation:
sort -nr|\
awk '{print $2}')
- finally, it inputs the selected character if the input is 1-9 or Space,
- using tmux send-keys on the previously active pane. Note that bash
- variables don't sort newlines, so the conversion of the input characters
- from line seperated to space seperated was done for free. However this
- makes the code less portable
+ finally, it inputs the selected character into tmux if the ime input is
+ 1-9 or Space. NOTE: bash variables don't store newlines, so the
+ conversion of the input characters from line seperated to space
+ seperated was done for free. However this makes the code less portable
<a href="https://hairydiode.xyz/cgit/dotfiles.git/tree/scripts/imt">CODE:</a>
char=$(echo $opt | awk "{print \$1}")
@@ -91,3 +89,4 @@ Downsides/The Future:
limitations on what text it can display(by default the linux console can
not display fonts with more than 512 characters). I think I'm gonna
write a bash based cbrll implemntation and a character displayer as well
+ so that I can get full userland unicode display and input support.
diff --git a/jankime.html b/jankime.html
index 3344c4a..6d1454a 100644
--- a/jankime.html
+++ b/jankime.html
@@ -23,13 +23,13 @@
UPDATE: This IME is now tmux based, old xdotool version is still <a href="https://hairydiode.xyz/cgit/dotfiles.git/tree/scripts/ims">here</a>
UPDATE2: I have created the most cursed thing in existance. Full unicode display
-and input support in the linux console using only bash/busybox and tmux.
-See <a href="https://hairydiode.xyz/unihome/">we have unicode at home</a>
+and input support in the linux console using only userland bash/busybox and
+tmux. See <a href="https://hairydiode.xyz/unihome/">we have unicode at home</a>
A new python version came out, so of course that means every python package on
my rolling-release system has broken. This includes ibus, which I need for my
input method. I'm currently running some web-crawling scripts that I don't want
-to stop, so while I wait for my machine to finish downloading all <a href="https://www.rcsb.org/">PDB</a>, I decided
+to stop, so while I wait for my machine to finish downloading all of <a href="https://www.rcsb.org/">PDB</a>, I decided
to write a janky bashscript implementation of ibus table so that I can still use
嘸蝦米.
@@ -41,10 +41,8 @@ Background:
table from <a href="https://github.com/jdh8/ibus-boshiamy">here</a>.
However, I urge that people pay for the license anyways as most of the
- actual work in creating an IME is organizing ways to decompose
- characters into componentd and compiling inputs codes off of that, and
- not the technical implementation I'm doing here, which is fairly
- trivial.
+ actual work in creating an IME is organizational. The technical aspects
+ of IMEs are fairly trivial as you'll see here.
In technical terms, it's just a very large TSV file with the first
column being the input code, the 2nd being the character, and the 3rd
@@ -61,8 +59,8 @@ Background:
The Implementation:
I want this to work in the terminal, and I want it to only require bash,
- and xorg, and it needs to work on all programs running in the terminal
- regardless of whether they used cooked input(bash) or raw input(vim)
+ and tmux, and it needs to work on all programs running in the terminal
+ regardless of whether they use cooked input(bash) or raw input(vim).
So what I ended up on is a bash script that runs in a seperate tmux
panel and sends input to the previously active panel
@@ -77,10 +75,11 @@ The Implementation:
IFS="" is done to make it read spaces as input, but this makes this
implementation very brittle and probably not portable depending on bash
versions. This also passes along control and special characters such as
- delete and move left, and it seems tmux handles most of these
- differences
+ delete and move left, and it seems tmux handles most of the differences
+ between terminals. An older version of this ime using xdotool did not
+ handle these control characters well.
- I then simple run grep ^$code\s, rearrange the columns with awk, sort,
+ I then simply run grep ^$code\s, rearrange the columns with awk and sort,
then take out the ranking column
<a href="https://hairydiode.xyz/cgit/dotfiles.git/tree/scripts/imt">CODE:</a>
@@ -91,11 +90,10 @@ The Implementation:
sort -nr|\
awk '{print $2}')
- finally, it inputs the selected character if the input is 1-9 or Space,
- using tmux send-keys on the previously active pane. Note that bash
- variables don't sort newlines, so the conversion of the input characters
- from line seperated to space seperated was done for free. However this
- makes the code less portable
+ finally, it inputs the selected character into tmux if the ime input is
+ 1-9 or Space. NOTE: bash variables don't store newlines, so the
+ conversion of the input characters from line seperated to space
+ seperated was done for free. However this makes the code less portable
<a href="https://hairydiode.xyz/cgit/dotfiles.git/tree/scripts/imt">CODE:</a>
char=$(echo $opt | awk "{print \$1}")
@@ -107,6 +105,7 @@ Downsides/The Future:
limitations on what text it can display(by default the linux console can
not display fonts with more than 512 characters). I think I'm gonna
write a bash based cbrll implemntation and a character displayer as well
+ so that I can get full userland unicode display and input support.
</pre>
</div>
<br>