mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Compare commits
14 Commits
67762e100b
...
b84893cced
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b84893cced | ||
|
|
cf4a12acb3 | ||
|
|
ca7debcaab | ||
|
|
a991f0982d | ||
|
|
b28bf324c4 | ||
|
|
539f3ac807 | ||
|
|
d68ba937be | ||
|
|
e259c2af0a | ||
|
|
9d921b33af | ||
|
|
4c80fed876 | ||
|
|
18018b18ff | ||
|
|
533c21c3af | ||
|
|
fe8f0bce94 | ||
|
|
6476766a21 |
@ -15,4 +15,4 @@ else
|
||||
fi
|
||||
# Activate dbus variables
|
||||
dbus-update-activation-environment --all
|
||||
ssh-agent dwm
|
||||
dbus-launch ssh-agent dwm
|
||||
|
||||
22
.local/bin/videosearch
Normal file
22
.local/bin/videosearch
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
command -v locate >/dev/null || {
|
||||
notify-send "Locate not found. Installing..."
|
||||
sudo pacman -S mlocate
|
||||
} || {
|
||||
notify-send "Failed. Run the script once on terminal OR change sudo permissions."
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -s "$HOME/.config/.mymlocate.db" ] || {
|
||||
notify-send "You have no database. Creating it..."
|
||||
disk_path=$(echo "" | rofi -dmenu -l 0 -p "Enter the disk path (e.g '/mnt/harddisk'): ")
|
||||
sudo updatedb -o ~/.config/.mymlocate.db -U "$disk_path" || {
|
||||
notify-send "Failed. Run the script once on terminal OR change sudo permissions."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
video_files=$(locate -d ~/.config/.mymlocate.db -b -r '.*\.\(mp4\|mkv\|webm\|mov\|m4v\|wmv\|flv\|avi\)$')
|
||||
chosen_file=$(echo "$video_files" | sed 's|.*/||; s/\.[^.]*$//' | rofi -dmenu -p "Select Video")
|
||||
mpv "$(echo "$video_files" | grep -F "/$chosen_file.")"
|
||||
Loading…
x
Reference in New Issue
Block a user