Control Panel

From Fvwm Extensions (configs) Archive
Jump to navigation Jump to search
Image

Control Panel (modules) is made of FvwmButtons. A module that provides a window of buttons that can be used to build different types of panels. The window is rectangular and can be split into different rectangular buttons of varying sizes. Each button can contain text, icons, and even Swallow other applications. In this config, resize, move and tiling buttons are included. Tiling places windows on the screen into mutually non-overlapping frames.

## FILE 1: controlPanel.txt
## Modules

## Vertical/horizontal tiling

DestroyFun WTile
AddToFunc WTile
# + I FvwmRearrange -tile $0 -r -mn 2 -maximize 0 0 $[wa.width]p $[wa.height]p #(2 columns)
 + I FvwmRearrange -tile $0 -r -mn 3 -maximize 0 0 $[wa.width]p $[wa.height]p #(3 columns)

## De-tiling
DestroyFunc DeTile
AddToFunc DeTile
+ I All (CurrentPage, !Iconic, CirculateHit, !Sticky) Maximize Off
+ I WindowId $0 WarpToWindow 50 50

## Set small icons
SetEnv smallIcons $[HOME]/.fvwm/.fvwm/icons

Module FvwmButtons ControlPanelB

DestroyModuleConfig ControlPanelB: *
*ControlPanelB: Fore #ffffff
*ControlPanelB: Back #2b4e5e
*ControlPanelB: Geometry 360x40-0+3 #Geometry -0+0
*ControlPanelB: PressColorset 4
*ControlPanelB: Frame 0
*ControlPanelB: Rows 1
*ControlPanelB: BoxSize smart
*ControlPanelB: Font "xft:Sans:size=9:antialias=True"
*ControlPanelB: Padding 2 2
  
*ControlPanelB: (1x1, Icon $[smallIcons]/search-w.png, Action(Mouse 1) "Exec exec rofi -show" )

*ControlPanelB: (1x1, Icon $[smallIcons]/resize-w.png, Action Resize )
*ControlPanelB: (1x1, Icon $[smallIcons]/move-w.png, Action Move  )
*ControlPanelB: (1x1, Icon $[smallIcons]/tile-w.png, Action WTile)
*ControlPanelB: (1x1, Icon $[smallIcons]/detile-w.png, Action DeTile)
*ControlPanelB: (Title Min, Back #faa46e, Action Thumbnail )
*ControlPanelB: (Title Max, Back #85a772, Action Maximize 97 90 ) #width and hight
*ControlPanelB: (Title Close, Back #e55757, Action Destroy)
*ControlPanelB: (1x1, Icon $[smallIcons]/quit-w.png, Action \
    `Read $[HOME]/.fvwm/restartSDown.sys` )

# Style Setting
Style ControlPanelB !Borders, !Title, WindowListSkip, StaysOnTop, Sticky

HOW TO: Copy the code and paste it into your config. Or create FILE 1 and run the below line:
Read $[HOME]/.fvwm/controlPanel.txt