-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexecutable_postinstall
973 lines (910 loc) · 37.1 KB
/
executable_postinstall
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
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
#!/bin/bash
#
# postinstall-0.3.2 - Post Installation Script
#
# Post Installation Script is a script which is developed for Manjaro Awesome
# WM Respin, codenamed: Cesious. It's purpose is to provide an easy way for
# users to set up their system, get used to the keybindings, install drivers
# and download and install applications.
#
# Written by Culinax
# Modified for use in BSPWM respin by Chrysostomus
PS3="> "
in_array() {
local i
for i in "${@:2}"; do
[[ $i = "$1" ]] && return 0
done
return 1
}
slct() {
if in_array "--" "$@"; then
declare -A subopts subtitles
local sub subtitle subopt
until [[ $1 = "--" ]]; do
IFS=: read -r sub subtitle subopt<<< "$1"
subopts[$sub]=$subopt
subtitles[$sub]=$subtitle
shift
done
shift
fi
local title=$1
shift
local indent=0
for app in "$@"; do
(( ${#app} > indent )) && indent=${#app}
done
while true; do
local idx=1
print_title "$title"
printf '%s\n' "Select the correct number to either enable or disable a selection. Applications"\
"marked with an * will be installed/reinstalled. Applications that are not marked"\
"will not be installed or will be removed."
printf '\n%s\n\n' "0. Proceed to next step"
for app in "$@"; do
printf "%-$((${##}+1))s %s %-${indent}s │ %s\n" "${idx}." "${work_list[${app}]:- }" "$app" "${apps_descr[$app]}"
((idx++))
done
echo
while true; do
read -e -n ${##} -p "$PS3" REPLY
if [[ $REPLY != [0-9]* ]]; then
echo "Invalid option"
continue
elif (( 10#$REPLY == 0 )); then
local quitslct=1
clear
break
elif (( 10#$REPLY >= 1 && 10#$REPLY <= $# )); then
opt=${!REPLY}
if in_array "${opt}" "${!work_list[@]}"; then
unset work_list[${opt}]
if in_array "$opt" "${!subopts[@]}"; then
for app in ${subopts[$opt]}; do
if in_array "$app" "${!work_list[@]}"; then
unset work_list[$app]
fi
done
fi
else
work_list[${opt}]="*"
if in_array "$opt" "${!subopts[@]}"; then
clear
slct "$title > ${subtitles[$opt]}" ${subopts[$opt]}
fi
fi
clear
break
else
echo "Invalid option"
continue
fi
done
(( quitslct == 1 )) && quitslct=0 && break
done
}
process_selections() {
local installation=() removal=()
for app in "${!work_list[@]}"; do
if ! in_array "${app}" "${!installed_list[@]}"; then
installation+=("${app,,}")
fi
done
clear
print_title "$1 > Installing"
if (( ${#installation[@]} == 0 )); then
printf '%s\n\n' "No applications listed for installation. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
break
else
echo "Press [Return] to finish."
continue
fi
done
else
if install_check i sudo pacman -S "${installation[@]}"; then
for app in "${installation[@]}"; do
installed_list[$app]=
done
fi
fi
for app in "${!installed_list[@]}"; do
if ! in_array "${app}" "${!work_list[@]}"; then
removal+=("${app,,}")
fi
done
clear
print_title "$1 > Removing"
if (( ${#removal[@]} == 0 )); then
printf '%s\n\n' "No applications listed for removal. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
break
else
echo "Press [Return] to finish."
continue
fi
done
else
if install_check r sudo pacman -Rns "${removal[@]}"; then
for app in "${removal[@]}"; do
unset installed_list[$app]
done
fi
fi
}
install_check() {
if [[ $1 = "i" ]]; then
local todo="Installation"
elif [[ $1 = "r" ]]; then
local todo="Removal"
fi
if "${@:2}"; then
while true; do
printf '\n%s\n\n' "$todo finished successfully. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
return 0
else
echo "Press [Return] to finish."
continue
fi
done
break
done
else
while true; do
printf '%b\n' "\nIt seems like an error occured. Please analyze the output carefully to solve the problem."\
"Press [Return] to finish.\n"
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
return 1
else
echo "Press [Return] to finish."
continue
fi
done
break
done
fi
}
print_title() {
printf "\033[1;34mPost Installation Script%s\033[0m\n\n" "$@"
}
print_main() {
printf '%b\n' "Welcome to Manjaro BSPWM Respin"\
"The purpose of this Post Installation Script is to automate common tasks which"\
"should help you to get you started using your brand new installation.\n"\
"It is by no means mandatory to run this script, however it is recommended to go"\
"throught this script once, as it is a very helpful addition. It is recommended"\
"to start from the first step and then work your way down.\n"
}
main() {
while true; do
clear
print_title
print_main
printf '%b\n' "Extra documentation can be found by following these links:"\
"- Arch linux bspwm forum: https://bbs.archlinux.org/viewtopic.php?id=149444"\
"- bspwm on the Arch Wiki: https://wiki.archlinux.org/index.php/Bspwm"
printf '%b\n' "1. Manual for bspwm"\
"2. Keybindings and controls"\
"3. Rank mirrorlist, verifying keyrings, sync to the repositories and update"\
"4. Install drivers"\
"5. Install applications sorted by category"\
"6. Configuration"\
"r. Never display at boot again"\
"q. Quit\n"
while true; do
read -s -n 1 -p "$PS3" REPLY
case "$REPLY" in
1) man bspwm
clear
break
;;
2) clear
keybinds | less
clear
break
;;
3) clear
rank_sync_update && synced=1
clear
break
;;
4) if (( synced == 0 )); then
printf '%s\n' "Please run the third option first to avoid breaking your system due to partial"\
" updates"
continue
fi
clear
install_drivers
clear
break
;;
5) clear
install_apps
clear
break
;;
6) clear
configuration
clear
break
;;
r) remove_from_startup
;;
q) quit
;;
*) echo "Invalid option"
continue
;;
esac
done
done
}
rank_sync_update(){
print_title " > Rank Sync Update"
sudo pacman-key --init
sudo pacman-key --populate archlinux manjaro
if sudo pacman-key -r 962DDE58 && sudo pacman-key --lsign-key 962DDE58; then
local idx=1
linenum=()
while read -r line; do
if [[ $line = "[infinality-bundle"* ]]; then
local repo=1
elif [[ $repo = 1 && $line = SigLevel* ]]; then
linenum+=($idx)
local repo=0
fi
(( idx++ ))
done < "/etc/pacman.conf"
for (( idx=${#linenum[@]}-1; idx>=0; idx-- )); do
sudo sed -i "${linenum[idx]}d" /etc/pacman.conf
done
fi
sudo pacman-mirrors -g
sudo pacman -Syy manjaro-system pacman --needed 2>/dev/null
install_check i sudo pacman -Su
}
install_drivers() {
while true; do
print_title " > Install Drivers"
printf '%b\n' "Select the correct number of the driver you want to install.\n"\
"1. AUR support"\
"2. Graphics driver"\
"3. Multimedia support"\
"4. Printer drivers"\
"5. Alternative file systems"\
"q. Quit\n"
while true; do
read -s -n 1 -p "$PS3" REPLY
case "$REPLY" in
1) clear
install_aur
clear
break
;;
2) clear
install_graphics
clear
break
;;
3) clear
install_media
clear
break
;;
4) clear
install_printer
clear
break
;;
5) clear
install_alt_fs
clear
break
;;
q) quitcat=1
clear
break
;;
*) echo "Invalid Option"
continue
;;
esac
done
(( quitcat == 1 )) && quitcat=0 && break
done
}
install_aur() {
for app in "${apps_aur[@]}"; do
work_list[$app]="*"
done
local subtitle=" > Install Drivers > AUR Support"
slct "$subtitle" "${apps_aur[@]}"
process_selections "$subtitle"
}
install_graphics() {
print_title " > Install Drivers > Graphics Driver"
printf '%b\n' "This option will install the correct graphics driver with the help of the"\
"Manjaro Hardware Detection tool. MHWD automatically detects your graphics card"\
"and installs the proper drivers for it. Please enter the correct number,"\
"depending whether you want the open-source (free) or the proprietary (non-free)"\
"drivers.\n"\
"1. Open-source drivers (free)"\
"2. Proprietary drivers (non-free)\n"
while true; do
read -s -n 1 -p "$PS3" REPLY
case "$REPLY" in
1) clear
print_title " > Install Drivers > Graphics Driver > Installing Free"
install_check i sudo mhwd -a pci free 0300
break
;;
2) clear
print_title " > Install Drivers > Graphics Driver > Installing Nonfree"
install_check i sudo mhwd -a pci nonfree 0300
break
;;
*) echo "Invalid Option"
continue
;;
esac
done
}
install_media() {
for app in "${apps_media[@]}"; do
work_list[$app]="*"
done
local subtitle=" > Install Drivers > AUR Support"
slct "$subtitle" "${apps_media[@]}"
process_selections "$subtitle"
}
install_printer() {
for app in "${apps_printer[@]}"; do
work_list[$app]="*"
done
local subtitle=" > Install Drivers > Printer Drivers"
slct "$subtitle" "${apps_printer[@]}"
process_selections "$subtitle"
systemctl enable cups
systemctl start cups
}
install_alt_fs() {
local subtitle=" > Install Drivers > Alternative File Systems"
slct "$subtitle" "${apps_alt_fs[@]}"
process_selections "$subtitle"
}
install_apps() {
local subtitle=" > Install Applications"
slct "$subtitle > Calendars" "${apps_cal[@]}"
slct "$subtitle > CD/DVD Burners" "${apps_cddvd[@]}"
slct "$subtitle > Chat Clients" "${apps_chat[@]}"
slct "$subtitle > Email Clients" "${apps_email[@]}"
slct "$subtitle > Graphic Manipulation" "${apps_graphic[@]}"
slct "$subtitle > Image Viewers" "${apps_imgview[@]}"
slct "$subtitle > IRC Clients" "${apps_irc[@]}"
slct "Nautilus:Nautilus:${apps_nautilus[*]}"\
"PCManFM:PCManFM:${apps_pcmanfm[*]}"\
"SpaceFM:SpaceFM:${apps_spacefm[*]}"\
"Thunar:Thunar:${apps_thunar[*]}"\
-- "$subtitle > File Managers" "${apps_file[@]}"
slct "MPD:MPD Clients:${apps_mpd[*]}"\
-- "$subtitle > Music Players" "${apps_music[@]}"
slct "$subtitle > Office Apps" "${apps_office[@]}"
slct "$subtitle > PDF Readers" "${apps_pdf[@]}"
slct "$subtitle > RSS Readers" "${apps_rss[@]}"
slct "$subtitle > System Monitors" "${apps_sysmon[@]}"
slct "$subtitle > Terminal Emulators" "${apps_term[@]}"
slct "$subtitle > Text Editors" "${apps_text[@]}"
slct "$subtitle > Torrent Clients" "${apps_torrent[@]}"
slct "$subtitle > Utilities" "${apps_util[@]}"
slct "$subtitle > Video Players" "${apps_video[@]}"
slct "$subtitle > Web Browsers" "${apps_web[@]}"
local installation=() removal=()
for app in "${!work_list[@]}"; do
if ! in_array "${app}" "${!installed_list[@]}"; then
installation+=("$app")
fi
done
(( ${#installation[@]} != 0 )) && slct "$subtitle > Review Installation List" "${installation[@]}"
for app in "${!installed_list[@]}"; do
if ! in_array "${app}" "${!work_list[@]}"; then
removal+=("$app")
fi
done
(( ${#removal[@]} != 0 )) && slct "$subtitle > Review Removal List" "${removal[@]}"
process_selections "$subtitle"
}
configuration() {
while true; do
print_title " > Configuration"
printf '%b\n' "Select the correct number of the configuration you want to perform.\n"\
"1. Use Zsh as default terminal"\
"2. Symlink local files to /root/"\
"3. Enable hibernation"\
"4. Enable delayed hibernation"\
"5. Enable autologin"\
"q. Quit\n"
while true; do
read -s -n 1 -p "$PS3" REPLY
case "$REPLY" in
1) clear
zsh_default_shell
clear
break
;;
2) clear
symlink_files
clear
break
;;
3) clear
enable_hibernation
clear
break
;;
4) clear
enable_delayed_hibernation
clear
break
;;
5) clear
enable_autologin
clear
break
;;
q) quitcat=1
clear
break
;;
*) echo "Invalid Option"
continue
;;
esac
done
(( quitcat == 1 )) && quitcat=0 && break
done
}
zsh_default_shell() {
print_title " > Configuration > Zsh Default Shell"
while true; do
read -s -n 1 -p "Change shell from bash to zsh for $USER? [y/N] " yesno
echo
if [[ $yesno = [Yy] ]]; then
chsh -s /usr/bin/zsh
break
elif [[ $yesno = [Nn] ]]; then
break
else
continue
fi
done
while true; do
echo
read -s -n 1 -p "Change shell from bash to zsh for root? [y/N] " yesno
echo
if [[ $yesno = [Yy] ]]; then
sudo chsh -s /usr/bin/zsh
break
elif [[ $yesno = [Nn] ]]; then
break
else
continue
fi
done
printf '\n%s\n\n' "Changing shells has been finished. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
break
else
echo "Press [Return] to finish."
continue
fi
done
}
enable_autologin() {
print_title " > Configuration > Zsh Default Shell"
while true; do
read -s -n 1 -p "Enable autologin for $USER? [y/N] " yesno
echo
if [[ $yesno = [Yy] ]]; then
sudo systemctl enable xlogin@$(whoami)
break
elif [[ $yesno = [Nn] ]]; then
break
else
continue
fi
done
printf '\n%s\n\n' "All is ready. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
break
else
echo "Press [Return] to finish."
continue
fi
done
}
enable_delayed_hibernation() {
print_title " > Delayed hibernation"
while true; do
read -s -n 1 -p "Hibernate suspend system after a set period of time? [y/N] " yesno
echo
if [[ $yesno = [Yy] ]]; then
sudo systemctl enable suspend-to-hibernate.service
break
elif [[ $yesno = [Nn] ]]; then
break
else
continue
fi
done
printf '\n%s\n\n' "Done. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
break
else
echo "Press [Return] to finish."
continue
fi
done
}
enable_hibernation() {
print_title " > Setting up hibernation"
while true; do
read -s -n 1 -p "Enable hibernation using hibernator script? [y/N] " yesno
echo
if [[ $yesno = [Yy] ]]; then
sudo hibernator
break
elif [[ $yesno = [Nn] ]]; then
break
else
continue
fi
done
printf '\n%s\n\n' "Hibernator has finished. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
break
else
echo "Press [Return] to finish."
continue
fi
done
}
symlink_files() {
fileslct() {
declare -Ag config_list
while true; do
local idx=1
print_title " > Configuration > Symlink Files"
printf '%s\n' "When you symlink local configuration files to /root/, then you'll have the same"\
"configuration available for user and root. This way you can have the same"\
"terminal configuration (using the same aliases, etc.), the same GTK theme, etc."
printf '\n%s\n\n' "0. Proceed to next step"
for app in "$@"; do
printf "%-$((${##}+1))s %s %s\n" "${idx}." "${config_list[${app}]:- }" "$app"
((idx++))
done
echo
while true; do
read -e -n ${##} -p "$PS3" REPLY
if [[ $REPLY != [0-9]* ]]; then
echo "Invalid option"
continue
elif (( 10#$REPLY == 0 )); then
local quitslct=1
break
elif (( 10#$REPLY >= 1 && 10#$REPLY <= $# )); then
opt=${!REPLY}
if in_array "${opt}" "${!config_list[@]}"; then
unset config_list[${opt}]
else
config_list[${opt}]="*"
fi
clear
break
else
echo "Invalid option"
continue
fi
done
(( quitslct == 1 )) && local quitslct=0 && break
done
}
fileslct "${local_configs[@]}"
for file in "${!config_list[@]}"; do
sudo ln -sf "$HOME/$file" "/root/$file"
done
printf '\n%s\n\n' "The selected files are symlinked. Press [Return] to finish."
while true; do
read -s -n 1 -p "$PS3" input
if [[ $input = "" ]]; then
break
else
echo "Press [Return] to finish."
continue
fi
done
}
remove_from_startup() {
for file in "$HOME/.local/share/applications/postinstall.desktop"\
"$HOME/.config/autostart/postinstall.desktop"; do
[[ -f $file ]] && rm "$file"
done
echo "Post Installation Script will now no longer be auto-started."
}
quit() {
printf '%b\n' "\nThank you for installing! If you'd want to run this script again in the future,"\
"you can type 'postinstall' in your terminal."
while true; do
read -s -n 1 -p "Press [Return] to quit."$'\n' input
if [[ $input = "" ]]; then
exit 0
else
printf '\n%s\n\n' "Quitting has been canceled"
break
fi
done
}
keybinds() {
cat <<-EOF
List of some useful keybindings.
More can be found from the file ~/.config/sxhkd/sxhkdrc.
You can also edit keybindings there.
Mod4 is super key, on many keyboards marked with windows logo.
As a rule of thumb, super+direction moves focus,
super+shift+direction moves focused window,
and super+ctrl+direction resizes windows.
Arrow keys, wasd and hjkl represent directions and numbers represent
different workspaces.
###Window manipulation################################################################
Super + z |- Open window navigation menu
Alt + Tab |- Cycle windows
Super + x |- Close window
Super + shift + x |- Kill window
Super + direction |- Move focus to the direction
Super + shift + direction |- Move focused window to direction
Super + ctrl + direction |- Resize focused window to direction
Super + 1-9 |- Focus the desktop with that number
Super + shift + 1-9 |- Move focused window to desktop with that number
Super + Enter |- Move window to the biggest available space
| or preselection if there is one
Super + ctrl + Enter |- Preselect where the next window will be opened
Super + b |- Balance windows
Super + i |- Make window sticky
Super + t |- Toggle tiling/floating
Super + shift + t |- Toggle pseudotiling
Super + shift + f |- Toggle fullscreen
Super + f |- Toggle monocle
ctrl + space |- Change window gap
Super + o |- Make window private
| (Avoids splitting it automatically)
Super + Shift + q |- Cleanly quit bspwm
Super + shift +r |- Reload bspwms configuration file
###Mousecommands######################################################################
Super + drag |- Moves window
Super + rightclick drap |- Resizes window
Alt + leftclick |- Spawn window manipulation menu on cursor
Alt_gr + leftclick |- Split window depending on mouselocation
| and spawn application menu
###Applications#######################################################################
Super + p |- Dmenu (Run applications)
Super + space |- Dmenu (Run applications)
Super + shift + b |- Browser
Super + r |- File search
Super + e |- Explore files with SpaceFM
Super + shift + e |- Explore files with Ranger
Alt + Ctrl + t |- Floating Terminal
Super + shift + Return |- Terminal
EOF
}
IFS=. read -r major minor _ <<< "$(uname -r)"
local_configs=(".gtkrc-2.0" ".config/gtk-3.0" ".zshrc" ".bashrc")
apps_aur=("Autoconf" "Automake" "binutils" "Bison" "fakeroot" "flex" "GCC" "libtool" "m4" "Make" "patch" "yaourt")
apps_alt_fs=("exfat-utils" "f2fs-tools" "fuse-exfat" "linux$major$minor-zfs" "manjarozfs")
apps_cal=("calcurse" "Wyrd")
apps_cddvd=("Brasero" "K3b" "Xfburn")
apps_chat=("BitlBee" "Pidgin" "Skype")
apps_email=("Evolution" "Mutt" "Re-Alpine" "Thunderbird")
apps_file=("kdebase-Dolphin" "MC" "Nautilus" "PCManFM" "ranger" "SpaceFM" "Thunar")
apps_graphic=("Blender" "GIMP" "ImageMagick" "Inkscape" "Pinta")
apps_imgview=("feh" "GPicView" "Mirage" "sxiv" "Viewnior")
apps_irc=("HexChat" "Irssi" "WeeChat")
apps_media=("gst-libav" "gst-plugins-bad" "gst-plugins-base" "gst-plugins-good" "gst-plugins-ugly" "gstreamer0.10-bad-plugins" "gstreamer0.10-base-plugins" "gstreamer0.10-good-plugins" "gstreamer0.10-ugly-plugins" "FlashPlugin" "libdvdcss" "IcedTea-Web-Java7")
apps_mpd=("mpc" "ncmpcpp" "Sonata")
apps_music=("Amarok" "Audacious" "Banshee" "Clementine" "cmus" "DeaDBeeF" "MOC" "MPD" "Rhythmbox")
apps_nautilus=("Nautilus-Actions" "Nautilius-Terminal" "Nautilus-Open-Terminal" "Seahorse-Nautilus")
apps_office=("AbiWord" "Calligra" "Gnumeric" "LibreOffice")
apps_pcmanfm=("GVfs")
apps_pdf=("ePDFView" "Evince" "MuPDF" "Xpdf" "zathura-pdf-mupdf" "zathura-pdf-poppler")
apps_printer=("CUPS" "Ghostscript" "gsfonts" "CUPS-PDF" "foomatic-db" "foomatic-db-engine" "foomatic-db-nonfree" "Gutenprint" "SpliX" "HPLIP")
apps_rss=("Liferea" "newsbeuter")
apps_spacefm=("udevil")
apps_sysmon=("Conky" "htop")
apps_term=("GNOME-Terminal" "kdebase-Konsole" "LilyTerm" "LXTerminal" "rxvt-unicode" "sakura" "Terminator" "Xfce4-Terminal" "xterm")
apps_text=("Emacs" "Geany" "gedit" "gVim" "Leafpad" "Vim")
apps_thunar=("GVfs" "Thunar-Archive-Plugin" "Thunar-Media-Tags-Plugin" "Thunar-VolMan" "Tumbler")
apps_torrent=("Deluge" "rTorrent" "Transmission-CLI" "Transmission-GTK" "Transmission-Remote-CLI" "Transmission-Qt")
apps_util=("BleachBit" "ClipIt" "galculator" "Parcellite" "scrot" "tmux")
apps_video=("GNOME-MPlayer" "MPlayer" "mpv" "SMPlayer" "VLC")
apps_web=("Chromium" "dwb" "Firefox" "luakit" "Midori" "Opera" "Uzbl-Tabbed")
declare -A apps_descr=(
["AbiWord"]="A fully-featured word processor"
["Amarok"]="The powerful music player for KDE"
["Audacious"]="Lightweight, advanced audio player focused on audio quality"
["Autoconf"]="A GNU tool for automatically configuring source code"
["Automake"]="A GNU tool for automatically creating Makefiles"
["Banshee"]="Music management and playback for GNOME"
["binutils"]="A set of programs to assemble and manipulate binary and object files"
["Bison"]="The GNU general-purpose parser generator"
["BitlBee"]="Brings instant messaging (XMPP, MSN, Yahoo!, AIM, ICQ, Twitter to IRC)"
["BleachBit"]="Deletes unneeded files to free disk space and maintain privacy"
["Blender"]="A fully integrated 3D graphics creation suite"
["Brasero"]="A disc burning application for Gnome"
["calcurse"]="A text-based personal organizer."
["Calligra"]="Actively developed fork of KOffice, the KDE office suite"
["Chromium"]="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser"
["Clementine"]="A music player and library organizer"
["ClipIt"]="Lightweight GTK+ clipboard manager (fork of Parcellite)"
["cmus"]="Very feature-rich ncurses-based music player"
["Conky"]="Lightweight system monitor for X"
["CUPS"]="The CUPS Printing System - daemon package"
["CUPS-PDF"]="PDF printer for cups"
["DeaDBeeF"]="An audio player for GNU/Linux based on GTK2."
["Deluge"]="A BitTorrent client with multiple use interfaces in a client/server model"
["dwb"]="A webkit web browser with vi-like keyboard shortcuts, stable snapshot"
["Emacs"]="The extensible, customizable, self-documenting real-time display editor"
["ePDFView"]="A free lightweight PDF document viewer."
["Evince"]="Simply a document viewer"
["Evolution"]="Manage your email, contacts and schedule"
["exfat-utils"]="Utilities for exFAT file system"
["f2fs-tools"]="Tools for Flash-Friendly File System (F2FS)"
["fakeroot"]="Gives a fake root environment, useful for building packages as a non-privileged user"
["feh"]="Fast and light imlib2-based image viewer"
["Firefox"]="Standalone web browser from mozilla.org"
["FlashPlugin"]="Adobe Flash Player"
["flex"]="A tool for generating text-scanning program"
["foomatic-db"]="Foomatic - The collected knowledge about printers, drivers, and driver options in XML files, used by foomatic-db-engine to generate PPD files."
["foomatic-db-engine"]="Foomatic - Foomatic's database engine generates PPD files from the data in Foomatic's XML database. It also contains scripts to directly generate print queues and handle jobs."
["foomatic-db-nonfree"]="Foomatic - database extension consisting of manufacturer-supplied PPD files released under non-free licenses"
["fuse-exfat"]="Free exFAT file system implementation"
["galculator"]="GTK+ based scientific calculator"
["GCC"]="The GNU Compiler Collection - C and C++ frontends"
["Geany"]="Fast and lightweight IDE"
["gedit"]="A text editor for GNOME"
["Ghostscript"]="An interpreter for the PostScript language"
["GIMP"]="GNU Image Manipulation Program"
["GNOME-MPlayer"]="A simple MPlayer GUI"
["GNOME-Terminal"]="The GNOME Terminal Emulator"
["Gnumeric"]="A GNOME Spreadsheet Program"
["GPicView"]="lightweight image viewer"
["gsfonts"]="Standard Ghostscript Type1 fonts from URW"
["gst-libav"]="Gstreamer libav Plugin"
["gst-plugins-bad"]="GStreamer Multimedia Framework Bad Plugins"
["gst-plugins-base"]="GStreamer Multimedia Framework Base Plugins"
["gst-plugins-good"]="GStreamer Multimedia Framework Good Plugins"
["gst-plugins-ugly"]="GStreamer Multimedia Framework Ugly Plugins"
["gstreamer0.10-bad-plugins"]="GStreamer Multimedia Framework Bad Plugins (gst-plugins-bad)"
["gstreamer0.10-base-plugins"]="GStreamer Multimedia Framework Base Plugins (gst-plugins-base)"
["gstreamer0.10-good-plugins"]="GStreamer Multimedia Framework Good Plugins (gst-plugins-good)"
["gstreamer0.10-ugly-plugins"]="GStreamer Multimedia Framework Ugly Plugins (gst-plugins-ugly)"
["Gutenprint"]="Top quality printer drivers for POSIX systems"
["GVfs"]="For trash support, mounting with udisk and remote filesystems"
["gVim"]="Vi Improved (with features, such as a GUI)"
["HexChat"]="A popular and easy to use graphical IRC (chat client)"
["HPLIP"]="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
["htop"]="Interactive process viewer"
["IcedTea-Web-Java7"]="provides a Free Software web browser plugin running applets written in the Java programming language and an implementation of Java Web Start, originally based on the NetX project"
["ImageMagick"]="An image viewing/manipulation program"
["Inkscape"]="Vector graphics editor using the SVG file format"
["Irssi"]="Modular text mode IRC client with Perl scripting"
["K3b"]="Feature-rich and easy to handle CD burning application"
["kdebase-Dolphin"]="File Manager"
["kdebase-Konsole"]="Terminal"
["Leafpad"]="A notepad clone for GTK+ 2.0"
["libdvdcss"]="Portable abstraction library for DVD decryption"
["LibreOffice"]="A productivity suite that is compatible with other major office suites"
["libtool"]="A generic library support script"
["Liferea"]="A desktop news aggregator for online news feeds and weblogs"
["LilyTerm"]="A light and easy to use libvte based X terminal emulator"
["linux$major$minor-zfs"]="Kernel modules for the Zettabyte File System."
["luakit"]="Fast, small, webkit based browser framework extensible by Lua"
["LXTerminal"]="VTE-based terminal emulator (part of LXDE)"
["m4"]="The GNU macro processor"
["Make"]="GNU make utility to maintain groups of programs"
["manjarozfs"]="User-Mode utils and Kernel modules for Zettabyte File System."
["MC"]="Midnight Commander is a text based filemanager/shell that emulates Norton Commander"
["Midori"]="Lightweight web browser based on Gtk WebKit"
["Mirage"]="A simple GTK+ Image Viewer"
["MOC"]="An ncurses console audio player designed to be powerful and easy to use"
["mpc"]="Minimalist command line interface to MPD"
["MPD"]="Flexible, powerful, server-side application for playing music"
["MPlayer"]="A movie player for Linux"
["mpv"]="Video player based on MPlayer/mplayer2"
["MuPDF"]="Lightweight PDF and XPS viewer"
["Mutt"]="Small but very powerful text-based mail client"
["Nautilus"]="GNOME file manager"
["Nautilus-Actions"]="Configures programs to be launched when files are selected in Nautilus"
["Nautilus-Open-Terminal"]="A nautilus plugin for opening terminals in arbitrary local paths"
["Nautilus-Terminal"]="An integrated terminal for Nautilus"
["ncmpcpp"]="Almost exact clone of ncmpc with some new features"
["newsbeuter"]="A RSS feed reader for the text console with special Podcast support"
["Opera"]="Fast and secure web browser and Internet suite"
["Parcellite"]="Lightweight GTK+ clipboard manager"
["patch"]="A utility to apply patch files to original sources"
["PCManFM"]="An extremely fast and lightweight file manager"
["Pidgin"]="Multi-protocol instant messaging client"
["Pinta"]="A drawing/editing program modeled after Paint.NET."
["ranger"]="A simple, vim-like file manager"
["Rhythmbox"]="An iTunes-like music playback and management application"
["Re-Alpine"]="The continuation of the Alpine email client from University of Washington"
["rTorrent"]="Ncurses BitTorrent client based on libTorrent"
["rxvt-unicode"]="An unicode enabled rxvt-clone terminal emulator (urxvt)"
["sakura"]="A terminal emulator based on GTK and VTE"
["scrot"]="A simple command-line screenshot utility for X"
["Seahorse-Nautilus"]="PGP encryption and signing for nautilus"
["Skype"]="P2P software for high-quality voice communication"
["SMPlayer"]="A complete front-end for MPlayer"
["Sonata"]="Elegant GTK+ music client for MPD"
["SpaceFM"]="Multi-panel tabbed file manager"
["SpliX"]="CUPS drivers for SPL (Samsung Printer Language) printers"
["sxiv"]="Simple X Image Viewer"
["Terminator"]="Terminal emulator that supports tabs and grids"
["Thunar"]="Modern file manager for Xfce"
["Thunar-Archive-Plugin"]="Create and deflate archives"
["Thunar-Media-Tags-Plugin"]="View/edit id3/ogg tags"
["Thunar-VolMan"]="Manages removable devices"
["Thunderbird"]="Standalone Mail/News reader"
["tmux"]="A terminal multiplexer"
["Transmission-CLI"]="Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)"
["Transmission-GTK"]="Fast, easy, and free BitTorrent client (GTK+ GUI)"
["Transmission-Qt"]="Fast, easy, and free BitTorrent client (Qt GUI)"
["Transmission-Remote-CLI"]="Curses interface for the daemon of the BitTorrent client Transmission"
["Tumbler"]="For thumbnail previews"
["udevil"]="Mount as non-root user and mount networks"
["Uzbl-Tabbed"]="Tabbing manager providing multiple uzbl-browser instances in 1 window"
["Viewnior"]="A simple, fast and elegant image viewer program"
["Vim"]="Vi Improved, a highly configurable, improved version of the vi text editor"
["VLC"]="A multi-platform MPEG, VCD/DVD, and DivX player"
["WeeChat"]="Fast, light and extensible IRC client (curses UI)"
["Wyrd"]="A text-based front-end to Remind."
["Xfburn"]="A simple CD/DVD burning tool based on libburnia libraries"
["Xfce4-Terminal"]="A modern terminal emulator primarly for the Xfce desktop environment"
["Xpdf"]="Viewer for Portable Document Format (PDF files)"
["xterm"]="X Terminal Emulator"
["yaourt"]="A pacman wrapper with extended features and AUR support"
["zathura-pdf-mupdf"]="Adds pdf support to zathura by using the mupdf library"
["zathura-pdf-poppler"]="Adds pdf support to zathura by using the poppler engine"
)
clear
print_title
print_main
printf '%b\n' "It is necessary for this script that an internet conncetion is available. Please"\
"make sure that you have a working connection before you continue. Press [Return]"\
"to perform a connection check.\n"
declare -A work_list installed_list
pacman_query="$(pacman -Qq)"
for app in "${!apps_descr[@]}"; do
if echo "$pacman_query" | grep -q "^${app,,}$"; then
work_list[$app]="*"
installed_list[$app]=
fi
done
while true; do
main
done