Skip to content

Commit

Permalink
configuration scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
igorw765 committed May 18, 2023
1 parent 5e07d0b commit 562e2ef
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
49 changes: 49 additions & 0 deletions initial-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

# Directory where the scripts are located
scripts_directory="$HOME/.config/conky/Regulus-Spotify/scripts/"

cd $scripts_directory & chmod +x *

# Function to execute a script
execute_script() {
script_name=$1
echo "Executing script: $script_name"
cd "$scripts_directory" && "./$script_name"
}

# Prompt user for execution (default answer: Y)
read -p "Do you want to change your current weather localization? (Y/n): " execute_localization
execute_localization=${execute_localization:-Y} # Set default value to Y if user presses enter without input

if [[ $execute_localization == "y" || $execute_localization == "Y" ]]; then
execute_script localization.sh
fi

# Prompt user for execution (default answer: Y)
read -p "Do you want to change text color? (Y/n): " execute_color
execute_color=${execute_color:-Y} # Set default value to Y if user presses enter without input

if [[ $execute_color == "y" || $execute_color == "Y" ]]; then
execute_script color.sh
fi

# Prompt user for execution (default answer: Y)
read -p "Do you want to change network interface (required for graphs to work correctly)? (Y/n): " execute_network
execute_network=${execute_network:-Y} # Set default value to Y if user presses enter without input

if [[ $execute_network == "y" || $execute_network == "Y" ]]; then
execute_script network.sh
fi

# Prompt user for execution (default answer: Y)
read -p "Do you want to change rings color? (Y/n): " execute_rings
execute_rings=${execute_rings:-Y} # Set default value to Y if user presses enter without input

if [[ $execute_rings == "y" || $execute_rings == "Y" ]]; then
execute_script rings.sh
fi


$HOME/.config/conky/Regulus-Spotify/start.sh
echo "Setup complited successfully"
10 changes: 10 additions & 0 deletions scripts/network.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Retrieve the default network interface
default_interface=$(ip route show default | awk '/default via/ {print $5}')

# Path to the Regulus.conf file
conf_file="$HOME/.config/conky/Regulus-Spotify/Regulus.conf"

# Replace "eno2" with the default network interface name in the conf file
sed -i "s/eno2/$default_interface/g" "$conf_file"

0 comments on commit 562e2ef

Please sign in to comment.