lets
This commit is contained in:
commit
9581bcc174
10 changed files with 191 additions and 0 deletions
23
for_smol/bat.sh
Executable file
23
for_smol/bat.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
state=$(acpi -a)
|
||||
# echo "$state"
|
||||
if [[ "$state" = "Adapter 0: on-line" ]]
|
||||
then
|
||||
echo "Charging"
|
||||
exit 0
|
||||
fi
|
||||
bat=$(acpi -b | cut -b 25-27 | sed 's/%//')
|
||||
echo "$bat %"
|
||||
if [[ "$bat" = 100 ]]
|
||||
then
|
||||
echo "Full"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$bat" -lt 20 ]]
|
||||
then
|
||||
echo "Suspending"
|
||||
systemctl suspend
|
||||
exit 0
|
||||
fi
|
14
for_smol/bt.sh
Normal file
14
for_smol/bt.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
power=$(bluetoothctl show | grep Powered)
|
||||
echo "$power"
|
||||
if [[ "$power" = " Powered: no" ]]
|
||||
then
|
||||
bluetoothctl power on
|
||||
sleep 1
|
||||
bluetoothctl connect 68:D6:ED:28:EB:D9
|
||||
exit
|
||||
else
|
||||
bluetoothctl power off
|
||||
exit
|
||||
fi
|
14
for_smol/musicctrl.sh
Normal file
14
for_smol/musicctrl.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
playerstatus=$(playerctl status)
|
||||
echo "$playerstatus"
|
||||
if [[ "$playerstatus" = "Playing" ]]
|
||||
then
|
||||
playerctl -a stop
|
||||
exit 0
|
||||
fi
|
||||
if [[ "$playerstatus" = "Stopped" ]]
|
||||
then
|
||||
playerctl play
|
||||
exit 0
|
||||
fi
|
13
for_smol/ytmpdplay.sh
Executable file
13
for_smol/ytmpdplay.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
: "${1?How to use: $0 YT_VIDEO_LINK}"
|
||||
|
||||
yt_link="$1"
|
||||
|
||||
play_link=$(yt-dlp -g "$yt_link" | sed '1d')
|
||||
|
||||
mpc clear 1>/dev/null
|
||||
mpc add "$play_link" 1>/dev/null
|
||||
mpc play 1>/dev/null
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue