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 | |
# 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 | |
# 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 | |
# 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 brightness levels as percentages | |
levels="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 "$levels" | rofi -dmenu -p "Set Brightness Level") | |
# If the user made a selection, set the brightness and print the chosen level | |
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 | |
# Temporary file to store the selected interface | |
INTERFACE_FILE="/tmp/selected_network_interface" | |
# Function to get available network interfaces | |
get_interfaces() { | |
ls /sys/class/net | grep -v lo | |
} |
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 | |
### | |
# [0] download first | |
# https://ungoogled-software.github.io/ungoogled-chromium-binaries/ | |
# [1] make it executable | |
# [2] move to system | |
# [3] set "https://search.brave.com/search?q=%s" as default search engine | |
### |
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 | |
# Get the list of tags (workspaces) with their states | |
tags=$(herbstclient tag_status) | |
# Primary Colors | |
clr_red="#FF0000" | |
clr_orange="#FFA500" | |
clr_yellow="#FFFF00" | |
clr_green="#008000" |
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 | |
# 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:") |