Update identation
This commit is contained in:
parent
9a16bae023
commit
1c887ee342
9 changed files with 290 additions and 297 deletions
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Check for sudo
|
# Check for sudo
|
||||||
if [ ! -f "/sbin/sudo" ]; then
|
if [ ! -f "/sbin/sudo" ]; then
|
||||||
echo ":: Error: \"/sbin/sudo\" not found, please install sudo"
|
echo ":: Error: \"/sbin/sudo\" not found, please install sudo"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clear variables
|
# Clear variables
|
||||||
|
@ -11,121 +11,121 @@ INSTALL_GUI_PACKAGES=
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
for arg in "${@}"; do
|
for arg in "${@}"; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
"--noconfirm")
|
"--noconfirm")
|
||||||
# I don't know what shellcheck is seeing here...
|
# I don't know what shellcheck is seeing here...
|
||||||
# shellcheck disable=SC2037
|
# shellcheck disable=SC2037
|
||||||
PACMAN_FLAGS=${PACMAN_FLAGS} --noconfirm
|
PACMAN_FLAGS=${PACMAN_FLAGS} --noconfirm
|
||||||
;;
|
;;
|
||||||
"--gui")
|
"--gui")
|
||||||
INSTALL_GUI_PACKAGES=true
|
INSTALL_GUI_PACKAGES=true
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ":: Warning: Unknown argument \"${arg}\""
|
echo ":: Warning: Unknown argument \"${arg}\""
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# Source /etc/os-release
|
# Source /etc/os-release
|
||||||
echo ":: Detecting distribution"
|
echo ":: Detecting distribution"
|
||||||
if [ -f "/etc/os-release" ]; then
|
if [ -f "/etc/os-release" ]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Perform actions based on distro
|
# Perform actions based on distro
|
||||||
case "$ID" in
|
case "$ID" in
|
||||||
"arch")
|
"arch")
|
||||||
echo ":: Detected Arch Linux, installing packages automatically"
|
echo ":: Detected Arch Linux, installing packages automatically"
|
||||||
|
|
||||||
# Check for paru
|
# Check for paru
|
||||||
if [ ! -f "/sbin/paru" ]; then
|
if [ ! -f "/sbin/paru" ]; then
|
||||||
echo ":: Error: \"/sbin/paru\" not found, please install paru"
|
echo ":: Error: \"/sbin/paru\" not found, please install paru"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install required packages (command line)
|
# Install required packages (command line)
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
paru --removemake --batchinstall --sudoloop --mflags "--ignorearch" -Syu --needed ${PACMAN_FLAGS} \
|
paru --removemake --batchinstall --sudoloop --mflags "--ignorearch" -Syu --needed ${PACMAN_FLAGS} \
|
||||||
nano ncurses moar fireplace sl fortune-mod cowsay lolcat \
|
nano ncurses moar fireplace sl fortune-mod cowsay lolcat \
|
||||||
moar yt-dlp-git tar zstd bzip zip unrar unzip 7-zip \
|
moar yt-dlp-git tar zstd bzip zip unrar unzip 7-zip \
|
||||||
rustup binutils base-devel cpu-power
|
rustup binutils base-devel cpu-power
|
||||||
|
|
||||||
# Install required packages packages (graphical)
|
# Install required packages packages (graphical)
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
[[ -n "${INSTALL_GUI_PACKAGES}" ]] && \
|
[[ -n "${INSTALL_GUI_PACKAGES}" ]] && \
|
||||||
paru --removemake --batchinstall --sudoloop --mflags "--ignorearch" -Syu --needed ${PACMAN_FLAGS} \
|
paru --removemake --batchinstall --sudoloop --mflags "--ignorearch" -Syu --needed ${PACMAN_FLAGS} \
|
||||||
hyprland-git hyprpaper-git waybar fnott qt6ct bemenu-wayland \
|
hyprland-git hyprpaper-git waybar fnott qt6ct bemenu-wayland \
|
||||||
cliphist j4-dmenu-desktop polkit-kde-agent polkit-qt6 \
|
cliphist j4-dmenu-desktop polkit-kde-agent polkit-qt6 \
|
||||||
xdg-desktop-portal-hyprland-git xdg-desktop-portal-kde \
|
xdg-desktop-portal-hyprland-git xdg-desktop-portal-kde \
|
||||||
qt6-wayland qt5-wayland xwaylandvideobridge pipewire \
|
qt6-wayland qt5-wayland xwaylandvideobridge pipewire \
|
||||||
wireplumber
|
wireplumber
|
||||||
|
|
||||||
# Install/update Rust toolchains and Rust-based software
|
# Install/update Rust toolchains and Rust-based software
|
||||||
(
|
(
|
||||||
# Update installed toolchains
|
# Update installed toolchains
|
||||||
rustup update
|
rustup update
|
||||||
|
|
||||||
# Install nightly and stable toolchains
|
# Install nightly and stable toolchains
|
||||||
rustup install stable
|
rustup install stable
|
||||||
rustup install nightly
|
rustup install nightly
|
||||||
|
|
||||||
# Switch to stable toolchain
|
# Switch to stable toolchain
|
||||||
rustup default nightly
|
rustup default nightly
|
||||||
|
|
||||||
# Install software
|
# Install software
|
||||||
cargo install eza cargo-audit
|
cargo install eza cargo-audit
|
||||||
)
|
)
|
||||||
|
|
||||||
# Install SDKMAN! and Java
|
# Install SDKMAN! and Java
|
||||||
(
|
(
|
||||||
# Download & install SDKMAN!
|
# Download & install SDKMAN!
|
||||||
curl -s "https://get.sdkman.io" | bash
|
curl -s "https://get.sdkman.io" | bash
|
||||||
|
|
||||||
# Initialize SDKMAN! for subshell
|
# Initialize SDKMAN! for subshell
|
||||||
export SDKMAN_DIR="$HOME/.sdkman"
|
export SDKMAN_DIR="$HOME/.sdkman"
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
|
||||||
# Update SDKMAN! and installed candidates
|
# Update SDKMAN! and installed candidates
|
||||||
sdk selfupdate
|
sdk selfupdate
|
||||||
sdk update
|
sdk update
|
||||||
|
|
||||||
# Install Java versions specified in array
|
# Install Java versions specified in array
|
||||||
# We use the Temurin distribution of Java.
|
# We use the Temurin distribution of Java.
|
||||||
|
|
||||||
java_versions=( '22.0.1' '21.0.3' '17.0.11' '8.0.412' )
|
java_versions=( '22.0.1' '21.0.3' '17.0.11' '8.0.412' )
|
||||||
for version in "${java_versions[@]}"; do
|
for version in "${java_versions[@]}"; do
|
||||||
sdk install java "${version}-tem"
|
sdk install java "${version}-tem"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Default to Java 21
|
# Default to Java 21
|
||||||
sdk default java 21.0.3-tem
|
sdk default java 21.0.3-tem
|
||||||
)
|
)
|
||||||
|
|
||||||
# Install Hyprland plugins
|
# Install Hyprland plugins
|
||||||
(
|
(
|
||||||
# Install Hyprland headers & update existing plugins
|
# Install Hyprland headers & update existing plugins
|
||||||
hyprpm update
|
hyprpm update
|
||||||
|
|
||||||
# Add hyprland-plugins repository
|
# Add hyprland-plugins repository
|
||||||
yes | hyprpm add https://github.com/hyprwm/hyprland-plugins
|
yes | hyprpm add https://github.com/hyprwm/hyprland-plugins
|
||||||
|
|
||||||
# Enable plugins
|
# Enable plugins
|
||||||
hyprpm enable csgo-vulkan-fix
|
hyprpm enable csgo-vulkan-fix
|
||||||
)
|
)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
"archarm")
|
"archarm")
|
||||||
echo ":: Arch Linux ARM is not yet supported"
|
echo ":: Arch Linux ARM is not yet supported"
|
||||||
echo " (but will soon be). Just wait a little!"
|
echo " (but will soon be). Just wait a little!"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ":: Hmm... your distribution isn't supported"
|
echo ":: Hmm... your distribution isn't supported"
|
||||||
echo " You can do the following:"
|
echo " You can do the following:"
|
||||||
echo " - Create an issue"
|
echo " - Create an issue"
|
||||||
echo " - Look into the source for this script"
|
echo " - Look into the source for this script"
|
||||||
echo " and install the required software yourself"
|
echo " and install the required software yourself"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "${HOME}/.dotfiles" || (
|
cd "${HOME}/.dotfiles" || (
|
||||||
echo ":: Error: Can't cd into ${HOME}/.dotfiles"
|
echo ":: Error: Can't cd into ${HOME}/.dotfiles"
|
||||||
exit 1
|
exit 1
|
||||||
)
|
)
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
|
@ -12,35 +12,35 @@ COLOR_RESET="\e[0m"
|
||||||
|
|
||||||
# Latest commit
|
# Latest commit
|
||||||
if curl -qsI https://git.staropensource.de|head -1|grep " 200" &> /dev/null; then
|
if curl -qsI https://git.staropensource.de|head -1|grep " 200" &> /dev/null; then
|
||||||
COMMIT=$(env PAGER= git log -n 1 --pretty=format:\"%H\")
|
COMMIT=$(env PAGER= git log -n 1 --pretty=format:\"%H\")
|
||||||
LATEST_COMMIT=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.id')
|
LATEST_COMMIT=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.id')
|
||||||
LATEST_COMMIT_MESSAGE=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.message'|sed 's/\\n//g')
|
LATEST_COMMIT_MESSAGE=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.message'|sed 's/\\n//g')
|
||||||
else
|
else
|
||||||
[[ -z "${SCRIPTED}" ]] && echo -e "${COLOR_BOLD}https://git.staropensource.de is not reachable"
|
[[ -z "${SCRIPTED}" ]] && echo -e "${COLOR_BOLD}https://git.staropensource.de is not reachable"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${COMMIT}" == "${LATEST_COMMIT}" ] || [ -z "${LATEST_COMMIT}" ]; then
|
if [ "${COMMIT}" == "${LATEST_COMMIT}" ] || [ -z "${LATEST_COMMIT}" ]; then
|
||||||
UPDATE=
|
UPDATE=
|
||||||
else
|
else
|
||||||
UPDATE=true
|
UPDATE=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${SCRIPTED}" ]; then
|
if [ -z "${SCRIPTED}" ]; then
|
||||||
if [ -n "${UPDATE}" ]; then
|
if [ -n "${UPDATE}" ]; then
|
||||||
echo -e "${COLOR_BOLD}An update for jstm's punktdateien is available."
|
echo -e "${COLOR_BOLD}An update for jstm's punktdateien is available."
|
||||||
echo -e "${COLOR_REGULAR}Latest commit: ${LATEST_COMMIT}"
|
echo -e "${COLOR_REGULAR}Latest commit: ${LATEST_COMMIT}"
|
||||||
echo " -> Message: ${LATEST_COMMIT_MESSAGE}"
|
echo " -> Message: ${LATEST_COMMIT_MESSAGE}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${COLOR_BOLD}Update by executing \"dotfiles-updater\""
|
echo -e "${COLOR_BOLD}Update by executing \"dotfiles-updater\""
|
||||||
echo -en "${COLOR_RESET}"
|
echo -en "${COLOR_RESET}"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ -z "${BASHRC}" ]; then
|
elif [ -z "${BASHRC}" ]; then
|
||||||
echo -e "${COLOR_BOLD}No update available"
|
echo -e "${COLOR_BOLD}No update available"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -n "${UPDATE}" ]; then
|
if [ -n "${UPDATE}" ]; then
|
||||||
echo "${LATEST_COMMIT_MESSAGE}"
|
echo "${LATEST_COMMIT_MESSAGE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
72
bin/updater
72
bin/updater
|
@ -1,57 +1,57 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "${HOME}/.dotfiles" || (
|
cd "${HOME}/.dotfiles" || (
|
||||||
echo ":: Error: Can't cd into ${HOME}/.dotfiles"
|
echo ":: Error: Can't cd into ${HOME}/.dotfiles"
|
||||||
exit 1
|
exit 1
|
||||||
)
|
)
|
||||||
|
|
||||||
# Define updater version
|
# Define updater version
|
||||||
LOCAL_UPDATER_VERSION=4
|
LOCAL_UPDATER_VERSION=4
|
||||||
|
|
||||||
case "${STAGE}" in
|
case "${STAGE}" in
|
||||||
1)
|
1)
|
||||||
# 0 - 2 -> 3
|
# 0 - 2 -> 3
|
||||||
if [ -z "${UPDATER_VERSION}" ] || [ "${UPDATER_VERSION}" -lt "3" ]; then
|
if [ -z "${UPDATER_VERSION}" ] || [ "${UPDATER_VERSION}" -lt "3" ]; then
|
||||||
echo ":: S1 | Updating to UPDATER_VERSION 3"
|
echo ":: S1 | Updating to UPDATER_VERSION 3"
|
||||||
./uninstall.sh --remove-legacy-paths
|
./uninstall.sh --remove-legacy-paths
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 3 -> 4
|
# 3 -> 4
|
||||||
if [ "${UPDATER_VERSION}" -lt "4" ]; then
|
if [ "${UPDATER_VERSION}" -lt "4" ]; then
|
||||||
echo ":: S1 | Updating to UPDATER_VERSION 4"
|
echo ":: S1 | Updating to UPDATER_VERSION 4"
|
||||||
./uninstall.sh --remove-unshared-bashrcd
|
./uninstall.sh --remove-unshared-bashrcd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo ":: S1 | Uninstalling"
|
echo ":: S1 | Uninstalling"
|
||||||
./uninstall.sh
|
./uninstall.sh
|
||||||
|
|
||||||
echo ":: S1 | Installing"
|
echo ":: S1 | Installing"
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
# Remove legacy updater version file
|
# Remove legacy updater version file
|
||||||
[[ -f "${HOME}/.config/.jstm_dotfiles_updater" ]] && rm -rf "${HOME}/.config/.jstm_dotfiles_updater"
|
[[ -f "${HOME}/.config/.jstm_dotfiles_updater" ]] && rm -rf "${HOME}/.config/.jstm_dotfiles_updater"
|
||||||
|
|
||||||
echo ":: S1 | Update complete."
|
echo ":: S1 | Update complete."
|
||||||
echo " Make sure to execute \"dotfiles-install-software\""
|
echo " Make sure to execute \"dotfiles-install-software\""
|
||||||
echo " to install/update required software."
|
echo " to install/update required software."
|
||||||
echo " Append \"--gui\" to install required GUI stuff."
|
echo " Append \"--gui\" to install required GUI stuff."
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ":: Checking for updates"
|
echo ":: Checking for updates"
|
||||||
|
|
||||||
if [ ! "${1}" == "--force" ] && [ "$(env SCRIPTED=true dotfiles-updatechecker)" == "" ]; then
|
if [ ! "${1}" == "--force" ] && [ "$(env SCRIPTED=true dotfiles-updatechecker)" == "" ]; then
|
||||||
echo ":: No update is available. Use \"--force\" to update anyway."
|
echo ":: No update is available. Use \"--force\" to update anyway."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ":: S0 | Uninstalling"
|
echo ":: S0 | Uninstalling"
|
||||||
./uninstall.sh
|
./uninstall.sh
|
||||||
|
|
||||||
echo ":: S0 | Pulling updates"
|
echo ":: S0 | Pulling updates"
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
exec env STAGE=1 UPDATER_VERSION=${LOCAL_UPDATER_VERSION} "${HOME}/.dotfiles/bin/updater"
|
exec env STAGE=1 UPDATER_VERSION=${LOCAL_UPDATER_VERSION} "${HOME}/.dotfiles/bin/updater"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -7,15 +7,16 @@ general {
|
||||||
|
|
||||||
# Lock screen
|
# Lock screen
|
||||||
listener {
|
listener {
|
||||||
timeout = 600
|
timeout = 600
|
||||||
on-timeout = loginctl lock-session
|
on-timeout = loginctl lock-session
|
||||||
}
|
}
|
||||||
|
|
||||||
# Turn on/off monitor
|
# Turn on/off monitor
|
||||||
listener {
|
listener {
|
||||||
timeout = 600
|
timeout = 600
|
||||||
on-timeout = hyprctl dispatch dpms off
|
on-timeout = hyprctl dispatch dpms off
|
||||||
on-resume = hyprctl dispatch dpms on
|
on-resume = hyprctl dispatch dpms on
|
||||||
|
}
|
||||||
|
|
||||||
# Welcome back message
|
# Welcome back message
|
||||||
listener {
|
listener {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# The only reason this script exists is because
|
# The only reason this script exists is because
|
||||||
# Hyprland, jobrunner, idk does not support piping.
|
# Hyprland, jobrunner, idk does not support piping.
|
||||||
|
|
||||||
cliphist list | launch-menu | cliphist decode | wl-copy
|
cliphist list | launch-menu | cliphist decode | wl-copy
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ "$(hyprctl activewindow -j | jq -r ".class")" = "Steam" ]; then
|
if [ "$(hyprctl activewindow -j | jq -r ".class")" = "Steam" ]; then
|
||||||
xdotool getactivewindow windowunmap
|
xdotool getactivewindow windowunmap
|
||||||
else
|
else
|
||||||
hyprctl dispatch killactive ""
|
hyprctl dispatch killactive ""
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
screencopy {
|
screencopy {
|
||||||
max_fps = 120
|
max_fps = 120
|
||||||
}
|
}
|
||||||
|
|
47
install.sh
47
install.sh
|
@ -2,37 +2,37 @@
|
||||||
# jeremystartm's dotfiles "installer"
|
# jeremystartm's dotfiles "installer"
|
||||||
|
|
||||||
if [ ! -f "$HOME/.config/.jstm_dotfiles" ]; then
|
if [ ! -f "$HOME/.config/.jstm_dotfiles" ]; then
|
||||||
echo ":: Removing files"
|
echo ":: Removing files"
|
||||||
./uninstall.sh &> /dev/null
|
./uninstall.sh &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# utility function
|
# utility function
|
||||||
function link() {
|
function link() {
|
||||||
if [ -a "${HOME}/${2}" ]; then
|
if [ -a "${HOME}/${2}" ]; then
|
||||||
[[ -n "$VERBOSE_WARNING" ]] && echo ":: Warning: ${2} already exists."
|
[[ -n "$VERBOSE_WARNING" ]] && echo ":: Warning: ${2} already exists."
|
||||||
else
|
else
|
||||||
echo ":: Linking ${1} -> ${2}"
|
echo ":: Linking ${1} -> ${2}"
|
||||||
ln -s "$(pwd)/${1}" "${HOME}/${2}"
|
ln -s "$(pwd)/${1}" "${HOME}/${2}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# update/clone repositories
|
# update/clone repositories
|
||||||
[[ ! -d "repositories/punktdateien-bashrc" ]] && git clone "https://git.staropensource.de/JeremyStarTM/punktdateien-bashrc.git" repositories/punktdateien-bashrc
|
[[ ! -d "repositories/punktdateien-bashrc" ]] && git clone "https://git.staropensource.de/JeremyStarTM/punktdateien-bashrc.git" repositories/punktdateien-bashrc
|
||||||
(
|
(
|
||||||
cd repositories/punktdateien-bashrc || (
|
cd repositories/punktdateien-bashrc || (
|
||||||
echo ":: Error: Can't cd into repositories/punktdateien-bashrc"
|
echo ":: Error: Can't cd into repositories/punktdateien-bashrc"
|
||||||
exit 1
|
exit 1
|
||||||
)
|
)
|
||||||
git pull
|
git pull
|
||||||
)
|
)
|
||||||
|
|
||||||
[[ ! -d "repositories/dracula-mc" ]] && git clone "https://github.com/dracula/midnight-commander.git" repositories/dracula-mc
|
[[ ! -d "repositories/dracula-mc" ]] && git clone "https://github.com/dracula/midnight-commander.git" repositories/dracula-mc
|
||||||
(
|
(
|
||||||
cd repositories/dracula-mc || (
|
cd repositories/dracula-mc || (
|
||||||
echo ":: Error: Can't cd into repositories/dracula-mc"
|
echo ":: Error: Can't cd into repositories/dracula-mc"
|
||||||
exit 1
|
exit 1
|
||||||
)
|
)
|
||||||
git pull
|
git pull
|
||||||
)
|
)
|
||||||
|
|
||||||
# create directories
|
# create directories
|
||||||
|
@ -100,14 +100,3 @@ link "bin/updater" ".local/bin/dotfiles-updater"
|
||||||
|
|
||||||
# write install file
|
# write install file
|
||||||
echo "pls don't remove" > "$HOME/.config/.jstm_dotfiles"
|
echo "pls don't remove" > "$HOME/.config/.jstm_dotfiles"
|
||||||
|
|
||||||
# check for executables
|
|
||||||
if ! which qt5ct &> /dev/null; then
|
|
||||||
echo ":: Warning: qt5ct is not in your PATH."
|
|
||||||
fi
|
|
||||||
if ! which qt6ct &> /dev/null; then
|
|
||||||
echo ":: Warning: qt6ct is not in your PATH."
|
|
||||||
fi
|
|
||||||
if ! which nwg-look &> /dev/null; then
|
|
||||||
echo ":: Warning: nwg-look is not in your PATH."
|
|
||||||
fi
|
|
||||||
|
|
150
uninstall.sh
150
uninstall.sh
|
@ -5,10 +5,10 @@ FORCED_UNLINKING=
|
||||||
|
|
||||||
# utility function
|
# utility function
|
||||||
function unlink() {
|
function unlink() {
|
||||||
if [ -a "${HOME}/${*}" ] || [ -n "${FORCED_UNLINKING}" ]; then
|
if [ -a "${HOME}/${*}" ] || [ -n "${FORCED_UNLINKING}" ]; then
|
||||||
echo ":: Unlinking ${1}"
|
echo ":: Unlinking ${1}"
|
||||||
rm -rf "${HOME:?}/${*:?}"
|
rm -rf "${HOME:?}/${*:?}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# repositories
|
# repositories
|
||||||
|
@ -18,80 +18,82 @@ function unlink() {
|
||||||
[[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "$HOME/.config/.jstm_dotfiles"
|
[[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "$HOME/.config/.jstm_dotfiles"
|
||||||
|
|
||||||
for arg in "${@}"; do
|
for arg in "${@}"; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
"--remove-legacy-paths")
|
"--remove-legacy-paths")
|
||||||
echo ":: Unlinking legacy paths"
|
echo ":: Unlinking legacy paths"
|
||||||
|
|
||||||
declare -a legacypaths=(
|
declare -a legacypaths=(
|
||||||
".local/bin/jobrunner"
|
".local/bin/jobrunner"
|
||||||
".local/bin/jobrunner-runjob"
|
".local/bin/jobrunner-runjob"
|
||||||
".jstmbash"
|
".jstmbash"
|
||||||
".config/jstmbash.env"
|
".config/jstmbash.env"
|
||||||
".config/starship.toml"
|
".config/starship.toml"
|
||||||
".bashrc"
|
".bashrc"
|
||||||
".config/hypr"
|
".config/hypr"
|
||||||
".config/waybar"
|
".config/waybar"
|
||||||
".config/fnott"
|
".config/fnott"
|
||||||
".config/eww"
|
".config/eww"
|
||||||
".config/xdg-desktop-portal/hyprland-portals.conf"
|
".config/xdg-desktop-portal/hyprland-portals.conf"
|
||||||
".config/neofetch"
|
".config/neofetch"
|
||||||
".config/btop"
|
".config/btop"
|
||||||
".local/share/mc"
|
".local/share/mc"
|
||||||
".config/mc"
|
".config/mc"
|
||||||
".config/mpv"
|
".config/mpv"
|
||||||
".config/GIMP/2.10/splashes"
|
".config/GIMP/2.10/splashes"
|
||||||
".config/gitui"
|
".config/gitui"
|
||||||
".local/share/mc/skins/dracula.ini"
|
".local/share/mc/skins/dracula.ini"
|
||||||
".local/share/mc/skins/dracula256.ini"
|
".local/share/mc/skins/dracula256.ini"
|
||||||
".config/nwg-look"
|
".config/nwg-look"
|
||||||
".config/qt5ct"
|
".config/qt5ct"
|
||||||
".config/qt6ct"
|
".config/qt6ct"
|
||||||
".config/Kvantum"
|
".config/Kvantum"
|
||||||
".icons"
|
".icons"
|
||||||
".local/share/icons"
|
".local/share/icons"
|
||||||
".fonts"
|
".fonts"
|
||||||
".config/fontconfig"
|
".config/fontconfig"
|
||||||
".local/share/wallpapers"
|
".local/share/wallpapers"
|
||||||
".local/share/plasma"
|
".local/share/plasma"
|
||||||
".config/kdedefaults"
|
".config/kdedefaults"
|
||||||
".local/share/color-schemes"
|
".local/share/color-schemes"
|
||||||
".local/share/aurorae"
|
".local/share/aurorae"
|
||||||
".config/kglobalshortcutsrc"
|
".config/kglobalshortcutsrc"
|
||||||
".config/kiorc"
|
".config/kiorc"
|
||||||
".config/krunnerrc"
|
".config/krunnerrc"
|
||||||
".config/kservicemenurc"
|
".config/kservicemenurc"
|
||||||
".config/ksplashrc"
|
".config/ksplashrc"
|
||||||
".config/ktimezonedrc"
|
".config/ktimezonedrc"
|
||||||
".config/plasma-localrc"
|
".config/plasma-localrc"
|
||||||
".config/plasma-org.kde.plasma.desktop-appletsrc"
|
".config/plasma-org.kde.plasma.desktop-appletsrc"
|
||||||
".config/konsolerc"
|
".config/konsolerc"
|
||||||
".local/share/konsole"
|
".local/share/konsole"
|
||||||
".config/dolphinrc"
|
".config/dolphinrc"
|
||||||
".local/bin/dotfiles-updatechecker"
|
".local/bin/dotfiles-updatechecker"
|
||||||
".local/bin/dotfiles-updater"
|
".local/bin/dotfiles-updater"
|
||||||
".local/bin/dotfiles-install-software"
|
".local/bin/dotfiles-install-software"
|
||||||
".local/bin/launch-menu"
|
".local/bin/launch-menu"
|
||||||
".config/copyq"
|
".config/copyq"
|
||||||
)
|
)
|
||||||
|
|
||||||
for path in "${legacypaths[@]}"; do
|
for path in "${legacypaths[@]}"; do
|
||||||
FORCED_UNLINKING=y unlink "${path}"
|
FORCED_UNLINKING=y unlink "${path}"
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -rf "jstmbash" "dracula-mc"
|
rm -rf "jstmbash" "dracula-mc"
|
||||||
|
|
||||||
echo ":: Unlinked legacy paths"
|
echo ":: Unlinked legacy paths"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
|
||||||
"--remove-unshared-bashrcd")
|
;;
|
||||||
echo ":: Removing unshared bashrc.d"
|
"--remove-unshared-bashrcd")
|
||||||
FORCED_UNLINKING=y unlink ".bashrc.d"
|
echo ":: Removing unshared bashrc.d"
|
||||||
exit 0
|
FORCED_UNLINKING=y unlink ".bashrc.d"
|
||||||
;;
|
exit 0
|
||||||
*)
|
|
||||||
echo ":: Warning: Unknown argument \"${arg}\""
|
;;
|
||||||
;;
|
*)
|
||||||
esac
|
echo ":: Warning: Unknown argument \"${arg}\""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# repositories
|
# repositories
|
||||||
|
|
Loading…
Reference in a new issue