From 6531d6dd3257daf5ffc19c151b173857c10d158e Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 31 May 2023 09:41:28 +0200 Subject: [PATCH] small fixes --- .config/git/config | 8 +++++--- .config/git/excludes | 2 ++ .config/zsh/profile | 2 +- .local/bin/dotsync | 12 +++++------- .local/bin/upgrades | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 .config/git/excludes diff --git a/.config/git/config b/.config/git/config index 7c76b81b3..f03b25f68 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,12 +1,14 @@ [init] - defaultBranch = main + defaultBranch = main [push] recurseSubmodules = check [pull] - rebase = false + rebase = false [submodule] recurse = true [credential] - helper = store + helper = store +[core] + excludesfile = ~/.config/git/excludes [include] path = ~/.config/git/host-setup diff --git a/.config/git/excludes b/.config/git/excludes new file mode 100644 index 000000000..4c5f88af2 --- /dev/null +++ b/.config/git/excludes @@ -0,0 +1,2 @@ +*~ +.*.swp diff --git a/.config/zsh/profile b/.config/zsh/profile index 653497f8f..9ee95fbde 100644 --- a/.config/zsh/profile +++ b/.config/zsh/profile @@ -59,7 +59,7 @@ export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" -export DOTFILES="$HOME/.dotfiles" +export DOTFILES_DIR="$HOME/.dotfiles" export ZSH_COMPDUMP="$XDG_CACHE_HOME/zcompdump" export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch-config" diff --git a/.local/bin/dotsync b/.local/bin/dotsync index 537b63a31..0318b877d 100755 --- a/.local/bin/dotsync +++ b/.local/bin/dotsync @@ -5,12 +5,10 @@ GREEN='\033[32m' BLUE='\033[34m' RED='\033[31m' NC='\033[0m' -dotfiles="${1:-$DOTFILES}" -dotfiles="${dotfiles:-$HOME/.dotfiles}" -printf "%b" "$BOLD${BLUE}Changing directory to $dotfiles$NC\n" -if ! cd "$dotfiles"; then - printf "%b" "${RED}Could not CD into $dotfiles$NC\n" +printf "%b" "$BOLD${BLUE}Changing directory to $DOTFILES_DIR$NC\n" +if ! cd "$DOTFILES_DIR"; then + printf "%b" "${RED}Could not CD into $DOTFILES_DIR$NC\n" exit fi printf "\n" @@ -43,12 +41,12 @@ else fi printf "%b" "$BOLD${BLUE}Generating firefox profiles...$NC\n\n" -"$dotfiles/.mozilla/firefox/generate.sh" +"$DOTFILES_DIR/.mozilla/firefox/generate.sh" printf "\n" printf "${BOLD}Recompile/Install src files? ${GREEN}Y/N?$NC\n" read ans -[ "$ans" = "y" ] && for f in "$dotfiles"/.local/src/*; do +[ "$ans" = "y" ] && for f in "$DOTFILES_DIR"/.local/src/*; do if ! cd "$f"; then printf "%b" "${RED}Could not CD into $f$NC\n" exit diff --git a/.local/bin/upgrades b/.local/bin/upgrades index cf4412021..734fbdee5 100755 --- a/.local/bin/upgrades +++ b/.local/bin/upgrades @@ -43,7 +43,7 @@ command -v apt 1>/dev/null 2>&1 && sudo apt upgrade command -v xbps-install 1>/dev/null 2>&1 && sudo xbps-install -Syu && pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" printf "%b" "$BOLD${BLUE}Updating arkenfox...$NC\n" -"$DOTFILES/.local/share/firefox/updater.sh" -s +"$DOTFILES_DIR/.local/share/firefox/updater.sh" -s printf "%b" "$BOLD${BLUE}Upgrade complete.\nPress to exit window.\n" read -r _