In my quest for a good minimal window manager, I have tried almost everything available for linux, including projects on https://github.com I havent found anything yet that works exactly as I want, but I enjoy hacking on the code to see if I can make them work more to my liking (or work at all). This is a recent attempt to hack some public domain xcb code to meet my needs. After my modifications it is only 134 sloc (single lines of code) and does the basic window manager functions I use. Here is the code:
#include <stdlib.h>
#include <sys/wait.h>
#include <xcb/xcb.h>
#ifdef COMPOSITE
#include <xcb/composite.h>
#endif
int main(int argc,char**argv){
static const uint32_t di[]={0,0,1440,900},cwa=XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT|XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY|XCB_EVENT_MASK_STRUCTURE_NOTIFY;
xcb_connection_t*d=xcb_connect(0,0);
void*p;
int32_t*x,*y,*tx=0,mx,my,rt=xcb_setup_roots_iterator(xcb_get_setup(d)).data->root,cs[255],*cz=cs+1;
uint8_t mz,mZ;
xcb_change_window_attributes(d,rt,XCB_CW_EVENT_MASK,&cwa);
xcb_grab_key(d,1,rt,0,133,XCB_GRAB_MODE_ASYNC,XCB_GRAB_MODE_ASYNC);
xcb_grab_button(d,1,rt,XCB_EVENT_MASK_BUTTON_PRESS,XCB_GRAB_MODE_ASYNC,XCB_GRAB_MODE_ASYNC,XCB_NONE,XCB_NONE,XCB_GRAB_ANY,XCB_MOD_MASK_4);
#ifdef COMPOSITE
xcb_composite_redirect_subwindows(d,rt,XCB_COMPOSITE_REDIRECT_AUTOMATIC);
#endif
xcb_generic_event_t*e=0;
main:xcb_flush(d);
waitpid(-1,0,WNOHANG);
noflush:x=y=cz-1;
again:free(e);
switch((e=xcb_wait_for_event(d))->response_type&127){
case XCB_BUTTON_PRESS:
for(;x>cs;x--)
if(*x==((xcb_button_press_event_t*)e)->child){
if(((xcb_key_press_event_t*)e)->detail==2)goto pocus;
case XCB_KEY_PRESS:
mz=128|((xcb_key_press_event_t*)e)->detail;
my=((xcb_key_press_event_t*)e)->state;
goto*(cz==cs+1?&&kcode:&&stack);
}
goto noflush;
case XCB_KEY_RELEASE:
if(((xcb_key_press_event_t*)e)->detail!=133||!tx)default:goto again;
xt:x=tx;
tx=0;
goto stack;
case XCB_CONFIGURE_REQUEST:;
uint32_t c[7];
p=c;
for(mz=0;mz<5;mz++)
if(((xcb_configure_request_event_t*)e)->value_mask&1<<mz){*(uint32_t*)p=*(int16_t*)(((void*)e)+16+mz*2);p+=4;}
if(((xcb_configure_request_event_t*)e)->value_mask&XCB_CONFIG_WINDOW_SIBLING){*(uint32_t*)p=((xcb_configure_request_event_t*)e)->sibling;p+=4;}
if(mz=((xcb_configure_request_event_t*)e)->value_mask&XCB_CONFIG_WINDOW_STACK_MODE)*(uint32_t*)p=((xcb_configure_request_event_t*)e)->stack_mode;
xcb_configure_window(d,((xcb_configure_request_event_t*)e)->window,((xcb_configure_request_event_t*)e)->value_mask,c);
if(mz){
p=xcb_query_tree_reply(d,xcb_query_tree_unchecked(d,rt),0);
int32_t*cl=p+32+((xcb_query_tree_reply_t*)p)->children_len*4;
for(y=p+32;y<cl;y++){
for(x=cs+1;x<cz;x++)
if(*x==*y)goto nono;
*y=0;
nono:;
}
x=cs;
for(y=p+32;y<cl;y++)
if(*y)*++x=*y;
free(p);
goto pocus;
}else goto main;
case XCB_MAP_REQUEST:
p=xcb_get_window_attributes_reply(d,xcb_get_window_attributes_unchecked(d,((xcb_map_request_event_t*)e)->window),0);
if(((xcb_get_window_attributes_reply_t*)p)->override_redirect)goto freeflush;
free(p);
for(;x>cs;x--)
if(*x==((xcb_map_request_event_t*)e)->window)goto noflush;
xcb_map_window(d,*cz++=((xcb_map_request_event_t*)e)->window);
goto hocus;
if(0)case XCB_MOTION_NOTIFY:xcb_configure_window(d,*x,mZ?XCB_CONFIG_WINDOW_WIDTH|XCB_CONFIG_WINDOW_HEIGHT:XCB_CONFIG_WINDOW_X|XCB_CONFIG_WINDOW_Y,(int32_t[]){mZ&&((xcb_motion_notify_event_t*)e)->root_x<=mx?:((xcb_motion_notify_event_t*)e)->root_x-mx,mZ&&((xcb_motion_notify_event_t*)e)->root_y<=my?:((xcb_motion_notify_event_t*)e)->root_y-my});
else case XCB_BUTTON_RELEASE:xcb_ungrab_pointer(d,XCB_CURRENT_TIME);
goto main;
case XCB_UNMAP_NOTIFY:unmap:goto*(x==cs?&&noflush:*x==((xcb_unmap_notify_event_t*)e)->window&&--cz>cs+1?&&stack:(x--,&&unmap));
}
mvsz:p=xcb_grab_pointer_reply(d,xcb_grab_pointer_unchecked(d,0,rt,XCB_EVENT_MASK_BUTTON_RELEASE|XCB_EVENT_MASK_POINTER_MOTION,XCB_GRAB_MODE_ASYNC,XCB_GRAB_MODE_ASYNC,XCB_NONE,XCB_NONE,XCB_CURRENT_TIME),0);
if(((xcb_grab_pointer_reply_t*)p)->status!=XCB_GRAB_STATUS_SUCCESS)goto freeflush;
free(p);
p=xcb_get_geometry_reply(d,xcb_get_geometry_unchecked(d,*y),0);
mx=((xcb_get_geometry_reply_t*)p)->x;
my=((xcb_get_geometry_reply_t*)p)->y;
free(p);
if(mZ=mz!=1)goto noflush;
p=xcb_query_pointer_reply(d,xcb_query_pointer_unchecked(d,rt),0);
mx=((xcb_query_pointer_reply_t*)p)->root_x-mx;
my=((xcb_query_pointer_reply_t*)p)->root_y-my;
freeflush:free(p);
goto noflush;
stack:mx=*x;
for(;x!=y;x+=x<y?:-1)*x=x[x<y?:-1];
*x=mx;
hocus:x=cz-1;
xcb_configure_window(d,*x,XCB_CONFIG_WINDOW_STACK_MODE,di);
pocus:xcb_set_input_focus(d,XCB_INPUT_FOCUS_POINTER_ROOT,*x,XCB_CURRENT_TIME);
if(!(mz&128))goto main;
kcode:switch(mz&=127){
case 1:case 3:goto mvsz;
case 23:case 49:
if(cz-cs<3)goto main;
y=tx;
tx=mz==23?(y!=cs+1?(y?:x)-1:x):!y||y==x?cs+1:y+1;
if(y&&y<cz-1)xcb_configure_window(d,*y,XCB_CONFIG_WINDOW_SIBLING|XCB_CONFIG_WINDOW_STACK_MODE,(uint32_t[]){y[mz==23?:-1],mz==23});
xcb_configure_window(d,*tx,XCB_CONFIG_WINDOW_STACK_MODE,di);
goto main;
case 25:goto*(p="firefox&",&&cmd);
case 26:goto*(p="thunar&",&&cmd);
case 27:goto*(p="dmenu_run&",&&cmd);
case 28:goto*(p="urxvt&",&&cmd);
case 38:goto*(p="xfce4-mixer&",&&cmd);
case 39:goto*(p="slock&",&&cmd);
case 53:full:
if(cz>cs+1)xcb_configure_window(d,*y,XCB_CONFIG_WINDOW_X|XCB_CONFIG_WINDOW_Y|XCB_CONFIG_WINDOW_WIDTH|XCB_CONFIG_WINDOW_HEIGHT,di);
goto main;
case 24:shut:
if(cz==cs+1)goto main;
if(tx)goto*(mz|=128,&&xt);
p=xcb_intern_atom_reply(d,xcb_intern_atom_unchecked(d,0,12,"WM_PROTOCOLS"),0);
mx=((xcb_intern_atom_reply_t*)p)->atom;
free(p);
p=xcb_intern_atom_reply(d,xcb_intern_atom_unchecked(d,0,16,"WM_DELETE_WINDOW"),0);
my=((xcb_intern_atom_reply_t*)p)->atom;
free(p);
p=xcb_get_property_reply(d,xcb_get_property_unchecked(d,0,*y,mx,XCB_ATOM_ATOM,0,-1),0);
xcb_send_event(d,0,*y,XCB_EVENT_MASK_NO_EVENT,(void*)(xcb_client_message_event_t[]){{.response_type=XCB_CLIENT_MESSAGE,.window=*y,.type=mx,.format=32,.data.data32={my,XCB_CURRENT_TIME}}});
for(mx=(((xcb_get_property_reply_t*)p)->value_len<<2)-4;mx>=0&&*(uint32_t*)(p+sizeof(xcb_get_property_reply_t)+mx)!=my;mx-=4);
if(mx==-1)killit:xcb_kill_client(d,*y);
free(p);
goto main;
case 9:goto*(cz==cs+1?&&main:(p=0,&&killit));
case 54:p="urxvt +sb -fn xft:monospace-16 -geometry 32x2+500+500 -e sh -c 'date;sleep 5'&";
cmd:system(p);
default:goto main;
}
}
AND here is what it does:
source code is configured to use the following keys:
WinKey - keycode 133 - Hold windows key and then press any of the following keys:
ESC - 9 - kills client window
q - 24 - asks to close client window normally
w - 25 - launches firefox
e - 26 - launches thunar
r - 27 - launches dmenu_run
t - 28 - lauches urxvt
a - 38 - launches xfce4-mixer
s - 39 - launches slock
x - 53 - maximizes window
c - 54 - shows time for 5 seconds
Tab - 23 - cycles forward
grave (~) - 49 cycles backward
WinKey + mouse button1 moves window
WinKey + mouse button3 resizes window
To compile from a terminal use this command:
gcc -o kcwm kcwm.c -std=gnu99 -lxcb
This is all I need from a window manager and it accomplishes all this with under 2 Meg of ram usage. It also closes windows gracefully, Allows proper memory usage, and allows firefox menus to show.
Tuesday, March 03, 2015
Tuesday, February 04, 2014
imac 27" and linux
It's only been a month with the new imac 27" I got for christmas. I LOVE the hardware, thin, quiet, doesn't get hot, beautiful non-reflective display etc. I believe Apple makes the best computer hardware and no other competitor even comes close including HP, Dell, and Samsung. Some think Apple prices are too high, however when you look at the full specs the 27" display is IPS and that kind of monitor would cost around $1000. The i5 processor, 8G ram, 2G vram nvidia 775, 1tb WD HD, Camera, Speakers, microphones, bluetooth keyboard, bluetooth mouse, etc., would be around $1000 for a pc. In an imac you get all that for $1800 so in a way its actually a bargain. Even though a high initial price.
Anyway after a month of doing almost everything possible in OSX including writing my own applescripts to automate things, installing Homebrew to install all my favorite linux apps, and running Linux in virtualbox. I still missed running linux native. So I downloaded and installed rEFInd and downloaded and installed all my favorite linux distributions. I thought Ubuntu would probably work best on this newest hardware but after trying several different distributions I found that Arch linux actually worked the best. I finally settled on an Arch linux distribution called Manjaro Linux. It even has EFI boot loader support and NVIDIA drivers included so install was quick. I am now writing this on Manjaro Linux and enjoying my iMac.
Some would say, why would you buy an Apple product that has a great OS based on UNIX (OSX) and then replace the OS? For me it's still about choice. 1. I can still not configure OSX to the level I want. 2. Apple wants to promote apps that cost you money (Many great free apps are not included in the Apple App store). 3. The performance I get from linux far exceeds what I can get from OSX.
Is OSX bad? no, its probably the best OS made to date. However, its "walled garden" approach means you have to do everything the Apple way and limits your true potential. The Apple way works and very good for those that want "just works" but very limiting to those that want "I can make it work better".
So in the end, I am a fan of Apple Hardware and appreciate their work to make an OS that works for the masses. However, the geek in me will not allow me to be content with an OS where I can't change the source code or modify every aspect to my liking. I know I am probably in the very minority of computer users these days but why spend
$1800 on the best hardware and settle for something less than gratifying. Now if only Apple would offer a Linux only version of iMac for $1600 :)
Anyway after a month of doing almost everything possible in OSX including writing my own applescripts to automate things, installing Homebrew to install all my favorite linux apps, and running Linux in virtualbox. I still missed running linux native. So I downloaded and installed rEFInd and downloaded and installed all my favorite linux distributions. I thought Ubuntu would probably work best on this newest hardware but after trying several different distributions I found that Arch linux actually worked the best. I finally settled on an Arch linux distribution called Manjaro Linux. It even has EFI boot loader support and NVIDIA drivers included so install was quick. I am now writing this on Manjaro Linux and enjoying my iMac.
Some would say, why would you buy an Apple product that has a great OS based on UNIX (OSX) and then replace the OS? For me it's still about choice. 1. I can still not configure OSX to the level I want. 2. Apple wants to promote apps that cost you money (Many great free apps are not included in the Apple App store). 3. The performance I get from linux far exceeds what I can get from OSX.
Is OSX bad? no, its probably the best OS made to date. However, its "walled garden" approach means you have to do everything the Apple way and limits your true potential. The Apple way works and very good for those that want "just works" but very limiting to those that want "I can make it work better".
So in the end, I am a fan of Apple Hardware and appreciate their work to make an OS that works for the masses. However, the geek in me will not allow me to be content with an OS where I can't change the source code or modify every aspect to my liking. I know I am probably in the very minority of computer users these days but why spend
$1800 on the best hardware and settle for something less than gratifying. Now if only Apple would offer a Linux only version of iMac for $1600 :)
Wednesday, December 04, 2013
My yearly update :}
Not updating as often as I used to which is probably a good thing :} I have tried several linux distributions and a few BSD distributions this year. Still love linux and the freedom and control you get. BSD is solid but more geared towards servers. I don't know why but I love getting into the nuts and bolts of my OS. I recently installed arch linux from the command line. It's about as low level as you can get. The nice thing about installing this way is you know the purpose of every file on your system and how to fix things if or when they break.
My favorite thing in linux is to download the source code of programs I like and change things to meet my needs. I'm getting good at reading C code and modifying parts of programs and recompiling. My computer rarely stays the same for two days in a row. There are days I've tried out 3 or 4 linux distributions. I feel sorry for my hard drive at times :}
Recently I discovered that someone involved with Tinycore linux had modified one of my favorite window managers called FLWM. They had moved the titlebar from the left side to the top and moved some buttons around. I decided to download the source code, I modified the config.h file to change the keybindings and compiled. It's now become my favorite window manager. Very fast and lean with unique mouse binds. Again that's the beauty of linux and open source is that anyone can modify or improve the original program.
I still hear from people that linux will never be mainstream, but what they don't know is it already is. So many mainstream programs borrow from linux or opensource software: Android, Webkit (Chrome and Safari browsers), CUPS (printing), Steam (gaming), etc. There are also many opensource programs that have been ported to windows and OSX i.e. The Gimp, VLC, 7zip, etc. Linux is heavily used in Healthcare, Scientific research, and servers. Linux may never be the OS for the average home user due to fact you can change everything including your user interface and there are 100's of distributions to choose from instead of one size fits all. Its opposite of the Apple locked down approach, which prevents the user from changing almost anything. OSX is popular because users that don't want to mess with their computers don't ever need to, things just work because there is only one way to do something. It's possible to install linux and configure it with a similar apple locked down interface, however that's not what Linux is about. It's about software choice and software freedom. I can change or modify even the source code of a program to make it how I choose. This will never be popular with the average user but it sure is with developers as they can simply borrow from someones program make a few changes and release. Some huge corporations are reaping the benefits.
My favorite thing in linux is to download the source code of programs I like and change things to meet my needs. I'm getting good at reading C code and modifying parts of programs and recompiling. My computer rarely stays the same for two days in a row. There are days I've tried out 3 or 4 linux distributions. I feel sorry for my hard drive at times :}
Recently I discovered that someone involved with Tinycore linux had modified one of my favorite window managers called FLWM. They had moved the titlebar from the left side to the top and moved some buttons around. I decided to download the source code, I modified the config.h file to change the keybindings and compiled. It's now become my favorite window manager. Very fast and lean with unique mouse binds. Again that's the beauty of linux and open source is that anyone can modify or improve the original program.
I still hear from people that linux will never be mainstream, but what they don't know is it already is. So many mainstream programs borrow from linux or opensource software: Android, Webkit (Chrome and Safari browsers), CUPS (printing), Steam (gaming), etc. There are also many opensource programs that have been ported to windows and OSX i.e. The Gimp, VLC, 7zip, etc. Linux is heavily used in Healthcare, Scientific research, and servers. Linux may never be the OS for the average home user due to fact you can change everything including your user interface and there are 100's of distributions to choose from instead of one size fits all. Its opposite of the Apple locked down approach, which prevents the user from changing almost anything. OSX is popular because users that don't want to mess with their computers don't ever need to, things just work because there is only one way to do something. It's possible to install linux and configure it with a similar apple locked down interface, however that's not what Linux is about. It's about software choice and software freedom. I can change or modify even the source code of a program to make it how I choose. This will never be popular with the average user but it sure is with developers as they can simply borrow from someones program make a few changes and release. Some huge corporations are reaping the benefits.
Friday, October 12, 2012
Slackware 14 released, must have it :}
Recently downloaded and installed Slackware 14 on my Desktop Dell i7 computer. Probably one of the easiest installs I've had with Slackware. Either I'm getting better at the command line or Slackware is getting easier. Probably both, however Slackware has one new added tool called "slackpkg". This makes it super easy to keep the distribution updated with security patches. Simply type at the command line as root: slackpkg update [return] slackpkg upgrade-all.
The other tool that has been in Slackware for a long time is called "pkgtool" When you run that as root, you can install new packages, change installation settings, and remove previously installed packages.
Another great tool for Slackware called "sbopkg" isn't part of the distribution but allows you to easily install software from a repository called SlackBuilds.org. It can be downloaded here: http://www.sbopkg.org/ Slackbuilds has most commonly used software programs that are actually tested for each slackware version. I like how I can browse the SlackBuilds web site or search directly from sbopkg.
I find that by using the above command line tools that Slackware is no harder to update or install new software than other common distributions like Debian or Fedora. The video driver installation programs from Nvidia and AMD also work well with Slackware. The beauty about Slackware is that they don't change things just to change things like most distributions. They update packages with each release, but the distribution tools and installation is almost the same as when I first installed it in the late '90s. Stability and Consistency is something rare these days in the world of beta software.
The other tool that has been in Slackware for a long time is called "pkgtool" When you run that as root, you can install new packages, change installation settings, and remove previously installed packages.
Another great tool for Slackware called "sbopkg" isn't part of the distribution but allows you to easily install software from a repository called SlackBuilds.org. It can be downloaded here: http://www.sbopkg.org/ Slackbuilds has most commonly used software programs that are actually tested for each slackware version. I like how I can browse the SlackBuilds web site or search directly from sbopkg.
I find that by using the above command line tools that Slackware is no harder to update or install new software than other common distributions like Debian or Fedora. The video driver installation programs from Nvidia and AMD also work well with Slackware. The beauty about Slackware is that they don't change things just to change things like most distributions. They update packages with each release, but the distribution tools and installation is almost the same as when I first installed it in the late '90s. Stability and Consistency is something rare these days in the world of beta software.
Saturday, May 28, 2011
Dual-boot OSX and LINUX on 2010 Mac Mini (4,1)
I've spent several nights loading various distributions of Linux on my Mac Mini. Since the Mini is based on Intel core2duo it should be easy for someone experienced with linux right? well...its not hard once you understand that the Mini does not use BIOS like PCs do. It uses EFI to boot and has a small 200MB partition that is used to install flash updates (sda1). The Hard drive uses GUID partitioning (GPT). Because of these new technologies and newer hardware, some distributions may not boot. The following covers how to install Ubuntu 11.04 and Debian testing, but will work for most distributions.
Lets start, the easiest and I think best way to dual-boot is to install a boot manager called rEFIt. rEFIt provides a nice icon menu at boot up in which you can select osx or Linux. It also has some nice tools. From OSX, download and install rEFIt. Reboot. Reboot again and the rEFIt screen should come up with icons for osx and various tools. Boot back into osx.
Next, download the 64 bit alternative ubuntu iso. You can use the standard 32 bit Ubuntu if you prefer, just remember to manually partition so that you can select the location for grub. If you prefer Debian, download Debian testing .iso (The stable version didn't recognize the mini's ethernet hardware). Use osx's disk utility to burn the .iso to a CD. Run Bootcamp and select a new partition size (the default 20GB should be fine) and then select "quit and install windows later". Make sure the newly created CD is in the drive and reboot.
When the rEFIt screen comes up select the CD-Rom icon. When the install Ubuntu/Debian screen comes up press F6 and select "nomodeset" or press e and type into boot options (debian). Otherwise you will get a blank screen due to the default nvidia driver that doesn't work fully on mini.
Begin the installation. When you get to the partitioning part, choose manual and then delete the Bootcamp partition. Create a / partition with ext4 and set the boot flag. If you have less than 4gig of ram also create a swap partition the size of your physical ram. You should now have an sda3 / partition and if you added a swap partition, it should be sda4. Towards the end of the installation you will need to install the grub boot loader. The only safe way for future updates is to install to the / or sda3 partition. Type in /dev/sda3 and finish the installation. Reboot...wait it wont reboot..we will fix that later. Hold down the power button for a few seconds to shut off. In case of errors..See Note 1 and 2 below.
Turn on mini and you should now have an icon for Linux on the rEFIt screen. Don't click it yet, instead click on the disk partition icon. Type Y to sync MBR. Click on the OSX icon to boot into osx. Reboot. Back at the rEFIt screen click the Linux icon and after a few seconds the grub menu should appear. Boot into linux. To fix the reboot issue, launch terminal and type "cd /etc/default" and then "sudo gedit grub". Find the line that reads GRUB_CMDLINE_LINUX_DEFAULT, and enter "reboot=pci" at the end of the line. Save the File and exit gedit. At the terminal prompt, type "sudo update-grub"
Now the fun part of configuring everything.. but thats too much to write here :) Enjoy the freedom that apple doesn't allow, such as tiling window managers, etc. P.S. Apple please add a reset button and CD eject button on next mac mini. It's not great having to boot into osx to eject a CD or to reboot by turning off power (i never thought i would miss CNTRL-ALT-DEL). But I guess I could have bought a PC :)
NOTE 1: If you accidently deleted or want to erase SDA1 (in case of corruption) you can restore it by resizing the Hard Drive using osx disk utility (good job apple).
NOTE 2: If you wrongfully installed grub to the MBR or sda, you can fix it by typing "sudo fdisk -u /dev/disk0" in osx terminal.
Lets start, the easiest and I think best way to dual-boot is to install a boot manager called rEFIt. rEFIt provides a nice icon menu at boot up in which you can select osx or Linux. It also has some nice tools. From OSX, download and install rEFIt. Reboot. Reboot again and the rEFIt screen should come up with icons for osx and various tools. Boot back into osx.
Next, download the 64 bit alternative ubuntu iso. You can use the standard 32 bit Ubuntu if you prefer, just remember to manually partition so that you can select the location for grub. If you prefer Debian, download Debian testing .iso (The stable version didn't recognize the mini's ethernet hardware). Use osx's disk utility to burn the .iso to a CD. Run Bootcamp and select a new partition size (the default 20GB should be fine) and then select "quit and install windows later". Make sure the newly created CD is in the drive and reboot.
When the rEFIt screen comes up select the CD-Rom icon. When the install Ubuntu/Debian screen comes up press F6 and select "nomodeset" or press e and type into boot options (debian). Otherwise you will get a blank screen due to the default nvidia driver that doesn't work fully on mini.
Begin the installation. When you get to the partitioning part, choose manual and then delete the Bootcamp partition. Create a / partition with ext4 and set the boot flag. If you have less than 4gig of ram also create a swap partition the size of your physical ram. You should now have an sda3 / partition and if you added a swap partition, it should be sda4. Towards the end of the installation you will need to install the grub boot loader. The only safe way for future updates is to install to the / or sda3 partition. Type in /dev/sda3 and finish the installation. Reboot...wait it wont reboot..we will fix that later. Hold down the power button for a few seconds to shut off. In case of errors..See Note 1 and 2 below.
Turn on mini and you should now have an icon for Linux on the rEFIt screen. Don't click it yet, instead click on the disk partition icon. Type Y to sync MBR. Click on the OSX icon to boot into osx. Reboot. Back at the rEFIt screen click the Linux icon and after a few seconds the grub menu should appear. Boot into linux. To fix the reboot issue, launch terminal and type "cd /etc/default" and then "sudo gedit grub". Find the line that reads GRUB_CMDLINE_LINUX_DEFAULT, and enter "reboot=pci" at the end of the line. Save the File and exit gedit. At the terminal prompt, type "sudo update-grub"
Now the fun part of configuring everything.. but thats too much to write here :) Enjoy the freedom that apple doesn't allow, such as tiling window managers, etc. P.S. Apple please add a reset button and CD eject button on next mac mini. It's not great having to boot into osx to eject a CD or to reboot by turning off power (i never thought i would miss CNTRL-ALT-DEL). But I guess I could have bought a PC :)
NOTE 1: If you accidently deleted or want to erase SDA1 (in case of corruption) you can restore it by resizing the Hard Drive using osx disk utility (good job apple).
NOTE 2: If you wrongfully installed grub to the MBR or sda, you can fix it by typing "sudo fdisk -u /dev/disk0" in osx terminal.
Monday, January 18, 2010
Another day, Another Launcher for Windows
I've made two more Windows launchers using Autohotkey. Both are activated by using the middle mouse button. The 8-ball or x in the middle hides the gui.
This one I call Picture Launcher:

