Advertisement
Dobbie03

Hello Script

Sep 19th, 2017
1,694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.51 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. ## written by Nathaniel Maia for ArchLabs Minimo <natemaia10@gmail.com>
  4. ##
  5. ## any enquiries https://sourceforge.net/projects/archlabs-linux-minimo/
  6.  
  7.  
  8.  
  9.  
  10. # my thanks to the bunsenlabs guys for this nice little hello message
  11. echo -e " _ _ _____ _ _ ___
  12. | | | | ____| | | | / _ \\
  13. | |_| | _| | | | | | | | |
  14. | _ | |___| |___| |__| |_| |
  15. |_| |_|_____|_____|_____\___/\n"
  16. echo -e " Hi $USER, Welcome to ArchLabs Linux! :)\n"
  17. echo -e " This will ask you a some questions in order to setup your installation"
  18.  
  19.  
  20. printf "\n\n\n Would you like to update the system & mirrorlist? (recommended) [y/n]: "
  21. read -r upd
  22.  
  23. if [ "$upd" == "y" ] || [ "$upd" == "Y" ]; then
  24. clear
  25. echo -e "\n Current mirrorlist backed up to /etc/pacman.d/mirrorlist.backup"
  26. sleep 1
  27.  
  28. sudo pacman -S reflector --noconfirm --needed
  29. sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
  30. sudo reflector --score 100 --fastest 25 --sort rate --save /etc/pacman.d/mirrorlist --verbose
  31.  
  32. clear
  33. sudo pacman -Syyu --noconfirm
  34.  
  35. fi
  36.  
  37. clear
  38. printf "\n Would you like to change your shell?
  39. 1)OhMyZsh 2)Fish 3)Ksh 4)Bash (default)\n\n "
  40. read -r shll
  41.  
  42. clear
  43. printf "\n What browser do you prefer?
  44. 1)Chrome 2)Chromium 3)Opera 4)Firefox (default)\n\n "
  45. read -r bwsr
  46. if [[ "$bwsr" =~ ^[1-3]$ ]]; then
  47. if [[ "$bwsr" =~ ^[1-2]$ ]]; then
  48. if [[ "$bwsr" == "1" ]]; then
  49. clear
  50. printf "\n Install the google talk plugin? (18M) [y/n]: "
  51. read -r tlk
  52.  
  53. else
  54. clear
  55. printf "\n Install flash plugin? (20M) [y/n]: "
  56. read -r flsh
  57.  
  58. fi
  59. fi
  60.  
  61. clear
  62. printf "\n Remove the default browser? [y/n]: "
  63. read -r remove
  64.  
  65. clear
  66. echo -e "\n ArchLabs provides a local homepage ~/.ArchLabs-homepage/index.html
  67. This can be opened with a browser and set as the homepage if you like"
  68. sleep 3
  69.  
  70. else
  71. clear
  72. printf "\n Install flash plugin? (20M) [y/n]: "
  73. read -r flsh
  74.  
  75. fi
  76.  
  77.  
  78. clear
  79. printf "\n Which editor do you prefer?
  80. 1)Atom 2)Mousepad 3)Sublime 4)Geany (default)\n\n "
  81. read -r edit
  82. if [[ "$edit" =~ ^[1-3]$ ]]; then
  83. clear
  84. printf "\n Remove the default editor? [y/n]: "
  85. read -r redit
  86.  
  87. fi
  88.  
  89. clear
  90. printf "\n Which file manager do you prefer?
  91. 1)PCmanFM 2)Nautilus 3)Thunar (default)\n\n "
  92. read -r file
  93. if [[ "$file" =~ ^[1-2]$ ]]; then
  94. clear
  95. printf "\n Remove Thunar, the default filemanager? [y/n]: "
  96. read -r rmfile
  97.  
  98. else
  99. clear
  100. printf "\n Do you need thunar volman and extra thumbnailers? [y/n]: "
  101. read -r ext
  102.  
  103. fi
  104.  
  105. clear
  106. printf "\n Would you like an additional terminal emulator?
  107. 1)Xfce4 terminal 2)Terminator 3)Urxvt 4)Tilda 5)Tilix 6)Termite (default)\n\n "
  108. read -r term
  109. if [[ "$term" =~ ^[1-5]$ ]]; then
  110. if [ "$term" == "3" ]; then
  111. clear
  112. echo -e "\n You can copy paste in urxvt with [Alt + c] [Alt + v]\n and in termite with [Ctrl + Shift + c] [Ctrl + Shift + v]"
  113. sleep 3
  114.  
  115. else
  116. clear
  117. echo -e "\n You can copy paste in termite with [Ctrl + Shift + c] [Ctrl + Shift + v]"
  118. sleep 3
  119.  
  120. fi
  121. else
  122. clear
  123. echo -e "\n You can copy paste in termite with [Ctrl + Shift + c] [Ctrl + Shift + v]"
  124. sleep 3
  125.  
  126. fi
  127.  
  128. clear
  129. printf "\n Additional terminal applications
  130. 1)Mpd & Ncmpcpp 2)Cava 3)S-tui 4)All 5)None (default)\n\n "
  131. read -r ter
  132.  
  133. clear
  134. printf "\n Music applications?
  135. 1)Spotify 2)Nicotine+ 3)Lollypop 4)Rythmbox 5)Clementine 6)Audacious (default)\n\n "
  136. read -r musc
  137. if [[ "$musc" =~ ^[3-5]$ ]]; then
  138. clear
  139. printf "\n Remove Audacious, the default music player? [y/n]: "
  140. read -r rmusc
  141.  
  142. fi
  143.  
  144. clear
  145. printf "\n Do you want a color picker?
  146. 1)Gpick 2)Gcolor2 3)None (default) "
  147. read -r pick
  148.  
  149. clear
  150. printf "\n Do you want conky installed?
  151. 1)conky 2)conky-lua 3)conky-lua-nv 4)None (default)\n\n "
  152. read -r conk
  153. if [ "$conk" =~ ^[1-3]$ ]; then
  154. clear
  155. printf "\n Install Archlabs conky chooser & pipemenu? [y/n]: "
  156. read -r alconk
  157.  
  158. fi
  159.  
  160. clear
  161. printf "\n Image editors?
  162. 1)Gimp 2)Inkscape 3)Pinta 4)All 4)None (default)\n\n "
  163. read -r img
  164.  
  165. clear
  166. printf "\n Screen capture & recording software?
  167. 1)SSR 2)OBS 3)Peek 4)Xfce Screenshooter 5)All 6)None (default)\n\n "
  168. read -r cap
  169.  
  170. clear
  171. printf "\n Video Editor
  172. 1)Kdenlive 2)Openshot 3)Lightworks 4)None (default)\n\n "
  173. read -r vid
  174.  
  175. clear
  176. printf "\n Office suite
  177. 1)Libre Office 2)Abiword 3) Caligra 4)None (default)\n\n "
  178. read -r off
  179.  
  180. clear
  181. printf "\n Mail clients
  182. 1)Thunderbird 2)Geary 3)Evolution 4)Mutt 5)None (default)\n\n "
  183. read -r mail
  184.  
  185. clear
  186. printf "\n Torrent clients
  187. 1)Deluge 2)Transmission 3)qBittorrent 4)None (default)\n\n "
  188. read -r tor
  189.  
  190. clear
  191. printf "\n Usb image writer
  192. 1)Etcher 2)Mintstick 3)Unetbootin 4)Etcher-cli 5)None (default)\n\n "
  193. read -r usb
  194.  
  195. clear
  196. printf "\n Disk burner
  197. 1)Xfburn 2)Simpleburn 3)K3b 4)None (default)\n\n "
  198. read -r brn
  199.  
  200. clear
  201. printf "\n Install gvfs for mounting and trash functionality? [y/n]: "
  202. read -r vfs
  203. if [ "$vfs" == "y" ] || [ "$vfs" == "Y" ]; then
  204. clear
  205. printf "\n Support for android/apple media transfer through gvfs? [y/n]: "
  206. read -r med
  207.  
  208. fi
  209. if [ "$vfs" == "y" ] || [ "$vfs" == "Y" ]; then
  210. clear
  211. printf "\n Support for samba media server through gvfs? [y/n]: "
  212. read -r smba
  213.  
  214. fi
  215.  
  216. clear
  217. printf "\n Would you like to install additional multimedia codecs? [y/n]: "
  218. read -r cod
  219.  
  220. clear
  221. printf "\n Would you like Dropbox installed? [y/n]: "
  222. read -r dbox
  223.  
  224. clear
  225. printf "\n Install catfish file search? [y/n]: "
  226. read -r sch
  227.  
  228. clear
  229. printf "\n Install gnome disks & system monitor? [y/n]: "
  230. read -r gnm
  231.  
  232. clear
  233. printf "\n Remove virtualbox guest modules & guest utils? [y/n]: "
  234. read -r vbox
  235.  
  236. clear
  237. printf "\n Prefer VLC over the default MPV video player? (120M) [y/n]: "
  238. read -r vlc
  239. if [ "$vlc" == "y" ] || [ "$vlc" == "Y" ]; then
  240. clear
  241. printf "\n Remove MPV, the default video player? [y/n]: "
  242. read -r rmpv
  243. fi
  244.  
  245. clear
  246. printf "\n Install oomox for making Gtk themes? (25M) [y/n]: "
  247. read -r omox
  248.  
  249. clear
  250. printf "\n Would you like some or our favorite additional fonts? [y/n]: "
  251. read -r fnt
  252.  
  253. clear
  254. printf "\n Install nerdfonts complete for icon patched fonts? (260M) [y/n]: "
  255. read -r nfnt
  256.  
  257. clear
  258. printf "\n Install the Archlabs wallpaper selection? (50M) [y/n]: "
  259. read -r wall
  260.  
  261. clear
  262. printf "\n Install obmenu generator and ArchLabs menu switching scripts? [y/n]: "
  263. read -r obm
  264.  
  265. clear
  266. printf "\n Do you want git for vcs? [y/n]: "
  267. read -r grab
  268.  
  269. clear
  270. printf "\n Do you need Steam installed? [y/n]: "
  271. read -r steam
  272.  
  273. clear
  274. printf "\n Do you want a screen lock? [y/n]: "
  275. read -r lck
  276.  
  277. clear
  278. printf "\n Want gnome keyring? (store saved passwords and encryption keys) [y/n]: "
  279. read -r key
  280.  
  281. clear
  282. printf "\n Want notifications though xfce4-notifyd [y/n]: "
  283. read -r notify
  284.  
  285. clear
  286. printf "\n Want xfce4-power-manager for automatic system & display sleep [y/n]: "
  287. read -r pwr
  288.  
  289. clear
  290. printf "\n Would you like pamac for updates & reminders? (3M) [y/n]: "
  291. read -r pac
  292. if [ "$pac" == "y" ] || [ "$pac" == "Y" ]; then
  293. echo -e "\n xfce polkit will be installed for authentication"
  294. sleep 1
  295.  
  296. else
  297. clear
  298. printf "\n Do you want xfce polkit for authentication with gksu? [y/n]: "
  299. read -r pol
  300.  
  301. fi
  302.  
  303. clear
  304. printf "\n Would you like to use i3 wm? [y/n]: "
  305. read -r wm
  306. # window manager and session
  307. if [ "$wm" == "y" ] || [ "$wm" == "Y" ]; then
  308. clear
  309. printf "\n Want i3 to be your main session? [y/n]: "
  310. read -r ses
  311.  
  312. if [ "$ses" == "y" ] || [ "$ses" == "Y" ]; then
  313. clear
  314. printf "\n Remove openbox completely? (Caution) [y/n]: "
  315. read -r rmob
  316.  
  317. fi
  318. else
  319. clear
  320. printf "\n Would you like i3 configs removed? [y/n]: "
  321. read -r rmi3
  322.  
  323. fi
  324.  
  325. clear
  326. printf "\n Do you need proprietary nvidia drivers? [y/n]: "
  327. read -r nvd
  328. # nvidia drivers
  329. if [ "$nvd" == "y" ] || [ "$nvd" == "Y" ]; then
  330. if [ "$wm" == "y" ] || [ "$wm" == "Y" ] && [ "$ses" == "y" ] || [ "$ses" == "Y" ]; then
  331. clear
  332. echo -e "\n A reboot is currently pending, next boot you will be promted to install the appropriate driver"
  333. echo 'exec --no-startup-id sleep 5; termite --exec=/usr/bin/nvidia-easy-install' >> /home/$USER/.config/i3/config
  334. sleep 3
  335.  
  336. else
  337. clear
  338. echo -e "\n A reboot is currently pending, next boot you will be promted to install the appropriate driver"
  339. echo '(sleep 5; termite --exec=/usr/bin/nvidia-easy-install) &' >> /home/$USER/.config/openbox/autostart
  340. sleep 3
  341.  
  342. fi
  343. fi
  344.  
  345. # openbox wasnt removed then ask panel and dock
  346. if ! [ "$rmob" == "y" ] || [ "$rmob" == "Y" ]; then
  347. clear
  348. printf "\n Would you like Tint2 instead of Polybar? [y/n]: "
  349. read -r panel
  350.  
  351. if [ "$panel" == "n" ] || [ "$panel" == "N" ]; then
  352. clear
  353. printf "\n Would you like the tint2 configs removed? [y/n]: "
  354. read -r tnt
  355.  
  356. fi
  357. clear
  358. printf "\n Would you like a dock as well?\n 1)Plank 2)Docky 3)Cairo Dock 4)None (default)\n\n "
  359. read -r dock
  360.  
  361. fi
  362.  
  363.  
  364. # Swapfile
  365. if free | awk '/^Swap:/ {exit !$2}'; then
  366. clear
  367. echo -e "\n Swap Found. No setup necessary"
  368. sleep 1
  369.  
  370. else
  371. clear
  372. printf "\n Would you like to setup a swapfile? (required for suspend or sleep) [y/n]: "
  373. read -r swp
  374.  
  375. if [ "$swp" == "y" ] || [ "$swp" == "Y" ]; then
  376. clear
  377. printf "\n Would you like to customize the size? (defaults to size of system RAM) [y/n]: "
  378. read -r cswp
  379.  
  380. if [ "$cswp" == "y" ] || [ "$cswp" == "Y" ]; then
  381. clear
  382. printf "\n Enter the size of swap needed eg. 8192M or 8G
  383. M = Mebibytes, G = Gibibytes (must be at least size of system RAM for sleep or suspend)\n\n "
  384. read -r size
  385.  
  386. fi
  387. fi
  388. fi
  389.  
  390.  
  391. # shell
  392. if [ "$shll" == "1" ]; then
  393. sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  394. echo "neofetch" >> /home/$USER/.zshrc
  395.  
  396. elif [ "$shll" == "2" ]; then
  397. sudo pacman -S fish --noconfirm --needed
  398. chsh -s fish $USER
  399.  
  400. elif [ "$shll" == "3" ]; then
  401. yaourt -S loksh --noconfirm --needed
  402. chsh -s loksh $USER
  403.  
  404. else
  405. echo -e "\n Shell not changed, staying with bash"
  406.  
  407. fi
  408.  
  409.  
  410. # git
  411. if [ "$grab" == "y" ] || [ "$grab" == "Y" ]; then
  412. sudo pacman -S git --noconfirm --needed
  413.  
  414. fi
  415.  
  416.  
  417. if [ "$vfs" == "y" ] || [ "$vfs" == "Y" ]; then
  418. sudo pacman -S gvfs --noconfirm --needed
  419.  
  420. if [ "$med" == "y" ] || [ "$med" == "Y" ]; then
  421. sudo pacman -S gvfs-mtp gvfs-afc --noconfirm --needed
  422.  
  423. fi
  424.  
  425. if [ "$smba" == "y" ] || [ "$smba" == "Y" ]; then
  426. sudo pacman -S gvfs-smb --noconfirm --needed
  427.  
  428. fi
  429. fi
  430.  
  431. if [ "$dbox" == "y" ] || [ "$dbox" == "Y" ]; then
  432. yaourt -S dropbox --noconfirm --needed
  433.  
  434. fi
  435.  
  436. if [ "$sch" == "y" ] || [ "$sch" == "Y" ]; then
  437. sudo pacman -S catfish --noconfirm --needed
  438.  
  439. fi
  440.  
  441. if [ "$gnm" == "y" ] || [ "$gnm" == "Y" ]; then
  442. sudo pacman -S gnome-disk-utility gnome-system-monitor --noconfirm --needed
  443.  
  444. fi
  445.  
  446.  
  447. # wallpapers
  448. if [ "$wall" == "y" ] || [ "$wall" == "Y" ]; then
  449. yaourt -S archlabs-wallpapers-git --noconfirm
  450.  
  451. fi
  452.  
  453. ## Browser
  454. if [ "$bwsr" =~ ^[1-3]$ ]; then
  455. if [ "$bwsr" == "1" ]; then
  456. if [ "$tlk" == "y" ] || [ "$tlk" == "Y" ]; then
  457. yaourt -S google-chrome google-talkplugin --noconfirm --needed
  458.  
  459. else
  460. yaourt -S google-chrome --noconfirm --needed
  461.  
  462. fi
  463.  
  464. echo '[Desktop Entry]
  465. NoDisplay=true
  466. Version=1.0
  467. Encoding=UTF-8
  468. Type=X-XFCE-Helper
  469. X-XFCE-Category=WebBrowser
  470. X-XFCE-CommandsWithParameter=google-chrome-stable "%s"
  471. Icon=google-chrome
  472. Name=Google Chrome
  473. X-XFCE-Commands=google-chrome-stable' > /home/$USER/.local/share/xfce4/helpers/custom-WebBrowser.desktop
  474.  
  475. sed -i 's/firefox/custom-WebBrowser/g' /home/$USER/.config/xfce4/helpers.rc
  476.  
  477. elif [ "$bwsr" == "2" ]; then
  478. sudo pacman -S chromium --noconfirm --needed
  479. sed -i 's/firefox/chromium/g' /home/$USER/.config/xfce4/helpers.rc
  480.  
  481. else
  482. sudo pacman -S opera --noconfirm --needed
  483. sed -i 's/firefox/opera/g' /home/$USER/.config/xfce4/helpers.rc
  484.  
  485. fi
  486.  
  487. if [ "$remove" == "y" ] || [ "$remove" == "Y" ]; then
  488. sudo pacman -Rn firefox --noconfirm
  489. rm -rf /home/$USER/.mozilla
  490.  
  491. fi
  492. fi
  493.  
  494. # flash
  495. if [ "$flsh" == "y" ] || [ "$flsh" == "Y" ]; then
  496. sudo pacman -S flashplugin --noconfirm --needed
  497.  
  498. fi
  499.  
  500.  
  501. clear
  502. printf "\n Which terminal do you prefer?
  503. 1)Xfce4 terminal 2)Terminator 3)Urxvt 4)Tilda 5)Tilix 6)Termite (default)\n\n "
  504. read -r term
  505.  
  506. # terminal apps
  507. if [ "$term" == "1" ]; then
  508. sudo pacman -S xfce4-terminal --noconfirm --needed
  509. sed -i 's/custom-TerminalEmulator/xfce4-terminal/g' /home/$USER/.config/xfce4/helpers.rc
  510.  
  511. elif [ "$term" == "2" ]; then
  512. sudo pacman -S terminator --noconfirm --needed
  513. sed -i 's/custom-TerminalEmulator/terminator/g' /home/$USER/.config/xfce4/helpers.rc
  514.  
  515. elif [ "$term" == "3" ]; then
  516. sudo pacman -S rxvt-unicode urxvt-perls xclip --noconfirm --needed
  517. sed -i 's/custom-TerminalEmulator/urxvt/g' /home/$USER/.config/xfce4/helpers.rc
  518. echo '(sleep 3; xclip) &' >> /home/$USER/.config/openbox/autostart
  519.  
  520. elif [ "$term" == "4" ]; then
  521. sudo pacman -S tilda --noconfirm --needed
  522. sed -i 's/Termite/Tilda/g' /home/$USER/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  523. sed -i 's/termite/tilda/g' /home/$USER/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  524.  
  525. elif [ "$term" == "5" ]; then
  526. yaourt -S tilix --noconfirm --needed
  527. sed -i 's/Termite/Tilix/g' /home/$USER/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  528. sed -i 's/termite/tilix/g' /home/$USER/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  529.  
  530. else
  531. echo -e "\n No terminal selected staying with termite"
  532.  
  533. fi
  534.  
  535.  
  536. # editors
  537. if [[ "$edit" =~ ^[1-3]$ ]]; then
  538. if [ "$edit" == "1" ]; then
  539. sudo pacman -S atom --noconfirm --needed
  540. sed -i 's/geany/atom/g' /home/$USER/.config/mimeapps.list
  541.  
  542. elif [ "$edit" == "2" ]; then
  543. sudo pacman -S mousepad --noconfirm --needed
  544. sed -i 's/geany/mousepad/g' /home/$USER/.config/mimeapps.list
  545.  
  546. else
  547. yaourt -S sublime-text-dev --noconfirm --needed
  548. sed -i 's/geany/sublime_text_3/g' /home/$USER/.config/mimeapps.list
  549.  
  550. fi
  551.  
  552. if [ "$redit" == "y" ] || [ "$redit" == "Y" ]; then
  553. sudo pacman -Rn geany --noconfirm
  554. rm -rf /home/$USER/.config/geany
  555.  
  556. fi
  557.  
  558. else
  559. echo -e "\n Staying with default editor"
  560.  
  561. fi
  562.  
  563.  
  564. # file manager
  565. if [[ "$file" =~ ^[1-2]$ ]]; then
  566. if [ "$file" == "1" ]; then
  567. sudo pacman -S pcmanfm --noconfirm --needed
  568. sed -i 's/thunar --daemon/pcmanfm -d/g' /home/$USER/.config/openbox/autostart
  569. sed -i 's/Thunar-folder-handler/pcmanfm/g' /home/$USER/.config/mimeapps.list
  570. sed -i 's/Thunar/pcmanfm/g' /home/$USER/.config/xfce4/helpers.rc
  571.  
  572. else
  573. sudo pacman -S nautilus nautilus-open-terminal nautilus-terminal --noconfirm --needed
  574. sed -i 's/#(sleep 3; thunar --daemon) &//g' /home/$USER/.config/openbox/autostart
  575. sed -i 's/Thunar-folder-handler/org.gnome.Nautilus/g' /home/$USER/.config/mimeapps.list
  576. sed -i 's/Thunar/nautilus/g' /home/$USER/.config/xfce4/helpers.rc
  577.  
  578. fi
  579.  
  580. if [ "$rmfile" == "y" ] || [ "$rmfile" == "Y" ]; then
  581. sudo pacman -Rn thunar --noconfirm
  582. rm -rf /home/$USER/.config/Thunar
  583. rm -f /home/$USER/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml
  584.  
  585. fi
  586.  
  587. else
  588. if [ "$ext" == "y" ] || [ "$ext" == "Y" ]; then
  589. sudo pacman -S thunar-volman ffmpegthumbnailer raw-thumbnailer --noconfirm --needed
  590.  
  591. fi
  592. fi
  593.  
  594.  
  595.  
  596. # terminal apps
  597. if [ "$ter" == "1" ]; then
  598. sudo pacman -S mpd ncmpcpp --noconfirm --needed
  599.  
  600. elif [ "$ter" == "2" ]; then
  601. yaourt -S cava --noconfirm --needed
  602.  
  603. elif [ "$ter" == "3" ]; then
  604. yaourt -S s-tui python2-psutil --noconfirm --needed
  605.  
  606. elif [ "$ter" == "4" ]; then
  607. yaourt -S s-tui python2-psutil cava mpd ncmpcpp --noconfirm --needed
  608.  
  609. else
  610. echo -e "\n No terminal apps selected"
  611.  
  612. fi
  613.  
  614. # usb image writers
  615. if [ "$usb" == "1" ]; then
  616. yaourt -S etcher --noconfirm --needed
  617.  
  618. elif [ "$usb" == "2" ]; then
  619. yaourt -S mintstick-git --noconfirm --needed
  620.  
  621. elif [ "$usb" == "3" ]; then
  622. sudo pacman -S unetbootin --noconfirm --needed
  623.  
  624. elif [ "$usb" == "4" ]; then
  625. yaourt -S etcher-cli --noconfirm --needed
  626.  
  627. else
  628. echo -e "\n No terminal apps selected"
  629.  
  630. fi
  631.  
  632. # music
  633. if [ "$musc" == "1" ]; then
  634. yaourt -S spotify --noconfirm --needed
  635.  
  636. elif [ "$musc" == "2" ]; then
  637. yaourt -S nicotine+ --noconfirm --needed
  638.  
  639. elif [ "$musc" == "3" ]; then
  640. yaourt -S lollypop --noconfirm --needed
  641.  
  642. elif [ "$musc" == "4" ]; then
  643. yaourt -S rythmbox --noconfirm --needed
  644.  
  645. elif [ "$musc" == "5" ]; then
  646. sudo pacman -S clementine --noconfirm --needed
  647.  
  648. else
  649. echo -e "\n No Music application selected"
  650.  
  651. fi
  652.  
  653. if [ "$rmusc" == "y" ] || [ "$rmusc" == "Y" ]; then
  654. sudo pacman -Rn audacious audacious-plugins --noconfirm
  655.  
  656. fi
  657.  
  658.  
  659.  
  660. # music
  661. if [ "$brn" == "1" ]; then
  662. sudo pacman -S xfburn --noconfirm --needed
  663.  
  664. elif [ "$brn" == "2" ]; then
  665. yaourt -S simpleburn --noconfirm --needed
  666.  
  667. elif [ "$brn" == "3" ]; then
  668. sudo pacman -S k3b --noconfirm --needed
  669.  
  670. else
  671. echo -e "\n No burner selected"
  672.  
  673. fi
  674.  
  675. # vlc
  676. if [ "$vlc" == "y" ] || [ "$vlc" == "Y" ]; then
  677. sudo pacman -S vlc qt4 --noconfirm --needed
  678.  
  679. if [ "$rmpv" == "y" ] || [ "$rmpv" == "Y" ]; then
  680. sudo pacman -Rn mpv --noconfirm
  681.  
  682. fi
  683. fi
  684.  
  685.  
  686. # oomox
  687. if [ "$omox" == "y" ] || [ "$omox" == "Y" ]; then
  688. yaourt -S oomox --noconfirm --needed
  689.  
  690. fi
  691.  
  692.  
  693. # fonts
  694. if [ "$fnt" == "y" ] || [ "$fnt" == "Y" ]; then
  695. yaourt -S ttf-hack ttf-anonymous-pro ttf-font-awesome ttf-fira-code ttf-material-icons --noconfirm
  696.  
  697. fi
  698.  
  699.  
  700. # nerd fonts
  701. if [ "$nfnt" == "y" ] || [ "$nfnt" == "Y" ]; then
  702. yaourt -S nerd-fonts-complete --noconfirm --needed
  703.  
  704. fi
  705.  
  706.  
  707. # color picker
  708. if [ "$pick" == "1" ]; then
  709. sudo pacman -S gpick --noconfirm --needed
  710.  
  711. elif [ "$pick" == "2" ]; then
  712. sudo pacman -S gcolor2 --noconfirm --needed
  713.  
  714. else
  715. echo -e "\n No color picker selected"
  716.  
  717. fi
  718.  
  719. # steam
  720. if [ "$steam" == "y" ] || [ "$steam" == "Y" ]; then
  721. sudo pacman -S steam steam-native-runtime --noconfirm --needed
  722. yaourt -S ttf-ms-fonts --noconfirm --needed
  723.  
  724. fi
  725.  
  726.  
  727. # lock
  728. if [ "$lck" == "y" ] || [ "$lck" == "Y" ]; then
  729. yaourt -S i3lock-color-git --noconfirm --needed
  730. sudo mv -f /etc/oblogout-lock.conf /etc/oblogout.conf
  731. mv -f /home/$USER/.config/i3/config-lock /home/$USER/.config/i3/config
  732. mv -f /home/$USER/.config/openbox/rc-lock.xml /home/$USER/.config/openbox/rc.xml
  733. mv -f /home/$USER/.config/polybar/config-i3-lock /home/$USER/.config/polybar/config-i3
  734. mv -f /home/$USER/.config/polybar/config-openbox-lock /home/$USER/.config/polybar/config-openbox
  735. openbox --reconfigure
  736.  
  737. else
  738. sudo rm -rf /usr/share/i3lock-fancy
  739. sudo rm -f /usr/bin/i3lock-fancy
  740. sudo rm -f /etc/oblogout-lock.conf
  741. rm -f /home/$USER/.config/polybar/config-{i3-lock,openbox-lock}
  742. rm -f /home/$USER/.config/openbox/rc-lock.xml
  743. rm -f /home/$USER/.config/i3/config-lock
  744. echo -e "\n No screen lock needed"
  745.  
  746. fi
  747.  
  748. # keyring
  749. if [ "$key" == "y" ] || [ "$key" == "Y" ]; then
  750. sudo pacman -S gnome-keyring --noconfirm --needed
  751.  
  752. else
  753. echo -e "\n No keyring selected"
  754.  
  755. fi
  756.  
  757. # power manager
  758. if [ "$pwr" == "y" ] || [ "$pwr" == "Y" ]; then
  759. sudo pacman -S xfce4-power-manager --noconfirm --needed
  760. echo "xfce4-power-manager &" >> /home/$USER/.config/openbox/autostart
  761.  
  762. else
  763. rm -f /home/$USER/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
  764. clear
  765. echo -e "\n xfce4-power-manager not needed"
  766. sleep 1
  767.  
  768. fi
  769.  
  770. # notifications
  771. if [ "$notify" == "y" ] || [ "$notify" == "Y" ]; then
  772. sudo pacman -S xfce4-notifyd --noconfirm --needed
  773. echo "xfce4-notifyd &" >> /home/$USER/.config/openbox/autostart
  774.  
  775. else
  776. rm -f /home/$USER/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml
  777. clear
  778. echo -e "\n xfce4-notifyd not needed"
  779. sleep 1
  780.  
  781. fi
  782.  
  783. # pamac & polkit
  784. if [ "$pac" == "y" ] || [ "$pac" == "Y" ]; then
  785. yaourt -S pamac-aur xfce-polkit --noconfirm --needed
  786. echo "(sleep 2; pamac-tray) &" >> /home/$USER/.config/openbox/autostart
  787. sed -i 's/#exec --no-startup-id \/usr\/lib\/xfce-polkit\/xfce-polkit/exec --no-startup-id \/usr\/lib\/xfce-polkit\/xfce-polkit/g' /home/$USER/.config/i3/config
  788.  
  789. else
  790. if [ "$pol" == "y" ] || [ "$pol" == "Y" ]; then
  791. yaourt -S xfce-polkit --noconfirm --needed
  792. sed -i 's/#exec --no-startup-id \/usr\/lib\/xfce-polkit\/xfce-polkit/exec --no-startup-id \/usr\/lib\/xfce-polkit\/xfce-polkit/g' /home/$USER/.config/i3/config
  793.  
  794. else
  795. echo -e "\n No polkit installed"
  796.  
  797. fi
  798. fi
  799.  
  800.  
  801. # conky
  802. if [[ "$conk" =~ ^[1-3]$ ]]; then
  803. if [ "$conk" == "1" ]; then
  804. sudo pacman -S conky --noconfirm --needed
  805.  
  806. elif [ "$conk" == "2" ]; then
  807. yaourt -S conky-lua --noconfirm --needed
  808.  
  809. elif [ "$conk" == "3" ]; then
  810. yaourt -S conky-lua-nv --noconfirm --needed
  811.  
  812. else
  813. echo -e "\n No conky package selected"
  814.  
  815. fi
  816.  
  817. if [ "$alconk" == "y" ] || [ "$alconk" == "Y" ]; then
  818. yaourt -S yad zenity webkitgtk webkit2gtk --noconfirm --needed
  819.  
  820. sed -i '/al-compositor/ i\
  821. <menu execute="al-conky-pipemenu" id="ConkyPipeMenu" label="Conky"/>' /home/$USER/.config/openbox/menu.xml
  822. sed -i '/al-compositor/ i\
  823. <menu execute="al-conky-pipemenu" id="ConkyPipeMenu" label="Conky"/>' /home/$USER/.config/openbox/menu-tint.xml
  824.  
  825. else
  826. sudo rm /usr/bin/al-conky*
  827. sudo rm -f /usr/share/archlabs/docs/helpfile-conkyzen.txt
  828. echo -e "\n No al-conky extras needed"
  829.  
  830. fi
  831. else
  832. sudo rm -f /usr/bin/al-conky*
  833. sudo rm -f /usr/share/archlabs/docs/helpfile-conkyzen.txt
  834. fi
  835.  
  836. # extra codecs
  837. if [ "$cod" == "y" ] || [ "$cod" == "Y" ]; then
  838. sudo pacman -S a52dec autofs faac faad2 flac lame libdca libdv libmad libmpeg2 --noconfirm --needed
  839. sudo pacman -S libtheora libvorbis libxv wavpack x264 libdvdcss dvd+rw-tools dvdauthor dvgrab --needed --noconfirm
  840.  
  841. fi
  842.  
  843.  
  844. # image
  845. if [ "$img" == "1" ]; then
  846. sudo pacman -S gimp --noconfirm --needed
  847.  
  848. elif [ "$img" == "2" ]; then
  849. sudo pacman -S inkscape --noconfirm --needed
  850.  
  851. elif [ "$img" == "3" ]; then
  852. sudo pacman -S pinta --noconfirm --needed
  853.  
  854. elif [ "$img" == "4" ]; then
  855. sudo pacman -S gimp inkscape pinta --noconfirm --needed
  856.  
  857. else
  858. echo -e "\n No image editing applications selected"
  859.  
  860. fi
  861.  
  862. # screen capture
  863. if [ "$cap" == "1" ]; then
  864. sudo pacman -S simplescreenrecorder --noconfirm --needed
  865.  
  866. elif [ "$cap" == "2" ]; then
  867. sudo pacman -S obs-studio --noconfirm --needed
  868.  
  869. elif [ "$cap" == "3" ]; then
  870. yaourt -S peek --noconfirm --needed
  871.  
  872. elif [ "$cap" == "4" ]; then
  873. yaourt -S xfce4-screenshooter --needed
  874.  
  875. elif [ "$cap" == "5" ]; then
  876. yaourt -S xfce4-screenshooter simplescreenrecorder obs-studio peek --noconfirm --needed
  877.  
  878. else
  879. echo -e "\n No screen capture software selected"
  880.  
  881. fi
  882.  
  883. # video
  884. if [ "$vid" == "1" ]; then
  885. sudo pacman -Rn breeze-snow-cursor-theme --noconfirm
  886. sudo pacman -S kdenlive kdebase-runtime dvdauthor frei0r-plugins qt5ct breeze breeze-icons --noconfirm --needed
  887. mkdir -p /home/$USER/.config/qt5ct
  888. echo "[Appearance]
  889. color_scheme_path=
  890. custom_palette=false
  891. icon_theme=breeze
  892. style=Breeze
  893.  
  894. [Interface]
  895. activate_item_on_single_click=1
  896. buttonbox_layout=0
  897. cursor_flash_time=1000
  898. dialog_buttons_have_icons=0
  899. double_click_interval=400
  900. gui_effects=General
  901. menus_have_icons=true
  902. stylesheets=@Invalid()
  903. toolbutton_style=4
  904. wheel_scroll_lines=3
  905. " > /home/$USER/.config/qt5ct/qt5ct.conf
  906.  
  907. elif [ "$vid" == "2" ]; then
  908. sudo pacman -S openshot --noconfirm --needed
  909.  
  910. elif [ "$vid" == "3" ]; then
  911. yaourt -S lwks --noconfirm --needed
  912.  
  913. else
  914. echo -e "\n No video editor selected"
  915.  
  916. fi
  917.  
  918. # office
  919. if [ "$off" == "1" ]; then
  920. sudo pacman -S libreoffice-fresh --noconfirm --needed
  921.  
  922. elif [ "$off" == "2" ]; then
  923. sudo pacman -S abiword --noconfirm --needed
  924.  
  925. elif [ "$off" == "3" ]; then
  926. sudo pacman -S calligra --noconfirm --needed
  927.  
  928. else
  929. echo -e "\n No office software selected"
  930.  
  931. fi
  932.  
  933. # mail client
  934. if [ "$mail" == "1" ]; then
  935. sudo pacman -S thunderbird --noconfirm --needed
  936.  
  937. elif [ "$mail" == "2" ]; then
  938. sudo pacman -S geary --noconfirm --needed
  939.  
  940. elif [ "$mail" == "3" ]; then
  941. sudo pacman -S evolution --noconfirm --needed
  942.  
  943. elif [ "$mail" == "4" ]; then
  944. sudo pacman -S mutt --noconfirm --needed
  945.  
  946. else
  947. echo -e "\n No mail client selected"
  948.  
  949. fi
  950.  
  951. # torrent client
  952. if [ "$tor" == "1" ]; then
  953. sudo pacman -S deluge --noconfirm --needed
  954.  
  955. elif [ "$tor" == "2" ]; then
  956. sudo pacman -S transmission-gtk --noconfirm --needed
  957.  
  958. elif [ "$tor" == "3" ]; then
  959. sudo pacman -S qbittorrent --noconfirm --needed
  960.  
  961. else
  962. echo -e "\n No torrent client selected"
  963.  
  964. fi
  965.  
  966.  
  967. # Virtual utils
  968. if [ "$vbox" == "y" ] || [ "$vbox" == "Y" ]; then
  969. sudo pacman -Rns virtualbox-guest-utils virtualbox-guest-modules-arch --noconfirm
  970. sudo rm -f /etc/xdg/autostart/vboxclient.desktop
  971.  
  972. fi
  973.  
  974.  
  975. # window manager and session
  976. if [ "$wm" == "y" ] || [ "$wm" == "Y" ]; then
  977. yaourt -S i3-gaps i3status --noconfirm
  978.  
  979. if [ "$ses" == "y" ] || [ "$ses" == "Y" ]; then
  980. sudo sed -i 's/openbox/i3/g' /etc/lightdm/lightdm.conf
  981.  
  982. if [ "$rmob" == "y" ] || [ "$rmob" == "Y" ]; then
  983. sudo pacman -Rn openbox lxappearance-obconf oblogout obconf --noconfirm
  984. sudo rm -f /usr/bin/{exit-openbox,kickshaw,al-*}
  985. rm -rf /home/$USER/.config/openbox
  986. rm -rf /home/$USER/.config/tint2
  987. rm -f /home/$USER/.config/polybar/{config-openbox,launch-ob-polybar.sh}
  988.  
  989. fi
  990. fi
  991.  
  992. else
  993. if [ "$rmi3" == "y" ] || [ "$rmi3" == "Y" ]; then
  994. rm -rf /home/$USER/.config/i3
  995. rm -f /home/$USER/.config/polybar/{config-i3,launch-i3-polybar.sh}
  996. sudo sed -i 's/i3/openbox/g' /etc/lightdm/lightdm.conf
  997.  
  998. fi
  999. fi
  1000.  
  1001.  
  1002.  
  1003. # Swapfile setup
  1004. if [ "$swp" == "y" ] || [ "$swp" == "Y" ]; then
  1005. if [ "$cswp" == "y" ] || [ "$cswp" == "Y" ]; then
  1006. if [ -n "$size" ]; then
  1007. if [[ $size == *G ]] || [[ $size == *M ]]; then
  1008. sudo fallocate -l $size /swapfile
  1009. sudo chmod 600 /swapfile
  1010. sudo mkswap /swapfile
  1011. sudo swapon /swapfile
  1012.  
  1013. echo -e "\n Appending to /ect/fstab\n"
  1014. echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab
  1015. sleep 1
  1016.  
  1017. else
  1018. clear
  1019. echo -e "\n Wrong formatting"
  1020.  
  1021. fi
  1022. else
  1023. clear
  1024. echo -e "\n No size entered"
  1025.  
  1026. fi
  1027.  
  1028. else
  1029. totalM=$(free --mega | awk '/^Mem:/{print $2}') ; totalM=$(($totalM + 20)) ; totalM="${totalM}M"
  1030.  
  1031. sudo fallocate -l $totalM /swapfile
  1032. sudo chmod 600 /swapfile
  1033. sudo mkswap /swapfile
  1034. sudo swapon /swapfile
  1035.  
  1036. echo -e "\n Appending to /ect/fstab\n"
  1037. echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab
  1038. sleep 1
  1039.  
  1040. fi
  1041. fi
  1042.  
  1043.  
  1044.  
  1045. # panel switch
  1046. if [ "$panel" == "y" ] || [ "$panel" == "Y" ] || [ "$panel" == "n" ] || [ "$panel" == "N" ]; then
  1047. if [ "$dock" == "1" ]; then
  1048. sudo pacman -S plank --noconfirm --needed
  1049. echo "(sleep 2; plank) &" >> /home/$USER/.config/openbox/autostart
  1050.  
  1051. elif [ "$dock" == "2" ]; then
  1052. sudo pacman -S docky --noconfirm --needed
  1053. echo "(sleep 2; docky) &" >> /home/$USER/.config/openbox/autostart
  1054.  
  1055. elif [ "$dock" == "3" ]; then
  1056. sudo pacman -S cairo-dock cairo-dock-plug-ins --noconfirm --needed
  1057. echo "(sleep 2; cairo-dock) &" >> /home/$USER/.config/openbox/autostart
  1058.  
  1059. else
  1060. clear
  1061. echo -e "\n No dock selected"
  1062. sleep 1
  1063.  
  1064. fi
  1065.  
  1066. if [ "$panel" == "y" ] || [ "$panel" == "Y" ]; then
  1067. if ! [ "$wm" == "y" ] || [ "$wm" == "Y" ]; then
  1068. sed -i 's/$HOME\/.config\/polybar\/launch-ob-polybar.sh/tint2/g' /home/$USER/.config/openbox/autostart
  1069. sed -i 's/#(sleep/(sleep/g' /home/$USER/.config/openbox/autostart
  1070. mv /home/$USER/.config/openbox/menu-tint.xml /home/$USER/.config/openbox/menu.xml
  1071.  
  1072. sudo pacman -S tint2 volumeicon network-manager-applet --noconfirm --needed
  1073. sudo pacman -Rns polybar-git --noconfirm
  1074. rm -rf /home/$USER/.config/polybar
  1075. openbox --reconfigure
  1076.  
  1077. else
  1078. sed -i 's/$HOME\/.config\/polybar\/launch-ob-polybar.sh/tint2/g' /home/$USER/.config/openbox/autostart
  1079. sed -i 's/#(sleep/(sleep/g' /home/$USER/.config/openbox/autostart
  1080. mv /home/$USER/.config/openbox/menu-tint.xml /home/$USER/.config/openbox/menu.xml
  1081.  
  1082. sudo pacman -S tint2 volumeicon network-manager-applet --noconfirm --needed
  1083. openbox --reconfigure
  1084.  
  1085. fi
  1086. else
  1087. rm -rf /home/$USER/.config/tint2
  1088. rm -rf /home/$USER/.config/volumeicon
  1089. rm -f /home/$USER/.config/openbox/menu-tint.xml
  1090.  
  1091. fi
  1092. fi
  1093.  
  1094.  
  1095.  
  1096. if [ "$obm" == "y" ] || [ "$obm" == "Y" ]; then
  1097. sed -i '/al-kb-pipemenu/ a\
  1098. <item label="Switch Menu">\
  1099. <action name="Execute">\
  1100. <command>genmenu</command>\
  1101. </action>\
  1102. </item>\
  1103. <separator/>' /home/$USER/.config/openbox/menu.xml
  1104.  
  1105. sudo pacman -S perl perl-data-dump perl-linux-desktopfiles --noconfirm --needed
  1106. openbox --reconfigure
  1107.  
  1108. if ! [ "$panel" == "y" ] || [ "$panel" == "Y" ]; then
  1109. sed -i '61d' /home/$USER/.config/obmenu-generator/schema.pl
  1110.  
  1111. fi
  1112.  
  1113. if ! [ "$alconk" == "y" ] || [ "$alconk" == "Y" ]; then
  1114. sed -i '60d' /home/$USER/.config/obmenu-generator/schema.pl
  1115.  
  1116. fi
  1117. else
  1118. rm -rf /home/$USER/.config/obmenu-generator
  1119. sudo rm -f /usr/bin/{obmenu-generator,genmenu,oldmenu}
  1120.  
  1121. fi
  1122.  
  1123.  
  1124.  
  1125. # reboot
  1126. clear
  1127. printf "\n A restart is needed to finish the changes, restart now? [y/n]: "
  1128. read -r reboot
  1129. if [ "$reboot" == "y" ] || [ "$reboot" == "Y" ]; then
  1130. systemctl reboot
  1131.  
  1132. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement