`X.P.Unicode`: support Unicode symbols in description
PRESFIL opened this issue · comments
Problem Description
X.P.Unicode
allows you to work with Emoji in Unicode, but does not allow you to use
non-Latin characters in the description of these Emojis. X.P.Unicode
works fine, but
cannot display such characters correctly.
I managed to write a patch to add support, but for this I had to abandon ByteString
.
I don't know if this is acceptable or necessary achieve operability with ByteString
...
Steps to Reproduce
- Install Noto font
- Create a file with an Emoji description (
/home/user/.xmonad/unicode-data
):
1f47e;alien monster | द एलियन
- Recompile the Xmonad config
- Sparm Unicode prompt
- Start typing characters to display completion
Configuration File
import XMonad
import XMonad.Prompt
import XMonad.Prompt.Unicode
import qualified Data.Map as M
-- Prompts
-- default prompt settings
myXPConfig :: XPConfig
myXPConfig = def
{ font = "xft:monospace:size=9,Noto Color Emoji:pixelsize=12:style=Regular,Noto Sans Devanagari UI"
, height = 17
, position = Top
, promptBorderWidth = 0
, historyFilter = deleteAllDuplicates
, searchPredicate = fuzzyMatch
}
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList
[ ((modm .|. controlMask, xK_u), unicodePrompt "/home/user/.xmonad/unicode-data" myXPConfig)
]
main = do
xmonad = def
{ keys = myKeys <+> keys def
}
Checklist
-
I've read CONTRIBUTING.md
-
I tested my configuration
- With
xmonad
version XXX (commit xmonad/xmonad@ed5c866 if using git) - With
xmonad-contrib
version XXX (commit ea97c35 if using git)
- With
I managed to write a patch to add support, but for this I had to abandon ByteString.
I don't know if this is acceptable or necessary achieve operability with ByteString...
Could you share your patch?
My branch:
UPD: typo in link.
I'm not sure, I don't know my way around this area. I thought providing a workaround would serve as a discussion basis with more knowledgeable maintainers. Since you have an alternative, feel free to create a PR! It would be more convenient to review code that way