updated scripts

This commit is contained in:
λmolinae 2025-04-16 23:03:27 -06:00
parent fa169ab0b6
commit 5203fdc11f
4 changed files with 82 additions and 0 deletions

54
.local/bin/bluetooth Executable file
View file

@ -0,0 +1,54 @@
#!/bin/sh -x
checkstate() {
if [ "$(bluetoothctl show | grep "Powered: yes")" ]; then
echo "󰂯 ON"
else
echo "󰂲 OFF"
fi
}
switchstate() {
case "$(checkstate | fuzzel -d)" in
"󰂯 ON")
bluetoothctl power off
notify-send "Bluetooth" "Bluetooth is disabled"
;;
"󰂲 OFF")
echo "Bluetooth is enabled"
bluetoothctl power on
notify-send "Bluetooth" "Bluetooth is enabled"
;;
*) exit ;;
esac
}
checkstate() {
if [ "$(bluetoothctl show | grep "Powered: yes")" ]; then
echo "󰂯 ON"
else
echo "󰂲 OFF"
fi
}
switchstate() {
case "$(checkstate | fuzzel -d)" in
"󰂯 ON")
bluetoothctl power off
notify-send "Bluetooth" "Bluetooth is disabled"
;;
"󰂲 OFF")
echo "Bluetooth is enabled"
bluetoothctl power on
notify-send "Bluetooth" "Bluetooth is enabled"
;;
*) exit ;;
esac
}
case $(printf "%s\n" "󰂯 Connect Device" "󰂳 Change State" | fuzzel -d) in
"󰂯 Connect Device")
echo menu ;;
"󰂳 Change State") switchstate ;;
*) exit ;;
esac

4
.local/bin/fsss Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
# takes a fullscreen screenshot and sends notification afterwards
grim - | wl-copy && notify-send "grim" "screenshot copied to clipboard"

22
.local/bin/nvim Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
ROOT=""$HOME"/Documents/Miscellaneous/archroot"
bwrap \
--dev-bind /dev /dev \
--tmpfs /tmp \
--proc /proc \
--bind "$ROOT"/lib /lib \
--bind "$ROOT"/lib64 /lib64 \
--bind "$ROOT"/usr/lib /usr/lib \
--bind "$ROOT"/usr/lib64 /usr/lib64 \
--bind "$ROOT"/usr/bin /usr/bin \
--bind "$ROOT"/bin /bin \
--bind "$ROOT"/usr/share /usr/share \
--bind "$ROOT"/etc /etc \
--ro-bind "$ROOT"/etc/resolv.conf /etc/resolv.conf \
--bind "$HOME" "$HOME" \
--setenv "$XDG_RUNTIME_DIR" "$XDG_RUNTIME_DIR" \
--bind "$XDG_RUNTIME_DIR" "$XDG_RUNTIME_DIR" \
/usr/bin/nvim "$@"

2
.local/bin/rgnss Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh -x
grim -g "$(slurp </dev/null) - | wl-copy"