diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 3e60d2f..76f9315 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -22,6 +22,7 @@ alias \ yt="youtube-dl --add-metadata -i" \ yta="yt -x -f bestaudio/best" \ ffmpeg="ffmpeg -hide_banner" \ + tmux="tmux -f ~/.config/tmux/tmux.conf" # Colorize commands when possible. alias \ @@ -46,7 +47,8 @@ alias \ lc="clone_from_labs" \ gc="clone_from_github" \ dgit="git --git-dir ~/.config/dotfiles/.git --work-tree=$HOME" \ - sudo=doas + sudo=doas \ + .z="source ~/.config/shell/profile" # Clone from labs function clone_from_labs() { @@ -75,7 +77,12 @@ function git_main_branch() { alias \ g="git" \ ga="git add" \ - ga="git add --all" \ + dga="dgit add -f" \ + dgcm="dgit commit -m" \ + dgs="dgit status" \ + dgd="dgit diff" \ + dgdc="dgit diff --cached" \ + gaa="git add --all" \ gb="git branch" \ gba="git branch -a" \ gbd="git branch -d" \ @@ -98,6 +105,7 @@ alias \ gf="git fetch" \ gfa="git fetch --all --prune" \ gd="git diff" \ + gdc="git diff --cached" \ gl="git pull" \ glg="git log --stat" \ glgg="git log --graph" \ diff --git a/.config/shell/profile b/.config/shell/profile index eaab4bf..adb2ba1 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -44,6 +44,7 @@ export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat" export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config" export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum" export ANDROID_AVD_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/android/avd" +export ANDROID_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/android" # Other program settings export DICS="/usr/share/stardicts/dic/" @@ -63,8 +64,7 @@ export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads. export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm # Development variables -export ANDROID_HOME="/opt/android" -export ANDROID_SDK_HOME="$ANDROID_HOME" +export ANDROID_HOME="/opt/android-sdk" export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME" # This is the list for lf icons: diff --git a/.local/bin/setup/setupandroid b/.local/bin/setup/setupandroid index 36d1f3c..713996b 100755 --- a/.local/bin/setup/setupandroid +++ b/.local/bin/setup/setupandroid @@ -8,14 +8,7 @@ yay -S --noconfirm --needed \ android-sdk-platform-tools \ android-platform -ANDROID_SDK_URL="https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip" -ANDROID_BUILD_TOOLS_VERSION=30.0.3 -ANT_HOME="/usr/share/ant" -MAVEN_HOME="/usr/share/maven" -GRADLE_HOME="/usr/share/gradle" -ANDROID_SDK_ROOT="/opt/android" -JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" -PATH="$PATH:$ANDROID_SDK_ROOT/cmdline-tools/bin:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/build-tools/$ANDROID_BUILD_TOOLS_VERSION:$ANT_HOME/bin:$MAVEN_HOME/bin:$GRADLE_HOME/bin" +ANDROID_SDK_ROOT="/opt/android-sdk" mkdir "$HOME/.local/share/android" && touch "$HOME/.local/share/android/repositories.cfg" && \ while true; do echo 'y'; sleep 2; done | doas sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "platforms;android-30" && \ @@ -34,9 +27,9 @@ newgrp android-sdk avdmanager -v create avd -n main -k "system-images;android-30;google_apis;x86_64" --device "pixel_xl" -# doas pacman --noconfirm -S nodejs +doas pacman --noconfirm -S nodejs -# npm install -g yarn +npm install -g yarn yarn global require nativescript diff --git a/.local/bin/teardown/teardownandroid b/.local/bin/teardown/teardownandroid new file mode 100755 index 0000000..4f92cd3 --- /dev/null +++ b/.local/bin/teardown/teardownandroid @@ -0,0 +1,21 @@ +#! /bin/bash + +avdmanager -v delete avd -n main + +doas pacman --noconfirm -Rns jdk-openjdk maven ant gradle wget + +yay -Rns --noconfirm --needed \ + android-sdk-cmdline-tools-latest \ + android-sdk-build-tools \ + android-sdk-platform-tools \ + android-platform + +[ -d /opt/android-sdk ] && sudo rm -rf /opt/android-sdk + +doas groupdel android-sdk + +yarn global remove nativescript + +[ -d "$HOME/.android" ] && sudo rm -rf "$HOME/.android" +[ -d "$HOME/.local/share/android" ] && sudo rm -rf "$HOME/.local/share/android" +