From 9833101a8d2100d7150a91bd95f79dcb49c84ac4 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Thu, 13 Feb 2020 16:26:53 +0100 Subject: [PATCH] Awesome --- tforgione.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tforgione.sh b/tforgione.sh index 1a37ca6..04e575e 100755 --- a/tforgione.sh +++ b/tforgione.sh @@ -70,6 +70,22 @@ install() { error "distribution not recognized, can't install $1." } +remove() { + test_command apt + if [ $? -eq 0 ]; then + sudo apt purge -yqq $1 + return + fi + + test_command pacman + if [ $? -eq 0 ]; then + sudo pacman -Rsn $1 + return + fi + + error "distribution not recognized, can't remove $1." +} + install_python3() { test_command apt if [ $? -eq 0 ]; then @@ -373,6 +389,40 @@ configure_rust() { fi } +configure_node() { + yes_no_ask "do you wish to install and configure node and npm?" + + if [ $? -ne 0 ]; then + return + fi + + install nodejs + install npm + + mkdir ~/.npmbin + npm config set prefix ~/.npmbin + + remove npm +} + +configure_awesome() { + yes_no_ask "do you wish to install and configure awesome?" + + if [ $? -ne 0 ]; then + return + fi + + install awesome + install acpi + git_clone https://gitea.tforgione.fr/tforgione/awesome ~/.config/awesome + + git_clone https://github.com/horst3180/arc-icon-theme --depth 1 && cd arc-icon-theme + ./autogen.sh --prefix=/usr + sudo make install + cd .. + rm -rf arc-icon-theme +} + main() { echo_green "=== WELCOME TO TFORGIONE'S CONFIG INSTALLER ===" @@ -385,6 +435,8 @@ main() { configure_neovim configure_powerline configure_rust + configure_node + configure_awesome } main < /dev/tty