add files
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
dir="${1:-.}"
|
||||
|
||||
find "$dir" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 |
|
||||
xargs -0 -P"$(nproc)" -I{} sh -c '
|
||||
if ! ffprobe -v quiet -show_entries format_tags \
|
||||
-of default=nw=1:nk=1 "$1" 2>/dev/null |
|
||||
grep -q -E "Visit https?://[^ ]+"; then
|
||||
echo "Match found in: $1"
|
||||
fi
|
||||
' _ {}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
sudo efibootmgr --create --disk /dev/sdd --part 1 --label "Arch Linux (Direct)" --loader '\EFI\arch\vmlinuz-linux-zen.efi' --unicode 'initrd=\EFI\arch\initramfs-linux-zen.img root=PARTUUID=19cf989f-90e6-4114-8736-ea031cb1488e iomem=relaxed pcie_acs_override=downstream,multifunction,id:10de:1c03,id:10de:10f1 rd.driver.pre=vfio-pci loglevel=3 pci-stub.ids=10de:1c03,10de:10f1 iommu=pt nvidia_drm.modeset=1 amd_iommu=on kvm.ignore_msrs=1 mitigations=off rw'
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
PLAYLIST_DIR="/home/user/Music/Playlists/"
|
||||
BASENAME="/home/user/Music/$SELECTED_SONGS"
|
||||
echo $BASENAME | kitty +kitten clipboard
|
||||
if grep -q "$BASENAME" $PLAYLIST_DIR/*.m3u
|
||||
then
|
||||
notify-send "Song is in a playlist";
|
||||
else
|
||||
notify-send "Song isnt in a playlist";
|
||||
fi
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
update_count=$(paru -Qu | wc -l)
|
||||
|
||||
if [ $update_count -eq 0 ]; then
|
||||
echo ""
|
||||
else
|
||||
echo " $update_count"
|
||||
fi
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
sudo cp /boot/vmlinuz-linux-zen /boot/EFI/arch/vmlinuz-linux-zen.efi
|
||||
sudo cp /boot/initramfs-linux-zen.img /boot/EFI/arch/initramfs-linux-zen.img
|
||||
echo "done updating kernel files for efi stub"
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo "Usage: ${0} up|down"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
STEP=5
|
||||
|
||||
get_vol() {
|
||||
mpc --host=/home/user/.config/mpd/socket volume
|
||||
}
|
||||
|
||||
set_vol() {
|
||||
mpc --host=/home/user/.config/mpd/socket volume "$1"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
up)
|
||||
set_vol +$((STEP))
|
||||
;;
|
||||
down)
|
||||
set_vol -$((STEP))
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0} up|down"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# Can parse 'max_length=SOME_INTEGER' as argument
|
||||
# (example: ./now-playing max_lentgh=40)
|
||||
|
||||
default_max_length=45
|
||||
|
||||
# Function to trim the info if it exceeds 'max_length' characters
|
||||
trim_info() {
|
||||
local info="$1"
|
||||
local max_length="$2"
|
||||
|
||||
if [ ${#info} -gt $max_length ]; then
|
||||
local trim_length=$((max_length - 1))
|
||||
info="${info:0:$trim_length}…"
|
||||
fi
|
||||
|
||||
echo "$info"
|
||||
}
|
||||
|
||||
# Parse the command-line argument for max_length
|
||||
if [[ $1 =~ max_length=([0-9]+) ]]; then
|
||||
max_length="${BASH_REMATCH[1]}"
|
||||
else
|
||||
max_length=$default_max_length
|
||||
fi
|
||||
|
||||
# Check if Spotify is playing
|
||||
spotify_status=$(playerctl --player=mpd status 2>/dev/null)
|
||||
|
||||
if [ "$spotify_status" == "Playing" ]; then
|
||||
# Get currently playing song from Spotify
|
||||
info=$(playerctl metadata --player=mpd --format ' {{title}} • {{artist}}')
|
||||
fi
|
||||
|
||||
trimmed_info=$(trim_info "$info" "$max_length")
|
||||
echo "$trimmed_info"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
spotify_status=$(playerctl --player=mpd status 2>/dev/null)
|
||||
|
||||
if [ "$spotify_status" == "Playing" ]; then
|
||||
playerctl --player=mpd next
|
||||
fi
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
spotify_status=$(playerctl --player=mpd status 2>/dev/null)
|
||||
|
||||
if [ "$spotify_status" == "Playing" ]; then
|
||||
playerctl --player=mpd previous
|
||||
fi
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
spotify_status=$(playerctl --player=mpd status 2>/dev/null)
|
||||
|
||||
if [ "$spotify_status" == "Playing" ]; then
|
||||
playerctl --player=mpd position $(($(playerctl --player=mpd position | awk '{print int($1)}') + 30))
|
||||
fi
|
||||
|
||||
# mpris-ctl --player Spotify seek +30
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo "Usage: ${0} up|down|mute"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
STEP=0.03 # Volume change step
|
||||
|
||||
get_vol() {
|
||||
playerctl -p mpd volume
|
||||
}
|
||||
|
||||
set_vol() {
|
||||
playerctl -p mpd volume $1
|
||||
}
|
||||
|
||||
current_vol=$(get_vol)
|
||||
|
||||
case $1 in
|
||||
up)
|
||||
new_vol=$(echo "$current_vol + $STEP" | bc)
|
||||
[[ $(echo "$new_vol > 1.0" | bc) -eq 1 ]] && new_vol=1.0
|
||||
set_vol $new_vol
|
||||
;;
|
||||
down)
|
||||
new_vol=$(echo "$current_vol - $STEP" | bc)
|
||||
[[ $(echo "$new_vol < 0.0" | bc) -eq 1 ]] && new_vol=0.0
|
||||
set_vol $new_vol
|
||||
;;
|
||||
mute)
|
||||
if [[ "$current_vol" != "0.0" ]]; then
|
||||
set_vol 0.0
|
||||
else
|
||||
set_vol 0.5 # or store last volume
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0} up|down|mute"
|
||||
;;
|
||||
esac
|
||||
|
||||
Executable
+74
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
# check command line arguments first
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
|
||||
echo "Usage ${0} up|down|mute"
|
||||
|
||||
exit 1
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $1 != "up" -a $1 != "down" -a $1 != "mute" ]; then
|
||||
|
||||
echo "Usage ${0} up|down|mute"
|
||||
|
||||
exit 1
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# go through each line of the sink-inputs output
|
||||
|
||||
pactl list sink-inputs | while read line; do
|
||||
|
||||
# Update current sink input id
|
||||
|
||||
[[ $line =~ ^Sink\ Input\ \#([[:digit:]]+) ]] && this_input=${BASH_REMATCH[1]}
|
||||
|
||||
# check if it is spotify
|
||||
|
||||
if [[ $line =~ "application.name = \"spotify\"" ]]; then
|
||||
|
||||
echo "Spotify is sink-input ${this_input}"
|
||||
|
||||
case $1 in
|
||||
|
||||
up)
|
||||
|
||||
pactl set-sink-input-volume ${this_input} +5%
|
||||
|
||||
;;
|
||||
|
||||
down)
|
||||
|
||||
pactl set-sink-input-volume ${this_input} -5%
|
||||
|
||||
;;
|
||||
|
||||
mute)
|
||||
|
||||
pactl set-sink-input-mute ${this_input} toggle
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
echo "Error"
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
done
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mpc --host=/home/user/.config/mpd/socket next
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
pw-play --volume=10.0 ~/.local/share/sounds/notification.wav
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mpc --host=/home/user/.config/mpd/socket prev
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Directory containing wallpapers
|
||||
wallpaper_dir=~/Pictures/Wallpapers
|
||||
|
||||
# Function to recursively find image files
|
||||
find_images() {
|
||||
find "$1" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \)
|
||||
}
|
||||
|
||||
# Check if the wallpaper directory exists and is not empty
|
||||
if [[ -d $wallpaper_dir && $(find_images "$wallpaper_dir") ]]; then
|
||||
# Select a random wallpaper from all image files (including subdirectories)
|
||||
random_wallpaper=$(find_images "$wallpaper_dir" | shuf -n 1)
|
||||
|
||||
# Set the wallpaper using awww with transition effects
|
||||
awww img "$random_wallpaper" --transition-step 100 --transition-type wipe --transition-angle 30
|
||||
|
||||
wal -i "$random_wallpaper" -n
|
||||
|
||||
echo "Wallpaper set to: $random_wallpaper"
|
||||
else
|
||||
echo "Wallpaper directory is either missing or does not contain any images."
|
||||
fi
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
dir="${1:-.}"
|
||||
|
||||
find "$dir" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 |
|
||||
xargs -0 -P"$(nproc)" -I{} bash -c '
|
||||
if ffprobe -v quiet -show_entries format_tags \
|
||||
-of default=nw=1:nk=1 "$1" 2>/dev/null |
|
||||
grep -q -E "Visit https?://[^ ]+"; then
|
||||
echo "Match found in: $1"
|
||||
fi
|
||||
' _ {} | sort
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mpc --host=/home/user/.config/mpd/socket seekthrough +30
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
mpd_status=$(playerctl --player=mpd status 2>/dev/null)
|
||||
|
||||
if [ "$mpd_status" == "Playing" ]; then
|
||||
playerctl --player=mpd pause
|
||||
else
|
||||
playerctl --player=mpd play 2>/dev/null || playerctl --player=spotify play
|
||||
fi
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
awww query
|
||||
if [ $? -eq 1 ] ; then
|
||||
awww-daemon
|
||||
fi
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
HOOK_NAME="$1"
|
||||
HOOK_VALUE="$2"
|
||||
|
||||
# Exit if no wallpaper path was provided
|
||||
[ -z "$HOOK_VALUE" ] && exit 0
|
||||
|
||||
# Run pywal without reloading terminals
|
||||
/usr/bin/wal -i "$HOOK_VALUE" -n 2>/dev/null
|
||||
# /usr/bin/awww img "$HOOK_VALUE" 2>/dev/null
|
||||
Reference in New Issue
Block a user