Linux Blog

Changing Window Manager on Fedora

Filed under: General Linux,Linux Software,Quick Linux Tutorials — TheLinuxBlog.com at 8:34 am on Monday, August 18, 2008

TheLinuxBlog.com was intended to be a blog where I could log my thoughts, findings and generally keep track of how to do stuff. Since it was started this is still the goal. Ultimately I’d like to refer to TheLinuxBlog on how to do something just as much as I refer to google for everything else. That being said, one thing that recently came up for me was “How do I change my desktop on Fedora”.

I had done this before but I couldn’t remember the command to do so. Well, since this blog is as much for me as it is for the reader I figure I can post the how to here and kill two birds out with one blog post, I mean stone.

The program I use to change my window manager on Fedora is: switchdesk.

Switchdesk can be installed by Yum or if you installed Fedora from DVD or CD and didn’t fine tune your packages then you probably have it already. All you have to do to run it is type:

switchdesk

Now, if you are in an X session you will get a nice graphical dialog that will help you change your desktop manager. If your at the terminal it will exit and ask you nicely to type either gnome, kde, xfce or any other window manager you may have installed.

Don’t ask me why every distribution has a different named command and interface to achieve the same thing thats just the way it is. Maybe one day I’ll get a list of all of the commands and post them. Alternatively if anyone wants to start a list feel free to post them in comments or by e-mail.

Awesome Piping

Filed under: General Linux,Quick Linux Tutorials — Kaleb at 8:01 am on Wednesday, April 23, 2008

Have you ever wanted to try a tiling window manager. But maybe you don’t want to deal with DWM and its bad config setup that forces you to recompile the app each time you change the config.

I suggest to you AwesomeWM. It was originally based on DWM, however now it is completely on its own. For those of you who don’t know, tiling window mangers are window managers that basically allow you to use ALL of y
our screen. If screen landscape is scarce on your box i suggest a tiling window manager. How do they do this? Its all about managing windows baby. What they do is they make every window you open full screen. that
s right FULL screen and if you open up more then one window in one virtual desktop it cuts them in half so that they are each using half the screen, and so on.

But this article is not about tiling window managers exactly it is about piping in awesome. The AwesomeWM has a status bar that you can edit which by default holds a list of your “tags” (virtual desktops however with a little bit different technique) and a window list of all the windows open on your current tag. However you can edit what is on this status bar with the .awesomerc. Now your asking yourself what can I put on i
t, does it have special keywords like conky or something? The answer is no. it works nothing like conky, however if you do it right you can completely replace conky.

Now how to do this. Open up your .awesomerc file with your favorite editor (i suggest vi or vim, and if you don’t know those why are you even at this site). Now you will see a bunch of lame stuff right, well you need to scroll down to the “status bar” section, this section strangely holds all the things that you will place on your status bar (the status bar section is repeatable so you can have more then one status bar as long as the name is changed).

Now with me I do not like having a list of running windows on my status bar, so I just remove that section,but I do like to have a clock on my status bar, I would assume you would like it to however I don’t know.

At first look it will seem a little complicated to make just a simple clock, but its actually not that bad once you get the hang of it.

What you need to do, for a clock, is create a “textbox” section (yes the time is TEXT strange eh).
It should look something like

textbox clock
{
text=” ”
}

the space between the “” is supposed to be a space so don’t worry about that. Now after you have this set up you are done messing with your .awesomerc. “clock” is now a keyword that you can use to pipe the clock t
o that part of your status bar.

Next what your going to want to do is create a little shell script for rendering your clock it should look something like:

#!/bin/bash

echo “0 widget_tell mystatusbar clock text `date +”%A %B %d, %Y %l:%M %p”`” | awesome-client

Now that is really complicated right. Well not really.

Honestly I have no idea what “0 widget_tell” does, I am assuming is just telling the status bar what to do.

Next in the list you have “mystatusbar” that is the name of your status bar, you should probably know the name of it.

Next should be obvious “clock” is the section of your status bar you want the data to be ported to.

After that comes “text” this just tells it that it is text and not some other type of data.

Then, inside the “ is the command you want to run. This is just the date command that has been modified to output the date in a specific format, it will output the date and time like this “Friday April 18, 2008
2:23 PM”

If you want it in a different way look at “man date” for help (its really simple).

Finally in the command you have “| awesome-client” this will pipe the command to awesome.

Now you need to have this script run on a regular basis, some people do this as a “while true” thing in there .xinit or something however since this is just a clock that only tells me minutes I use the crontab to
run this script every minute. A crontab to run this every minute should look like:
*/1 * * * * ~/scripts/clock.sh
Do all of this and you should have an up and running clock in no time. And like I said before you can put anything you want into this. Even graphics. So now that you know the basic stuff go make a pretty status bar.

Kaleb Porter

porterboy55@yahoo.com

http://kpstuff.servebeer.com (website is temporarily down)