Other Fvwm shutdown script

i made this function on Fvwm to shutdown/close session/etc,is pretty nice and fast
(the names are in spanish,but is simple to adapt to english)
for the notes,i put the images in a folder ~/Sist/tmp, possibly the function can be improved
for example,if the Feh command fails to run ,Fvwm waits forever for Feh to execute
and "hangs" itselfs, but the Wait argument is needed for execute it in order
(made the image...execute the module) without wait sometimes is in reverse order..:(
also i use the Schedule Fvwm command ,but is not what a want

the function:
Code:
DestroyFunc Sale
AddToFunc    Sale
+ I  Exec `import -silent -window root /home/juan/Sist/tmp/1.jpg && convert /home/juan/Sist/tmp/1.jpg -resize 40% -blur 0x5 /home/juan/Sist/tmp/2.jpg && feh  -ZNY -F /home/juan/Sist/tmp/2.jpg &`
+ I Wait feh
+ I Module FvwmButtons Sal -g 619x99+0+10

#cancel button
DestroyFunc Nosale
AddToFunc Nosale
+ I KillModule  FvwmButtons Sal
+ I Exec `killall -9 feh`

#restart Fvwm button
DestroyFunc Nosale2
AddToFunc Nosale2
+ I Exec `killall -9 feh`
+ I Restart



the module:

Code:
KillModule Sal

DestroyModuleConfig Sal: *
*Sal: Colorset 7
*Sal: Font "xft:Sans:Style=Bold:pixelsize=12:antialias=true:hinting=slight"
*Sal: Frame 1
*Sal: Padding 1 0
*Sal: Rows 1
*Sal: (2x1,Frame 0, Padding 1 1,Nop)
*Sal: (6x1,Frame 0, Padding 1 1,Icon $[imagen]/salir/restart-fvwm1.png,ActiveIcon $[imagen]/salir/restart-fvwm2.png ,ActiveTitle "Reiniciar Fvwm",Action Function Nosale2)
*Sal: (1x1,Frame 0, Padding 1 1,Nop)
*Sal: (5x1,Frame 0, Padding 1 1,Icon $[imagen]/salir/restart1.png,ActiveIcon $[imagen]/salir/restart2.png ,ActiveTitle "Reiniciar",Action Exec sudo shutdown -r now )
*Sal: (1x1,Frame 0, Padding 1 1,Nop)
*Sal: (5x1,Frame 0, Padding 1 1,Icon $[imagen]/salir/shut1.png,ActiveIcon $[imagen]/salir/shut2.png ,ActiveTitle "Apagar",Action Exec sudo shutdown -p now )
*Sal: (1x1,Frame 0, Padding 1 1,Nop)
*Sal: (5x1,Frame 0, Padding 1 1,Icon $[imagen]/salir/cancel1.png,ActiveIcon $[imagen]/salir/cancel2.png ,ActiveTitle "Cancelar",Action Function Nosale)
*Sal: (4x1,Frame 0, Padding 1 1,Nop)
*Sal: (2x1,Frame 0, Padding 1 1,Title "Salir?" )
*Sal: (5x1,Frame 0, Padding 1 1,Icon $[imagen]/salir/warning.png  )

and finally the style:

Code:
Style Sal !Title,RoundedCorners, !Handles, BorderWidth 2 HandleWidth 2 ,CirculateSkip, Sticky, WindowListSkip,InitialMapCommand  Move 50-50w 50-50w


the result is this:

Screenshot from 2017-08-12 09-21-51.png
Screenshot from 2017-08-12 09-22-03.png
 
Back
Top