Skip to content

Commit

Permalink
Merge pull request #122 from Diudid/patch-1
Browse files Browse the repository at this point in the history
Update configuration.adoc
  • Loading branch information
ABeltramo authored Sep 13, 2024
2 parents 36f407b + 1677abb commit 91828ef
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion docs/modules/user/pages/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,54 @@ https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167[gstreamer/issue

== Directly launch a Steam game

This has been moved to the xref:steam.adoc[] page.
This has been moved to the xref:steam.adoc[] page.

== Changing and Switching Keyboard Layouts in wolf Apps Containers

This guide demonstrates how to change the default keyboard layout and switch between multiple layouts in Docker containers.

=== Create a Configuration File

Create a config file at `${HOST_APPS_STATE_FOLDER}/cfg/90-custom.conf` with the following content:
....
input type:keyboard {
xkb_layout "fr,us"
xkb_numlock "enable"
}
....
* xkb_layout : The first layout code you set will be the default layout. Add other layouts separated by commas. For more layout codes, see: https://man.archlinux.org/man/xkeyboard-config.7#LAYOUTS
* xkb_numlock "enable" turns on NumLock by default.

=== Configure Container Mounts

In the same folder, edit `${HOST_APPS_STATE_FOLDER}/cfg/config.toml`
For each container where you want to use the custom layout, edit the "mounts" variable as follows:
....
mounts = [
"${HOST_APPS_STATE_FOLDER}/cfg/90-custom.conf:/etc/sway/config.d/90-custom.conf",
]
....

This ensures that the config is not overwritten. On the next app restart, the keyboard layout will be set to the default one specified.

=== Switching Layouts

==== Switching layout from the console in moonlight

Start the console in Moonlight.
Use the command:
....
swaymsg input type:keyboard xkb_switch_layout next
....

==== Creating a Steam Shortcut for Layout Switching
In Steam, add a "Non-Steam Game", and select anything as the target.
Once the game is created in Steam, Right-click on it and select "Properties".
In the "Target" field, enter:
....
/bin/bash -c "swaymsg input type:keyboard xkb_switch_layout next"
....
Rename the game to "Switch Layout".
Close the properties window.

You now have a clickable link in Steam to switch layouts.

0 comments on commit 91828ef

Please sign in to comment.