Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
lehrkraefte:blc:plg:stift [2023/12/18 19:36] Karlheinz Schubert extend for Wayland or X++ usage |
lehrkraefte:blc:plg:stift [2024/01/20 10:56] Karlheinz Schubert |
||
---|---|---|---|
Line 23: | Line 23: | ||
{{lehrkraefte: | {{lehrkraefte: | ||
<code python> | <code python> | ||
- | # | + | #!/usr/bin/env -S python3 |
import subprocess | import subprocess | ||
Line 64: | Line 64: | ||
if __name__ == " | if __name__ == " | ||
- | args = sys.argv[1: | + | |
- | if len(args) > 0 and (" | + | |
- | verbose = True | + | if len(args) > 0 and (" |
- | else: | + | verbose = True |
- | print(" | + | else: |
- | is_wayland() | + | print(" |
- | if is_wayland(): | + | is_wayland() |
- | display_id = display_id_wayland | + | if is_wayland(): |
- | device_names = device_names_wayland | + | display_id = display_id_wayland |
- | else: | + | device_names = device_names_wayland |
- | display_id = display_id_x11 | + | else: |
- | device_names = device_names_x11 | + | display_id = display_id_x11 |
- | name_length = max([len(n) for n in device_names]) | + | device_names = device_names_x11 |
- | for device_name in device_names: | + | name_length = max([len(n) for n in device_names]) |
- | device_id = get_device_id(device_name) | + | for device_name in device_names: |
- | print(f" | + | device_id = get_device_id(device_name) |
- | set_xinput_mapping(device_id, | + | print(f" |
+ | set_xinput_mapping(device_id, | ||
+ | | ||
+ | print(e) | ||
print("" | print("" | ||
+ | input(" | ||
</ | </ |