Showing posts with label cwm. Show all posts
Showing posts with label cwm. Show all posts

Wednesday, December 14, 2016

-c X200 amd64: New bind-key for cwm.

Hey,

Updated my -CURRENT today and found that my key bindings in cwm no longer working. Done a man cwmrc and found that binding has changed.

Previous ~/.cwmrc
=====
#bind key binding
bind 4-l    lock
=====

Now:
=====
bind-key 4-l    lock
=====


Working now like a charm. cwm rocks!

Thursday, May 28, 2015

5.7 amd64 X200: Rotating random wallpaper using feh + cron. And more.

Hi,

Searching for rotating wallpaper on the web has given me a few good shell scripts to use. But what if I just want to use the good ol' crontab and feh? Here's what I've done.

What I'm on now:
- CWM
- feh

Obviously CWM is my WM of choice nowadays. And I've installed feh. My lappy's screen resolution is 1280x800 so I went searching for beautiful nature's wallpaper. Get more than 2 so I'll have many rotation choices.

For me, I mkdir a Wallpapers folder. So it's look like:

~/Wallpapers

I put all the pictures into that folder. Now for the cron part.

$ crontab -e

This is my first cron so the file is empty. I want this wallpaper to rotate using random picture every 5 minutes. So my cron is like this:

*/5 * * * * DISPLAY=:0.0 feh --bg-fill -z --no-fehbg ~/Wallpapers/

In short, human-readable meaning is every 5 minutes (*/5) the screen (DISPLAY=:0.0) will be used by feh to fill the picture as wallpaper (--bg-fill) randomly (-z) without writing a ~/.fehbg file (--no-fehbg) using pictures from the folder ~/Wallpapers .

Then press :WQ to write the changes and quit so the process will start. Enjoy the rotating wallpapers guys.

Ok. Now. What if I want to use random wallpapers everytime I log in to cwm? The command is the same like crontab there but I need to ready 2 things.

Editing ~/.xsession and put this line (before exec cwm or any WM of your choice).

eval `cat ~/.fehbg`
exec cwm

Now create/edit ~/.fehbg and put the command like in crontab (without the DISPLAY=:0.0 bit):

feh --bg-fill -z --no-fehbg ~/Wallpapers/

And it's done. Oh wait, how about another one? Get a menu to change to a random wallpaper in cwm. Open up ~/.cwmrc and put this:

command ChangeWP "feh --bg-fill -z --no-fehbg ~/Wallpapers/"

Then refresh the cwm (by default should be pressing Ctrl+Alt+Shift+R) and click the menu.

Man crontab / feh for more info. Later.

Sunday, April 28, 2013

5.2 amd64 X200: xorg.conf to get Trackpoint to behave properly.

Heyya. One of the thing that I like about X200, is the lack of touchpad. I don't quite like touchpads. It's a nuisance at best. Surely some OS can disable the touchpad when external mouse is connected but then, what's the point? Most of the time I'll be ignoring the touchpad.

For X200, it only comes with Trackpoint with 3 buttons. The left and right buttons are the standard left-right click, and the middle button is for scrolling. In Windows, pressing the middle-button then using the Trackpoint will scroll to the desired point (Right, left, up, down). But that's for Windows, I want it for my 5.2.

Surely, what's the point of having the best documentations if I didn't use it, right? So, man xorg.conf. Then I notice something. In the INPUTDEVICE SECTION, it's stated that:

"It is usually not necessary to provide InputDevice sections in the xorg.conf if hotplugging is in use (i.e. AutoAddDevices is enabled). If hotplugging is enabled, InputDevice sections using the mouse, kbd and vmmouse driver will be ignored."

Now that's different from what I used to remember. Previously I just alter my /etc/X11/xorg.conf like this:

Section "InputDevice"
    Identifier    "Trackpoint"
    Driver        "mouse"
    Option        "Protocol"    "Auto"
    Option        "Device"    "/dev/wsmouse"
    Option        "Emulate3Buttons"    "False"
    Option        "EmulateWheel"    "True"
    Option        "EmulateWheenButton"    "2"
    Option        "XAxisMapping"    "6 7"
    Option        "YAxisMapping"    "4 5"
EndSection


But now that won't work. It doesn't do anything. My USB Mouse's wheel is working fine, but Trackpoint does nothing as I wanted. So I alter the SERVERLAYOUT section:

Section "ServerLayout"
    ...snip...
    Option        "AutoAddDevices"    "False"
EndSection


