-
Notifications
You must be signed in to change notification settings - Fork 0
/
11-ShutdownFunc-ExitMenu
68 lines (59 loc) · 2.54 KB
/
11-ShutdownFunc-ExitMenu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
## vim: syntax=fvwm
## ┏━┓╻ ╻╻ ╻╺┳╸╺┳┓┏━┓╻ ╻┏┓╻┏━╸╻ ╻┏┓╻┏━╸ ┏━╸╺┳╸┏━╸
## ┗━┓┣━┫┃ ┃ ┃ ┃┃┃ ┃┃╻┃┃┗┫┣╸ ┃ ┃┃┗┫┃ ┣╸ ┃ ┃
## ┗━┛╹ ╹┗━┛ ╹ ╺┻┛┗━┛┗┻┛╹ ╹╹ ┗━┛╹ ╹┗━╸ ┗━╸ ╹ ┗━╸
##
## Not the standard way to exit FVWM, but works fine for me.
DestroyFunc ShutdownFunc
AddToFunc ShutdownFunc
+ I CleanupFunc
+ I Exec exec urxvt -n "shutdown.sh" -T "shutdown.sh" -b 15 \
-fn $[infostore.font_medium_bold] -fb $[infostore.font_medium_bold] \
-fg gray70 -bg gray9 -e $[FVWM_USERDIR]/bin/shutdown.sh $[0]
DestroyFunc RebootFunc
AddToFunc RebootFunc
+ I CleanupFunc
+ I Exec exec sudo /sbin/reboot
DestroyFunc CleanupFunc
AddToFunc CleanupFunc
+ I Echo **** CLEANUPFUNC ****
+ I SaveSettings
+ I PipeRead '[ "$[0]" = "poweroff" -o "$[0]" = "reboot" ] || echo "Break 1" ; '
+ I Deschedule $[infostore.psid_restart_processes]
+ I Deschedule $[infostore.psid_restart_fvwmanimate]
+ I Deschedule $[infostore.psid_check_restart_thumbnails]
+ I Deschedule $[infostore.psid_check_restart_clipboard]
+ I Deschedule $[infostore.psid_check_restart_fvwmclip]
+ I Deschedule $[infostore.psid_restart_thumbnails]
+ I KillModule Clipboard
+ I Exec pkill -f 'bin/perl.*Clipboard'
+ I All (!FvwmForm,!PanelStatusBar2) ThisWindow Close
+ I All ("FF-Confirm|FF-Okay|FF-TVSchedule") ThisWindow Close
+ I Exec sudo tomb close
#### EXITMENU
DestroyMenu ExitMenu
AddToMenu ExitMenu
+ "$[infostore.icon_mm_session_reboot]&Reboot" RebootFunc
+ "$[infostore.icon_mm_session_shutdown]&Shutdown" ShutdownFunc
+ "$[infostore.icon_mm_session_shutdown]&Timed Exit" FF-ExitTimer
DestroyFunc FF-ExitTimer
AddToFunc FF-ExitTimer
+ I DestroyModuleConfig FF-ExitTimer: *
+ I *FF-ExitTimer: WarpPointer
+ I *FF-ExitTimer: PadVText 25
+ I *FF-ExitTimer: Title "Exit Timer"
+ I *FF-ExitTimer: Line Center
+ I *FF-ExitTimer: Text "Delay:"
+ I *FF-ExitTimer: Input delay 8 "20"
+ I *FF-ExitTimer: Line Center
+ I *FF-ExitTimer: Text " "
+ I *FF-ExitTimer: Button quit "Start" ^Y
+ I *FF-ExitTimer: Command ExitTimer $(delay)
+ I *FF-ExitTimer: Text " "
+ I KillModule FvwmForm FF-ExitTimer
+ I Module FvwmForm FF-ExitTimer
DestroyFunc ExitTimer
AddToFunc ExitTimer I Exec exec \
urxvt -name ftimer -n "Exit_Timer" -T "Exit_Timer" -g 25x5 \
-fn $[infostore.dejavu14bold] -fb $[infostore.dejavu14bold] \
-e sh -c "ftimer -a $[0] && FvwmCommand \" ShutdownFunc\" "