add gh-cli

This commit is contained in:
danny 2024-12-14 16:55:50 +08:00
parent ab917700ee
commit 5b46a0b217
30 changed files with 680 additions and 356 deletions

View file

@ -0,0 +1,8 @@
#!/bin/bash
#Script for lockscreen
sleep 2
powerprofilesctl set power-saver
hyprlock -c ~/.config/dotfiles/hyprland/hyprlock/hyprlock.conf
powerprofilesctl set performance

41
home/config/scripts/lofi.sh Executable file
View file

@ -0,0 +1,41 @@
#!/bin/bash
#Taken from jakoolit's hyprland dots
iDIR="$HOME/.config/swaync/icons"
declare -A menu_options=(
["Lofi Girl ☕️🎶"]="https://play.streamafrica.net/lofiradio"
["White Noise 📖🎶"]="https://www.youtube.com/watch?v=nMfPqeZjc2c&t=7040s&pp=ygULd2hpdGUgbm9pc2U%3D"
["Easy Rock 96.3 FM 📻🎶"]="https://radio-stations-philippines.com/easy-rock"
["Wish 107.5 FM 📻🎶"]="https://radio-stations-philippines.com/dwnu-1075-wish"
["Wish 107.5 YT Pinoy HipHop 🎻🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJnmgMYwCKid4XIFqUKBVWEs&si=vahW_noh4UDJ5d37"
["Wish 107.5 YT Wishclusives ☕️🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJn5B22H9HOWP3Kxxs-DkPSM&si=d_Ld2OKhGvpH48WO"
["Chillhop ☕️🎶"]="http://stream.zeno.fm/fyn8eh3h5f8uv"
["SmoothChill ☕️🎶"]="https://media-ssl.musicradio.com/SmoothChill"
["Relaxing Music ☕️🎶"]="https://youtube.com/playlist?list=PLMIbmfP_9vb8BCxRoraJpoo4q1yMFg4CE"
)
notification() {
notify-send -u normal "Playing now: $@"
}
main() {
choice=$(printf "%s\n" "${!menu_options[@]}" | rofi -i -dmenu -config ~/.config/dotfiles/rofi/config.rasi -p "")
if [ -z "$choice" ]; then
exit 1
fi
link="${menu_options[$choice]}"
notification "$choice"
if [[ $link == *playlist* || $link == *watch* ]]; then
mpv --shuffle --vid=no --volume=50 "$link"
else
mpv --volume=50 "$link"
fi
}
pkill mpv && notify-send -u low "Online Music stopped" || main

54
home/config/scripts/scrcpy.sh Executable file
View file

@ -0,0 +1,54 @@
#!/usr/bin/bash
#Script to run SCRCPY
if pgrep -x "scrcpy" > /dev/null
then
pkill -x scrcpy
exit
fi
# Get connected devices
devices=$(adb devices | awk 'NR>1 && $2=="device" {print $1}')
device_count=$(echo "$devices" | wc -l)
# If no devices are found, exit the script
if [ "$device_count" -eq 0 ]; then
notify-send "No devices connected."
exit 1
fi
# If multiple devices are connected, prompt to select one
if [ "$device_count" -gt 1 ]; then
selected_device=$(echo "$devices" | rofi -dmenu -config ~/.config/dotfiles/rofi/config.rasi -p "Select Device: ")
else
selected_device=$(echo "$devices")
fi
# If no device was selected, exit the script
if [ -z "$selected_device" ]; then
echo "No device selected."
exit 1
fi
# Options for SCRCPY modes
options="Video\nNo Video\nVideo & Audio"
# Prompt to select the SCRCPY mode
selected_option=$(echo -e "$options" | rofi -dmenu -config ~/.config/dotfiles/rofi/config.rasi -p "Select SCRCPY mode: ")
# Run scrcpy with the selected mode and device
case "$selected_option" in
"Video")
scrcpy --serial "$selected_device" --max-size=1024 --video-codec=h265 --video-bit-rate=6M --audio-bit-rate=128K --max-fps=30 --no-audio
;;
"No Video")
scrcpy --serial "$selected_device" --no-window
;;
"Video & Audio")
scrcpy --serial "$selected_device" --max-size=1024 --video-codec=h265 --video-bit-rate=6M --audio-bit-rate=128K --max-fps=30
;;
*)
echo "Invalid selection"
;;
esac

View file

@ -0,0 +1,32 @@
#!/bin/bash
#Taken from JaKoolit's dotfiles
bar="▁▂▃▄▅▆▇█"
dict="s/;//g"
bar_length=${#bar}
for ((i = 0; i < bar_length; i++)); do
dict+=";s/$i/${bar:$i:1}/g"
done
config_file="/tmp/bar_cava_config"
cat >"$config_file" <<EOF
[general]
bars = 10
[input]
method = pulse
source = auto
[output]
method = raw
raw_target = /dev/stdout
data_format = ascii
ascii_max_range = 7
EOF
pkill -f "cava -p $config_file"
cava -p "$config_file" | sed -u "$dict"

View file

@ -0,0 +1,9 @@
#!/usr/bin/bash
#Restart Waybar and swaync
killall waybar
killall swaync
waybar -c ~/.config/dotfiles/waybar/config -s ~/.config/dotfiles/waybar/style.css &
swaync -s ~/.config/dotfiles/swaync/style.css -c ~/.config/dotfiles/swaync/config.json &
notify-send --app-name=HOME -i ~/.config/dotfiles/fastfetch/moon.png Hello