Skip to content

Commit

Permalink
Use a docker container for generating keysyms
Browse files Browse the repository at this point in the history
Previously, keysyms were just generated on the host operating system.
This means that the keysyms that are generated varies from system to
system, which is just bad form. This commit makes it so the keysyms are
generated inside of a Docker container, which should make the process
much more reproducible.

Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Oct 22, 2023
1 parent 060e9e4 commit ebe9640
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@
# limitations under the Licenses.

keysyms:
cargo run --manifest-path keysym-generator/Cargo.toml \
src/automatically_generated.rs
docker container run --rm \
--name keysym_generator \
--mount type=bind,source="$(pwd)",target=/xkeysym \
-it rust:slim-bookworm \
sh -c "apt-get update && apt-get install x11proto-core-dev && \
cargo run --manifest-path /xkeysym/keysym-generator/Cargo.toml \
/xkeysym/src/automatically_generated.rs"

10 changes: 10 additions & 0 deletions src/automatically_generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4735,6 +4735,10 @@ pub mod key {
pub const XF86_VoiceCommand: RawKeysym = 0x10081246;
#[doc(alias = "XF86XK_Assistant")]
pub const XF86_Assistant: RawKeysym = 0x10081247;
#[doc(alias = "XF86XK_EmojiPicker")]
pub const XF86_EmojiPicker: RawKeysym = 0x10081249;
#[doc(alias = "XF86XK_Dictate")]
pub const XF86_Dictate: RawKeysym = 0x1008124a;
#[doc(alias = "XF86XK_BrightnessMin")]
pub const XF86_BrightnessMin: RawKeysym = 0x10081250;
#[doc(alias = "XF86XK_BrightnessMax")]
Expand Down Expand Up @@ -9835,6 +9839,10 @@ impl Keysym {
pub const XF86_VoiceCommand: Keysym = Keysym(key::XF86_VoiceCommand);
#[doc(alias = "XF86XK_Assistant")]
pub const XF86_Assistant: Keysym = Keysym(key::XF86_Assistant);
#[doc(alias = "XF86XK_EmojiPicker")]
pub const XF86_EmojiPicker: Keysym = Keysym(key::XF86_EmojiPicker);
#[doc(alias = "XF86XK_Dictate")]
pub const XF86_Dictate: Keysym = Keysym(key::XF86_Dictate);
#[doc(alias = "XF86XK_BrightnessMin")]
pub const XF86_BrightnessMin: Keysym = Keysym(key::XF86_BrightnessMin);
#[doc(alias = "XF86XK_BrightnessMax")]
Expand Down Expand Up @@ -12584,6 +12592,8 @@ pub(crate) const fn name(keysym: Keysym) -> Option<&'static str> {
Keysym::XF86_Screensaver => Some("XF86XK_Screensaver"),
Keysym::XF86_VoiceCommand => Some("XF86XK_VoiceCommand"),
Keysym::XF86_Assistant => Some("XF86XK_Assistant"),
Keysym::XF86_EmojiPicker => Some("XF86XK_EmojiPicker"),
Keysym::XF86_Dictate => Some("XF86XK_Dictate"),
Keysym::XF86_BrightnessMin => Some("XF86XK_BrightnessMin"),
Keysym::XF86_BrightnessMax => Some("XF86XK_BrightnessMax"),
Keysym::XF86_KbdInputAssistPrev => Some("XF86XK_KbdInputAssistPrev"),
Expand Down

0 comments on commit ebe9640

Please sign in to comment.