-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconfig-install.sh
executable file
·459 lines (316 loc) · 17.7 KB
/
config-install.sh
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
#!/usr/bin/env bash
set -e
################################################################################
### Head: gnome
##
gnome_config_install () {
gnome_set_wallpaper
gnome_set_theme
gnome_set_keybindings_start_here
gnome_set_keybindings_show_desktop
gnome_set_keybindings_switch_windows
gnome_set_keybindings_win_close
gnome_set_keybindings_toggle_fullscreen
gnome_set_keybindings_toggle_maximized
gnome_set_keybindings_minimize
gnome_set_keybindings_begin_move
gnome_set_keybindings_begin_resize
gnome_set_keybindings_toggle_above
gnome_set_keybindings_toggle_shaded
gnome_set_keybindings_raise_or_lower
gnome_set_keybindings_toggle_tiled
gnome_set_keybindings_about_workspace
gnome_set_keybindings_custom
}
gnome_set_wallpaper () {
## Wallpaper
gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/Manhattan_Sunset_by_Giacomo_Ferroni.jpg'
gsettings set org.gnome.desktop.screensaver picture-uri 'file:///usr/share/backgrounds/Raindrops_On_The_Table_by_Alex_Fazit.jpg'
}
gnome_set_theme () {
## Theme Type
## $ gsettings list-recursively | grep 'org.gnome.metacity.theme'
# org.gnome.metacity.theme name ''
# org.gnome.metacity.theme type 'gtk'
##
#gsettings set org.gnome.metacity.theme type 'gtk'
## Theme
## $ gsettings list-recursively | grep 'theme' | grep 'org.gnome.desktop'
gsettings set org.gnome.desktop.wm.preferences theme 'NumixBlue'
gsettings set org.gnome.desktop.interface gtk-theme 'NumixBlue'
gsettings set org.gnome.desktop.interface icon-theme 'Numix'
gsettings set org.gnome.desktop.interface cursor-theme 'breeze_cursors'
## $ gsettings list-recursively | grep 'theme' | grep 'org.gnome.desktop'
## $ gsettings list-recursively | grep 'org.gnome.desktop' | grep 'theme'
# org.gnome.desktop.wm.preferences theme 'NumixBlue'
# org.gnome.desktop.interface cursor-theme 'breeze_cursors'
# org.gnome.desktop.interface icon-theme 'Numix'
# org.gnome.desktop.interface gtk-theme 'NumixBlue'
# org.gnome.desktop.interface gtk-key-theme 'Default'
# org.gnome.desktop.sound theme-name 'ubuntu'
##
}
gnome_set_keybindings_start_here () {
## gsettings list-recursively | grep 'org.gnome.desktop' | sort -u
## Disable Only Win Key Binding
#gsettings set org.gnome.mutter overlay-key 'Super_L'
gsettings set org.gnome.mutter overlay-key ''
## Toggle the activities overview
#gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Alt>F1', '<Control><Alt>a', '<Control><Super>a']"
## Show all applications
#gsettings set org.gnome.shell.keybindings toggle-application-view "['<Super>a', '<Shift><Alt>a']"
#gsettings set org.gnome.shell.keybindings toggle-application-view "['<Super>a']"
gsettings set org.gnome.shell.keybindings toggle-application-view "['<Control><Alt>a', '<Control><Super>a']"
## Show the activities overview
#gsettings set org.gnome.shell.keybindings toggle-overview "['<Super>s', '<Shift><Alt>r']"
#gsettings set org.gnome.shell.keybindings toggle-overview "['<Super>s']"
gsettings set org.gnome.shell.keybindings toggle-overview "['<Control><Alt>s', '<Control><Super>s', '<Super>c']"
}
gnome_set_keybindings_show_desktop () {
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Control><Alt>d', '<Control><Super>d', '<Super>d']"
}
gnome_set_keybindings_switch_windows () {
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Super>a']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Super>s']"
}
gnome_set_keybindings_win_close () {
gsettings set org.gnome.desktop.wm.keybindings close "['<Alt>F4', '<Shift><Alt>q', '<Super>q']"
}
gnome_set_keybindings_toggle_fullscreen () {
## Fullscreen
gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['F11', '<Super>o', '<Super>f']"
}
gnome_set_keybindings_toggle_maximized () {
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Alt>F10', '<Super>u', '<Super>w']"
}
gnome_set_keybindings_minimize () {
#gsettings set org.gnome.desktop.wm.keybindings minimize "['<Super>h']"
gsettings set org.gnome.desktop.wm.keybindings minimize "['<Super>i', '<Super>x']"
}
gnome_set_keybindings_begin_move () {
gsettings set org.gnome.desktop.wm.keybindings begin-move "['<Alt>F7', '<Super>e']"
}
gnome_set_keybindings_begin_resize () {
gsettings set org.gnome.desktop.wm.keybindings begin-resize "['<Alt>F8', '<Super>r']"
}
gnome_set_keybindings_toggle_above () {
#gsettings set org.gnome.desktop.wm.keybindings always-on-top "['<Super>t']"
gsettings set org.gnome.desktop.wm.keybindings toggle-above "['<Super>t']"
}
gnome_set_keybindings_toggle_shaded () {
gsettings set org.gnome.desktop.wm.keybindings toggle-shaded "['<Super>y']"
}
gnome_set_keybindings_raise_or_lower () {
gsettings set org.gnome.desktop.wm.keybindings raise-or-lower "['<Super>m']"
}
gnome_set_keybindings_toggle_tiled () {
#gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver "'<Super>l'"
#gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver "'<Super>]'"
gsettings set org.gnome.mutter.keybindings toggle-tiled-left "['<Super>Left', '<Super><Control>h']"
gsettings set org.gnome.mutter.keybindings toggle-tiled-right "['<Super>Right', '<Super><Control>l']"
}
gnome_set_keybindings_about_workspace () {
## gsettings list-recursively | grep 'org.gnome.desktop.wm.keybindings switch-to-workspace'
## Workspace
gsettings set org.gnome.mutter dynamic-workspaces true
#gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 4
#gsettings set org.gnome.desktop.wm.preferences num-workspaces 10
#gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-last "['<Super>End', '<Alt>z']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Super>Page_Up', '<Control><Alt>Up', '<Alt>k']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Super>Page_Down', '<Control><Alt>Down', '<Alt>j']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Control><Alt>Left', '<Alt>h']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Control><Alt>Right', '<Alt>l']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Alt>1']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Alt>2']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Alt>3']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Alt>4']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Alt>5']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6 "['<Alt>6']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7 "['<Alt>7']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-8 "['<Alt>8']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-9 "['<Alt>9']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-10 "['<Alt>0']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Shift><Alt>exclam']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Shift><Alt>at']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Shift><Alt>numbersign']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Shift><Alt>dollar']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Shift><Alt>percent']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6 "['<Shift><Alt>asciicircum']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7 "['<Shift><Alt>ampersand']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8 "['<Shift><Alt>asterisk']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-9 "['<Shift><Alt>parenleft']"
#gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-10 "['<Shift><Alt>parenright']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Alt><Super>1']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Alt><Super>2']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Alt><Super>3']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Alt><Super>4']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Alt><Super>5']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6 "['<Alt><Super>6']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7 "['<Alt><Super>7']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8 "['<Alt><Super>8']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-9 "['<Alt><Super>9']"
# gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-10 "['<Alt><Super>10']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Super>1']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Super>2']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Super>3']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Super>4']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Super>5']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6 "['<Super>6']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7 "['<Super>7']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8 "['<Super>8']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-9 "['<Super>9']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-10 "['<Super>10']"
}
gnome_set_keybindings_custom () {
## Custom Keybindings
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/tilix/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal-lefthand/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-run/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-window/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-drun/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/editor/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/browser/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files-1/']"
## Tilix
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/tilix/name "'Tilix'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/tilix/command "'tilix --quake'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/tilix/binding "'<Shift><Alt>t'"
## Terminal
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal/name "'Terminal'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal/command "'sakura -m'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal/binding "'<Alt>Return'"
## Terminal (Left Hand)
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal-lefthand/name "'Terminal-LeftHand'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal-lefthand/command "'sakura -m'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal-lefthand/binding "'<Shift><Alt>a'"
## Rofi Show Run
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-run/name "'Rofi-Show-Run'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-run/command "'rofi -show run'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-run/binding "'<Shift><Alt>r'"
## Rofi Show Window
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-window/name "'Rofi-Show-Window'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-window/command "'rofi -show window -show-icons'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-window/binding "'<Shift><Alt>w'"
## Rofi Show Drun
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-drun/name "'Rofi-Show-Drun'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-drun/command "'rofi -show drun -show-icons'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-show-drun/binding "'<Shift><Alt>d'"
## Editor
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/editor/name "'Editor'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/editor/command "'gedit'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/editor/binding "'<Shift><Alt>e'"
## Browser
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/browser/name "'Browser'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/browser/command "'firefox'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/browser/binding "'<Shift><Alt>b'"
## Files
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files/name "'Files'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files/command "'pcmanfm-qt'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files/binding "'<Shift><Alt>f'"
## Files-1
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files-1/name "'Files-1'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files-1/command "'nautilus'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/files-1/binding "'<Shift><Alt>g'"
}
##
### Tail: gnome
################################################################################
################################################################################
### Head: pcmanfm-qt
##
pcmanfm_qt_config_install () {
mkdir -p "$HOME/.config/pcmanfm-qt/default"
echo "mkdir -p $HOME/.config/pcmanfm-qt/default"
cp ./config/pcmanfm-qt/default/settings.conf "$HOME/.config/pcmanfm-qt/default/settings.conf"
echo "cp ./config/pcmanfm-qt/default/settings.conf $HOME/.config/pcmanfm-qt/default/settings.conf"
}
##
### Tail: pcmanfm-qt
################################################################################
################################################################################
### Head: rofi
##
rofi_config_install () {
mkdir -p $HOME/.config/rofi
echo "mkdir -p $HOME/.config/rofi"
cp ./config/rofi/config $HOME/.config/rofi/config
echo "cp ./config/rofi/config $HOME/.config/rofi/config"
}
##
### Tail: rofi
################################################################################
################################################################################
### Head: sakura
##
sakura_config_install () {
mkdir -p "$HOME/.config/sakura"
echo "mkdir -p $HOME/.config/sakura"
cp "./config/sakura/sakura.conf" "$HOME/.config/sakura/sakura.conf"
echo "cp ./config/sakura/sakura.conf $HOME/.config/sakura/sakura.conf"
sakura_put_my_desktop_entry
}
sakura_put_my_desktop_entry () {
mkdir -p "$HOME/.local/share/applications"
echo "mkdir -p $HOME/.local/share/applications"
cp "/usr/share/applications/sakura.desktop" "$HOME/.local/share/applications/sakura.desktop"
echo "cp /usr/share/applications/sakura.desktop $HOME/.local/share/applications/sakura.desktop"
sed -i 's/^Exec=sakura/Exec=sakura -m/g' "$HOME/.local/share/applications/sakura.desktop"
echo "sed -i 's/^Exec=sakura/Exec=sakura -m/g' $HOME/.local/share/applications/sakura.desktop"
}
##
### Tail: sakura
################################################################################
################################################################################
### Head: fcitx
##
fcitx_config_install () {
mkdir -p $HOME/.config/fcitx
echo "mkdir -p $HOME/.config/fcitx"
cp ./config/fcitx/profile $HOME/.config/fcitx/profile
echo "cp ./config/fcitx/profile $HOME/.config/fcitx/profile"
fcitx_config_install_im_config
}
fcitx_config_install_im_config () {
echo
im-config -n fcitx
echo "im-config -n fcitx"
echo "cat ~/.xinputrc"
cat ~/.xinputrc
echo
}
##
### Tail: fcitx
################################################################################
################################################################################
### Head: gtk3
##
gtk3_config_install () {
mkdir -p $HOME/.config/gtk-3.0
echo "mkdir -p $HOME/.config/gtk-3.0"
cp ./config/gtk3/settings.ini $HOME/.config/gtk-3.0/settings.ini
echo "cp ./config/gtk3/settings.ini $HOME/.config/gtk-3.0/settings.ini"
}
##
### Tail: gtk3
################################################################################
################################################################################
### Head: gtk2
##
gtk2_config_install () {
cp ./config/gtk2/.gtkrc-2.0 $HOME/.gtkrc-2.0
echo "cp ./config/gtk2/.gtkrc-2.0 $HOME/.gtkrc-2.0"
}
##
### Tail: gtk2
################################################################################
################################################################################
### Head: main
##
main_config_install () {
pcmanfm_qt_config_install
rofi_config_install
sakura_config_install
fcitx_config_install
gtk3_config_install
gtk2_config_install
gnome_config_install
}
## start
main_config_install
##
### Tail: main
################################################################################