Hi,
I've written a simple script to use my K43U keyboard shortcuts. As stated previously, Fn+F1 (sleep) and Fn+F7 (Off LCD) shortcuts is working. But as the Fn button is undetected in OpenBSD or xorg, I cannot use the Fn button to create other shorcuts, instead I need rely on spectrwm's MOD key. I might change this back to Fn key if later on it's workable.
What's the purpose of this (current) script?
- MOD+F10 to mute/unmute master volume (mixerctl outputs.master.mute)
- MOD+F11 to decrease master volume (mixerctl outputs.master. For both LR channel)
- MOF+F12 to increase master volume (mixerctl outputs.master. For both LR channel)
If you're using xstatbar, like me, xstatbar will show a graph of master volume for each Left/Right channel. So by using this script, you can see how much percentage of the volume you increase/decrease.
Why ksh? Because OpenBSD's default SHELL is ksh and I'm using it. This script might work with other shell.
Copy the asusfn.sh to either your $HOME or if you want to use it exclusively for spectrwm (scrotwm), copy it to /usr/local/share/scrotwm/ but make sure to alter my .scrotwm.conf below accordingly as I put my asusfn.sh in $HOME. Make sure to chmod the asusfn.sh to executable.
Manual usage is:
$ ./asusfn.sh [param]
Replace [param] with:
aup : To increase volume.
adn : To decrease volume.
amt : To mute/unmute volume.
This top part is snippet of my $HOME/.scrotwm.conf. As stated above, alter accordingly.
And this part above is the asusfn.sh. If you read the script carefully, you can see that you can also use the command:
$ ./asusfn.sh info
Which is basically my debugging for the script. I'm not an expert on ksh scripting so I used that to check values/env/bla bla etc.
Future (might be) improvements:
- MOD+F2 to enable/disable athn0 (Wireless LAN)
- MOD+F8 to change display output
- MOD+F9 to enable/disable touchpad
I also found that there's acpiasus which is the Hotkeys driver for Asus's laptop. Currently not automatically working with this machine-o-mine so I need to search for clues on it.
Legal stuff. You can freely copy/use/alter the script any way you want. Don't mock my programming skill because I'm not a programmer and I know this script can be made more simpler. If you alter the script and gave it somebody, make sure you tell them it's not my version. If you find this script useful, thank me or don't either way it's ok. Later.
Subscribe to:
Post Comments (Atom)
6.5 amd64: Modify existing certbot certificates.
Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...
-
Now FreeBSD has version 6.x fer production purpose and 7 fer current. I missed quite a release nowadays. But 1 of the most important news I...
-
Hi, So far I'm still learning about Drupal. I have a project in mind using this. So I wanted to install a module into this Drupal-o-m...
-
Update: My Updated wmiirc Status Bar Script is the recent version, there's a bit of error in the script below so you guys better take a...
1 comment:
Thanks! Getting it to work in my OpenBSD 6.0 with i3wm.
Post a Comment