Completes bootstrap.v2 setup
This commit is contained in:
parent
2bbccb4595
commit
b8192c832e
24 changed files with 86 additions and 143 deletions
3
.config/yadm/bootstrap
Executable file
3
.config/yadm/bootstrap
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/env sh
|
||||
|
||||
$HOME/.config/yadm/bootstrap.v2/bootstrap
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/env sh
|
||||
|
||||
sudo firewall-cmd --permanent --add-port=1714-1764/{tcp,udp}
|
||||
|
||||
echo "-- For some reason, its recommended to reboot your device to make kdeconnect work..."
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/env sh
|
||||
|
||||
xdg-mime default vimiv.desktop image/{png,jpeg}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/env sh
|
||||
|
||||
ya pack --install
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/env sh
|
||||
|
||||
chsh -s $(which zsh)
|
||||
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --keep-zshrc --unattended || exit 0
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/env sh
|
||||
|
||||
declare -A repositories
|
||||
|
||||
repositories['DSA']="ssh://git.php.fail/neintonine/dsa.git"
|
||||
repositories['Notes']="ssh://git.php.fail/neintonine/notes.git"
|
||||
repositories['gameconcepts']="ssh://git.php.fail/neintonine/game-concepts.git"
|
||||
|
||||
for path in "${!repositories[@]}"; do
|
||||
url=${repositories[$path]}
|
||||
|
||||
realPath="${HOME}/$path"
|
||||
if [ -d "$realPath" ]; then
|
||||
echo "-- $realPath already exist... skipping clone"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "-- Cloning to $realPath";
|
||||
git clone "$url" "$realPath"
|
||||
done
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/env sh
|
||||
|
||||
echo "# Refreshing darkman (bruteforce method)"
|
||||
darkman toggle
|
||||
darkman toggle
|
||||
|
|
@ -3,4 +3,8 @@
|
|||
addApplications bluez \
|
||||
bluez-utils
|
||||
|
||||
sudo systemctl enable --now bluetooth.service
|
||||
setupBluetooth() {
|
||||
sudo systemctl enable --now bluetooth.service
|
||||
}
|
||||
|
||||
addActions setupBluetooth
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ if [ -z ${XDG_SESSION_DESKTOP+x} ]; then
|
|||
read -p "-- Which desktop environment do you want to install? " -r XDG_SESSION_DESKTOP
|
||||
fi
|
||||
|
||||
echo "-- Adding dependencies for $XDG_SESSION_DESKTOP"
|
||||
|
||||
if [ $XDG_SESSION_DESKTOP = "i3" ]; then
|
||||
addApplications polybar \
|
||||
betterlockscreen \
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@
|
|||
addApplications zen-browser-bin \
|
||||
zathura zathura-pdf-mupdf \
|
||||
onlyoffice-bin \
|
||||
bitwarden
|
||||
bitwarden \
|
||||
blueman \
|
||||
planify
|
||||
|
|
|
|||
|
|
@ -3,16 +3,4 @@
|
|||
addApplications git gnome-keyring \
|
||||
git-credential-oauth
|
||||
|
||||
configure-git-oauth() {
|
||||
git credential-oauth configure
|
||||
}
|
||||
|
||||
#source ./30-GitUserConfig.sh.add
|
||||
|
||||
if ! git config list | grep "credential.helper=oauth" >/dev/null; then
|
||||
addActions configure-git-oauth
|
||||
fi
|
||||
|
||||
if ! git config list | grep "user.name" > /dev/null; then
|
||||
addActions git-user-config
|
||||
fi
|
||||
addActions "git credential-oauth configure"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/env sh
|
||||
|
||||
git-user-config() {
|
||||
gitUserConfig() {
|
||||
git config --global user.email "fedde@eventit.ag"
|
||||
git config --global user.name "Michel Fedde"
|
||||
}
|
||||
addActions gitUserConfig
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/env sh
|
||||
|
||||
git-user-config() {
|
||||
gitUserConfig() {
|
||||
git config --global user.email "git@iedsoftworks.com"
|
||||
git config --global user.name "Michel Fedde"
|
||||
}
|
||||
|
||||
addActions gitUserConfig
|
||||
|
|
@ -1,3 +1,11 @@
|
|||
#!/bin/env sh
|
||||
|
||||
addApplications kdeconnect
|
||||
|
||||
setupKDEConnect() {
|
||||
sudo firewall-cmd --permanent --add-port=1714-1764/{tcp,udp}
|
||||
|
||||
echo "-- For some reason, its recommended to reboot your device to make kdeconnect work..."
|
||||
}
|
||||
|
||||
addActions setupKDEConnect
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/env sh
|
||||
|
||||
echo "# Installing thunar"
|
||||
|
||||
addApplications thunar \
|
||||
gvfs \
|
||||
thunar-archive-plugin \
|
||||
|
|
|
|||
0
.config/yadm/bootstrap.v2/applications/30-Vimiv.sh
Normal file → Executable file
0
.config/yadm/bootstrap.v2/applications/30-Vimiv.sh
Normal file → Executable file
|
|
@ -1,3 +1,13 @@
|
|||
#!/bin/env sh
|
||||
|
||||
addApplications zsh oh-my-zsh
|
||||
|
||||
setupZsh() {
|
||||
chsh -s $(which zsh)
|
||||
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --keep-zshrc --unattended || return 0
|
||||
}
|
||||
|
||||
if [ $SHELL != "/usr/bin/zsh" ]; then
|
||||
addActions setupZsh
|
||||
fi
|
||||
|
|
|
|||
1
.config/yadm/bootstrap.v2/applications/40-GitRepositories.sh##class.Work
Executable file
1
.config/yadm/bootstrap.v2/applications/40-GitRepositories.sh##class.Work
Executable file
|
|
@ -0,0 +1 @@
|
|||
|
||||
25
.config/yadm/bootstrap.v2/applications/40-GitRepositories.sh##default
Executable file
25
.config/yadm/bootstrap.v2/applications/40-GitRepositories.sh##default
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/env sh
|
||||
|
||||
|
||||
setupGitRepositories() {
|
||||
|
||||
declare -A repositories
|
||||
|
||||
repositories['DSA']="ssh://git.php.fail/neintonine/dsa.git"
|
||||
repositories['Notes']="ssh://git.php.fail/neintonine/notes.git"
|
||||
repositories['gameconcepts']="ssh://git.php.fail/neintonine/game-concepts.git"
|
||||
for path in "${!repositories[@]}"; do
|
||||
url=${repositories[$path]}
|
||||
|
||||
realPath="${HOME}/$path"
|
||||
if [ -d "$realPath" ]; then
|
||||
echo "-- $realPath already exist... skipping clone"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "-- Cloning to $realPath";
|
||||
git clone "$url" "$realPath"
|
||||
done
|
||||
}
|
||||
|
||||
addActions setupGitRepositories
|
||||
6
.config/yadm/bootstrap.v2/applications/40-MimeDefaults.sh
Executable file
6
.config/yadm/bootstrap.v2/applications/40-MimeDefaults.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/env sh
|
||||
|
||||
setupMimeTypes() {
|
||||
xdg-mime default vimiv.desktop image/{png,jpeg}
|
||||
}
|
||||
addActions setupMimeTypes
|
||||
9
.config/yadm/bootstrap.v2/applications/99-Reload.sh
Executable file
9
.config/yadm/bootstrap.v2/applications/99-Reload.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/env sh
|
||||
|
||||
reloadDarkman() {
|
||||
echo "# Refreshing darkman (bruteforce method)"
|
||||
darkman toggle
|
||||
darkman toggle
|
||||
}
|
||||
|
||||
addActions reloadDarkman
|
||||
|
|
@ -7,11 +7,9 @@ SCRIPTPATH="$(
|
|||
pwd -P
|
||||
)"
|
||||
APPLICATIONS_PATH="$SCRIPTPATH/applications"
|
||||
ACTIONS_PATH="$SCRIPTPATH/actions"
|
||||
|
||||
#$SCRIPTPATH/functions/set_class.sh
|
||||
$SCRIPTPATH/functions/set_class.sh
|
||||
source $SCRIPTPATH/functions/pkg.sh
|
||||
source $SCRIPTPATH/functions/filerunner.sh
|
||||
|
||||
if [[ ! -d "$APPLICATIONS_PATH" ]]; then
|
||||
echo "Error: applications directory '$APPLICATIONS_PATH' not found" >&2
|
||||
|
|
@ -30,7 +28,7 @@ actions=()
|
|||
addApplications ()
|
||||
{
|
||||
for application in "$@"; do
|
||||
echo "adding application: $application"
|
||||
# echo "adding application: $application"
|
||||
|
||||
applications+=("$application")
|
||||
done
|
||||
|
|
@ -39,7 +37,7 @@ addApplications ()
|
|||
addActions()
|
||||
{
|
||||
for action in "$@"; do
|
||||
echo "adding action: $action"
|
||||
# echo "adding action: $action"
|
||||
|
||||
actions+=("$action")
|
||||
done
|
||||
|
|
@ -55,4 +53,8 @@ echo -n "# Installing/Updating applications (${#applications[@]})"
|
|||
installPackages ${applications[*]}
|
||||
|
||||
echo "# Executing actions... (${#actions[@]})"
|
||||
|
||||
for action in "${actions[@]}";
|
||||
do
|
||||
echo "==> Now executing: ${action}"
|
||||
$action
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
#!/bin/env sh
|
||||
|
||||
_repeat() {
|
||||
local start=1
|
||||
local end=${1:-80}
|
||||
local str="${2:-=}"
|
||||
local range=$(seq $start $end)
|
||||
for i in $range; do echo -n "${str}"; done
|
||||
}
|
||||
|
||||
_header() {
|
||||
local length="$1"
|
||||
echo -n "/="
|
||||
_repeat ${length} "="
|
||||
echo "=\\"
|
||||
}
|
||||
_value() {
|
||||
local value="$1"
|
||||
echo -n "| "
|
||||
echo -n ${value}
|
||||
echo " |"
|
||||
}
|
||||
_footer() {
|
||||
local length="$1"
|
||||
echo -n "\\="
|
||||
_repeat ${length} "="
|
||||
echo "=/"
|
||||
}
|
||||
|
||||
display() {
|
||||
local value="$1"
|
||||
_header ${#value}
|
||||
_value "${value}"
|
||||
_footer ${#value}
|
||||
}
|
||||
|
||||
runfile() {
|
||||
local command="$1"
|
||||
local commandName=$(basename $command)
|
||||
local prompt="Do you wish to run $commandName? [Ynq]"
|
||||
local display="Executing $commandName"
|
||||
|
||||
local promptLength=$((${#prompt}))
|
||||
local displayLength=${#display}
|
||||
|
||||
local maxWidth=$((promptLength > displayLength ? promptLength : displayLength))
|
||||
|
||||
_header ${maxWidth}
|
||||
|
||||
read -p "| $prompt |" -n 1 -r -s
|
||||
echo
|
||||
|
||||
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||
_footer ${maxWidth}
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ $REPLY =~ ^[Qq]$ ]]; then
|
||||
_footer ${maxWidth}
|
||||
display "Exiting..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -n "| $display"
|
||||
_repeat $((maxWidth - displayLength)) " "
|
||||
echo " |"
|
||||
|
||||
_footer ${maxWidth}
|
||||
|
||||
if ! "$command"; then
|
||||
echo "Error: bootstrap '$command' failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue