updated
This commit is contained in:
parent
4be5494d9d
commit
f7fa1a14fe
5 changed files with 42 additions and 41 deletions
|
@ -191,7 +191,7 @@ print_status() {
|
|||
paired_devices_cmd="paired-devices"
|
||||
fi
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2)
|
||||
mapfile -t paired_devices < <(bluetoothctl "$paired_devices_cmd" | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
for device in "${paired_devices[@]}"; do
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple power menu rofi script
|
||||
# - Dependencies: rofi, power-profiles-daemon
|
||||
# - Dependencies: rofi, power-profiles-daemon, swaylock
|
||||
#
|
||||
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## CURRENT WALLPAPER FOR LOCKSCREEN ##
|
||||
currwall=$(tail --l 1 "$HOME/.wbg" | awk '{print $5}')
|
||||
|
||||
|
@ -16,8 +19,6 @@ option4="鈴 Suspend"
|
|||
option5=" Lock"
|
||||
option6=" Change power profile"
|
||||
option7=" Cancel"
|
||||
|
||||
## OPTIONS ARRAY ##
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||
|
||||
## POWER PROFILE OPTIONS ##
|
||||
|
@ -25,12 +26,10 @@ pwr1=" Performance"
|
|||
pwr2=" Balanced"
|
||||
pwr3=" Power Saver"
|
||||
pwr4=" Cancel"
|
||||
|
||||
## POWER PROFILES ARRAY ##
|
||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
||||
|
||||
## MAIN ACTION COMMAND ##
|
||||
action=$(echo -e "$options" | rofi -dmenu -i -p " Power Options ")
|
||||
action=$(echo -e "$options" | $menu " Power Options ")
|
||||
case "$action" in
|
||||
$option1*)
|
||||
pkill Hyprland;;
|
||||
|
@ -53,7 +52,7 @@ case "$action" in
|
|||
elif [ "$currentpwr" = "balanced" ]; then
|
||||
currentpwr=" Balanced"
|
||||
fi
|
||||
pwraction=$(echo -e "$pwrs" | rofi -dmenu -i -p " Power Profile Menu - Currently set to: ${currentpwr} ")
|
||||
pwraction=$(echo -e "$pwrs" | $menu " Power Profile Menu - Currently set to: ${currentpwr} ")
|
||||
case "$pwraction" in
|
||||
$pwr1*)
|
||||
powerprofilesctl set performance && notify-send "Power profile switched to performance";;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# Screenshot directory
|
||||
screenshot_directory="$HOME/Pictures/Screenshots"
|
||||
mkdir -p $screenshot_directory
|
||||
mkdir -p "$screenshot_directory"
|
||||
|
||||
countdown() {
|
||||
notify-send "Screenshot" "Executing in 3 seconds" -t 1000
|
||||
|
@ -48,7 +48,7 @@ get_options() {
|
|||
}
|
||||
|
||||
check_deps() {
|
||||
if ! hash $1 2>/dev/null; then
|
||||
if ! hash "$1" 2>/dev/null; then
|
||||
echo "Error: This script requires $1"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -108,7 +108,7 @@ main() {
|
|||
set -e
|
||||
}
|
||||
|
||||
main $1 &
|
||||
main "$1" &
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
|
@ -2,52 +2,52 @@
|
|||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wallpaper changer script
|
||||
# - Dependencies: rofi, fd, feh
|
||||
# - Dependencies: rofi, fd, swaybg
|
||||
|
||||
## MAIN VARIABLES AND COMMANDS ##
|
||||
walldir="$HOME/Pictures/Wallpapers" # wallpapers folder, change it to yours, make sure that it ends with a /
|
||||
cd "$walldir" || exit
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## SELECT PICTURE FUNCTION ##
|
||||
selectpic() {
|
||||
wallpaper=$(fd -p "$walldir" | rofi -dmenu -i -p " Wallpaper Selector ")
|
||||
if [ "$wallpaper" ]; then
|
||||
chosenwall=$wallpaper
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
selectpic
|
||||
## WALLPAPER DIRECTORY ##
|
||||
walldir="$HOME/Pictures/Wallpapers" # wallpapers folder, change it to yours
|
||||
|
||||
## WALLPAPER SETTING OPTIONS ##
|
||||
option1=" Fill"
|
||||
option2=" Center"
|
||||
option3=" Tile"
|
||||
option4=" Fit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5"
|
||||
options="$option1\n$option2\n$option3\n$option4"
|
||||
|
||||
## SELECT PICTURE ##
|
||||
cd "$walldir" || exit 1
|
||||
wallpaper=$(fd -p "$walldir" | $menu " Wallpaper Selector ")
|
||||
if [ "$wallpaper" ]; then
|
||||
chosenwall=$wallpaper
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## MAIN ACTION ##
|
||||
action=$(echo -e "$options" | rofi -dmenu -i -p " Chose the format ")
|
||||
action=$(echo -e "$options" | $menu " Chose the format ")
|
||||
case "$action" in
|
||||
$option1*)
|
||||
pkill swaybg
|
||||
swaybg -m fill -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m fill -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
echo -e "#!/bin/sh\nswaybg -m fill -i $walldir/$chosenwall" > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
$option2*)
|
||||
pkill swaybg
|
||||
swaybg -m center -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m center -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
echo -e "#!/bin/sh\nswaybg -m center -i $walldir/$chosenwall" > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
$option3*)
|
||||
pkill swaybg
|
||||
swaybg -m tile -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m tile -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
echo -e "#!/bin/sh\nswaybg -m tile -i $walldir/$chosenwall" > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
$option4*)
|
||||
pkill swaybg
|
||||
swaybg -m fit -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m fit -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
echo -e "#!/bin/sh\nswaybg -m fit -i $walldir/$chosenwall" > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
esac
|
||||
exit 0
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wifi rofi script
|
||||
# - Dependencies: rofi, NetworkManager
|
||||
# - Dependencies: rofi, NetworkManager, io.elementary.capnet-assist
|
||||
|
||||
## ROFI VARIABLES ##
|
||||
ROFI="rofi -dmenu -i -p"
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## MAIN OPTIONS ##
|
||||
option1=" Turn on WiFi"
|
||||
|
@ -16,7 +16,9 @@ option5=" Setup captive portal"
|
|||
option6=" Cancel"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||
|
||||
## GRAB WIFI INTERFACE ##
|
||||
wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
|
||||
|
||||
## TURN OFF WIFI FUNCTION ##
|
||||
turnoff() {
|
||||
nmcli radio wifi off
|
||||
|
@ -43,12 +45,12 @@ disconnect() {
|
|||
connect() {
|
||||
notify-send "Scannig networks, please wait"
|
||||
sleep 1
|
||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $ROFI " Select a Wifi Network " | cut -d' ' -f1)
|
||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $menu " Select a Wifi Network " | cut -d' ' -f1)
|
||||
}
|
||||
|
||||
## SELECT PASSWORD FUNCTION ##
|
||||
password() {
|
||||
pass=$(echo " " | $ROFI " Enter Password " -password)
|
||||
pass=$(echo " " | $menu " Enter Password " -password)
|
||||
}
|
||||
|
||||
## MAIN CONNECTION COMMAND ##
|
||||
|
@ -69,7 +71,7 @@ check() {
|
|||
}
|
||||
|
||||
## MAIN ACTION COMMANDS ##
|
||||
cases=$(echo -e "$options" | $ROFI " Wifi Settings " )
|
||||
cases=$(echo -e "$options" | $menu " Wifi Settings " )
|
||||
case "$cases" in
|
||||
$option1*)
|
||||
turnon;;
|
||||
|
|
Loading…
Reference in a new issue