enable save output via printf
This commit is contained in:
parent
57e4ea564d
commit
5526161f7f
32
install.sh
32
install.sh
@ -1,23 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
GRE='\033[0;32m'
|
||||
{RED}='\033[0;31m'
|
||||
{NOR}='\033[0m'
|
||||
say () { say %s\\n "$*" ; }
|
||||
|
||||
echo "${GRE}"
|
||||
echo "::: Installing i3blocks"
|
||||
echo "::: Checking if i3 is installed"
|
||||
GRE='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
NOR='\033[0m'
|
||||
|
||||
say "${GRE}"
|
||||
say "::: Installing i3blocks"
|
||||
say "::: Checking if i3 is installed"
|
||||
i3 -v &> /dev/null
|
||||
[[ $? -ne 0 ]] && echo "${RED}::: Please install i3 and restart this setup${NOR}\n" && exit 1
|
||||
echo "::: Checking if i3blocks is installed"
|
||||
[[ $? -ne 0 ]] && say "${RED}::: Please install i3 and restart this setup${NOR}\n" && exit 1
|
||||
say "::: Checking if i3blocks is installed"
|
||||
i3blocks -V &> /dev/null
|
||||
[[ $? -ne 0 ]] && echo "${RED}::: Please install i3blocks and restart this setup${NOR}\n" && exit 1
|
||||
echo "::: Checking if the directory ~/.config/i3blocks already exists"
|
||||
[[ -d "$HOME/.config/i3blocks" ]] && echo "::: Moving ~/.config/i3blocks to ~/.config/i3blocks.bak" && mv "$HOME/.config/i3blocks"{,.bak} >/dev/null 2>/dev/null
|
||||
echo "::: Downloading simple-i3blocks to ~/.config/i3blocks"
|
||||
[[ $? -ne 0 ]] && say "${RED}::: Please install i3blocks and restart this setup${NOR}\n" && exit 1
|
||||
say "::: Checking if the directory ~/.config/i3blocks already exists"
|
||||
[[ -d "$HOME/.config/i3blocks" ]] && say "::: Moving ~/.config/i3blocks to ~/.config/i3blocks.bak" && mv "$HOME/.config/i3blocks"{,.bak} >/dev/null 2>/dev/null
|
||||
say "::: Downloading simple-i3blocks to ~/.config/i3blocks"
|
||||
git clone https://will.kein.hk/git/koksnuss/simple-i3blocks.git ~/.config/i3blocks &> /dev/null
|
||||
cd "$HOME/.config/i3blocks/modules"
|
||||
echo "::: Masking modules as execulatbles"
|
||||
say "::: Masking modules as execulatbles"
|
||||
chmod u+x audio backlight battery cpu datetime ip ram storage
|
||||
echo "::: Finished, please reload i3. Normally you can do this with the shortcut MOD+SHIFT+R"
|
||||
echo "${NOR}"
|
||||
say "::: Finished, please reload i3. Normally you can do this with the shortcut MOD+SHIFT+R"
|
||||
say "${NOR}"
|
||||
|
Reference in New Issue
Block a user