xmonad / xmonad-contrib

Contributed modules for xmonad

Home Page:https://xmonad.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identify a location to download data for XMonad.Prompt.Unicode

jpolchlo opened this issue · comments

Problem Description

XMonad.Prompt.Unicode requires a data file to function. It appears that unicode-data is used to generate this data file, but the instructions for doing so are not clear, and I've had trouble generating this file for myself. Either more specific instructions should be provided, or a downloadable data file should be made available.

Steps to Reproduce

Not a bug, nothing to reproduce.

Configuration File

N/A, but the function to be used is

import XMonad.Prompt.Unicode

unicodePrompt "/path/to/unicode/data" def

Checklist

  • I've read CONTRIBUTING.md

  • I tested my configuration

    • With xmonad version XXX (commit XXX if using git)
    • With xmonad-contrib version XXX (commit XXX if using git)

That module, like everything else in xmonad-contrib, is contributed by someone else (the file header says @nomeata with changes by @NickHu); if they can't help then all we can do is remove the module from the distribution.

That file is a standard file shipped by distributions. On Ubuntu, you’ll find it in the package unicode-data at path /usr/share/unicode/UnicodeData.txt (see https://packages.debian.org/sid/all/unicode-data/filelist for the list of files).

On NixOS it’s a bit trickier. I just notice that I am running a different version of the code, guess I wrote that when switching to NixOS, that reads supports an environment variable: https://gist.github.com/nomeata/b927440678e905fb433460f38e6f86ce, which I set in my NixOS configuration:

  environment.variables = {
    UNICODE_DATA = "${pkgs.unicode-character-database}/share/unicode";
  };

Hey, @nomeata, thanks for the pointer. I found a file on my system thanks to your reply titled UnicodeData.txt, but it's under /usr/share/texmf-dist, which seems decidedly nonstandard. It does work, but it feels a bit kludge-y. I'd imagine that the standard file located at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt is probably close to ground truth, and so should be called out in the prompt module's docstring. I can probably make a PR with that documentation change if it's useful.

What is your distribution?

But yes, such a PR would be useful

Gentoo

Maybe https://packages.gentoo.org/packages/app-i18n/unicode-data would be the canonical package? Where does it put the file?

Yup. That's it. Got thrown by the app-i18n category. Was not familiar with the abbreviation. I'll make a documentation PR.