Here is the graphic you need, copy it to where you put the script: Link
(right click on link, copy location and paste into address bar, then right click and save as)
Here is the source code: link
Here is the exe file: link
This one I call pie Launcher:

Here is the graphic you need, copy it to where you put the script: Link
(right click on link, copy location and paste into address bar, then right click and save as)
Here is the source code: Link
Here is the exe file: Link
This one I call Picture Launcher:

Here is the graphic you need, copy it to where you put the script: Link
(right click on link, copy location and paste into address bar, then right click and save as)
Here is the source code: link
Here is the exe file: link
This one I call pie Launcher:

Here is the graphic you need, copy it to where you put the script: Link
(right click on link, copy location and paste into address bar, then right click and save as)
Here is the source code: Link
Here is the exe file: Link
Wednesday, November 25, 2009
New programs for Windows
I have made a couple new programs lately with Autohotkey.
This one I call mini Radial:

It appears with middle mouse button under the mouse location and launches my favorite programs.
It uses this graphic: http://www.autohotkey.net/~netfun81/greenorb.png
If you get an error copy URL to address box of browser and paste. Save Graphic to the same folder as the .exe file.
Here is the Exe file: http://www.autohotkey.net/~netfun81/mini radial.exe
Here is the source code: http://www.autohotkey.net/~netfun81/mini%20radial.ahk
This program I call NirCmd Gui:

