This file contains 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 | |
# Get the application directory from the command line argument | |
APP_DIR="$1" | |
# Set installation path | |
INSTALL_DIR="/opt" # Standard directory for optional apps | |
BIN_PATH="/usr/local/bin" # Path where we symlink the executable | |
# Check if APP_DIR was provided |
This file contains 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 the AppImage file path is provided | |
if [ -z "$1" ]; then | |
echo "Error: Please provide the path to the AppImage file as the first argument." | |
exit 1 | |
fi | |
# Path to the AppImage file | |
appimage_path="$1" |
This file contains 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 an argument (file or directory) is provided | |
if [ -z "$1" ]; then | |
echo "Usage: sizeof <file_or_directory>" | |
exit 1 | |
fi | |
# Use du to calculate size in bytes, then dynamically adjust for KB, MB, GB, etc. | |
size_in_bytes=$(du -sb "$1" | cut -f1) |
This file contains 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 | |
# Update package list | |
echo "Updating package list..." | |
sudo apt update | |
# Install PHP | |
echo "Installing PHP..." | |
sudo apt install -y php8.0 |
This file contains 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 | |
# Function to print a message in a specific format | |
print_message() { | |
echo "--------------------------------------------------" | |
echo "$1" | |
echo "--------------------------------------------------" | |
} | |
# Function to install Homebrew |
This file contains 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 | |
# Temporary file to store the selected interface | |
INTERFACE_FILE="/tmp/selected_network_interface" | |
# Default network interface | |
DEFAULT_INTERFACE="wlp2s0" | |
# Function to get available network interfaces | |
get_interfaces() { |
This file contains 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 path to the mode file | |
MODE_FILE=~/.config/polybar/current_screen_mode | |
# Create the mode file with a default value if it doesn't exist | |
if [ ! -f "$MODE_FILE" ]; then | |
echo "default" > "$MODE_FILE" | |
fi |
This file contains 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 | |
# Get the network interface (e.g., eth0, wlan0) | |
INTERFACE=$(ip route | grep default | awk '{print $5}') | |
# Default values if files are not found | |
DEFAULT_RX_BYTES=0 | |
DEFAULT_TX_BYTES=0 | |
# Get the current bytes received and transmitted |
This file contains 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 | |
# Get the top ten processes consuming the most CPU | |
top_processes=$(ps -eo pid,comm,%cpu --sort=-%cpu | head -n 11 | tail -n 10) | |
# Format the process list for rofi | |
process_list=$(echo "$top_processes" | awk '{print $1 " " $2 " (" $3 "%)"}') | |
# Show the process list in rofi and get the user's choice | |
chosen=$(echo "$process_list" | rofi -dmenu -p "Kill Process:") |
This file contains 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 | |
# Get the top ten processes consuming the most memory | |
top_processes=$(ps -eo pid,comm,%mem --sort=-%mem | head -n 11 | tail -n 10) | |
# Format the process list for rofi | |
process_list=$(echo "$top_processes" | awk '{print $1 " " $2 " (" $3 "%)"}') | |
# Show the process list in rofi and get the user's choice | |
chosen=$(echo "$process_list" | rofi -dmenu -p "Kill Process:") |
NewerOlder