Showing posts with label xstatbar. Show all posts
Showing posts with label xstatbar. Show all posts

Saturday, September 15, 2012

5.2 amd64 K43U: Conky not showing correct cpu core's load.

Well, I'm getting more comfortable with cwm. In fact I installed conky again because of cwm. Currently cwm is my main window manager and although spectrwm is still my favorite, I've been using cwm more.

I just found out something interesting today. I'm interested in playing with conky again after I found cwm. Thinking that it will be a great combination. Installation went fine, although I noticed that there's more dependencies needed to install conky now (or I didn't notice it earlier in previous versions).

Then I noticed that the graph and load percentage for 2nd core of my cpu is zero. Nil. Nada. Reading about updates of 5.2 tells me that that version have much more improvements on SMP handling, so obviously OpenBSD is not the issue here. Then I use xstatbar and found that both of my cpu cores are displayed and working as usual. I double check the man for conky and it's confirmed that cpu0 is for all cores, cpu1 is for 1st core and cpu2 is for the 2nd core. So, something wrong with conky again huh. Ok. I know it's not written with OpenBSD in mind so I'm not complaining. Gonna find some sort of workaround for this.

I might try dzen and see if it's any good. Later.

p/s: Oh, this is my 200th post for this blog-o-mine. Hah!

Friday, March 02, 2012

5.1 amd64 K43U: ksh script for Asus K43U keyboard shortcut in spectrwm.

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.

Wednesday, December 22, 2010

OpenBSD NC4200: scrotwm + xstatbar & I think I found a bug.

xstatbar is a status bar which can be use in scrotwm to display cpu usage graph, memory usage, battery/AC status, Master Volume and date/time. Informations which is displayed is currently fixed and hacking the source code is the only way to customize the display. I downloaded and installed xstatbar. Then I edited ~/.xsession.

*unrelated bits ignored*
xstatbar -y 753 -w 1024 &
exec scrotwm
*unrelated bits ignored*


It's basically telling xstatbar to appear from pixel 753 with the width of 1024 pixel. My laptop's resolution is 1024x764 so it's the best pick. Displaying xstatbar will take the height of 15 pixel so do the math. Then I edited ~/.scrotwm.

*unrelated bits ignored*
# Region setting for xstatbar use.
region = screen[1]:1024x753+0+0

*unrelated bits ignored*


This one basically tells scrotwm to use only 1024x753 for the window manager and 15pixel is reserved for xstatbar's use. Then after I log in, xstatbar happily resides on the bottom area. Both scrotwm and xstatbar is still under development so there's more features will be added in the future.

A few days using scrotwm, I managed to get scrotwm to crash when using Mozille Thunderbird. It's quite random but replication is possible. In scrotwm, I opened Thunderbird in workspace 3 (my fav workspace for Thunderbird). The main Thunderbird program will be there but I always move email composing dialog in workspace 4. In workspace 3, I will click Write button and the compose dialog will be in workspace 4. Switching to workspace 4 and I will write the recipient's email address. Auto complete's dialog will be displayed and that's when scrotwm will crash, dumping core and returning me to xdm. But like I've stated, it's quite random with most of the time I'm being lucky. Maybe there's something else which made this happened but I'm very sure it has something to do with Thunderbird as I didn't see that when using other program. I've registered with FlySpray but I'm not sure whether to file a bug report yet. Later.

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 ...