Posts Tagged ‘fluxbox’
Touchpad Config For Linux On A Macbook Pro
I bought my first Mac several months ago because I travel around the city a lot I wanted something smaller than my older 15 inch laptop. I used Macosx on it for sometime but found development too difficult. I guess I’ve been using Linux for so long now that I am so intune with the way it works, I was lost without it. My two main gripes was no good (from limited effort trying homebrew) package managers and less than ideal window manager. I realised more than ever how much I need Aptitude and Fluxbox to be productive.
So I installed Kubuntu 11.04 and felt at home again. However there were some things that didn’t work they way I needed them to. The touchpad is great and I could never go back to a system that doesn’t have one but with Linux it was way too sensitive. As someone else on the web pointed out, you could move the mouse without actually touching the device. This made typing emails and most typing tasks a real pain because the cursor would jump all over the place. However thanks to Texstar’s post I was able to correct this. I went with solution 4. I found that setting FingerHigh to a value of 50 was better than the recommended 30. Also on another forum I found an option to detect if your palm has brushed the touchpad and ignore the action.
My config now looks like this: /etc/X11/xorg.conf.d/50-synaptics.conf
Section "InputClass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" #Option "Device" "/dev/input/mouse0" Option "Protocol" "auto-dev" #Option "LeftEdge" "1700" #Option "RightEdge" "5300" #Option "TopEdge" "1700" #Option "BottomEdge" "4200" Option "FingerLow" "25" Option "FingerHigh" "50" Option "MaxTapTime" "180" Option "MaxTapMove" "220" Option "VertScrollDelta" "30" Option "MinSpeed" "1.48" Option "MaxSpeed" "2.00" Option "AccelFactor" "0.3830" Option "SHMConfig" "1" Option "VertTwoFingerScroll" "1" Option "HorizTwoFingerScroll" "1" Option "VertEdgeScroll" "1" Option "HorizEdgeScroll" "1" Option "TapButton1" "1" Option "TapButton2" "3" Option "TapButton3" "2" Option "PalmDetect" "1" EndSection
These settings can also be changed on the fly using synclient.
synclient FingerHigh=40
I found that this set-up helped a lot getting the mouse gestures in Firefox to respond better. Now I’m just waiting on the development of a native driver for the wireless card.
Update: The option that makes the biggest improvement is the PalmDetect. Setting this to 1 stops the touchpad from reacting when you’re plan slides across. The other settings should then be tweaked to suit your needs.
Using Multiple Window Managers Simultaneously
I discovered something completely new over the weekend; running multiple window managers simultaneously in your Linux environment. This came about because of a conflict I encountered between Fluxbox and an application I was trying to run, Bitcoin. It seems that two are somewhat incompatible.
After finding that Bitcoin ran fine in WindowMaker, it was pointed out to me that I could run WindowMaker inside my Fluxbox session by running a second X server. This saves me from having to logout of one window manager to use another, just for the sake of one application. I installed X window server Xephyr which then allowed me to run a second window manager which then allowed WindowMaker within.
Thanks to qole and his forum thread I was able to put the whole thing together with a basic script with a few minor modifications to suit my environment. My modified script follows:
#!/bin/sh ################################## #Change these two variables to the WM of your choice. export WMNAME="windowmakerWM" export WMEXEC="wmaker" ################################## export DISPLAY=:0 export TSLIB_TSDEVICE=/dev/input/event3 export TSLIB_CALIBFILE=/etc/pointercal export GTK_MODULES=libgtkstylus.so export PARWIN=`wmctrl -l | grep -i $WMNAME | awk '{print $1}'` wmctrl -i -r $PARWIN -b toggle,fullscreen xinit /bin/su chippy -c 'export DISPLAY=:1; $WMEXEC' -- /usr/bin/Xephyr :1 -br -screen 1000x700x16 -dpi 96 -parent $PARWIN +kb -ac export DISPLAY=:0
Running this script loads the X server and then runs a WindowMaker session within it. It’s quite like running a virtual machine, however you are not running another instance of an operating system, just another window within your current operating system with all your installed applications and environment as you would expect.
Sometimes I am reminded the power available to Linux and all things open source. This was another example.
Clever Shortcuts In Fluxbox
Fluxbox has been my window manager of choice for the last 18 months after switching from Window Maker and last week I discovered some great shortcuts by looking through the ~/.fluxbox/keys file. I haven’t seen these shortcuts discussed anywhere and because they make the most common window tasks extremely fast and easy, I thought I should share them.
Moving and resizing windows
- Moving a window – A window can be dragged around that screen by holding Mod1 (Alt key) and left clicking anywhere on the window. This avoids moving the mouse to the title bar each time.
- Resizing a window – You can resize a window by pressing Mod1 (Alt key) and right clicking on the window to resize that window. The resizing occurs from the nearest corner from where you clicked.
Tabs in windows
The windows also allow tabs. By middle clicking the title bar, you can drag the title bar of one window into the title bar of another window, creating a tab. You can move between the tabs by either clicking on the tab or by holding Mod4 (Windows key) and pressing a number on the keyboard. Eg. 1 for the first tab, 2 for the second, etc…
Extra: Switching between workspaces
I remap my keys file so that I can easily switch between my four workspaces. By modifying the config like below (in ~/.fluxbox/keys) I can now press Mod1 (Alt)+1 to goto workspace 1 and Mod1 (Alt)+2 to goto workspace 2.
# move to a specific workspace Mod1 1 :Workspace 1 Mod1 2 :Workspace 2 Mod1 3 :Workspace 3 Mod1 4 :Workspace 4
Windows can be moved to other workspaces by left clicking on the window (dragging the window slightly) and moving to a new workspace. The window will move with you.