But then both the Trackpoint and USB Mouse is not working. At all. This is not good. After re-reading the relevant xorg.conf manual, I found the answer. It lies in the INPUTCLASS SECTION. This is the working snippet of my /etc/X11/xorg.conf files.

Section "InputDevice"
    Identifier    "Trackpoint"
    Driver        "mouse"
    Option        "Protocol"    "Auto"
    Option        "Device"    "/dev/wsmouse"
EndSection


Section "InputClass"
    Identifier    "Trackpoint"
    MatchIsPointer    "True"
    Option        "Emulate3Buttons"    "False"
    Option        "EmulateWheel"        "True"
    Option        "EmulateWheelButton"    "2"
    Option        "XAxisMapping"        "6 7"
    Option        "YAxisMapping"        "4 5"
EndSection


Basically the INPUTCLASS can be used to add different function to different input devices (eg: Trackpoint, USB Mouse with Scroller etc) if configured correctly. In my case, I managed to get the Trackpoint's scrolling function using the middle button and the paste buffer function is also working as needed. But then my USB Mouse is also inheriting the same function. Ah well I will try to alter the INPUTCLASS SECTION so that the Trackpoint and USB Mouse have distint function.

So in the end, I got my Trackpoint working as I wanted. Take note that I'm using cwm and scrolling is tested and working in vim, Firefox and other programs. Great.

Oh, before I forget. I had problem generating my xorg.conf as there's error when I use X -configure. X -configure exited with error. But in the end the xorg.conf file did got generated. Current status is:

- Trackpoint scrolling function now working.
- intel (4) is working fine.
- Video display is 1280x800.
- VGA Out is not tested yet.
- Ultrabase's DisplayPort & VGA Out is not yet tested.

Here's my current /etc/X11/xorg.conf.


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!

Wednesday, September 12, 2012

amd64 K43U: Upgrading to 5.2-current (via FTP) & cwm - Calm Window Manager.

Hi,

Currently I'm upgrading my K43U to 5.2-current. Using FTP install. But that's not my main point.

Calm Window Manager, or cwm has been in OpenBSD's base install since 4.2. But only now I have the privilege of knowing about it. Sheesh. I'm currently testing it and I can say that it's as fast as spectrwm. But I haven't configured any of it yet. As always, man is the way.


Upgrading 5.1-current to 5.2-current:

Most of the steps are the same as 5.1 amd64: Following -current & radeon 6.14.3 installation topic I posted before. The only thing that's different is the method I'm getting the snapshot files and updating the packages. For this one, I used my Celcom Broadband connection and retrieve all the essential files via ftp.

So first of all, I fired up the Celcom connection, you can check the 4.8 - Script to connect to Celcom 3G link. Bolded is my input:

# celcom3g connect
Connection Celcom3G...


Then it's time to get the files. My fav server is ftp.OpenBSD.org. I make sure I'm in the dir that I want to store all the files first:

# cd /mnt/snapshot/amd64/
# ftp ftp.OpenBSD.org

Connected to openbsd.sunsite.ualberta.ca.
220 openbsd.srv.ualberta.ca FTP server ready.
name (ftp.OpenBSD.org:karl):


Ah. Login name? Err. I just hit Return and got this:

530 User karl access denied.
ftp: Login karl failed.

Now it's getting interesting. After reading the manpage, I found that I should use "-a" to login anonymously. So back to ftp:

# ftp -a ftp.OpenBSD.org
*** Login successful printout ***

Great. Now to get the files.


ftp> cd pub/OpenBSD/snapshots/amd64/
250 CWD command successful.
ftp> mget bsd*
ftp> mget *.tgz
ftp> quit


After this the steps are the same as my previous post. After I done upgrading the OpenBSD to 5.2-current, I updates my packages online (without downloading to local dir like I've always do before).

# export PKG_PATH=http://ftp.OpenBSD.org/pub/OpenBSD/snapshots/packages/amd64/
# sudo pkg_add -vui


Then enjoy, wait, it'll take some time depending on how many stuff you installed already. After a brief testing last night, noticeable improvement is the radeon driver which is updated to 6.14.6. Previously playing 720p mkv movie will stutter like mad but now it's smooth although tearing effect is there. I still have to explore more to comment more on 5.2-current.

Oh, regarding cwm. What's the different between cwm and spectrwm? Short answer:

cwm = stacking
spectrwm = tiling

But cwm is already in base, and spectrwm is available in package. I still need to explore cwm more. 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 ...