Coder Social home page Coder Social logo

b0pol / ergol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nuclear-squid/ergol

0.0 0.0 0.0 36.2 MB

A Colemak-style keyboard layout for French-speaking typists and programmers.

Home Page: https://ergol.org/

License: Other

JavaScript 97.65% Python 0.11% CSS 0.54% Makefile 0.02% HTML 1.63% Vim Script 0.05%

ergol's Introduction

(in English hereinafter)

Une disposition de clavier ergonomique optimisée pour le français, l’anglais et le code.

  • Disposition optimisée pour le français et l’anglais;
  • Couche AltGr optionnelle, optimisée pour l’enchaînement des symboles de programmation;
  • Conservation des raccourcis usuels : Ctrl-{Q,A,S,Z,X,V} (Ctrl-C est décalé, mais reste faisable d’une main);
  • Support de tous les caractères spéciaux utilisés en français (diacritiques, majuscules accentuées, lettres entrelacées, symboles de ponctuation…);
  • Chiffres en accès direct.

English

A Colemak-style layout for French-speaking users.

TL;DR:

  • a Colemak-style keyboard layout optimized for French and English;
  • most common keyboard shortcuts are preserved (like in Colemak);
  • use a dead key for the most frequent accented characters;
  • use the AltGr layer for programming symbols.

This layout claims to be better than Bépo for French, better than Dvorak for English and better than Qwerty for programming. Check the stats !

Layout

base layout

The dead key gives access to all acute accents, grave accents, cedillas, digraphs and quote signs you’ll need to write in proper French:

dead key layout

… and the AltGr layer is fully dedicated to programming symbols.

altgr layout

The default layout allows to write in English, French, German and Esperanto easily.

More information on the website (in French).

Availability

Kalamine is available on Debian Unstable. It is automatically installed via the xkb-data package.

Install

You’ll need the latest version of Kalamine to build your own layout. We highly recommend using pipx, once you have it installed (by following their guide), you can just run the following command:

pipx install kalamine

Download the layouts/ergol.toml file in this repo and build the layout :

kalamine build ergol.toml

You’ll get a dist folder containing all the drivers.

Then, to install Ergo‑L, follow the install section of Kalamine’s repo, and you should be good to go !

Install (Linux only)

xkalamine is a linux‑specific tool (shipped with kalamine) to easily install keyboard layouts on Linux. You can drop sudo if you use wayland, but it’s required on Xorg.

sudo xkalamine install ergol.toml  # Install the layout

Then switch to Ergo‑L using the following command:

setxkbmap fr -variant ergol  # Switch your keyboard layout to ergol

Troubleshooting with ubuntu / wayland

There is a weird issue where Ergo-L works fine with some applications (phpstorm, gnome,...) but not on others (libreoffice, terminator). The deadkey remain for two chars instead of only one. (ex: a[deadkey]sen should display aéen but it displays aéèn instead.).

This issue is solved by adding at the end of /etc/environment the following lines:

INPUT_METHOD=ibus
GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

Make Your Own !

If you wish to modify the layout, the layouts/*.{toml,yaml} are human-readable ASCII arts of the final layout. You can easily edit them, then run make (or make watch) at the root of the repo to generate the .json files used to benchmark layouts on the stats page.

This repo contains all of the code for the Ergo‑L website, so you can run the page locally to try your prototypes !

Edit Corpora

The different corpora can be found in corpus/, mainly fr.txt and en.txt which can be edited to change the type of text used (for instance if you don’t write like translators of Miguel de Cervantes, or if you want to test with your own emails).

If you have multiple source files, you can thus merge them using the merge.py script, for instance:

python3 merge.py file-fr‑1.txt … file-fr-n.txt > fr.txt

Once this is done, the statistics file can be generated using the chardict.py script. Note that for this step, you don’t want to have parasitic .txt files in the corpus directory, or their stats will be generated as well.

python3 chardict.py

For the sake of completeness, we add that specifying a single file after the command generates the json stat file for this specific corpus.

Run a Local Server

Hugo can be used to serve the site, it automatically watches and live-reload the pages upon file changes, however you still need to have make watch running to ensure that the .json files are generated upon modifying human-friendly layouts in layouts/*.{to,ya}ml.

You can thus run your local instance of the Ergo‑L website either by running hugo server in the www/ directory, or via:

hugo server --source www/

By default, the server will run on port 1313: http://localhost:1313/

The stats page is now accessible on http://localhost:1313/stats/#/ergol/ol60/fr!

Note: This solution supports live-reload for most parts. While it’s not a problem while editing the content, some stats are not fully refreshed with live-reload. You may have to manually refresh the stats page after editing a layout or a corpus to have the correct version of them.

ergol's People

Contributors

fabi1cazenave avatar nuclear-squid avatar loevenbruck avatar chouhartem avatar wismill avatar delapouite avatar trilowy avatar maggick avatar lysquid avatar 16ur avatar mart-e avatar clemabt avatar cedricr avatar alexherbo2 avatar gagath avatar brabalan avatar theycallmehacked avatar taratatach avatar philippe-levan avatar sphinxknight avatar steevelefort avatar adjivas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.