~scripts
58 itemsDownload ./*

58 itemsDownload ./*

..
display
dzen2
nginx
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton.sh
dailywall
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
mp3ogg
netspeed.sh
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
readystart.sh
rotate.sh
scan.sh
screencast
screencast2
scrot
scrotw
search
skull
slocker
startblender.sh
starwars
streamit
sumnum
synctimedate.sh
tty-colorize
usrmount
ytp
ytplay
zombie-restart.sh


scriptsinstall-twily.sh
265•  10 months ago•  DownloadRawClose
10 months ago•  265

{}
#!/bin/bash
#
# author: twily 2023
# install default twily configs, may need further twaking;
# will affect zshrc, vimrc, screenrc, Xresources and download of scripts~

echo "Install primary tools zsh/vim and 'wget' and 'sed' to fetch twily configs~"
echo "Configs will be placed where they should be in relative to \$HOME"
echo "Your original configs will be placed in ~/twilybackups/ created folder"
echo ""
if [ -f ~/twilybackups/lock ]; then
    echo "~/twilybackups/lock to continue remove this file created last run-"
    echo "exit"
    exit
fi
p="N"
echo -n "Continue installing twily configs/scripts to your home dir? [y/N]: "
read p
echo ""
if [ "$p" != "Y" ] && [ "$p" != "y" ]; then
    echo "exiting..."
    exit
fi
echo "Continuing-"

echo "Creating ~/twilybackups to store your original configs.."
mkdir ~/twilybackups


echo "Installing twily custom vim syntax highlighting colors, set in .vimrc~"
mkdir -p ~/twilybackups/.vim/colors
mv ~/.vim/colors/twily.vim ~/twilybackups/.vim/colors/twily.vim
mv ~/.vim/colors/twilylight.vim ~/twilybackups/.vim/colors/twilylight.vim
mv ~/.vim/colors/twilylight2.vim ~/twilybackups/.vim/colors/twilylight2.vim
mkdir -p ~/.vim/colors
wget https://twily.info/s/.vim/colors/twily.vim -O ~/.vim/colors/twily.vim
wget https://twily.info/s/.vim/colors/twilylight.vim -O ~/.vim/colors/twilylight.vim
wget https://twily.info/s/.vim/colors/twilylight2.vim -O ~/.vim/colors/twilylight2.vim

echo "Installing twily custom vimrc, use :W (captial w) to write as sudo after opening without permissions"
mv ~/.vimrc ~/twilybackups/
wget https://twily.info/s/.vimrc -O ~/.vimrc

echo "Installing twily custom zsh, custom aliases ie screen commands 'sc name', 'sl', 'sr name'"
echo "Also uses zsh-syntax-highlighter (must be installed)"
mv ~/.zshrc ~/twilybackups/
wget https://twily.info/s/.zshrc -O ~/.zshrc
sed -i "s/amalie/$USER/g" ~/.zshrc # replace
sed -i "s/scripts/twilyscripts/g" ~/.zshrc # replace


SC1=("4cdl" "4trips" "alarm" "ambient" "battery-monitor" "brightness.sh" "checkit" "cleverbot.py" "clock" "color-gem" "colors-hex" "colorscheme.sh" "compton" "dailywall" "dmenu" "ffthumb" "grid" "gridmacro" "gridmacro.kde" "help" "importw" "indexer" "installng" "keep-on" "mp4ogg" "orange" "pipes" "pipes.x" "ports" "rain" "randwall" "rotate.sh" "scan.sh" "screen-dim" "screencast" "screencast2" "scrot" "scrotw" "search" "skull" "slocker" "starwars" "streamit" "sumnum" "tty-colorize" "usrmount" "ytp" "ytplay")
SC2=("2spooky.lua" "README.md" "blocks" "colors" "colorscheme" "dna" "dna1" "faces" "fetch" "invaders" "lines" "pacman" "pipes" "rallyx" "rectangles" "skull" "slendy" "tanks" "tux" "xrally")
SC3=("drawterm" "ext.grid" "grid" "gridmacro" "gridmacro.kde" "snap.all" "snap.grid" "split.grid" "swap.grid")
echo "Installing twily custom scripts to ~/twilyscripts/* {+vosh, +tiling}"
mv ~/twilyscripts ~/twilybackups/twilyscripts
mkdir -p ~/twilyscripts
for(( i=0;i<${#SC1[*]};i++ )); do
    wget https://twily.info/s/scripts/${SC1[$i]} -O ~/twilyscripts/${SC1[$i]}
    chmod +x ~/twilyscripts/${SC1[$i]} # executable
done
mkdir -p ~/twilyscripts/vosh
for(( i=0;i<${#SC2[*]};i++ )); do
    wget https://twily.info/s/scripts/${SC2[$i]} -O ~/twilyscripts/${SC2[$i]}
    chmod +x ~/twilyscripts/${SC2[$i]} # executable
done
mkdir -p ~/twilyscripts/tiling
for(( i=0;i<${#SC3[*]};i++ )); do
    wget https://twily.info/s/scripts/${SC3[$i]} -O ~/twilyscripts/${SC3[$i]}
    chmod +x ~/twilyscripts/${SC3[$i]} # executable
done


echo "Installing twily custom Xresources, use for urxvt ( $ xrdb -merge ~/.Xresources )"
mv ~/.Xresources ~/twilybackups/
wget https://twily.info/s/.Xresources -O ~/.Xresources

echo "Installing twily custom screenrc (use 'C-w d' instead of 'C-a d' to detach)"
mv ~/.screenrc ~/twilybackups/
wget https://twily.info/s/.screenrc -O ~/.screenrc

echo "Installing twily custom help page into ~/.local/bin/help, use $ help command after"
mkdir -p ~/twilybackups/.local/bin
mv ~/.local/bin/help ~/twilybackups/.local/bin/help
mkdir -p ~/.local/bin
wget https://twily.info/s/scripts/help -O ~/.local/bin/help
chmod +x ~/.local/bin/help # executable

echo "Locking ~/twilybackups to prevent overwrite"
echo "" > ~/twilybackups/lock

echo "Changing shell to zsh with $ chsh -s shell (find shells with $ cat /etc/shells, default bash)"
chsh -s $(cat /etc/shells|grep zsh|cut -d$'\n' -f1) # change shell zsh

echo ""
echo "Done installing twily~ find your original configs in ~/twilybackups/* (Show hidden files)"
#echo "To change to zsh use commands;"
#echo "$ cat /etc/shells (to find path)"
#echo "$ chsh -s /usr/bin/zsh (set permanent, default is bash)"
echo "Open a new terminal to confirm it is working"


Top
©twily.info 2013 - 2024
twily at twily dot info



2 158 771 visits
... ^ v