ConfirmQuit with more buttons

Got an error posting in Fvwm-KISe topic, new guy!!

An error occurred: We’re sorry, but new users are temporarily limited to 3 replies in the same topic.

I modified FvwmScript-ConfirmQuit with device commands of @ceeslans exit-menu. Works on init and systemd. Has more buttons.

UseGettext
WindowTitle {ConfirmQuit}
WindowSize  520 80
Font "xft:Sans:style=Bold:size=10"
Init
 Begin
 End

Widget 1
Property
 LocaleTitle {Do you want to quit Fvwm?}
 Size  250 30
 Position 135 0
 Type ItemDraw
 Flags NoReliefString
Main
 Case message of
  SingleClic :
  Begin
  End
End

Widget 2
Property
 LocaleTitle {Cancel}
 Size 70 28
 Position 30 40
 Flags NoReliefString
 Type PushButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   Quit
  End
End

Widget 3
Property
 LocaleTitle {Logout}
 Size 70 28
 Position 120 40
 Flags NoReliefString
 Type PushButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   Do {Quit}
  End
End

Widget 4
Property
 LocaleTitle {Suspend}
 Size 70 28
 Position 210 40
 Flags NoReliefString
 Type PushButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   Do {Exec sudo pm-suspend}
  End
End

Widget 5
Property
 LocaleTitle {Restart}
 Size 70 28
 Position 310 40
 Flags NoReliefString
 Type PushButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   Do {Exec sudo reboot}
  End
End

Widget 6
Property
 LocaleTitle {Shutdown}
 Size 70 28
 Position 400 40
 Flags NoReliefString
 Type PushButton
 Value 1
Main
 Case message of
  SingleClic :
  Begin
   Do {Exec sudo halt}
  End
End

confirmQuit

1 Like

Great, InitCheck script now be removed from myExt. Also remove RestartShutdown button.
Did a test, works on Manjaro Linux with pm-utils package for Suspend. This Quit script to become Fvwm default.

1 Like