Page 1 of 1
yinput-0.6 - yad program to enable or disable devices
Posted: Sat Jan 13, 2024 4:27 pm
by plinej
Here's a little yad gui that will enable or disable devices (i.e. touchpad). I started to write this as a gui for xinput but I know Wayland doesn't use that so this should work for everyone.
Devices that are enabled will show enabled in the combobox and the other option will be "disable".
Devices that are disabled will show disabled in the combobox and the other option will be "enable".
Change the options that you want and click ok.
0.2 - if xinput is installed you'll have to select to use or not and then the main gui will popup. Make your changes and then you can click the test button to test your changes and you'll get a 30 second countdown. After 30 seconds your changes will revert. You can click the revert button on the countdown gui to immediately revert or click the keep button to keep your changes.
0.3 bugfix and some improvements
0.4 added a switch to xinput or non-xinput button and some other improvements.
0.5 bugfix
0.6 code clean up
- yinput-snap.png (45.05 KiB) Viewed 1048 times
Re: yinput-0.1 - yad program to enable or disable devices
Posted: Sun Jan 14, 2024 2:25 pm
by BarryK
Thanks, that looks useful.
Re: yinput-0.1 - yad program to enable or disable devices
Posted: Mon Jan 15, 2024 1:58 am
by MochiMoppel
Hmmm... my PC uses 1 keyboard and 1 mouse. Can be tricky to find them in the list and can be easy to disable the wrong one, which would leave the system without any input device = not operational anymore.
Maybe it would help to limit the list to input devices with which the user interacts and ignore adapters and virtual devices? Just a thought...
- yinput.jpg (55.18 KiB) Viewed 923 times
With use_xinput=false
I can't see any keyboard:
- yinput2.jpg (51.31 KiB) Viewed 920 times
Re: yinput-0.1 - yad program to enable or disable devices
Posted: Mon Jan 15, 2024 5:51 am
by stemsee
Or....have a simple mode and an advanced mode with all devices. And a checkbox for timeout on reboot or re-login before activation, giving time to restore a device in case all were disabled.
Re: yinput-0.1 - yad program to enable or disable devices
Posted: Mon Jan 15, 2024 11:06 am
by MochiMoppel
Disabled all audio devices (see 2nd screenshot). Output through front headphone continued
Re: yinput-0.1 - yad program to enable or disable devices
Posted: Wed Jan 17, 2024 12:05 am
by plinej
I'm not sure I want to do anything else with this. It does what I need it to do but I can see how someone may disable the wrong thing and have to reboot. If anyone wants to add code to this feel free. I've got other things that I want to spend my time on.
Re: yinput-0.1 - yad program to enable or disable devices
Posted: Wed Jan 17, 2024 11:13 am
by plinej
Scratch that, I'll do an 0.2 version later today. I thought of some things to easily implement.
Re: yinput-0.2 - yad program to enable or disable devices
Posted: Wed Jan 17, 2024 9:56 pm
by plinej
Re: yinput-0.2 - yad program to enable or disable devices
Posted: Thu Jan 18, 2024 11:03 am
by plinej
@MochiMoppel, I think I may have figured out why your audio device wasn't disabled. I'll do an 0.3 update sometime today. The other pitfall of this program is disabling something that appears in the xinput list and the non-xinput list which will only show disabled in the gui that you've disabled it in and not the other. I'll implement a warning message if the program finds that when you run the other version of the gui.
Re: yinput-0.3 - yad program to enable or disable devices
Posted: Thu Jan 18, 2024 9:51 pm
by plinej
Re: yinput-0.4 - yad program to enable or disable devices
Posted: Fri Jan 19, 2024 10:38 am
by plinej
0.4 is up. I think I'm done with this now unless someone finds a bug.
Re: yinput-0.5 - yad program to enable or disable devices
Posted: Mon Jan 22, 2024 10:24 am
by plinej
Re: yinput-0.6 - yad program to enable or disable devices
Posted: Mon Feb 12, 2024 10:38 pm
by plinej