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" | |
# Default network interface | |
DEFAULT_INTERFACE="wlp2s0" | |
# Function to get available network interfaces | |
get_interfaces() { |
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 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 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 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 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 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 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:") |
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 | |
### | |
# [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 | |
# 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 | |
# 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 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 |