From cf56fb2cb7ef2fb9515ff85a9cb96ec72ad55cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haoran=20S=2E=20Diao=20=28=E5=88=81=E6=B5=A9=E7=84=B6=29?= <0@hairydiode.xyz> Date: Fri, 30 Jun 2023 09:29:15 -0700 Subject: Typos --- cont/jankime.html | 33 ++++++++++++++++----------------- jankime.html | 33 ++++++++++++++++----------------- 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 here 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 we have unicode at home +and input support in the linux console using only userland bash/busybox and +tmux. See we have unicode at home 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 PDB, I decided +to stop, so while I wait for my machine to finish downloading all of PDB, I decided to write a janky bashscript implementation of ibus table so that I can still use 嘸蝦米. @@ -25,10 +25,8 @@ Background: table from here. 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 CODE: @@ -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 CODE: 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 here 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 we have unicode at home +and input support in the linux console using only userland bash/busybox and +tmux. See we have unicode at home 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 PDB, I decided +to stop, so while I wait for my machine to finish downloading all of PDB, I decided to write a janky bashscript implementation of ibus table so that I can still use 嘸蝦米. @@ -41,10 +41,8 @@ Background: table from here. 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 CODE: @@ -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 CODE: 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.
-- cgit v1.1