Adds bootstrap.v2
This commit is contained in:
parent
06c8003cf2
commit
2bbccb4595
61 changed files with 468 additions and 4 deletions
|
|
@ -24,6 +24,7 @@ exec-once = kdeconnect-indicator &
|
||||||
exec-once = beeper --hidden --default-frame &
|
exec-once = beeper --hidden --default-frame &
|
||||||
exec-once = solaar --window="hide" &
|
exec-once = solaar --window="hide" &
|
||||||
exec-once = protonmail-bridge-core -n &
|
exec-once = protonmail-bridge-core -n &
|
||||||
|
exec-once = planify -b &
|
||||||
# exec-once = sleep 5 && nwg-dock-hyprland -a start -f -nolauncher -x -i 30 -o "DP-4" &
|
# exec-once = sleep 5 && nwg-dock-hyprland -a start -f -nolauncher -x -i 30 -o "DP-4" &
|
||||||
exec-once = wal -R
|
exec-once = wal -R
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ windowrulev2 = move 72% 7%,title:^(Picture-in-Picture)$
|
||||||
windowrulev2 = move cursor -50% -50%, class:blobdrop
|
windowrulev2 = move cursor -50% -50%, class:blobdrop
|
||||||
windowrulev2 = move cursor -50% -25%, class:Bitwarden
|
windowrulev2 = move cursor -50% -25%, class:Bitwarden
|
||||||
windowrulev2 = move 0.5% 55px,title:term_hyprdrop
|
windowrulev2 = move 0.5% 55px,title:term_hyprdrop
|
||||||
|
windowrule = move cursor -110% 0%, class:io.github.alainm23.planify
|
||||||
|
|
||||||
# windowrule v2 to avoid idle for fullscreen apps
|
# windowrule v2 to avoid idle for fullscreen apps
|
||||||
windowrulev2 = idleinhibit fullscreen, class:^(*)$
|
windowrulev2 = idleinhibit fullscreen, class:^(*)$
|
||||||
|
|
@ -89,6 +90,7 @@ windowrulev2 = float, class:Bitwarden
|
||||||
windowrulev2 = float, class:org.kde.kdeconnect.daemon
|
windowrulev2 = float, class:org.kde.kdeconnect.daemon
|
||||||
windowrulev2 = float, class:org.kde.kdeconnect-settings
|
windowrulev2 = float, class:org.kde.kdeconnect-settings
|
||||||
windowrulev2 = float, class:org.kde.kdeconnect.app
|
windowrulev2 = float, class:org.kde.kdeconnect.app
|
||||||
|
windowrule = float, class:io.github.alainm23.planify
|
||||||
|
|
||||||
# windowrule v2 - size
|
# windowrule v2 - size
|
||||||
windowrulev2 = size 70% 70%, class:^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$
|
windowrulev2 = size 70% 70%, class:^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$
|
||||||
|
|
|
||||||
|
|
@ -227,5 +227,9 @@
|
||||||
},
|
},
|
||||||
"exec-if": "which waybar-updates",
|
"exec-if": "which waybar-updates",
|
||||||
"exec": "waybar-updates"
|
"exec": "waybar-updates"
|
||||||
|
},
|
||||||
|
"custom/planify": {
|
||||||
|
"format": " ",
|
||||||
|
"on-click": "gtk-launch io.github.alainm23.planify.desktop"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@
|
||||||
"custom/file_manager",
|
"custom/file_manager",
|
||||||
"custom/tty",
|
"custom/tty",
|
||||||
"custom/colorpicker",
|
"custom/colorpicker",
|
||||||
"custom/hypr-class"
|
"custom/hypr-class",
|
||||||
|
"custom/planify"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"group/motherboard": {
|
"group/motherboard": {
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
10-SDDM.sh##default
|
|
||||||
|
|
@ -83,7 +83,7 @@ SCRIPTPATH="$(
|
||||||
pwd -P
|
pwd -P
|
||||||
)"
|
)"
|
||||||
# Directory to look for bootstrap executables in
|
# Directory to look for bootstrap executables in
|
||||||
BOOTSTRAP_D="${BASH_SOURCE[0]}.d"
|
BOOTSTRAP_D="$SCRIPTPATH/bootstrap.d"
|
||||||
|
|
||||||
$SCRIPTPATH/_set_class.sh
|
$SCRIPTPATH/_set_class.sh
|
||||||
|
|
||||||
5
.config/yadm/bootstrap.v2/actions/30-KDEConnect.sh
Executable file
5
.config/yadm/bootstrap.v2/actions/30-KDEConnect.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/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..."
|
||||||
3
.config/yadm/bootstrap.v2/actions/30-MimeDefaults.sh
Executable file
3
.config/yadm/bootstrap.v2/actions/30-MimeDefaults.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
xdg-mime default vimiv.desktop image/{png,jpeg}
|
||||||
3
.config/yadm/bootstrap.v2/actions/30-Yazi.sh.bak
Executable file
3
.config/yadm/bootstrap.v2/actions/30-Yazi.sh.bak
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
ya pack --install
|
||||||
5
.config/yadm/bootstrap.v2/actions/30-Zsh.sh
Executable file
5
.config/yadm/bootstrap.v2/actions/30-Zsh.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/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
|
||||||
21
.config/yadm/bootstrap.v2/actions/40-GitRepositories.sh
Executable file
21
.config/yadm/bootstrap.v2/actions/40-GitRepositories.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
5
.config/yadm/bootstrap.v2/actions/99-Darkman.sh
Normal file
5
.config/yadm/bootstrap.v2/actions/99-Darkman.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
echo "# Refreshing darkman (bruteforce method)"
|
||||||
|
darkman toggle
|
||||||
|
darkman toggle
|
||||||
9
.config/yadm/bootstrap.v2/applications/01-Dependencies.sh
Executable file
9
.config/yadm/bootstrap.v2/applications/01-Dependencies.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
addApplications neovim \
|
||||||
|
network-manager-applet \
|
||||||
|
ghostty \
|
||||||
|
btop \
|
||||||
|
zoxide fzf \
|
||||||
|
wifi-qr neovim \
|
||||||
|
brightnessctl
|
||||||
5
.config/yadm/bootstrap.v2/applications/02-AMDGPUDrivers.sh##class.PC
Executable file
5
.config/yadm/bootstrap.v2/applications/02-AMDGPUDrivers.sh##class.PC
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications mesa lib32-mesa \
|
||||||
|
xf86-video-amdgpu \
|
||||||
|
vulkan-radeon lib32-vulkan-radeon
|
||||||
6
.config/yadm/bootstrap.v2/applications/03-Bluetooth.sh
Executable file
6
.config/yadm/bootstrap.v2/applications/03-Bluetooth.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications bluez \
|
||||||
|
bluez-utils
|
||||||
|
|
||||||
|
sudo systemctl enable --now bluetooth.service
|
||||||
28
.config/yadm/bootstrap.v2/applications/10-SDDM.sh##default
Executable file
28
.config/yadm/bootstrap.v2/applications/10-SDDM.sh##default
Executable file
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
SDDM_THEME_PATH="/etc/sddm.conf.d/theme.conf"
|
||||||
|
|
||||||
|
addApplications sddm catppuccin-sddm-theme-mocha
|
||||||
|
|
||||||
|
sddm() {
|
||||||
|
sudo mkdir -p /etc/sddm.conf.d
|
||||||
|
sudo ln ~/.config/sddm/theme.conf /etc/sddm.conf.d/theme.conf
|
||||||
|
|
||||||
|
sudo systemctl enable sddm
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
if ! command -v sddm >/dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$SDDM_THEME_PATH" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if check; then
|
||||||
|
addAction sddm
|
||||||
|
fi
|
||||||
35
.config/yadm/bootstrap.v2/applications/11-DesktopEnv.sh
Executable file
35
.config/yadm/bootstrap.v2/applications/11-DesktopEnv.sh
Executable file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
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 \
|
||||||
|
dunst \
|
||||||
|
pulseaudio-control \
|
||||||
|
nitrogen
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $XDG_SESSION_DESKTOP = "Hyprland" ]; then
|
||||||
|
addApplications hyprland \
|
||||||
|
waybar waybar-updates \
|
||||||
|
hyprlock \
|
||||||
|
swww \
|
||||||
|
hyprswitch \
|
||||||
|
nwg-dock-hyprland \
|
||||||
|
nwg-drawer \
|
||||||
|
swaync \
|
||||||
|
wayland-logout \
|
||||||
|
hyprpicker \
|
||||||
|
pulseaudio-control \
|
||||||
|
wl-clipboard \
|
||||||
|
grim \
|
||||||
|
slurp \
|
||||||
|
hyprsunset \
|
||||||
|
darkman \
|
||||||
|
anyrun-git
|
||||||
|
fi
|
||||||
3
.config/yadm/bootstrap.v2/applications/12-Decrypt.sh
Executable file
3
.config/yadm/bootstrap.v2/applications/12-Decrypt.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addActions "yadm decrypt"
|
||||||
14
.config/yadm/bootstrap.v2/applications/20-Fonts.sh
Executable file
14
.config/yadm/bootstrap.v2/applications/20-Fonts.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
addApplications getnf
|
||||||
|
|
||||||
|
REQUESTED_FONT="JetBrainsMono"
|
||||||
|
|
||||||
|
fonts() {
|
||||||
|
getnf -i "JetBrainsMono"
|
||||||
|
fc-cache
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! getnf -l | grep "$REQUESTED_FONT" >/dev/null; then
|
||||||
|
addActions fonts
|
||||||
|
fi
|
||||||
3
.config/yadm/bootstrap.v2/applications/20-GTKGruvbox.sh
Executable file
3
.config/yadm/bootstrap.v2/applications/20-GTKGruvbox.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications gruvbox-material-icon-theme-git gruvbox-gtk-theme-git
|
||||||
31
.config/yadm/bootstrap.v2/applications/20-Keymap.sh
Executable file
31
.config/yadm/bootstrap.v2/applications/20-Keymap.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
addApplications evremap
|
||||||
|
|
||||||
|
keymap() {
|
||||||
|
|
||||||
|
sudo gpasswd -a $USER input
|
||||||
|
echo 'KERNEL=="uinput", GROUP="input"' | sudo tee /etc/udev/rules.d/input.rules
|
||||||
|
|
||||||
|
mkdir -p $HOME/.log
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
if ! id | grep input >>/dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "/etc/udev/rules.d/input.rules" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$HOME/.log" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if check; then
|
||||||
|
addActions keymap
|
||||||
|
fi
|
||||||
3
.config/yadm/bootstrap.v2/applications/20-Theming.sh
Executable file
3
.config/yadm/bootstrap.v2/applications/20-Theming.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications python-pywal sass
|
||||||
6
.config/yadm/bootstrap.v2/applications/30-GeneralPrograms.sh
Executable file
6
.config/yadm/bootstrap.v2/applications/30-GeneralPrograms.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications zen-browser-bin \
|
||||||
|
zathura zathura-pdf-mupdf \
|
||||||
|
onlyoffice-bin \
|
||||||
|
bitwarden
|
||||||
18
.config/yadm/bootstrap.v2/applications/30-Git.sh
Executable file
18
.config/yadm/bootstrap.v2/applications/30-Git.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
git-user-config() {
|
||||||
|
git config --global user.email "fedde@eventit.ag"
|
||||||
|
git config --global user.name "Michel Fedde"
|
||||||
|
}
|
||||||
6
.config/yadm/bootstrap.v2/applications/30-GitUserConfig.sh.add##default
Executable file
6
.config/yadm/bootstrap.v2/applications/30-GitUserConfig.sh.add##default
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
git-user-config() {
|
||||||
|
git config --global user.email "git@iedsoftworks.com"
|
||||||
|
git config --global user.name "Michel Fedde"
|
||||||
|
}
|
||||||
37
.config/yadm/bootstrap.v2/applications/30-Hyprdrop.sh
Executable file
37
.config/yadm/bootstrap.v2/applications/30-Hyprdrop.sh
Executable file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
HYPRDROP_GIT_PATH="$HOME/.cache/hyprdrop"
|
||||||
|
|
||||||
|
install_hyprdrop() {
|
||||||
|
PREV_DIRECTORY=$PWD
|
||||||
|
|
||||||
|
if [ ! -d "$HYPRDROP_GIT_PATH" ]; then
|
||||||
|
git clone https://github.com/kjlo/hyprdrop "$HYPRDROP_GIT_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ~/.cache/hyprdrop
|
||||||
|
cargo install --path .
|
||||||
|
|
||||||
|
cd $PREV_DIRECTORY
|
||||||
|
}
|
||||||
|
|
||||||
|
check_hyprdrop() {
|
||||||
|
if [ ! -d "$HOME/.cache/hyprdrop" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
PREV_DIRECTORY=$PWD
|
||||||
|
|
||||||
|
cd $HYPRDROP_GIT_PATH
|
||||||
|
|
||||||
|
if ! git remote update && git status | grep behind >>/dev/null; then
|
||||||
|
cd $PREV_DIRECTORY
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if check_hyprdrop; then
|
||||||
|
addActions install_hyprdrop
|
||||||
|
fi
|
||||||
3
.config/yadm/bootstrap.v2/applications/30-KDEConnect.sh
Executable file
3
.config/yadm/bootstrap.v2/applications/30-KDEConnect.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications kdeconnect
|
||||||
14
.config/yadm/bootstrap.v2/applications/30-Thunar.sh
Executable file
14
.config/yadm/bootstrap.v2/applications/30-Thunar.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
echo "# Installing thunar"
|
||||||
|
|
||||||
|
addApplications thunar \
|
||||||
|
gvfs \
|
||||||
|
thunar-archive-plugin \
|
||||||
|
thunar-media-tags-plugin \
|
||||||
|
thunar-shares-plugin \
|
||||||
|
thunar-volman \
|
||||||
|
tumbler \
|
||||||
|
libgsf \
|
||||||
|
raw-thumbnailer \
|
||||||
|
tumbler-extra-thumbnailers
|
||||||
3
.config/yadm/bootstrap.v2/applications/30-Vimiv.sh
Normal file
3
.config/yadm/bootstrap.v2/applications/30-Vimiv.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications vimiv
|
||||||
4
.config/yadm/bootstrap.v2/applications/30-Yazi.sh.bak
Executable file
4
.config/yadm/bootstrap.v2/applications/30-Yazi.sh.bak
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications yazi p7zip jq poppler fd ripgrep fzf zoxide imagemagick fuse-archive zip \
|
||||||
|
blobdrop-git
|
||||||
3
.config/yadm/bootstrap.v2/applications/30-Zsh.sh
Executable file
3
.config/yadm/bootstrap.v2/applications/30-Zsh.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
addApplications zsh oh-my-zsh
|
||||||
58
.config/yadm/bootstrap.v2/bootstrap
Executable file
58
.config/yadm/bootstrap.v2/bootstrap
Executable file
|
|
@ -0,0 +1,58 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
SCRIPTPATH="$(
|
||||||
|
cd -- "$(dirname "$0")" >/dev/null 2>&1
|
||||||
|
pwd -P
|
||||||
|
)"
|
||||||
|
APPLICATIONS_PATH="$SCRIPTPATH/applications"
|
||||||
|
ACTIONS_PATH="$SCRIPTPATH/actions"
|
||||||
|
|
||||||
|
#$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
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "# Updating system"
|
||||||
|
updateSystem
|
||||||
|
|
||||||
|
echo "# Gathering applications"
|
||||||
|
|
||||||
|
declare -x -a applications
|
||||||
|
declare -x -a actions
|
||||||
|
actions=()
|
||||||
|
|
||||||
|
addApplications ()
|
||||||
|
{
|
||||||
|
for application in "$@"; do
|
||||||
|
echo "adding application: $application"
|
||||||
|
|
||||||
|
applications+=("$application")
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
addActions()
|
||||||
|
{
|
||||||
|
for action in "$@"; do
|
||||||
|
echo "adding action: $action"
|
||||||
|
|
||||||
|
actions+=("$action")
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
while IFS= read -r file; do
|
||||||
|
if [[ -x "$file" && ! "$file" =~ "##" && ! "$file" =~ ~$ && ! "$file" =~ ".bak" ]]; then
|
||||||
|
source $file
|
||||||
|
fi
|
||||||
|
done < <(find -L "$APPLICATIONS_PATH" -type f | sort)
|
||||||
|
|
||||||
|
echo -n "# Installing/Updating applications (${#applications[@]})"
|
||||||
|
installPackages ${applications[*]}
|
||||||
|
|
||||||
|
echo "# Executing actions... (${#actions[@]})"
|
||||||
|
|
||||||
74
.config/yadm/bootstrap.v2/functions/filerunner.sh
Normal file
74
.config/yadm/bootstrap.v2/functions/filerunner.sh
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
#!/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
|
||||||
|
}
|
||||||
29
.config/yadm/bootstrap.v2/functions/pkg.sh
Normal file
29
.config/yadm/bootstrap.v2/functions/pkg.sh
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
installPackages() {
|
||||||
|
packages=$@
|
||||||
|
|
||||||
|
if command -v yay >/dev/null; then
|
||||||
|
echo " using yay"
|
||||||
|
yay -S --needed $packages
|
||||||
|
elif command -v apt >/dev/null; then
|
||||||
|
echo " using apt"
|
||||||
|
apt install $packages
|
||||||
|
else
|
||||||
|
echo "... no supported package manager found. exiting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
updateSystem() {
|
||||||
|
if command -v yay >/dev/null; then
|
||||||
|
echo " using yay"
|
||||||
|
yay
|
||||||
|
elif command -v apt >/dev/null; then
|
||||||
|
echo " using apt"
|
||||||
|
apt update
|
||||||
|
else
|
||||||
|
echo "... no supported package manager found. exiting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
13
.config/yadm/bootstrap.v2/functions/set_class.sh
Executable file
13
.config/yadm/bootstrap.v2/functions/set_class.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
class=$(yadm config local.class)
|
||||||
|
if [[ ! -z $class ]]; then
|
||||||
|
yadm alt
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -p "-- Which class does this device belong to: " -r class
|
||||||
|
|
||||||
|
echo "-- Setting class and reloading alternative files"
|
||||||
|
yadm config local.class $class
|
||||||
|
yadm alt
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -66,3 +66,7 @@
|
||||||
.config/evremap/keychron.toml
|
.config/evremap/keychron.toml
|
||||||
.config/evremap/ATKeyboard.toml
|
.config/evremap/ATKeyboard.toml
|
||||||
.config/evremap/SurfaceKeyboard.toml
|
.config/evremap/SurfaceKeyboard.toml
|
||||||
|
.config/yadm/bootstrap.v1/bootstrap.d/02-AMDGPUDrivers.sh
|
||||||
|
.config/yadm/bootstrap.v1/bootstrap.d/10-SDDM.sh
|
||||||
|
.config/yadm/bootstrap.v2/applications/02-AMDGPUDrivers.sh
|
||||||
|
.config/yadm/bootstrap.v2/applications/10-SDDM.sh
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Host rpi5
|
||||||
IdentityFile ~/.ssh/webserver.key
|
IdentityFile ~/.ssh/webserver.key
|
||||||
|
|
||||||
Host home
|
Host home
|
||||||
HostName home
|
HostName 192.168.178.36
|
||||||
User michel
|
User michel
|
||||||
IdentityFile ~/.ssh/home.key
|
IdentityFile ~/.ssh/home.key
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue