From 458d4d55068a7bf64cc8b391cf694e8c1981adf0 Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Tue, 4 Mar 2025 23:16:23 -0700 Subject: [PATCH] cleanup & organization. added .gitignore -> .env to ginit --- bin/mark-aarch64 | Bin 0 -> 8440 bytes check-dependency | 113 ------------------- ginit | 2 + goto | 2 +- inst | 278 ----------------------------------------------- install | 165 ---------------------------- mark | Bin 16160 -> 8440 bytes mkmp3 | 16 --- run | 162 --------------------------- set-theme | 101 ----------------- setup | 7 -- update | 84 -------------- update-bl | 22 ---- update-vol | 22 ---- 14 files changed, 3 insertions(+), 971 deletions(-) create mode 100755 bin/mark-aarch64 delete mode 100755 check-dependency delete mode 100755 inst delete mode 100755 install delete mode 100755 mkmp3 delete mode 100755 run delete mode 100755 set-theme delete mode 100755 setup delete mode 100755 update delete mode 100755 update-bl delete mode 100755 update-vol diff --git a/bin/mark-aarch64 b/bin/mark-aarch64 new file mode 100755 index 0000000000000000000000000000000000000000..0827746bd44e2123fc6c5c7492a07df799e26548 GIT binary patch literal 8440 zcmcIp4UAOP6}~eAGA;|Qx>o8B`%pH4=+6GIz(Q@Dg~dX;2%>Ga@#pbo=FQH?{Q2fB zECtgQ+Gt{%GD@ON)GkEZ#m08iXau8zViVIEBdEk$YZi*lroY&1&2H;5{m#Aj%)Wgx z)@piT-nr-h-1F|e@7%lJS<`((Fc1*jLgHCLSkKoLC8`5XWd<=)QQHEYU z8l$MA2ihJ57>0HH6@FCl$sg&3FH(5;_;ff=p~BFR{mlX{L#g7A#TiC*hr;-@I13aI z8bf{$n?7(8pXSd$K5a&9)Oz=wuk8BaZHg=y@;kc;dNNMU|Ez%Y={K(P?S~I*Lk!tp zb8&mowX@B!bgns*&TX-sW$h$NG6q1Srk#RCeV{Lq@_Ra&b4E&l$PAYoxPMrHz`^jt!fJl}o@-4(TwEm?EvEoNL7L`7JcgB9sj`Wg9f((>W^>sqti^ zk_nkd&VoYDkpaa}qgQ=3O@^cLS0Q=bE9i(udI74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D^6wHoh(Y+;UkN`4{Z$eTVw8KPE4&HxBG0_#e4f>GKF7-%7qk%UTr}N; z#ICDC@2Nt+Q_`pM$?uEqBhO`jo0fOggs+@6c53<_P2a3zyQhksd#ljDukD=CcG|U_ zhpNawR)zjV75dMr(0^Hley9rlr7Cn0!EKT46hs7vXgk7NW;%hRu!tnK=Zf32BGQ}d zi|D<38e%#MOv}+l9Q)vBoVPwX40{;wwX#mk}-j6rG7|BQCCUA zfR#ht}h$29YNOwGEO+q|4s9T zO`Yr4m}_qAGEMT!Bf!nzRD5bs(@Eq_j&k~SqPj{nQwThRd&F&yRlrS%sN66nih0eP ze)m{#Q@BD&@WrEPe(F`EyyMB>dc}JwsV-#JW03#*{iNCTts6VnuUoCx+7|&>7P405 zdT>N{82al_lJ_?H9MTrf`ux3P$lpWO;r*F$`kv4B=<|1uVM;qBAJpaV5P$a@K|{fn zulUyvxUS?nn?Hvv$FL3hRC_Yc^(R9Ed}{39AAcu!A9?h-zGY~TG8+5m_!U(M`iv5f z{rBklmm$~BEbq_%&0tVWtY0}F=z@K-R`mPl{N1kgS7|vuA29Tu59s^C@w0v}XcQCW zks5!`8Ghgkm{Epw=%GHxU+wQ-WSg2l|5P`5^|?M{$bYAk%6M@6jNhyE`Fz85DF1zP zm=mWJ{QiI7)32N_E>H?*v>pSlml%Hl9g3gt`73pXUr;MVHDvH3bSU;pm|Ul5eI7r} zUurylHoqS<>0ffE{(e!Q0vwIsv%;qI8UHCdUVT14-lz2kSWrXu&*Wirh{o}UDIsY5 z_ulb23g;*J^0vc3y#D!I!216!{$D}g>z~g922FO&Q$6+c$Ny`P$$yJi2z}N+>7#S} z45^Ofx$hMXU#zfUJ>k9#v;jZ%&*S9IR?P}j literal 0 HcmV?d00001 diff --git a/check-dependency b/check-dependency deleted file mode 100755 index 5f3b35d..0000000 --- a/check-dependency +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/zsh - -error() { - echo "Your package manager is not supported." - echo "$COMMAND could not be installed automatically." - echo "Please install $COMMAND manually before running this script." - exit 1 -} - -install() { - COMMAND=$1 - PACKAGE=$2 - - if ! command -v $COMMAND &> /dev/null - then - if [[ "$OSTYPE" == "linux-gnu"* ]]; then - echo "$COMMAND not found. Installing $PACKAGE..." - - DISTRO=$(cat /etc/os-release | grep -oP '(?<=^ID=).+' | tr -d '"') - - if [[ $DISTRO == "arch" ]]; then - yes | sudo pacman -S $PACKAGE - yes | sudo pacman -S $COMMAND - exit 0 - elif [[ $DISTRO == "archarm" ]]; then - yes | sudo pacman -S $PACKAGE - yes | sudo pacman -S $COMMAND - exit 0 - elif [[ $DISTRO == "ubuntu" ]]; then - yes | sudo apt-get install $PACKAGE - yes | sudo apt-get install $COMMAND - exit 0 - elif [[ $DISTRO == "fedora" ]]; then - yes | sudo dnf install $PACKAGE - yes | sudo dnf install $COMMAND - exit 0 - elif [[ $DISTRO == "centos" ]]; then - yes | sudo yum install $PACKAGE - yes | sudo yum install $COMMAND - exit 0 - elif [[ $DISTRO == "debian" ]]; then - yes | sudo apt install $PACKAGE - yes | sudo apt install $COMMAND - exit 0 - else - error - fi - - elif [[ "$OSTYPE" == "darwin"* ]]; then - echo "$COMMAND not found. Installing $PACKAGE..." - - if command -v "brew" &> /dev/null - then - yes | brew install $PACKAGE - yes | brew install $COMMAND - - elif command -v "port" &> /dev/null - then - yes | sudo port install $PACKAGE - yes | sudo port install $COMMAND - else - echo "Homebrew or MacPorts not found. Please install one of them before running this script." - exit 1 - fi - else - error - fi - else - echo "Package $PACKAGE is already installed." - fi -} - -# If the number of arguments is not 2, print the usage -if [[ $# -ne 2 ]]; then - echo "Usage: check-dependency " - echo " check-dependency <--git> " - echo "Checks if a command is installed and if not, installs the package." - echo "If --git is specified, it will check if the git repository is executable." - echo "Supported package managers: apt, pacman, dnf, yum, brew, port" - exit 1 -fi - -COMMAND=$1 -PACKAGE=$2 - -# If the command is git, we will clone the repository and install it -if [[ "$COMMAND" == "--git" ]]; then - USER=$(echo $PACKAGE | cut -d'/' -f1) - REPO=$(echo $PACKAGE | cut -d'/' -f2) - - # If the repository is not installed, we will clone it and install it - if ! command -v $REPO &> /dev/null - then - THIS_USER=$SUDO_USER - - if [ ! -d /home/$THIS_USER/build ]; then - echo "Creating build directory for user $THIS_USER..." - su $THIS_USER -c "mkdir /home/$THIS_USER/build" - fi - - cd /home/$THIS_USER/build - git clone https://github.com/$USER/$REPO - cd $REPO - inst - exit 0 - - else - echo "Repository $PACKAGE is already installed." - exit 0 - fi -else - install $COMMAND $PACKAGE -fi diff --git a/ginit b/ginit index c73ad49..f5ddc5b 100755 --- a/ginit +++ b/ginit @@ -1,6 +1,8 @@ #!/bin/zsh git init +touch .gitignore +echo "*.env" >> .gitignore git stage -A git commit -m "init commit" diff --git a/goto b/goto index 48fd8a5..c33b8c2 100755 --- a/goto +++ b/goto @@ -3,7 +3,7 @@ # Dependencies: # quaxlyqueen/scripts/mark -BOOKMARKS_FILE="/home/violet/.bookmarks" +BOOKMARKS_FILE="/data/data/com.termux/files/home/.bookmarks" # Catch any invalid input. if [[ $# -eq 0 || $# -gt 1 ]]; then diff --git a/inst b/inst deleted file mode 100755 index 25ac34c..0000000 --- a/inst +++ /dev/null @@ -1,278 +0,0 @@ -#!/bin/zsh - -name_executable() { - read "?The current name of the executable is $1. Do you want to change it? (y/N)" CHOICE - - if [[ $CHOICE == "y" || $CHOICE == "Y" ]]; then - read "?Enter the name of the executable: " NAME - echo $NAME - else - echo $1 - fi -} - -save_desktop_entry() { - if [[ "$OSTYPE" == "linux-gnu" ]]; then - NAME=$1 - EXECUTABLE=$2 - - echo "Creating a desktop entry for the $NAME project...\n" - - # Create the desktop entry - sudo echo "[Desktop Entry]" > /usr/share/applications/$NAME.desktop - sudo echo "Name=$NAME" >> /usr/share/applications/$NAME.desktop - sudo echo "Exec=$EXECUTABLE" >> /usr/share/applications/$NAME.desktop - sudo echo "Type=Application" >> /usr/share/applications/$NAME.desktop - sudo echo "# Auto-generated by the install script" >> /usr/share/applications/$NAME.desktop - else - echo "This operating system is not yet supported." - exit 1 - fi -} - -help() { - echo "This script installs a project onto the user's system." - echo "Usage: install" - echo " install " - echo " install -h | --help" - echo "\nIf no path is provided, the script will look for a dependencies.txt file in the current directory." - exit 0 -} - -error_missing_dependencies() { - echo "The dependencies.txt file is missing from the project directory." - echo "This file should contain the required packages for the project to run." - echo "The format should be as follows: ," - echo "For example: python,python3" - echo "Please create this file before continuing." - echo "You can find an example file in the root directory of this project." - exit 1 -} - -success() { - NAME=$1 - EXECUTABLE=$2 - - echo "The $NAME project and it's dependencies have been successfully installed onto your system." - echo "You can now run the project by typing $EXECUTABLE into the terminal." - - read "?Would you like to create a desktop entry for the $NAME project? (y/N): " CHOICE - - if [[ $CHOICE == "y" || $CHOICE == "Y" ]]; then - save_desktop_entry $NAME $EXECUTABLE - fi -} - -install_c() { - NAME=$1 - echo "\nOther languages and build systems are not yet supported." - - exit 0 -} - -install_python() { - NAME=$1 - EXECUTABLE=$(name_executable $1) - - # Get the current working directory and the virtual environment - CWD=$(pwd) - ENV=$(pwd)/bin/activate - COMMAND="python $CWD/src/$NAME.py" - - # Create the virtual environment - python -m venv . - source bin/activate - - # Install Python packages in the virtual environment - if [[ -f requirements.txt ]]; then - pip install -r requirements.txt - fi - - - # Create the executable - sudo echo "#!/bin/zsh" > /usr/local/bin/$EXECUTABLE - sudo echo "source $ENV" >> /usr/local/bin/$EXECUTABLE - sudo echo "$COMMAND" >> /usr/local/bin/$EXECUTABLE - sudo echo "# Auto-generated by the install script" >> /usr/local/bin/$EXECUTABLE - sudo chmod +x /usr/local/bin/$EXECUTABLE - - success "$NAME" "$EXECUTABLE" -} - -install_java() { - NAME=$1 - echo "Other languages and build systems are not yet supported." - - exit 0 -} - -install_other() { - NAME=$1 - echo "Other languages and build systems are not yet supported." - - exit 0 -} - -install() { - PROJECT_NAME=$1 - - echo "\nInstalling the $PROJECT_NAME project onto your system..." - - echo "Please select the project language or build system:" - echo "1. C" - echo "2. Python" - echo "3. Java" - echo "4. Other" - - read "?Enter the number of the project type: " PROJECT_TYPE - - case $PROJECT_TYPE in - 1) - install_c "$PROJECT_NAME" - ;; - 2) - install_python "$PROJECT_NAME" - ;; - 3) - install_java "$PROJECT_NAME" - ;; - 4) - install_other "$PROJECT_NAME" - ;; - *) - echo "Invalid option" - ;; - esac -} - -install_dependencies() { - echo "Checking for required packages..." - - # Check if the check-dependency command is installed - if ! command -v check-dependency &> /dev/null - then - echo "The command check-dependency could not be found. Please install it before continuing." - echo "You can find it at https://github.com/quaxlyqueen/scripts." - exit 1 - fi - - # Iterate through each line of the dependencies.txt file - # and check if the package is installed with check-dependency - while read -r line; do - command=$(echo $line | awk -F ',' '{print $1}') - package=$(echo $line | awk -F ',' '{print $2}') - - check-dependency $command $package - - # If the package could not be installed, exit the script - if [[ $? -eq 1 ]]; then - echo "The command $command from package $package could not be installed. Please install it manually before continuing." - exit 1 - fi - - done < dependencies.txt -} - -check_sudo() { - if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root" - echo "Try 'sudo ./install'" - exit 1 - fi -} - -check_theme() { - USER=$SUDO_USER - if [ ! -d /home/$USER/.config ]; - then - echo "Creating the ~/.config directory..." - su $USER -c "mkdir /home/$USER/.config" - fi - - if [ ! -d /home/$USER/.config/theme ]; - then - echo "Creating the /home/$USER/.config/theme directory..." - su $USER -c "mkdir /home/$USER/.config/theme" - fi - - THEME_DIR=/home/$USER/.config/theme - - if [ ! -f $THEME_DIR/active.theme ]; - then - su $USER -c "touch $THEME_DIR/light.theme" - echo "base=#C6CAED" > $THEME_DIR/light.theme - echo "accent=#4D5382" >> $THEME_DIR/light.theme - echo "hover=#262940" >> $THEME_DIR/light.theme - - su $USER -c "touch $THEME_DIR/dark.theme" - echo "base=#262940" > $THEME_DIR/dark.theme - echo "accent=#4D5382" >> $THEME_DIR/dark.theme - echo "hover=#C6CAED" >> $THEME_DIR/dark.theme - - su $USER -c "ln -s $THEME_DIR/dark.theme $THEME_DIR/active.theme" - fi -} - -install-extra() { - if [ -f "install-extra" ]; then - echo "Running install-extra..." - ./install-extra - fi -} - -check_args() { - check_sudo - check_theme - - if [[ $# -gt 1 ]]; then - echo "ERROR: There were too many arguments.\n" - echo "Usage: install" - echo " install " - echo " install -h | --help" - exit 1 - - # No arguments provided - elif [[ $# -eq 0 ]]; then - - # Check if the current directory contains the required dependencies.txt file. - if [[ ! -f dependencies.txt ]]; then - error_missing_dependencies - - # Install the project - else - PROJECT_NAME=$(pwd | cut -d '/' -f5) - install_dependencies - install "$PROJECT_NAME" - install-extra - exit 0 - fi - - # User argument provided - else - - # Display help message - if [[ $1 == "-h" || $1 == "--help" ]]; then - help - fi - - # Check if the specified directory exists - if [[ ! -d $1 ]]; then - echo "The specified project directory does not exist" - exit 1 - - # Check if the specified directory contains the required dependencies.txt file. - elif [[ ! -f $1/dependencies.txt ]]; then - error_missing_dependencies - - # Install the project - else - PROJECT_NAME=$1 - install_dependencies - cd $PROJECT_NAME - install-extra - exit 0 - fi - fi -} - -check_args $1 diff --git a/install b/install deleted file mode 100755 index 11bd39d..0000000 --- a/install +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/zsh - -help() { - echo "This script installs and sets up the configuration for the repo quaxlyqueen/scripts." - echo "It will install the scripts in /usr/local/bin and set up the environment variables and aliases." - echo "The user will be prompted to:" - echo " - Set up the environment variables and aliases" - echo " - Create a theme for supported applications" - echo " - Set up Git, github-cli (gh), and gclone" - - echo "\nUsage: sudo ./install" - echo " sudo ./install -h | --help" - exit 0 -} - -# The script must be run as root -is_root() { - if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root." - exit 1 - fi -} - -create_theme() { - USER=$1 - su $USER -c "mkdir /home/$USER/.config/theme" - - echo "\nTheming currently supports .theme files with 3 colors: base, accent, and hover." - echo "These themes can be changed at anytime by editing the .theme file in ~/.config/theme." - echo "Supported applications will automatically use the active.theme link to theme themselves." - echo "active.theme is a symbolic link to (for eg.) light.theme or dark.theme." - - echo "\nMany themes can be created with this format, and using the 'set-theme ' command." - echo "See 'set-theme --help' for more information." - - echo "\n\nYou can create a theme now or use the default light and dark themes." - read "?Do you want to create a theme now? (y/n) " CHOICE - - USER=$SUDO_USER - DIR="/home/$USER/.config/theme" - - if [[ $CHOICE == "y" ]]; then - echo "\n" - read "?Please enter the base color in hex format (e.g. #ffffff): " BASE - read "?Please enter the accent color in hex format (e.g. #ffffff): " ACCENT - read "?Please enter the hover color in hex format (e.g. #ffffff): " HOVER - read "?Please enter the name of the theme: " NAME - - su $USER -c "echo 'base=$BASE' > $DIR/$NAME.theme" - su $USER -c "echo 'accent=$ACCENT' >> $DIR/$NAME.theme" - su $USER -c "echo 'hover=$HOVER' >> $DIR/$NAME.theme" - - echo "Theme created successfully." - echo "You can now use the 'set-theme $NAME' command to use this theme." - echo "Setting the active theme to $NAME.theme..." - su $USER -c "ln -s $DIR/$NAME.theme $DIR/active.theme" - - else - echo "Creating default light and dark themes..." - su $USER -c "echo 'base=#C6CAED' > $DIR/light.theme" - su $USER -c "echo 'accent=#4D5382' >> $DIR/light.theme" - su $USER -c "echo 'hover=#262940' >> $DIR/light.theme" - - su $USER -c "echo 'base=#262940' > $DIR/dark.theme" - su $USER -c "echo 'accent=#4D5382' >> $DIR/dark.theme" - su $USER -c "echo 'hover=#C6CAED' >> $DIR/dark.theme" - - read "?Do you want to set the active theme to the dark theme? (y/n) " CHOICE - - if [[ $CHOICE == "y" ]]; then - echo "Setting the active theme to dark.theme..." - su $USER -c "ln -s $DIR/dark.theme $DIR/active.theme" - else - echo "Setting the active theme to light.theme..." - su $USER -c "ln -s $DIR/light.theme $DIR/active.theme" - fi - fi -} - -setup_git() { - # Set up gclone - if [ ! -d "/home/$USER/.config/gclone" ]; then - su $USER -c "mkdir /home/$USER/.config/gclone" - su $USER -c "touch /home/$USER/.config/gclone/gclone.conf" - - read "?Please enter your GitHub user name for gclone: " GHUSER - su $USER -c "gclone --set-default $GHUSER" - fi - - # If the user has not set up git, do so now - if [ ! -f "/home/$USER/.gitconfig" ]; then - read "?Please enter your name for Git: " NAME - read "?Please enter your email for Git: " EMAIL - - su $USER -c "git config --global user.name $NAME" - su $USER -c "git config --global user.email $EMAIL" - fi - - # Install github-cli if it is not already installed - check_dependency "gh" "github-cli" - - # If the user has not set up github-cli, do so now - if [ ! -f "/home/$USER/.config/gh/hosts.yml" ]; then - echo "Please log in to GitHub using github-cli." - echo "This will allow you to modify your repositories and other GitHub features." - - su $USER -c "gh auth login" - fi -} - -# Create environment variables and global aliases -setup_environment() { - echo "Setting up the environment..." - read "?By default, the scripts will install in the /usr/local/bin directory. Is this OK? (y/n): " CHOICE - - if [[ $CHOICE == "n" ]]; then - read "?Please enter the directory to install the scripts: " DIR - else - DIR="/usr/local/bin" - fi - - echo "# Auto-generated by quaxlyqueen/scripts. Environment setup" >> ~/.zshrc - echo "alias gt='. goto $1'" >> ~/.zshrc - echo "alias goto='. goto $1'" >> ~/.zshrc - echo "export PATH=\$PATH:$DIR" >> ~/.zshrc - - # Source the .zshrc file to update the environment - source ~/.zshrc - - USER=$SUDO_USER - if [ ! -d "/home/$USER/.config" ]; then - su $USER -c "mkdir /home/$USER/.config" - create_theme $USER - fi - - if [ ! -d "/home/$USER/.config/theme" ]; then - create_theme $USER - fi - - setup_git -} - -is_root - if [[ $# -eq 1 ]]; then - if [[ $1 == "-h" || $1 == "--help" ]]; then - help - fi - fi - -more_install - if [ -f "install-extra" ]; then - echo "Running install-extra..." - sudo ./install-extra - fi - -# Install the scripts -echo "Installing scripts..." -sudo cp * /usr/local/bin -setup_environment -more_install - -echo "Installation complete. Please restart your terminal to use the new commands, or run 'source ~/.zshrc'." -echo "To remove the scripts, simply delete the files in /usr/local/bin and remove the aliases from your .zshrc file." -echo "Thank you for using quaxlyqueen/scripts!" -exit 0 diff --git a/mark b/mark index e3ad289c62ec809ffa932f8b0274e47d34048f46..0827746bd44e2123fc6c5c7492a07df799e26548 100755 GIT binary patch literal 8440 zcmcIp4UAOP6}~eAGA;|Qx>o8B`%pH4=+6GIz(Q@Dg~dX;2%>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ARGET.webm -n $TARGET.mp3 - rm $TARGET.webm -elif [[ -e $TARGET.mp4 ]]; then - ffmpeg -i $TARGET.mp4 -n $TARGET.mp3 - rm $TARGET.mp4 -else - echo "file not found" -fi diff --git a/run b/run deleted file mode 100755 index a184a10..0000000 --- a/run +++ /dev/null @@ -1,162 +0,0 @@ -#!/bin/zsh - -# Supported languages. -TYPES=("c", "rs", "cs", "java", "js", "python", "flutter", "gradle", "go") - -# Catch case where there are too many arguments. -if [[ $# -gt 1 ]]; then - echo "Proper usage: run {file}" - echo " eg. run" - echo " eg. run main" - echo " eg. run gradle" - echo " eg. run flutter" - echo " eg. run -h" - echo " eg. run --help" - - exit - -# Help page -elif [[ $1 == "-h" || $1 == "--help" ]]; then - echo "\nAbstracting away command line tools to compile and run code for various languages and frameworks." - echo "User can use with or without an argument file, the filetype is not needed." - echo "With no arguments, 'run' will list available (and supported) files." - echo "Additionally, 'run' prompts for and passes command line arguments for a program.\n" - echo "Detects required tools to use based upon filetypes.\n" - echo "Usage:" - echo " run" - echo " run [filename]" - echo " eg. run main" - echo " run gradle" - echo " run flutter" - echo " run -h" - echo " run --help\n" - echo "Supported languages: $TYPES" - - exit - -# Default state, with a reminder of what files may be launched from based upon the currently supported languages. -elif [[ $# -eq 0 ]]; then - - echo "Files that may be launched from:" - - # List files available to launch from. - for f in * - do - TYPE=`echo $f | cut -d "." -f 2` - counter=0 - - # Only list supported filetypes. - if [[ ${TYPES[@]} =~ $TYPE ]]; then - counter=$((counter+1)) # Increment counter to indicate the number of results. - - # Format: filename (file type) - echo `echo $f | cut -d "." -f 1` "("$TYPE")" - fi - done - echo $counter" available files.\n" - - # Catch case where there are no available files to run and exit. - if [[ $counter -eq 0 ]]; then - echo "No available files to run. Exiting." - exit - fi - - read "?Which file would you like to launch from: " TMP - - # Locate file and assign variables associated with the file (name and filetype). - for f in * - do - FILE=`echo $f | cut -d "." -f 1` - if [[ $FILE == $TMP ]]; then - NAME=$TMP - TYPE=`echo $f | cut -d "." -f 2` - fi - done - -# User has provided the file name. -elif [[ $# -eq 1 ]]; then - - # Locate file and assign variables associated with the file (name and filetype). - for f in * - do - FILE=`echo $f | cut -d "." -f 1` - if [[ $FILE == $1 ]]; then - NAME=$FILE - TYPE=`echo $f | cut -d "." -f 2` - fi - done -fi - -read "?Arguments: " ARGS - -# Run C app. -if [[ $TYPE == "c" ]]; then - clear - echo "Compiling..." - gcc $NAME.c -lm - echo "Output..." - ./a.out $ARGS - - rm a.out - -# Run a Rust app. -elif [[ $TYPE == "rs" ]]; then - clear - cargo run - -# Run C# app. -elif [[ $TYPE == "cs" ]]; then - clear - echo "Compiling..." - mcs -out:$NAME.exe $NAME.cs - echo "Output..." - mono $NAME.exe - -# Run Java app. -elif [[ $TYPE == "java" ]]; then - clear - echo "Compiling..." - javac *.java - echo "Output..."; - java $NAME $ARGS - rm *.class - -# Run JavaScript app. -elif [[ $TYPE == "js" ]]; then - clear - echo "Output..." - node $NAME.js - -# Run Python app. -elif [[ $TYPE == "py" ]]; then - clear - echo "Running..." - python $FILE.py - -# Run Golang app. -elif [[ $TYPE == "go" ]]; then - clear - echo "Compiling..." - go build - echo "Output..." - ./discordo #TODO: need to dynamically obtain the newly created object file to run and then delete - rm discordo - -# Run app through Gradle -elif [[ $1 == "gradle" ]]; then - clear; - echo "Output..." - ./gradlew run - -# Run app through Flutter -elif [[ $1 == "flutter" ]]; then - clear; - echo "Output..." - flutter run - -else - read "?Language is not supported. Create a GH issue (y/n, default y): " GH - if [[ $GH == "y" || $GH == "" ]]; then - echo "Need to implement issue reporting." - fi -fi diff --git a/set-theme b/set-theme deleted file mode 100755 index e7023be..0000000 --- a/set-theme +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/zsh - -# This script is used to apply a theme to i3 -# It takes zero or one argument, the name of the theme to apply or toggle between light and dark -# The theme must be located in $THEME_DIR -# The theme must be a file with the extension .theme -# The theme must be formatted as follows: -# base=base_color -# accent=accent_color -# hover=hover_color -# Where base_color, accent_color, and hover_color are hex values -# The theme will be applied to i3, i3blocks, and rofi - -cd ~/.config/theme -CURRENT_THEME=`stat active.theme | grep .theme | cut -d " " -f 6 | awk -F '/' '{print $NF}'` - -get_current_theme() { - if [ -f active.theme ]; then - CURRENT_THEME=`stat active.theme | grep .theme | cut -d " " -f 6 | awk -F '/' '{print $NF}'` - else - ln -sf dark.theme active.theme - fi -} - -set_theme() { - get_current_theme - # Get the theme - theme=$(cat active.theme) - - # Apply the theme - base=$(echo $theme | grep -oP '(?<=base=).*') - accent=$(echo $theme | grep -oP '(?<=accent=).*') - hover=$(echo $theme | grep -oP '(?<=hover=).*') - mode=$(echo $CURRENT_THEME | cut -d '.' -f 1) - - # Set i3 themes - sed -i "s/color=\(.*\)/color=$hover/g" ~/.config/i3blocks/i3blocks.conf - sed -i "s/set \$base .*/set \$base $base/g" ~/.config/i3/config - sed -i "s/set \$accent .*/set \$accent $accent/g" ~/.config/i3/config - sed -i "s/set \$hover .*/set \$hover $hover/g" ~/.config/i3/config - - # Apply active.theme to alacritty - ALACRITTY=~/.config/alacritty - sed -i "s/themes\/.*\.toml/themes\/$mode.toml/g" $ALACRITTY/alacritty.toml - - # Apply active.theme to rofi - ROFI_PATH=theme.rasi - sed -i "s/base\: .*/base: $base\;/" $ROFI_PATH - sed -i "s/accent\: .*/accent: $accent\;/" $ROFI_PATH - sed -i "s/hover\: .*/hover: $hover\;/" $ROFI_PATH - - # Set NeoVim theme - NVIM_PATH=~/.config/nvim/after/plugin/colors.lua - if [[ $mode == "light" ]]; then - sed -i "s/photon/antiphoton/" $NVIM_PATH - sed -i "s/guibg=#262940/guibg=#C6CAED/" $NVIM_PATH - sed -i "s/fg='#C6CAED'/fg='#262940'/" $NVIM_PATH - else - sed -i "s/anti//" $NVIM_PATH - sed -i "s/guibg=#C6CAED/guibg=#262940/" $NVIM_PATH - sed -i "s/fg='#262940'/fg='#C6CAED'/" $NVIM_PATH - fi - - i3-msg restart -} - -# If no argument is given, toggle between light and dark -if [ $# -eq 0 ]; then - if [[ $CURRENT_THEME == "light.theme" ]]; then - ln -sf dark.theme active.theme - else - ln -sf light.theme active.theme - fi - - set_theme - -elif [ $# -gt 1 ]; then - echo "Too many arguments" - exit 1 - -else - # Check if the theme exists - if [ ! -f $1.theme ]; then - echo "Theme $1 does not exist" - exit 1 - fi - - # Check if the theme is already applied - if [ -f active.theme ]; then - if [[ $(cat active.theme) == $(cat $1.theme) ]]; then - echo "Theme $1 is already applied" - exit 1 - else - ln -sf $1.theme active.theme - fi - else - ln -sf $1.theme active.theme - fi - - set_theme -fi diff --git a/setup b/setup deleted file mode 100755 index 56b49d4..0000000 --- a/setup +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/zsh - -mkdir dev docs downloads pictures school tmp; -sudo pacman -S alacritty android-tools archlinux-keyring aspnet-runtime base blender bluebubbles-desktop-app code dart devhelp devhelp-docs dhcpcd discord docker dotnet-sdk dracut efibootmgr feh firefox flatpak fzf gcc git github-cli godot gradle i3-wm i3lock i3status intel-ucode iwd java-openjfx java-openjfx-doc java-openjfx-src jdk-openjdk jgrasp jre-openjdk keepassxc kubeadm kubectl libreoffice-fresh linux linux-firmware luarocks man-db man-pages maven mono nasm neofetch neovim nerd-fonts-complete-starship net-tools networkmanager network-manager-applet ninja nitrogen nmap npm nvidia obs-studio os-prober php picom pavucontrol pidgin python python-pip reflector rofi rust simplescreenrecorder sof-firmware starship steam sudo tar texinfo thunar tldr typescript unrar vi virtualbox vlc wavpack wget wireshark-cli wl-clipboard xob xorg yarn yay zoom zoxide zsh -git clone https://github.com/quaxlyqueen/notes; -git clone https://github.com/quaxlyqueen/templates; -cd dev; git clone https://github.com/quaxlyqueen/scripts; diff --git a/update b/update deleted file mode 100755 index df52f53..0000000 --- a/update +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/zsh - -error() { - echo "Improper usage. To increase a value in a file, update [target_file] {+, -}[change]." - echo "For example, to increase the volume by 5, use 'update volume +5'." - echo "To decrease the brightness by 10, use 'update brightness -10'." - exit 1 -} - -# Set up target file -get_target() { - TARGET=$1 - - if [[ $TARGET == "volume" ]]; then - echo "/home/jashton/.config/xob/volume" - - elif [[ $TARGET == "brightness" ]]; then - echo "/home/jashton/.config/xob/brightness" - - else - echo "Invalid target. Please use 'volume' or 'brightness'." - error - exit 1 - fi -} - -# Format change -get_change() { - CHANGE=$1 - - if [[ $CHANGE[1] == "+" ]]; then - echo $CHANGE[2,-1] - return ${CHANGE[2,-1]} - elif [[ $CHANGE[1] == "-" ]]; then - echo -$CHANGE[2,-1] - return -${CHANGE[2,-1]} - else - echo "Invalid change. Please use '+' or '-'." - error - fi -} - -update() { - CHANGE=$1 - TARGET=$2 - TARGET_FILE=$(get_target "$TARGET") - - OLDNUM=`head $TARGET_FILE` - NEWNUM=`expr $OLDNUM + $CHANGE` - - if [[ $NEWNUM -le 100 && $NEWNUM -ge 0 ]]; then - sed -i "s/$OLDNUM/$NEWNUM/g" $TARGET_FILE - - if [[ $TARGET == "volume" ]]; then - pamixer --set-volume $NEWNUM% - - elif [[ $TARGET == "brightness" ]]; then - brightnessctl set $NEWNUM% - - else - echo "Invalid target. Please use 'volume' or 'brightness'." - error - fi - - echo $NEWNUM >> ~/.config/xob/xobpipe - exit 0 - else - echo "Invalid value. Please use a number between 0 and 100." - exit 1 - fi -} - -# Check for proper number of arguments -if [[ $# -ne 2 ]]; then - error -fi - -TARGET=$1 -CHANGE=$(get_change "$2") - -# Set up xob -tail -f ~/.config/xob/xobpipe | xob -s $TARGET & - -update "$CHANGE" "$TARGET" & diff --git a/update-bl b/update-bl deleted file mode 100755 index d6d4129..0000000 --- a/update-bl +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/zsh - -tail -f ~/.config/xob/xobpipe | xob -s volume & -if [[ $# -eq 2 ]]; then - CHANGE=$1 - TARGET_FILE=$2 -elif [[ $# -eq 3 ]]; then - CHANGE=`expr 0 - $2` - TARGET_FILE=$3 -else - echo "Improper usage. To increase a value in a file,\nupdate-bl [change] [target_file]." - echo "To decrease a value in a file,\nupdate-bl --decrease [change] [target_file]." -fi - -OLDNUM=`cut -f1 $TARGET_FILE` -NEWNUM=`expr $OLDNUM + $CHANGE` - -if [[ $NEWNUM -le 100 && $NEWNUM -ge 0 ]]; then - sed -i "s/$OLDNUM/$NEWNUM/g" $TARGET_FILE - brightnessctl set $NEWNUM% - echo $NEWNUM >> ~/.config/xob/xobpipe -fi diff --git a/update-vol b/update-vol deleted file mode 100755 index 6d9641f..0000000 --- a/update-vol +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/zsh - -tail -f ~/.config/xob/xobpipe | xob -s volume & -if [[ $# -eq 2 ]]; then - CHANGE=$1 - TARGET_FILE=$2 -elif [[ $# -eq 3 ]]; then - CHANGE=`expr 0 - $2` - TARGET_FILE=$3 -else - echo "Improper usage. To increase a value in a file,\nupdate-val [change] [target_file]." - echo "To decrease a value in a file,\nupdate-val --decrease [change] [target_file]." -fi - -OLDNUM=`cut -f1 $TARGET_FILE` -NEWNUM=`expr $OLDNUM + $CHANGE` - -if [[ $NEWNUM -le 100 && $NEWNUM -ge 0 ]]; then - sed -i "s/$OLDNUM/$NEWNUM/g" $TARGET_FILE - pactl set-sink-volume @DEFAULT_SINK@ $NEWNUM% - echo $NEWNUM >> ~/.config/xob/xobpipe -fi