HI,
i use a modified Version of the FvwmQuit-Script that comes with fvwm.
It’s all works fine, but my WindowPosition gets ignored :-/
Does anyone have an idea whats wrong?
The quit-Script:
WindowTitle {Quit}
WindowSize 400 235 # Taille
WindowPosition 500 500 # Position
Colorset 1
Font "shadow=0 se:xft:Verdena:size=8"
#ForeColor {black}
#BackColor {grey85}
#ShadowColor {grey55}
#HilightColor {grey100}
Init
Begin
WarpPointer 1
Set $ToDo = Halt
ChangeValue 6 0
ChangeValue 7 0
ChangeValue 9 0
ChangeValue 10 1
End
Widget 1
Property
Position 40 40
Flags NoReliefString NoFocus
Type ItemDraw
Icon shutdown.xpm
Main
Case message of
SingleClic :
Begin
End
End
Widget 2
Property
Size 370 170
Position 15 15
Type Rectangle
Main
Case message of
SingleClic :
Begin
End
End
Widget 3
Property
Title { What do you want to do? }
Position 100 8
Flags NoReliefString NoFocus
Type ItemDraw
Value 0
Font -adobe-helvetica-bold-r-*-*-12-*
Main
Case message of
SingleClic :
Begin
End
End
Widget 4
Property
Title {OK}
Size 60 28
Position 300 195
Flags NoReliefString
Type PushButton
Value 1
Main
Case message of
SingleClic :
Begin
If $ToDo == Logout Then
Do {Quit}
Else
Begin
If $ToDo == Restart Then
Do {Restart}
Else
Begin
If $ToDo == RestartWith Then
Do {Restart } (GetTitle 11)
Else
Begin
If $ToDo == Reboot Then
Begin
Do {Exec sync}
Do {Exec sudo /sbin/shutdown -r now}
Quit
End
Else
Begin
Do {Exec sync}
Do {Exec sudo /sbin/shutdown -h now}
Quit
End
End
End
End
End
End
Widget 5
Property
Title {Cancel}
Size 60 28
Position 40 195
Flags NoReliefString
Type PushButton
Value 1
Main
Case message of
SingleClic :
Begin
Quit
End
End
Widget 6
Property
Title {Logout}
Position 90 45
Flags NoReliefString
Type RadioButton
Value 0
Main
Case message of
SingleClic :
Begin
ChangeValue 7 0
# ChangeValue 8 0
ChangeValue 9 0
ChangeValue 10 0
Set $ToDo = Logout
End
End
Widget 7
Property
Title {Restart fvwm}
Position 90 75
Flags NoReliefString
Type RadioButton
Value 0
Main
Case message of
SingleClic :
Begin
ChangeValue 6 0
ChangeValue 9 0
ChangeValue 10 0
Set $ToDo = Restart
End
End
Widget 9
Property
Title {Restart the computer}
Position 90 105
Flags NoReliefString
Type RadioButton
Value 1
Main
Case message of
SingleClic :
Begin
ChangeValue 6 0
ChangeValue 7 0
ChangeValue 10 0
Set $ToDo = Reboot
End
End
Widget 10
Property
Title {Shut down the computer}
Position 90 135
Flags NoReliefString
Type RadioButton
Value 0
Main
Case message of
SingleClic :
Begin
ChangeValue 6 0
ChangeValue 7 0
ChangeValue 9 0
Set $ToDo = Halt
End
End
… and my fvwm2rc:
ImagePath /usr/local/share/icons:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/local/share/icons:/usr/share/icons:/usr/include/X11/bitmaps:/usr/X11R6/include/X11/pixmaps:/etc/X11/fvwm/images/icons:/etc/X11/fvwm/images
DeskTopSize 2x2
EdgeScroll 0 0
EdgeResistance 250 250
# Menu
Colorset 1 bg grey, fg black
Colorset 2 bg black, fg white
DestroyDecor default-decor
AddToDecor default-decor
+ ButtonStyle Reset
+ DefaultFont "shadow=0 se:xft:Verdena:size=9"
#+ ButtonStyle 1 Vector 5 20x40@1 80x40@1 80x60@0 20x60@0 20x40@1
#+ ButtonStyle 2 Vector 17 20x20@1 30x20@1 50x40@0 70x20@1 80x20@1 80x30@0 60x50@0 80x70@0 80x80@0 70x80@0 50x60@1 30x80@0 20x80@0 20x70@1 40x50@1 20x30@1 20x20@1
#+ ButtonStyle 4 Vector 5 25x75@0 75x75@0 75x25@0 25x25@1 25x75@1
#+ ButtonStyle 6 Vector 4 50x75@1 25x25@1 75x25@1 50x75@0
+ TitleStyle AllActive TiledPixmap title/title.png -- flat
+ TitleStyle AllInactive TiledPixmap title/title-in.png -- flat
+ TitleStyle Height 20
+ ButtonStyle 1 Active (Pixmap title/wops.png) Inactive (Pixmap title/wops-in.png) ActiveDown (Pixmap title/wops-down.png)
+ ButtonStyle 2 Active (Pixmap title/close.png) Inactive (Pixmap title/close-in.png) ActiveDown (Pixmap title/close-down.png)
+ ButtonStyle 4 Active (Pixmap title/max.png) Inactive (Pixmap title/max-in.png) ActiveDown (Pixmap title/max-down.png)
+ ButtonStyle 6 Active (Pixmap title/min.png) Inactive (Pixmap title/min-in.png) ActiveDown (Pixmap title/min-down.png)
+ ButtonStyle All -- flat usetitlestyle
Style "*" UseDecor default-decor
Style "*" HilightFore white
Style "*" HilightBack steelblue
Style "*" Color black/darkgrey
Style "*" BorderWidth 2
Style "*" HandleWidth 2
Style "*" MWMFunctions
Style "*" MWMBorder
Style "*" MWMDecor
Style "*" DecorateTransient
Style "*" SmartPlacement
Style "*" NoPPosition
Style "Fvwm*" NoTitle
Style "Fvwm*" WindowListSkip
Style "Fvwm*" CirculateSkip
Style "FvwmIconMan" Sticky
Style "FvwmPager" Sticky, StaysOnTop, HandleWidth 1
Style "StatusBar" Sticky, HandleWidth 0, StaysOnBottom, NeverFocus
Style "quit" Sticky, Title
Style "XMMS" UsePPosition, IgnoreRestack
Style "gkrellm" Sticky
Style "torsmo" Sticky, StaysOnBottom
Style "FvwmIdent" Title
Style "FvwmIdent" WindowListHit
Style "FvwmIdent" CirculateHit
# Add icons to some common programs
Style "Emacs" Icon gnu-animal.xpm, MiniIcon mini.emacs.xpm
Style "XTerm" Icon xterm-linux.xpm, MiniIcon mini.xterm.xpm
Style "Ghostview" Icon gv.xpm
Style "Gnuplot" Icon graphs.xpm
Style "XCalc" Icon xcalc.xpm, MiniIcon mini.calc.xpm
Style "XBff" Icon mail1.xpm, MiniIcon mini.mail.xpm
Style "Xman" Icon xman.xpm, MiniIcon mini-manual.xpm
Style "Xmag" Icon mag_glass.xpm, MiniIcon mini.xmag.xpm
Style "Mosaic" Icon Mosaic.xpm
Style "Netscape" Icon nscape.xpm, MiniIcon mini-nscape.xpm
Style "Xpaint" Icon xpaint.xpm, MiniIcon mini.xpaint.xpm
Style "Manual Page" Icon xman.xpm, MiniIcon mini-manual.xpm
Style "Xedit" Icon textedit.xpm, MiniIcon mini-edit.xpm
Style "ripperX" Icon ripperx.xpm
Style "ssh" Icon openssh.xpm, MiniIcon openssh.mini.xpm
Style "*" Icon default.xpm
#
# Section: Init and restart functions
#
Read /etc/X11/fvwm/init.fvwm2rc
#
# Section: Menus
#
MenuStyle "*" mwm, Font -adobe-helvetica-bold-r-*-*-12-*, MenuColorset 1
Read /etc/X11/fvwm/mymenu.fvwm2rc
DestroyMenu Window-Ops
AddToMenu Window-Ops "Alt-F1: Window Ops" Title
+ "Alt-F2: Main Menu" Popup /mymenu
+ "Alt-F3: Lower" Lower
+ "Alt-F4: Window List" WindowList
+ "Alt-F5: Previous" Prev
+ "Alt-F6: Next" Next
+ "Alt-F7: Move" Move
+ "Alt-F8: Resize" Resize
+ "Alt-F9: (De)Iconify" Iconify
+ "Alt-F10: (Un)Maximize to screen" Maximize 100 100
+ "Alt-F11: Raise" Raise
+ "Alt-F12: (Un)Stick" Stick
+ " (Un)Maximize vertical" Maximize 0 100
+ " (Un)Maximize horizontal" Maximize 100 0
+ "" Nop
+ " Destroy" Destroy
+ " Close" Close
#
# Section: Mouse bindings
#
# This section defines the mouse bindings, that is, all the things that
# can be done with the mouse.
#
#
# Each button gives a different menu from the background (root window).
#
Mouse 1 R A Menu /mymenu
Mouse 2 R A Menu Window-Ops
Mouse 3 R A WindowList
#
# Moving and resizing, depending on which part of the window
# you grab (T=title bar, S=side/top/bottom, F=corner).
#
Mouse 0 T A move-and-raise-or-raiselower
Mouse 0 W M -
Mouse 0 F A resize-or-raiselower
Mouse 0 S A resize-or-raiselower
# Mouseactions for Icons
Mouse 1 I A deiconify-and-focus-or-move
Mouse 3 I A Menu Window-Ops
#
# Buttons on the title bar (1,3,5,7,9 are on the left, 0,8,6,4,2 on
# the right side of the title bar). Note that the bindings here
# make more sense if the ButtonStyle's defined earlier are retained.
#
Mouse 0 1 A Menu Window-Ops
Mouse 0 2 A Close
Mouse 0 4 A Maximize 100 100
Mouse 0 6 A Iconify
#
# Section: Key bindings
#
# This section binds some actions to keys. The bindings have been inspired
# by MWM, Windows, and nightmares. Everything that these key bindings do,
# can be done without them. Therefore they should not be too much of a
# burden on new users, but it definitely _can_ be confusing to press a
# key by accident and have it do something completely unexpected.
#
Key Tab A M Next [CurrentPage !iconic] focus-and-raise
Key Tab A MS Prev [CurrentPage !iconic] focus-and-raise
Key Tab A CM Next [CurrentPage] deiconify-and-focus
Key Tab A CMS Prev [CurrentPage] deiconify-and-focus
Key Left A M Scroll -100 +0
Key Up A M Scroll +0 -100
Key Right A M Scroll +100 +0
Key Down A M Scroll +0 +100
Key F1 A M Popup Window-Ops
Key F2 A M Popup /mymenu
Key F3 A M Lower
Key F4 A M WindowList SelectOnRelease
Key F5 A M Prev
Key F6 A M Next
Key F7 A M Move
Key F8 A M Resize
Key F9 A M Iconify
Key F10 A M Maximize 100 100
Key F11 A M Raise
Key F12 A M Stick
#
# Section: Functions
#
# This section defines various functions. Not all of these are used by
# the default bindings, but they can be useful for a user who wants to
# customize things.
#
#
# The following functions operate on a window or menu. The
# names are systematic: foo means "do foo"; foo-or-bar means
# "do foo, if mouse is moving, bar if click"; and foo-or-bar-or-baz
# adds "baz, if double-clicked".
#
# "M" ist movement, C is click, "I" is immidiate, "D" is Doubleclicked
DestroyFunc deiconify-and-focus-or-move
AddToFunc deiconify-and-focus-or-move
+ "C" Iconify -1
+ "C" Focus
+ "M" Move
DestroyFunc deiconify-and-raise
AddToFunc deiconify-and-raise
+ "I" Iconify -1
+ "I" Raise
DestroyFunc focus-and-raise
AddToFunc focus-and-raise
+ "I" Focus
+ "I" Raise
DestroyFunc move-or-raiselower
AddToFunc move-or-raiselower
+ "M" Move
+ "C" RaiseLower
DestroyFunc move-and-raise-or-raiselower
AddToFunc move-and-raise-or-raiselower
+ "M" Move
+ "M" Raise
+ "C" RaiseLower
DestroyFunc move-or-raiselower-or-maximize-vertical
AddToFunc move-or-raiselower-or-maximize-vertical
+ "M" Move
+ "C" RaiseLower
+ "D" Maximize 0 100
DestroyFunc resize-or-raiselower
AddToFunc resize-or-raiselower
+ "M" Resize
+ "C" RaiseLower
#
# Authide
#
DestroyFunc FuncAutoEnter
AddToFunc FuncAutoEnter
+ I Autohide FvwmPager 0 500 SE
AddToFunc Autohide
+ I ThisWindow ($0) Deschedule $[w.id]
+ I TestRc (!Match) Deschedule -$[w.id]
+ I ThisWindow ($0) ThisWindow (shaded) AutohideShow $1 $3
+ I TestRc (!Match) All ($0, !shaded) AutohideHide $2 $3
AddToFunc AutohideShow
+ I Schedule $0 -$[w.id] WindowShade $1 off
+ I Schedule $0 -$[w.id] Deschedule $[w.id]
+ I Schedule $0 -$[w.id] Deschedule -$[w.id]
AddToFunc AutohideHide
+ I Schedule $0 $[w.id] WindowShade $1 on
+ I Schedule $0 $[w.id] Deschedule $[w.id]
+ I Schedule $0 $[w.id] Deschedule -$[w.id]
AddToFunc StartFunction
+ I Module FvwmAuto FvwmAutohide -menter FuncAutoEnter
#
# Configure the FvwmPager module
#
*FvwmPager: Back SlateGrey
*FvwmPager: Fore Black
*FvwmPager: Font none
*FvwmPager: Hilight SlateBlue4
*FvwmPager: Geometry -0-0
*FvwmPager: SmallFont -*-times-medium-r-*-*-*-80-*-*-*-*-*-*
*FvwmPager: DeskTopScale 32
#*FvwmPager: MiniIcons
#*FvwmPager: Balloons
#
# Configure the FvwmScript module
#
*FvwmScript: Path /etc/X11/fvwm/scripts
#
# Configure StatusBar
#
*StatusBar: Geometry 120x30-0+0
*StatusBar: Colorset 2
*StatusBar: Rows 1
*StatusBar: Columns 3
*StatusBar: Frame 0
*StatusBar: Padding 0 0
#*StatusBar: (2x2, Icon firefox48.png, Action(Mouse 1) 'Exec exec mozilla-firefox')
#*StatusBar: (2x2, Icon sylpheed-claws.png, Action(Mouse 1) 'Exec exec sylpheed-claws')
#*StatusBar: (2x2, Icon xmms48.png, Action(Mouse 1) 'Exec exec xmms')
*StatusBar: ( 1x1, Swallow (Kill) "battery" "FvwmScript battery")
*StatusBar: ( 1x1, Swallow (Kill) "mail" "FvwmScript mail")
*StatusBar: ( 1x1, Swallow (Kill) "clock" "FvwmScript clock")
#*StatusBar: ( 3x1, Swallow (Kill) "date" "FvwmScript date", Action(Mouse 1) 'exec exec plan')
Style FvwmQuit StaysOnTop, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip, HandleWidth 1, BorderWidth 1, NeverFocus, Layer 10, !Handles
*FvwmQuit: BoxSize fixed
*FvwmQuit: Colorset 1
*FvwmQuit: Rows 19
*FvwmQuit: Columns 40
*FvwmQuit: Geometry 220x100+520+412
*FvwmQuit: Padding 0 0
*FvwmQuit: Frame 0
*FvwmQuit: Font "shadow=0 se:xft:Verdena:size=8"
*FvwmQuit: (36x5, Title " What do you want to do?")
*FvwmQuit: (3x3+37+0, ActionOnPress, Icon close.png, ActiveIcon close.png, Action(Mouse 1) `KillModule FvwmButtons FvwmQuit`)
*FvwmQuit: (10x8+2+6, ActionOnPress, Icon logout_inactive.png, ActiveIcon logout.png, Action(Mouse 1) `Quit`)
*FvwmQuit: (10x8+15+6, ActionOnPress, Icon reboot_inactive.png, ActiveIcon reboot.png, Action(Mouse 1) `exec sudo /sbin/shutdown -r now`)
*FvwmQuit: (10x8+28+6, ActionOnPress, Icon shutdown_inactive.png, ActiveIcon shutdown.png, Action(Mouse 1) `exec sudo /sbin/shutdown -h now`)
*FvwmQuit: (10x5+2+14, Title Logout)
*FvwmQuit: (10x5+15+14, Title Reboot)
*FvwmQuit: (10x5+28+14, Title Shutdown)