Score:1

Make a button execute 2 terminal commands

gb flag

I have an RGB keyboard but the switch key is not working on Linux . To switch light on I need to run this command xset led on and to turn it off I need to run this xset led off Can I add these commands as a shortcut to a button with a status check before to run on or off command?

vanadium avatar
cn flag
Yes, you can if you can read the current status. Then a script can check the current value of the status and change to the other value accordingly.
JuniorDev avatar
gb flag
I know but i'm not a programmer.
vanadium avatar
cn flag
`xset q` lists all current settings, so a script will need to analyze that output. Add some of this information and output for your computer to your question, and someone may be able to brew a little script for you.
Score:0
ee flag

i just faced the same problem you had and one easy solution will be to set custom keyboard shortcuts one for xset led on and one for xset led off, and you can toggle between them very easy.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.