Fluxbox keys tutorial

If you are a fluxbox user, don't like automounting, like speeding up tasks....

The /usr/home/username/.fluxbox/keys allows you to map keyboard buttons to actions. Whether it's launcing applications, mounting drives, etc. That's up to you.

Here are some addtions to your /usr/home/username/.fluxbox/keys config file that will make working with usb drives, opening applications, showing the desktop, getting the root menu without a mouse, restarting a moused after it dying after a sleep etc. that can be handy. Edit as you see fit. Use your own paths, interfaces, and devices

Code:
# my additions
# Open rox
Mod4 r :Exec rox

# Open rox as Root
Control Mod4 r :Exec xterm +sb -T "Rox as Root" -g 40x10 -bg red -fg white -e sudo rox -n

# Open thunar
Mod4 e :Exec thunar

# Open thuar as Root
Control Mod4 e :Exec xterm +sb -T "Thunar as Root" -g 40x10 -bg red -fg white -e sudo thunar

# Open gedit
Mod4 g :Exec gedit

# Open gedit as Root
Control Mod4 g :Exec xterm +sb -T "Gedit as Root" -g 40x10 -bg red -fg white -e sudo gedit

# Open xterm
Mod4 x :Exec xterm

# Put machine to sleep
Mod4 s :Exec xterm +sb -T Sleep -g 40x10 -bg yellow -fg black -e sudo acpiconf -s3

# Shutdown -- see xrun.sh
Mod4 o :Exec xterm +sb -T Shutdown -g 40x10 -bg red1 -fg white -e sudo /path/to/xrun.sh "shutdown -p now"

# Mount USB drive FAT
Mod4 m :Exec xterm +sb -T "USB drive mount" -g 40x10 -bg blue -fg white -e sudo mount -t msdosfs /dev/da0s1 /home/username/usb

# Mount USB drive NTFS --requires ntfs-3g
Mod4 n :Exec xterm +sb -T "USB drive mount" -g 40x10 -bg blue -fg white -e sudo ntfs-3g /dev/da0s1 /home/username/usb

# Unmount USB drive
Mod4 u :Exec xterm +sb -T "USB drive UnMount" -g 40x10 -bg blue -fg white -e sudo umount /home/username/usb

# Open applications quickly
Mod4 t :Exec thunderbird
Mod4 f :Exec firefox3

# Minimizes all windows to panel -- do it again and they come back
Mod4 d :ShowDesktop

# Stop the network interface fast
Mod4 i :Exec xterm +sb -T "Network Down" -g 40x10 -bg blue -fg white -e sudo ifconfig dc0 down

# Bring it back up
Control Mod4 i :Exec xterm +sb -T "Network Up" -g 40x10 -bg blue -fg white -e sudo ifconfig dc0 up 

# Restart the mouse demon
Mod4 z :Exec xterm +sb -T "Restart Mouse" -g 40x10 -bg yellow -fg black -e sudo /etc/rc.d moused restart

# Opens the root menu -- navigate with arrow keys
Control Escape :RootMenu



xrun.sh -- don't forget to make it executable.
Code:
#!/bin/sh

$@
/bin/sh

I hope that this was of some use to some.
 
Back
Top