blob: 62d2f5055bb1c740b7340106aa319edddb6c0561 (
plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
#!/bin/sh
source /etc/xdm-xfreq/xdm-xfreq.rc
if [[ -v XDM_XFREQ_KEYB_LED_PATH ]]; then
$XDM_XFREQ_KEYB_LED_PATH $XDM_XFREQ_KEYB_LED_ARGS
fi
if [[ -v XDM_XFREQ_BG_COLOR_PATH ]]; then
$XDM_XFREQ_BG_COLOR_PATH $XDM_XFREQ_BG_COLOR_ARGS
fi
if [[ -v XDM_XFREQ_BG_WALLPAPER_PATH ]]; then
$XDM_XFREQ_BG_WALLPAPER_PATH $XDM_XFREQ_BG_WALLPAPER_ARGS
fi
if [[ -v XDM_XFREQ_CLOCK_PATH ]]; then
$XDM_XFREQ_CLOCK_PATH $XDM_XFREQ_CLOCK_ARGS & echo $! > $XDM_XFREQ_CLOCK_PID
fi
if [[ -v XDM_XFREQ_BUTTONS_PATH ]]; then
(
declare -i LOOP=1
while (( LOOP == 1 ))
do
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_MENU "";
declare -i RC=$?
case $RC in
99)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_SUBMENU ""
RC=$?
case $RC in
11)
if [[ -v XDM_XFREQ_SCREENSHOT_PATH ]]; then
$XDM_XFREQ_SCREENSHOT_PATH $XDM_XFREQ_SCREENSHOT_ARGS &
fi
;;
*)
if (( $RC > 128 )); then
LOOP=0
fi
;;
esac
;;
11)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_PWROFF ""
RC=$?
case $RC in
11)
$XDM_XFREQ_POWEROFF_CMD
;;
*)
if (( $RC > 128 )); then
LOOP=0
fi
;;
esac
;;
12)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_HALT ""
RC=$?
case $RC in
11)
$XDM_XFREQ_HALT_CMD
;;
*)
if (( $RC > 128 )); then
LOOP=0
fi
;;
esac
;;
13)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_REBOOT ""
RC=$?
case $RC in
11)
$XDM_XFREQ_REBOOT_CMD
;;
*)
if (( $RC > 128 )); then
LOOP=0
fi
;;
esac
;;
14)
$XDM_XFREQ_SLEEP_CMD
;;
15)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_RESCUE ""
RC=$?
case $RC in
11)
$XDM_XFREQ_RESCUE_CMD
;;
*)
if (( $RC > 128 )); then
LOOP=0
fi
;;
esac
;;
*)
if (( $RC > 128 )); then
LOOP=0
fi
;;
esac
done
) & echo $! > $XDM_XFREQ_BUTTONS_PID
fi
if [[ -v XDM_XFREQ_GUI_PATH ]]; then
$XDM_XFREQ_GUI_PATH $XDM_XFREQ_GUI_ARGS & echo $! > $XDM_XFREQ_GUI_PID
fi
|