It is a front-end for NirCmd which is an excellent command line freeware tool.
You can get NirCmd here: http://www.nirsoft.net/utils/nircmd.html
Here is the gui .exe: http://www.autohotkey.net/~netfun81/nircmdgui.exe
Copy to the same folder as NirCmd.exe or copy NirCmd.exe to your windows folder.
Here is the source code: http://www.autohotkey.net/~netfun81/nircmdgui.ahk
Copy to the same folder as NirCmd.exe or copy NirCmd.exe to your windows folder.
This one I call mini Radial:

It appears with middle mouse button under the mouse location and launches my favorite programs.
It uses this graphic: http://www.autohotkey.net/~netfun81/greenorb.png
If you get an error copy URL to address box of browser and paste. Save Graphic to the same folder as the .exe file.
Here is the Exe file: http://www.autohotkey.net/~netfun81/mini radial.exe
Here is the source code: http://www.autohotkey.net/~netfun81/mini%20radial.ahk
This program I call NirCmd Gui:

It is a front-end for NirCmd which is an excellent command line freeware tool.
You can get NirCmd here: http://www.nirsoft.net/utils/nircmd.html
Here is the gui .exe: http://www.autohotkey.net/~netfun81/nircmdgui.exe
Copy to the same folder as NirCmd.exe or copy NirCmd.exe to your windows folder.
Here is the source code: http://www.autohotkey.net/~netfun81/nircmdgui.ahk
Copy to the same folder as NirCmd.exe or copy NirCmd.exe to your windows folder.
Tuesday, November 25, 2008
Arch Linux
It's been awhile again since I last posted. I finally got brave enough to load linux on my new Toshiba Satellite laptop. You know how it goes, when something is brand new you don't want to mess with it too much. Well it only took two months for the new to wear off and for me to feel comfortable installing linux and dual booting with Vista. What distribution did I pick? well you would think I would load Ubuntu since I had no idea if all the hardware was compatable, but since I'm a linux nutcase and never take the easy way out, I decided to install Arch Linux. Arch has become my favorite distribution over the last several months do to its simplicity and great package management. I like to think of it as Slackware with a good package manager that takes care of all the dependencies. However, Arch takes longer for me to install and setup than does Slackware since after installation all you have is core linux. You need to install Xorg, a window manager, firefox, pretty much every application you want.
How did my Toshiba fare? Sweeeeet! All the hardware was recognized. I have intel video, atheros wireless, and realtek audio. All of these are supported by linux. After many hours of installing software and setting everything up, I now have a fast, minimal, Arch setup with DWM as the window manger and Apwal as my launcher. I did have to edit the config.h file before compiling dwm to make it a little more mouse friendly (like close windows with middle click and start apwal with right click on clock).
I have noticed my laptop seems to run cooler running linux over Vista. I think its due to vistas constant thrashing of the hard drive to update its indexing and high memory requirements for the Aero look. I am really happy with Arch and love how easy it is to keep it updated. I find it easier to configure than Debian. Ubuntu and other easy to use distributions are not my cup of tea, since they work well until you need to get to the nuts and bolts and then you find they are messier than they need to be. I am not fond of distributions that are built on other distributions...since you find they sometimes deviate from the way the original distro set things up. Anyway thats all for now...next time I write, everything will probably have changed.
How did my Toshiba fare? Sweeeeet! All the hardware was recognized. I have intel video, atheros wireless, and realtek audio. All of these are supported by linux. After many hours of installing software and setting everything up, I now have a fast, minimal, Arch setup with DWM as the window manger and Apwal as my launcher. I did have to edit the config.h file before compiling dwm to make it a little more mouse friendly (like close windows with middle click and start apwal with right click on clock).
I have noticed my laptop seems to run cooler running linux over Vista. I think its due to vistas constant thrashing of the hard drive to update its indexing and high memory requirements for the Aero look. I am really happy with Arch and love how easy it is to keep it updated. I find it easier to configure than Debian. Ubuntu and other easy to use distributions are not my cup of tea, since they work well until you need to get to the nuts and bolts and then you find they are messier than they need to be. I am not fond of distributions that are built on other distributions...since you find they sometimes deviate from the way the original distro set things up. Anyway thats all for now...next time I write, everything will probably have changed.
Friday, September 19, 2008
Mouse Launch - small launcher for Windows
This is a small launcher program that I made to appear under the mouse pointer when the middle mouse button is clicked. The buttons are labeled with just one letter to keep the size very small.
Here is what it launches:
C: - ccleaner
E: - explorer
F: - firefox
I: - Internet Explorer
T: - task manager
V: - volume control
L: - logoff windows
R: - Restart windows
S: - Shutdown windows
Hotkeys:
Alt-Space: Hide all windows
Alt-X: Show hidden windows
Lctrl-wheelup: Maximize window
Lctrl-wheeldown: Minimize window
Lctrl-Mbutton: Close window
Lctrl-Rbutton: Switch to next open task
Here is the program: http://www.autohotkey.net/~netfun81/mouse%20launch.exe
Here is the source code: http://www.autohotkey.net/~netfun81/mouse%20launch.ahk
Here is a screenshot:
Here is what it launches:
C: - ccleaner
E: - explorer
F: - firefox
I: - Internet Explorer
T: - task manager
V: - volume control
L: - logoff windows
R: - Restart windows
S: - Shutdown windows
Hotkeys:
Alt-Space: Hide all windows
Alt-X: Show hidden windows
Lctrl-wheelup: Maximize window
Lctrl-wheeldown: Minimize window
Lctrl-Mbutton: Close window
Lctrl-Rbutton: Switch to next open task
Here is the program: http://www.autohotkey.net/~netfun81/mouse%20launch.exe
Here is the source code: http://www.autohotkey.net/~netfun81/mouse%20launch.ahk
Here is a screenshot:

Friday, September 12, 2008
KCmenu Vista Launcher
I've created a launcher program for Vista using Autohotkey. It has tabs for each category, shows running tasks, Has a clock and calendar. Has hotkey support for various functions such as controlling volume. It stays hidden in ur taskbar tray until you press the middle mouse button. Has a built in Boss Key for privacy.
This shows the main screen:

This shows the Help tab and some features:
You can download the program here: http://www.autohotkey.net/~netfun81/KCmenu%20Vista.exe
Here is the source code: http://www.autohotkey.net/~netfun81/KCmenu%20Vista.ahk
This shows the main screen:

This shows the Help tab and some features:

Here is the source code: http://www.autohotkey.net/~netfun81/KCmenu%20Vista.ahk
Wednesday, March 26, 2008
Linux update
It's been awhile since my last post. Since then, I have downloaded and tested about 100 linux distributions. My favorites are either based on Debian or Slackware. My all time favorite distribution has become Slackware, mainly because I love how I can so easily compile programs in it (includes most needed libraries) and that it keeps files where they should be (most unix like). Although I read that people think Slackware is hard to configure, i completely disagree. It is so easy to start/stop daemons (cd /etc/rc.d) (chmod -x rc.acpid), or tweak the inittab file to have it boot to a command prompt. It also comes with some great command line utilites that are more reliable than most gui utilities (pkgtool, netconfig, etc). Things just work with Slackware which I can't say for all the other distros. Debian is my second favorite with Ubuntu/Sidux third. Although I love mini distributions (Puppy, Zenwalk, Vector, Wolvix, NimbleX, DSL, etc) they don't work for me long-term because I like to install a lot of software and they are usually missing a lot of libraries and often make it difficult. For someone that doesn't install much, I would recommend Puppy Linux since it boots up and shuts down so fast and is light on memory.
As far as window managers go, Ive tried many from here: http://xwinman.org/ I prefer the light simple ones. Two of the latest I have tried are "Karmen" and "Awesome". I like both but for different reasons. Karmen is simple and doesn't have a config file or root menus so you need to use a launcher app with it. It does show running tasks by right clicking any titlebar or desktop. I like how it looks and its simplicity and stability. It manages windows in a very microsoft kind of way. In contrast, Awesome is a tiling window manager that has full keyboard support. It took me a couple hours of editing the .awesomerc file to get this one to my liking, but I eventually got the thing launching apps with mouse1,3 and Alt-mouse 1,2,3. Moving windows with Win-mouse1, sizing with Win-mouse3, and closing windows with Mouse2. You can really configure most anything with it. There are several other tiling window managers that are fun, such as Xmonad, Ion, and Wmii.
So I guess in summary I have wasted a lot of time loading and configuring software but its something I enjoy, and at times get tired of. I never use windows anymore and still believe Linux to be better due to its security, availability of free software, and configurability.
As far as window managers go, Ive tried many from here: http://xwinman.org/ I prefer the light simple ones. Two of the latest I have tried are "Karmen" and "Awesome". I like both but for different reasons. Karmen is simple and doesn't have a config file or root menus so you need to use a launcher app with it. It does show running tasks by right clicking any titlebar or desktop. I like how it looks and its simplicity and stability. It manages windows in a very microsoft kind of way. In contrast, Awesome is a tiling window manager that has full keyboard support. It took me a couple hours of editing the .awesomerc file to get this one to my liking, but I eventually got the thing launching apps with mouse1,3 and Alt-mouse 1,2,3. Moving windows with Win-mouse1, sizing with Win-mouse3, and closing windows with Mouse2. You can really configure most anything with it. There are several other tiling window managers that are fun, such as Xmonad, Ion, and Wmii.
So I guess in summary I have wasted a lot of time loading and configuring software but its something I enjoy, and at times get tired of. I never use windows anymore and still believe Linux to be better due to its security, availability of free software, and configurability.
Friday, August 24, 2007
Window Managers
Now that I've settled on a Linux distribution, I needed to get it all setup how I like it. The first choice is what window manager to use. I have tried them all (or a majority of them) from Desktop Enviroments like KDE, Gnome, XFCE, to minimal window managers like TWM, CTWM, FVWM, IceWM, Pekwm, Aewm, Fluxbox, Openbox, etc. Which one is the best? well it just depends on what you like. I like resource friendly, fast, and completely configurable. That rules out the desktop enviroments. So which of the minimal ones fit that bill? Several do, but most have annoyances like how the windows are placed or some things can't be configured like mouse operations or titlebar buttons.
So the winner for me, is OpenBox. It gives me everything i need in a window manager. It has good configurability, doesnt force me to use its taskbar or uneeded items, and is resource friendly. Add "apwal" launcher and bind it to the right mouse button and you have a fast light easy to use system.
So the winner for me, is OpenBox. It gives me everything i need in a window manager. It has good configurability, doesnt force me to use its taskbar or uneeded items, and is resource friendly. Add "apwal" launcher and bind it to the right mouse button and you have a fast light easy to use system.
Thursday, August 23, 2007
Linux update
I'm finally done with switching linux distributions. The one I settled with is Debian. Why you ask? For a couple reasons. 1. It just works. It boots fast and is solid and consistent. 2. Some other distributions I tried...including Fedora which I thought was excellent until I discovered that it and others had an issue when running Firefox where the whole OS would slow down. That is unacceptable to me and could be duplicated by visiting download.com. Debian doesn't have this issue.
Ubuntu is widely claimed as the "best distribution", but I disagree. Ubuntu is just Debian with a pretty face and some scars being hid under makeup. One of the main things about Ubuntu that made me wonder is it would ask for the user password when wanting root privileges. Hmmm, Debian asks for the root password. Whom do you trust for security? not to mention Ubuntu uses non-stable repositories, where Debian only uses stable ones unless you add others. There are some other differences, but to make this short Debian is clearly the winner. Ubuntu is only for beginners that don't know anything about Linux and once they learn they most likely will move on.
What makes Linux so great is that you don't have to settle for one distribution. Remember that "Linux" is just the kernal and that the rest of the OS is put together by the makers of the distribution. Sure there are similarities between all distributions but the subtleties are what makes the difference.
Ubuntu is widely claimed as the "best distribution", but I disagree. Ubuntu is just Debian with a pretty face and some scars being hid under makeup. One of the main things about Ubuntu that made me wonder is it would ask for the user password when wanting root privileges. Hmmm, Debian asks for the root password. Whom do you trust for security? not to mention Ubuntu uses non-stable repositories, where Debian only uses stable ones unless you add others. There are some other differences, but to make this short Debian is clearly the winner. Ubuntu is only for beginners that don't know anything about Linux and once they learn they most likely will move on.
What makes Linux so great is that you don't have to settle for one distribution. Remember that "Linux" is just the kernal and that the rest of the OS is put together by the makers of the distribution. Sure there are similarities between all distributions but the subtleties are what makes the difference.
Saturday, August 18, 2007
Linux Distributions
It's been awhile since I posted and I haven't spent much time with windows shells recently because I started using linux again. I originally started to use linux back in the redhat 4.1 days around '95. It was pretty basic back then and a lot of editing files had to be done. It has come a long way since then. I have tried several Linux distributions in the last few months. I started with Ubuntu since I heard it was the "best distribution" and then tried Absolute Linux, PClinuxOS, and Fedora linux. Out of this group I think Fedora wins hands down. It has the best installer of the group and best stability/security. All of the distributions have a lot of gui tools to help with administration tasks and pretty boot loaders, etc. I would rate these distributions in this order: 1. Fedora 2. Ubuntu 3. PClinuxOS 4. Absolute
My first criteria is stability, with the second being the ability to easily add applications, and third is looks. I think both Ubuntu and PClinuxOS were good looking distributions with fancy boot screens and backgrounds. However, they didn't quite live up to their looks when it came to performance and use.
I will probably try more distributions in the future and may change my mind :)
My first criteria is stability, with the second being the ability to easily add applications, and third is looks. I think both Ubuntu and PClinuxOS were good looking distributions with fancy boot screens and backgrounds. However, they didn't quite live up to their looks when it came to performance and use.
I will probably try more distributions in the future and may change my mind :)
Monday, April 24, 2006
Spring Update
Been awhile since I last posted so here is an update. A couple new shells have popped up on the web.
The first one is called Desktop Lite, it uses few resources ~4 meg and contains most of the things you need in a shell, task switching, tray, quicklaunch, access to programs etc. The real beauty of this app is that it is only one .exe file with no configuration...it doesnt get easier than that. Find it here: http://www.nymtec.com/
The second shell and one I find interesting is called Ciliegia, it is a scriptable shell and also light on resources. A bit hard to get started since you have to edit a text file and the documentation is all in Japanese :) but there are some samples to get you there. Just replace the login.scm file with your custom file (tweak the one from the examples folder) and you have a shell running. I really like how the tray is implemented in a popup menu. Find it here: http://nicht.s8.xrea.com/2006/02/ciliegia/
Here's proof that old shells never die :} I have always loved minimal shells.. there was one I liked a long time ago called EVWM, used to use it back in the win95/98 days. I was thinking about it so decided to download it again...was hard to find, but found a site that still had it here:
http://www.skinnables.org/apps.php?section=shells
the thing is it still works fine on XP... sure there are some missing XP tray icons, and the popup menu is loaded statically and not dynamically, also some startup programs dont load..but these are easy things to get around and I found I still like this shell. It is also extremely light in resources ~2-3 meg and just feels light and fast.
There is a lot of concern that the new Windows Vista will kill off the remaining shells being worked on...It might have some impact but I think there are still people like me out there that like changing their desktop and making a more minimal faster experience... At least I hope so :)
The first one is called Desktop Lite, it uses few resources ~4 meg and contains most of the things you need in a shell, task switching, tray, quicklaunch, access to programs etc. The real beauty of this app is that it is only one .exe file with no configuration...it doesnt get easier than that. Find it here: http://www.nymtec.com/
The second shell and one I find interesting is called Ciliegia, it is a scriptable shell and also light on resources. A bit hard to get started since you have to edit a text file and the documentation is all in Japanese :) but there are some samples to get you there. Just replace the login.scm file with your custom file (tweak the one from the examples folder) and you have a shell running. I really like how the tray is implemented in a popup menu. Find it here: http://nicht.s8.xrea.com/2006/02/ciliegia/
Here's proof that old shells never die :} I have always loved minimal shells.. there was one I liked a long time ago called EVWM, used to use it back in the win95/98 days. I was thinking about it so decided to download it again...was hard to find, but found a site that still had it here:
http://www.skinnables.org/apps.php?section=shells
the thing is it still works fine on XP... sure there are some missing XP tray icons, and the popup menu is loaded statically and not dynamically, also some startup programs dont load..but these are easy things to get around and I found I still like this shell. It is also extremely light in resources ~2-3 meg and just feels light and fast.
There is a lot of concern that the new Windows Vista will kill off the remaining shells being worked on...It might have some impact but I think there are still people like me out there that like changing their desktop and making a more minimal faster experience... At least I hope so :)
Tuesday, December 20, 2005
Shell news
Just a little update on Shell news. Litestep 24.7 final has been released. That's great news for this shell that it isnt forgotton. There have been a few awesome themes released in the last two weeks as well.. go to www.litestep.net and check out Obsidion and Fractal ice. A new shell has hit the scene as well..its call Nex and uses XML for configuration. Looks promising. Check it out at http://codedump.org.
Merry Xmas everyone!
Merry Xmas everyone!
Wednesday, July 20, 2005
Litestep again..
It seems the more new shells I try the more I return back to Litestep. Litestep really has evolved to a powerful shell expecially with the xmodules. Its still the only shell that lets you change everything about your desktop..so many others only give certain options. I have been busy scripting my own themes and hacking away at others to make them to my liking. Go to Litestep.net and download LaserDesk and Stained Glass Windows themes...two of my favorites right now. If you don't have Litestep, I recommend downloading the installer from http://www.ls-universe.info/download.php
Wednesday, May 18, 2005
msstyles
I noticed that they released a new UXTheme patcher v.4.0 for windowsXP so I downloaded it and started checking out the new styles for XP. There are some really nice ones on Customize.org here: http://www.customize.org/list/stylexp Check out the ones with the highest ranking.
Go check them out it really makes using XP a little more sweet. Even alt shells look better with new window buttons and skins.
Go check them out it really makes using XP a little more sweet. Even alt shells look better with new window buttons and skins.
Tuesday, May 03, 2005
BBlean
So I noticed that bblean 1.16 has been released. I downloaded it installed it...works great. Then I noticed that Grischka released bbiconbox. hmmm new plugin, sounds interesting. It's way more than that. It can become a tray, taskbar, and launcher. I configured it and now it has become my default shell. I no longer need the bbleanbar or any other bar. This is an awesome plugin. All you need is bblean with this plugin and you have a complete shell! If you are using bblean or Blackbox for windows...get this plugin, its great!
Sunday, May 01, 2005
Shell news
ok, so I'm a shell addict...yes I have tried every shell available to mankind. And its no secret the ones I prefer... Litestep, geoshell, emergedesktop, bluebox, bblean, Talisman, and Serenade. Yes there are differences between them, but each has a unique quality. I like litestep when I want to program and modify anything. I like emerge when I just want things to work. I prefer Talisman when I want eye candy. And I prefer bluebox when I want to multitask...just click the next button and the next window appears. But I must say that each are far better than the lame windows explorer shell. I can't remember the last time I was stuck using that POS. I can't believe the XP explorer shell still lets windows go under the taskbar when on top... geeez Anyway. I love alt shells about as much as my girlfriend...maybe a bit more :) And I made this page to help others to see the light. If you have a question or issue with any alt shell please let me know. Most likely I have ran into it before and can help you.
Subscribe to:
Posts (Atom)