-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmxfb-keybindings
executable file
·274 lines (249 loc) · 8.56 KB
/
mxfb-keybindings
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
#!/bin/bash
##This app was developed by MX Devs 2023 and released under GPLv3
### version 2310-01
TEXTDOMAINDIR=/usr/share/locale
export TEXTDOMAIN="mxfb-accessories"
source gettext.sh
### desktop file strings
#Translator Note - desktop file Name field
Name="$(gettext 'Shortcuts')"
#Translator Note - desktop file Comment field
Comment="$(gettext 'Shows frequently used key shortcuts')"
### buttons
export BTN_CLOSE=$(gettext "Close") ; BTN_CLOSE+='!window-close'
#Translator Note - button to open the fluxbox 'keys' file in text editor
export BTN_EDIT=$(gettext "Edit keys file") ; BTN_EDIT+='!edit'
###
#Translator Note - Window title, keybindings = shortcut keys
TITLE="$(gettext 'MX-Fluxbox Keybindings')"
CLASS="mxfb-keybindings"
ICONPATH=/usr/share/pixmaps/mxfb-keybindings.png
tempfile1=/tmp/kb-1.txt
### cleanup
trap "rm -f $tempfile1" EXIT
###Tab 1
fkey=$RANDOM
#Translator Note - opens mx-fluxbox manual
LINE_1B_1="$(gettext 'Manual - MX Fluxbox')"
#Translator Note - translate key names for your language if necessary
LINE_1B_2="$(gettext 'Ctrl F1')"
#Translator Note - opens mx manual
LINE_1C_1="$(gettext 'Manual - MX Linux')"
#Translator Note - translate key names for your language if necessary
LINE_1C_2="$(gettext 'Shift F1')"
#Translator Note - opens mx-tools application
LINE_1D_1="$(gettext 'MX-Tools')"
#Translator Note - translate key names for your language if necessary
LINE_1D_2="$(gettext 'Ctrl F5')"
#Translator Note - launches the screen magnifier
LINE_1E_1="$(gettext 'Screen Magnifier')"
#Translator Note - translate key names for your language if necessary
LINE_1E_2="$(gettext 'Ctrl Alt M')"
#Translator Note - go to the next virtual workspace
LINE_1F_1="$(gettext 'Next Workspace')"
#Translator Note - mouse action
LINE_1F_2="$(gettext 'Scroll Wheel Up')"
LINE_1F_3="$(gettext ' or')"
#Translator Note - translate key names for your language if necessary
LINE_1F_4="$(gettext 'Ctrl Alt') "
#Translator Note - go to the previous virtual workspace
LINE_1G_1="$(gettext 'Previous Workspace')"
#Translator Note - mouse action
LINE_1G_2="$(gettext 'Scroll Wheel Down')"
LINE_1G_3="$(gettext ' or')"
#Translator Note - translate key names for your language if necessary
LINE_1G_4="$(gettext 'Ctrl Alt') "
yad --plug=$fkey --tabnum=1 \
--form --columns=3 --scroll \
--field="$LINE_1B_1":LBL \
--field="$LINE_1C_1":LBL \
--field="$LINE_1D_1":LBL \
--field="$LINE_1E_1":LBL \
--field="$LINE_1F_1":LBL \
--field="$LINE_1F_3":LBL \
--field="$LINE_1G_1":LBL \
--field="$LINE_1G_3":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field="$LINE_1B_2":LBL \
--field="$LINE_1C_2":LBL \
--field="$LINE_1D_2":LBL \
--field="$LINE_1E_2":LBL \
--field="$LINE_1F_2":LBL \
--field="$LINE_1F_4":LBL \
--field="$LINE_1G_2":LBL \
--field="$LINE_1G_4":LBL \
>$tempfile1 &
###Tab 2
#Translator Note - opens application finder
LINE_2A_1="$(gettext 'All Apps')"
#Translator Note - translate key names for your language if necessary
LINE_2A_2="$(gettext 'Left Super')"
#Translator Note - opens run dialog
LINE_2B_1="$(gettext 'Run')"
#Translator Note - translate key names for your language if necessary
LINE_2B_2="$(gettext 'Ctrl F2')"
#Translator Note - opens file manager
LINE_2C_1="$(gettext 'File Manager')"
#Translator Note - translate key names for your language if necessary
LINE_2C_2="$(gettext 'Ctrl F3')"
#Translator Note - opens terminal
LINE_2D_1="$(gettext 'Terminal')"
#Translator Note - translate key names for your language if necessary
LINE_2D_2="$(gettext 'Ctrl Alt T')"
#Translator Note - opens screenshot app
LINE_2E_1="$(gettext 'Screen Capture')"
#Translator Note - translate key names for your language if necessary
LINE_2E_2="$(gettext 'Alt Q')"
yad --plug=$fkey --tabnum=2 \
--form --columns=3 --scroll \
--field="$LINE_2A_1":LBL \
--field="$LINE_2B_1":LBL \
--field="$LINE_2C_1":LBL \
--field="$LINE_2D_1":LBL \
--field="$LINE_2E_1":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field="$LINE_2A_2":LBL \
--field="$LINE_2B_2":LBL \
--field="$LINE_2C_2":LBL \
--field="$LINE_2D_2":LBL \
--field="$LINE_2E_2":LBL \
>>$tempfile1 &
###Tab 3
#Translator Note - window command
LINE_3A_1="$(gettext 'Minimize')"
#Translator Note - translate key names for your language if necessary
LINE_3A_2="$(gettext 'Alt F9')"
#Translator Note - window command
LINE_3B_1="$(gettext 'Maximize')"
#Translator Note - translate key names for your language if necessary
LINE_3B_2="$(gettext 'Alt F10')"
#Translator Note - window command
LINE_3C_1="$(gettext 'Close')"
#Translator Note - translate key names for your language if necessary
LINE_3C_2="$(gettext 'Alt F4')"
#Translator Note - window action
LINE_3D_1="$(gettext 'Move (drag titlebar)')"
LINE_3D_2="$(gettext 'Left click')"
#Translator Note - window action
LINE_3E_1="$(gettext 'Resize (drag lower R corner)')"
#Translator Note - translate key names for your language if necessary
LINE_3E_2="$(gettext 'Alt Right click')"
#Translator Note - window action
LINE_3F_1="$(gettext 'Hide All')"
#Translator Note - translate key names for your language if necessary
LINE_3F_2="$(gettext 'Alt D')"
#Translator Note - opens workspace menu
LINE_3G_1="$(gettext 'Workspace Menu (on desktop)')"
#Translator Note - mouse action
LINE_3G_2="$(gettext 'Middle click')"
#Translator Note - opens root menu
LINE_3H_1="$(gettext 'Root Menu (on desktop)')"
#Translator Note - mouse action
LINE_3H_2="$(gettext 'Right click')"
yad --plug=$fkey --tabnum=3 \
--form --columns=3 --scroll \
--field="$LINE_3A_1":LBL \
--field="$LINE_3B_1":LBL \
--field="$LINE_3C_1":LBL \
--field="$LINE_3D_1":LBL \
--field="$LINE_3E_1":LBL \
--field="$LINE_3F_1":LBL \
--field="$LINE_3G_1":LBL \
--field="$LINE_3H_1":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field="$LINE_3A_2":LBL \
--field="$LINE_3B_2":LBL \
--field="$LINE_3C_2":LBL \
--field="$LINE_3D_2":LBL \
--field="$LINE_3E_2":LBL \
--field="$LINE_3F_2":LBL \
--field="$LINE_3G_2":LBL \
--field="$LINE_3H_2":LBL \
>>$tempfile1 &
###Tab 4
#Translator Note - option for window tiling
LINE_4A_1="$(gettext 'One-Half')"
#Translator Note - translate key names for your language if necessary
LINE_4A_2="$(gettext 'Ctrl 1/2/3/4')"
LINE_4B_1="$(gettext ' or (on keypad)')"
#Translator Note - translate key names for your language if necessary
LINE_4B_2="$(gettext 'Alt 2,4,6,8')"
#Translator Note - option for window tiling
LINE_4C_1="$(gettext 'One-Quarter')"
#Translator Note - translate key names for your language if necessary
LINE_4C_2="$(gettext 'Ctrl 5/6/7/8')"
LINE_4D_1="$(gettext ' or (on keypad)')"
#Translator Note - translate key names for your language if necessary
LINE_4D_2="$(gettext 'Alt 1,3,7,9')"
#Translator Note - option for window tiling
LINE_4E_1="$(gettext 'One-Third')"
#Translator Note - translate key names for your language if necessary
LINE_4E_2="$(gettext 'Ctrl 9')"
#Translator Note - option for window tiling
LINE_4F_1="$(gettext 'Fullscreen')"
#Translator Note - translate key names for your language if necessary
LINE_4F_2="$(gettext 'Ctrl 0')"
yad --plug=$fkey --tabnum=4 \
--form --columns=3 --scroll \
--field="$LINE_4A_1":LBL \
--field="$LINE_4B_1":LBL \
--field="$LINE_4C_1":LBL \
--field="$LINE_4D_1":LBL \
--field="$LINE_4E_1":LBL \
--field="$LINE_4F_1":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field=":":LBL \
--field="$LINE_4A_2":LBL \
--field="$LINE_4B_2":LBL \
--field="$LINE_4C_2":LBL \
--field="$LINE_4D_2":LBL \
--field="$LINE_4E_2":LBL \
--field="$LINE_4F_2":LBL \
>>$tempfile1 &
###Main Tab
#Translator Note - short descriptive text on main window of mxfb-keybindings
TEXT1="$(gettext 'This tool displays default shortcuts ("keys") that are frequently used.')"
#Translator Note - tab label
TABTEXT_1="$(gettext 'GENERAL')"
#Translator Note - tab label
TABTEXT_2="$(gettext 'PROGRAMS')"
#Translator Note - tab label
TABTEXT_3="$(gettext 'WINDOWS')"
#Translator Note - tab label - tiling as in arrangement of non-overlapping windows on a screen
TABTEXT_4="$(gettext 'TILING')"
yad --notebook --key=$fkey --tab="<b>$TABTEXT_1</b>" --tab="<b>$TABTEXT_2</b>" --tab="<b>$TABTEXT_3</b>" --tab="<b>$TABTEXT_4</b>" --tab-pos=left \
--title="$TITLE" --class="$CLASS" --window-icon="$ICONPATH" \
--width=550 --height=450 --borders=10 --center --buttons-layout=spread \
--text="\n<b>$TEXT1</b>\n" --text-align=center \
--button="${BTN_EDIT}":7 --button="${BTN_CLOSE}":6
ret=$?
case $ret in
6 | 252 )
exit
;;
7 )
fpad $HOME/.fluxbox/keys
;;
esac