summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dmenusearch9
-rwxr-xr-xscripts/music24
-rwxr-xr-xscripts/randwp2
-rw-r--r--scripts/test1
4 files changed, 25 insertions, 11 deletions
diff --git a/scripts/dmenusearch b/scripts/dmenusearch
index b1ed9d6..059be7f 100755
--- a/scripts/dmenusearch
+++ b/scripts/dmenusearch
@@ -70,7 +70,7 @@ emoji() {
[ -z "$CHOSEN" ] && return 1
printf '%s' "$CHOSEN" | xclip -selection clipboard
- # notify-send "'$CHOSEN' copied to clipboard."
+ herbe "'$CHOSEN' copied to clipboard."
}
main() {
@@ -82,6 +82,11 @@ main() {
aur)
aur ;;
youtube)
+# vid="$(ytfzf -D -I raw)"
+# title="$(echo $vid | sed "s/\s*|.*//g")"
+# url="https$(echo $vid | sed "s/.*|https//")"
+# echo "\"$url\"" > "$HOME/music/urls/$title"
+# pidof mpv > /dev/null || music "auto" "$HOME/music/urls"
ytfzf -D
return ;;
man)
@@ -97,4 +102,4 @@ main() {
"$BROWSER" "$query" 2> /dev/null
}
-main "$@" \ No newline at end of file
+main "$@"
diff --git a/scripts/music b/scripts/music
index a7fe836..d5eeaa3 100755
--- a/scripts/music
+++ b/scripts/music
@@ -1,7 +1,17 @@
#!/bin/sh
-# simple music selector with dmenu that uses and interacts with mpv
-# have a look at musiccmd, dwmblocks/sb_music and .local/etc/mpv/music
-# shellcheck disable=SC2012
+# . :-. .
+# author: ratakor <ratakor@disroot.org> :*==*%%%#%+=---:
+# :#%%%*+%#=+%*:.
+# created: Sat, 06 May 2023 18:44:52 +0200 :%%%. . -*%-
+# updated: Sat, 01 Jul 2023 18:12:52 +0200 =## . :#%*=:.
+# -#*#%:=#%%%#-
+# description: *:*%%%%%%%#-
+# simple music selector with dmenu that uses and .-#%%%%%%+
+# interacts with mpv. have a look at musiccmd, %%%--%%%%*-
+# dwmblocks/sb_music and .local/etc/mpv/music ;) ##%= +%%=:..
+# #* #%#
+# :# -==*
+# shellcheck disable=SC2012 # :: .:
MUSICDIR="${XDG_MUSIC_DIR:-$HOME/music}"
@@ -11,11 +21,11 @@ if [ "$1" = "--shuffle" ]; then
fi
MUSIC="${1:-$MUSICDIR/$(ls "$MUSICDIR" | dmenu -i -p "Play ")}"
-SCRIPT="$XDG_CONFIG_HOME/mpv/music/local.lua"
+SCRIPT="${XDG_CONFIG_HOME:-$HOME/.config}/mpv/music/local.lua"
if [ "$MUSIC" = "$MUSICDIR/urls" ]; then
MUSIC="$(cat "$MUSICDIR/urls/$(ls "$MUSICDIR/urls" | dmenu -i -p "Play ")")"
- SCRIPT="$XDG_CONFIG_HOME/mpv/music/online.lua"
+ SCRIPT="${XDG_CONFIG_HOME:-$HOME/.config}/mpv/music/online.lua"
fi
[ "$MUSIC" = "$MUSICDIR/" ] || [ -z "$MUSIC" ] && exit 1
@@ -26,5 +36,5 @@ if [ -z "$SHUFFLE" ] && [ -d "$MUSIC" ] || printf '%s' "$MUSIC" | grep -q playli
fi
printf 'stop\n' | socat - /tmp/mpvsocket 2> /dev/null
-mpv --vid=no --input-ipc-server=/tmp/mpvsocket --loop-playlist --volume=100\
- --ytdl-format="wv*+ba" --script="$SCRIPT" --shuffle="$SHUFFLE" "$MUSIC"
+mpv --vid=no --input-ipc-server=/tmp/mpvsocket --loop-playlist\
+ --ytdl-format=ba --script="$SCRIPT" --shuffle="$SHUFFLE" "$MUSIC"
diff --git a/scripts/randwp b/scripts/randwp
index a63271d..da47247 100755
--- a/scripts/randwp
+++ b/scripts/randwp
@@ -2,7 +2,7 @@
# set a random wallpaper
# to ignore a folder or a file put it in IGNORE like "file1|folder|file2"
-WPDIR="${1:-/home/marcellus/.config/wallpapers}"
+WPDIR="${1:-/home/marcellus/.config/wallpapers/SFW}"
ALL="$(find "$WPDIR" -type f ! -path '*/.git*' ! -name 'README.md')"
searchwp() {
diff --git a/scripts/test b/scripts/test
deleted file mode 100644
index 999bef1..0000000
--- a/scripts/test
+++ /dev/null
@@ -1 +0,0 @@
-fzdlfhzdk \ No newline at end of file