This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Parses command-line arguments and executes the appropriate action | |
parse_args() { | |
case $1 in | |
-r | --reset) | |
reset_temperature | |
;; | |
-t | --temperature) | |
if [ -n "$2" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define the options for brightness levels | |
options="0%\n5%\n10%\n15%\n20%\n25%\n30%\n35%\n40%\n45%\n50%\n55%\n60%\n65%\n70%\n75%\n80%\n85%\n90%\n95%\n100%" | |
# Use rofi to select a brightness level | |
chosen=$(echo -e "$options" | rofi -dmenu -p "Set Brightness Level") | |
# If the user made a selection, set the brightness | |
if [ -n "$chosen" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define the options for volume levels | |
options="0%\n5%\n10%\n15%\n20%\n25%\n30%\n35%\n40%\n45%\n50%\n55%\n60%\n65%\n70%\n75%\n80%\n85%\n90%\n95%\n100%" | |
# Use rofi to select a volume level | |
chosen=$(echo -e "$options" | rofi -dmenu -p "Set Volume Level") | |
# If the user made a selection, set the volume | |
if [ -n "$chosen" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script to initiate a new Lua project | |
# Check if the user wants to create a new directory | |
read -p "Do you want to create a new directory for your Lua project? (y/n): " create_new_directory | |
if [ "$create_new_directory" == "y" ]; then | |
# Get project name from user input | |
read -p "Enter your Lua project name: " project_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
getGoVersion() { | |
versionInfo=$(go version 2>&1) | |
if [ $? -ne 0 ]; then | |
echo "Error executing 'go version' command: $versionInfo" >&2 | |
return 1 | |
fi | |
version=$(echo $versionInfo | awk '{print $3}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script to initiate a new Python project | |
# Check if the user wants to create a new directory | |
read -p "Do you want to create a new directory for your project? (y/n): " create_new_directory | |
if [ "$create_new_directory" == "y" ]; then | |
# Get project name from user input | |
read -p "Enter your project name: " project_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if a GitHub URL is provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <GitHub Repo URL>" | |
exit 1 | |
fi | |
# Remove "http://" or "https://" | |
url_no_protocol=$(echo $1 | sed 's/https\?:\/\///') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEFAULT_BROWSER="brave" | |
# Declare a custom array of websites | |
declare -A websites | |
websites["google"]="https://google.com/" | |
websites["youtube"]="https://youtube.com/" | |
websites["x-twitter"]="https://x.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH_MEDIA="/media" | |
PATH_HOME="/home" | |
# Declare a custom array of dirs | |
declare -A dirs | |
dirs["dir:category:subcategory"]="$PATH_MEDIA/public-repos" | |
dirs["dir:category:subcategory"]="$PATH_MEDIA/private-repos" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Rofi prompt for website URL | |
website_url=$(rofi -dmenu -p "Enter the website URL:") | |
# Extract the website name | |
website_name=$(echo "$website_url" | awk -F[/:] '{print $4}') | |
# Rofi prompt for folder name | |
folder_name=$(rofi -dmenu -p "Enter folder name for $website_name:") |