I'm Tux Geek, and I am here to show you cool Linux things.
My first cool Linux thing is FVWM. This is my desktop.
And this is my desktop with a menu and xterm open.
At the top is a trayer. nitrogen provides the background and the rest is FVWM.
Config files
My .fvwm2rc
# There are three places to specify startup commands. InitFunction, which
# runs only when you first start FVWM2; RestartFunction, which runs when
# you restart it, and StartFunction, which runs on startup AND restart.
# This sets my wallpaper
AddToFunc "StartFunction"
+ "I" Exec nitrogen --restore
+ "I" Module FvwmButtons -g -0-0
#+ "I" Module FvwmPager 0 0
# This starts up the Pager (bottom right) and a GKrellM (top right) when
# FVWM2 starts
AddToFunc "InitFunction"
+ "I" Exec xcompmgr -Ff
+ "I" Exec xscreensaver -nosplash
+ "I" Exec lxpolkit
+ "I" Exec trayer --edge top --widthtype request
#+ "I" Exec xclock -digital -strftime '%H:%M:%S' -fg cyan -bg steelblue -geom -10-275 -update 1
# For actions where you want more than one function to be performed with a
# single action.
AddToFunc "Move-or-Raise" "M" Move
+ "M" Raise
+ "C" Raise
+ "D" Maximize 100 100
AddToFunc "Move-or-Lower" "M" Move
+ "M" Lower
+ "C" Lower
+ "D" RaiseLower
AddToFunc "Move-or-Iconify" "M" Move
+ "D" Iconify
AddToFunc "Resize-or-Raise" "M" Resize
+ "M" Raise
+ "C" Raise
+ "D" RaiseLower
AddToFunc WindowListFunc
+ I WarpToWindow 50 50
# Mouse bindings
#
# First, for the mouse in the root window
# Button 1 gives the Window Ops menu
# Button 2 gives the WindowList (like Openbox)
# Button 3 gives the StartMenu menu (also like Openbox)
# I use the AnyModifier (A) option for the modifier field, so you can hold
# down any shift-control-whatever combination you want!
# Button Context Modifi Function
Mouse 1 R A Menu "FVWM"
Mouse 2 R A WindowList
Mouse 3 R A Menu xdg_menu
# Next up, mouse bindings for when you click on title bar buttons
# Button 0 means any mouse button will work
# The first button is on the left (as is shown by it being an odd no.)
# and opens up a menu
# The other buttons, in order, toggle the window between sticking and
# unsticking the window, toggle between current and full-screen size,
# iconify the window, close the window, and kill the whole process.
# Button Context Modif Function
Mouse 0 1 A Menu "Window-Ops2"
#Mouse 0 10 A Resize
Mouse 0 6 A Maximize 100 89
Mouse 0 8 A Iconify
Mouse 0 4 A Delete
Mouse 0 2 A Destroy
# This makes the borders of a window resize it with a left-click or move
# it with a right-click
Mouse 1 FS A Function "Resize-or-Raise"
Mouse 3 FS A Function "Move-or-Raise"
# Right-click in title moves window, left-click lowers it
Mouse 1 T A Function "Move-or-Raise"
Mouse 3 T A Lower
# Button 3 in the window, with the Modifier-1 key (usually alt or diamond)
# gives Raise-Lower.
Mouse 0 W M RaiseLower
# And now, the keyboard bindings:
# First, Cursor/Arrow Keys
# press Ctrl-Alt-Arrow anywhere, and scroll by 1 page
Key Left A MC Scroll -100 0
Key Right A MC Scroll +100 +0
Key Up A MC Scroll +0 -100
Key Down A MC Scroll +0 +100
# Other apps
Key F2 A M Exec gmrun
# First, we define the main menu appearances.
# ActiveFore is the colour of the font your cursor is hovering over.
# Foreground is the rest of the text
# This particular option sets normal text as black, and hilighted text grey
#MenuStyle * Font -adobe-helvetica-medium-r-*-*-20-*-*-*-*-*-*-*
MenuStyle * Font "xft:Bitstream Vera Sans:size=11:weight=bold"
MenuStyle * MenuFace Vgradient 1000 3 \
#008080 166 \
#00FFFF 333 \
#FFFFFF 500 \
#FFFFFF \
MenuStyle * ActiveFore, Hilight3DOff
# Now we define the actual menus and their contents.
# First off, the main menu. This will be opened when I hit the Start
# button or left-click on the wallpaper (Root)
read fvwm2-menu
DestroyMenu "FVWM"
AddToMenu "FVWM"
AddToMenu FVWM@tuxmenu.png@
+ "&Lock screen" Exec xscreensaver-command -lock
+ "&Screensaver options" Exec xscreensaver-command -prefs
+ "" Nop
+ "&Edit Config File" Exec geany /home/daniel/.fvwm2rc
+ "&Edit Theme" Exec geany /home/daniel/.themes/Lighter/gtk-2.0/gtkrc /home/daniel/.themes/Lighter/gtk-3.0/gtk.css
+ "" Nop
+ "&Change Theme" Exec lxappearance
+ "&Change Wallpaper" Exec nitrogen
+ "" Nop
+ "&Restart" Restart fvwm2
+ "&Logout" Quit
+ "" Nop
+ "Reboot" Exec pkexec reboot
+ "Shutdown" Exec pkexec poweroff
DestroyMenu "Window Ops"
AddToMenu "Window Ops"@tuxmenu.png@
+ "&Move" Function Move-or-Raise
+ "&Resize" Function Resize-or-Raise
+ "(Un)Stick" Stick
+ "" Nop
+ "Identify" Module FvwmIdent
+" Scroll Bar" Module FvwmScroll 2 2
+ "" Nop
+ "Ops2" Popup "Window-Ops2"
+ "" Nop
+ "Kill" Destroy
+ "&Close" Delete
AddToMenu "Window-Ops2"
AddToMenu Window-Ops2@tuxmenu.png@
+ "&Stick" Stick
+ "&Resize" Popup sizemenu
+ "&Move" Popup movemenu
AddToMenu "sizemenu"
AddToMenu sizemenu@tuxmenu.png@
+ "&Default" Resize 1024p 768p
+ "&Xterm" Resize 80c 24c
# Fullscreen in this context leaves some space to the right to keep the pager
# and GKrellM visible. It also moves it to the top left corner to make sure
# there's no overlap!
+ "&Fullscreen" ResizeMove 1147p 870p 0 0
AddToMenu "movemenu"
AddToMenu movemenu@tuxmenu.png@
+ "&Top left" Move 0 0
+ "Screen &1" MoveToPage 0 0
+ "Screen &2" MoveToPage 1 0
+ "Screen &3" MoveToPage 0 1
+ "Screen &4" MoveToPage 1 1
# This file sets the basic defaults for FVWM2 and open the programs I like
# to have running on startup
# First off, I tell it where to find icons and what font to use
#WindowFont -adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*
WindowFont "xft:Bitstream Vera Sans:size=9:weight=bold"
ImagePath .fvwm_icons
SetEnv fvwm_webbrowser midori
SetEnv fvwm_term urxvt
SetEnv fvwm_media_player xmms
SetEnv fvwm_video_player mplayer
# To make sure Numlock and Caps lock don't stop shortcut keys working, use
IgnoreModifiers L25
# To get a real-time view of the window I'm moving, rather than just
# lines, I set all windows that are smaller than the screen (100%) to be
# opaque.
OpaqueMoveSize 100
# Because switching screens just because the mouse stays at the edge of
# the screen too long is annoying, Edgescroll is set to 0.
EdgeScroll 0 0
EdgeResistance 100 0
# I like a 2x2 desktop, it gives me all the room I need
DeskTopSize 2x2
# This makes windows stick together when their edges are within 10 pixels
# of each other
SnapAttraction 10 All Screen
# This is for the pager!
#Colorset 2 Transparent Hilight #555555, Fore #000001, Back #FFFFFF
# Definitions used by the modules - almost all of these are the defaults
#------------------ Pager
*FvwmPagerBack teal
*FvwmPagerFore white
*FvwmPager: UseSkipList
*FvwmPager: Font none
*FvwmPagerHilight #c3c3ff
*FvwmPagerGeometry -0-0
*FvwmPagerLabel 0 Desktop
*FvwmPagerSmallFont 5x8
*FvwmPager: MiniIcons
*FvwmPager: DesktopScale 18
*FvwmPager: NoTitle
*FvwmPager: Pixmap none
#------------------ Buttons
*FvwmButtons: Rows 1
*FvwmButtons: Columns 4
*FvwmButtons: Back teal
*FvwmButtons: Padding 0 0
*FvwmButtons: ButtonGeometry 142x114
#*FvwmButtons: ButtonGeometry: 142x114
#*FvwmButtons: (142x114-0-0 Swallow "FvwmPager" "FvwmPager 0 0" Frame 0)
#*FvwmButtons: (1x1, icon fvwm.png, Action (Mouse1) Popup StartMenu, Frame 0)
#*FvwmButtons: (1x1, Swallow xclock 'exec xclock' Frame 0)
*FvwmButtons: (1x1, Swallow (UseOld, NoClose) xclock 'exec xclock -bg teal -fg white' Frame 0)
*FvwmButtons: (7x1, Swallow (UseOld, NoClose) fterm 'exec xterm -cm +sb -bg teal -fg white -name fterm' Frame 0)
*FvwmButtons: (Size 142 114, Swallow "FvwmPager" "FvwmPager 0 0" Frame 0)
#------------------ Identify
*FvwmIdentBack #000080
*FvwmIdentFore Yellow
*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
#------------------ FvwmWinList
*FvwmWinListBack #c3c3c3
*FvwmWinListFore Black
*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmWinListAction Click1 Iconify -1,Focus
*FvwmWinListAction Click2 Iconify
*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
*FvwmWinListUseSkipList
*FvwmWinListGeometry +0-1
# Colorsets used in various places
# This one is used by the various menus
Colorset 1 Translucent White 75 ActiveFore #555555, ForeGround #000000, BackGround #FFFFFF
Titlestyle height 20
TitleStyle Active Hgradient 201 2 \
#ffffff 100 \
#00FFFF 100 \
#ffffff -- flat
TitleStyle InActive Hgradient 201 2 \
#ffffff 100 \
#00FFFF 100 \
#ffffff -- flat
# The -- flat removes the border from the titlebar so there's no break on
# buttons
#
# And speaking of buttons, I have five in the titlebar:
# Any mouse button in the left button gives the window ops menu
# The first right title-bar button maximizes the window
# The second title-bar button minimises the window
# The third closes it, and the fourth kills it.
# Note the use of "Mouse 0" for AnyButton.
# The buttons are flat, again so they form an unbroken titlebar
# Odd button numbers appear on the left, evens on the right
# The button colours are self-explanatory, and you should be able to see that
# the inactive buttons go grey.
ButtonStyle 1 Active Pixmap blueball.png -- flat right
ButtonStyle 1 Inactive Pixmap greyblueball.png -- flat right
#ButtonStyle 10 Active Pixmap purpleball.png -- flat right
#ButtonStyle 10 Inactive Pixmap greyball.png -- flat right
ButtonStyle 6 Active Pixmap greenball.png -- flat right
ButtonStyle 6 Inactive Pixmap greygreenball.png -- flat right
ButtonStyle 8 Active Pixmap yellowball.png -- flat right
ButtonStyle 8 Inactive Pixmap greyyellowball.png -- flat right
ButtonStyle 4 Active Pixmap amberball.png -- flat right
ButtonStyle 4 Inactive Pixmap greyamberball.png -- flat right
ButtonStyle 2 Active Pixmap redball.png -- flat right
ButtonStyle 2 Inactive Pixmap greyredball.png -- flat right
# And now onto the style commands
#CursorStyle ROOT nice_arrow.xpm
Style "*" UseDecor FlatDecor
Style "*" ForeColor black
Style "*" BackColor white
# I hate windows grabbing focus away from the one I'm using. HATE it!
Style "*" GrabFocusOff
Style "*" HilightBack white
Style "*" MouseFocusClickRaises
# The best focus there is:
Style "*" SloppyFocus
# Icons clutter the desktop:
Style "*" NoIcon
Style "*" MWMFunctions
Style "*" DecorateTransient
Style "*" HintOverride
Style "*" MWMDecor
Style "*" RandomPlacement
Style "*" BorderWidth 10, HandleWidth 6
# "Bterm" is just an aterm started with the switch "-name bterm" added. It's for when I just want some text displayed on the screen. I run the bterm transparently, so it looks like just text displaying on the root screen.
Style "bterm" NoTitle, HandleWidth 0
Style "xclock*" NoTitle, Handlewidth 0
Style "Fvwm*" NoTitle, Sticky, WindowListSkip
Style "FvwmPager" NoTitle, StaysOnTop, HandleWidth 0
Style "FvwmButtons" NoTitle, StaysOnBottom, HandleWidth 0
Style "FvwmTaskBar" NoTitle, StaysOnBottom, HandleWidth 0
Style FvwmPager ParentalRelativity
Style "FvwmBanner" StaysOnTop
Style "gkrell*" StaysOnBottom, NoHandles, Sticky, WindowListSkip
Style "xclock*" StaysOnBottom, Sticky, Windowlistskip
Style "*irefox*" MiniIcon mini/firefox.png, EWMHMiniIconOverride
Style "*term*" MiniIcon mini/term.png, EWMHMiniIconOverride
My background



No comments:
Post a Comment