|
@@ -69,8 +69,8 @@ launch() { |
|
|
Tasks) st -t "Tasks" -e sh -lc taskwarrior-tui;; |
|
|
Tasks) st -t "Tasks" -e sh -lc taskwarrior-tui;; |
|
|
Page) pages pager "$(printf "1\n2\n3\n" | dmenu -p 'page')";; |
|
|
Page) pages pager "$(printf "1\n2\n3\n" | dmenu -p 'page')";; |
|
|
Games) games;; |
|
|
Games) games;; |
|
|
Movie) mpv $(find /mnt/media/movies -name '*.m*' -type f -not -path '*.x/*' | |
|
|
|
|
|
dmenu -i -c -l 20 -p 'Play');; |
|
|
|
|
|
|
|
|
Movie) mpv $(find /mnt/media/movies -regex '.*\.m\(kv\)\|\(p.\)$'\ |
|
|
|
|
|
-type f -not -path '*.x/*' | dmenu -i -c -l 20 -p 'Play');; |
|
|
Multiplexer) st -t "Multiplexer" -e tmux attach-session -t 0 || |
|
|
Multiplexer) st -t "Multiplexer" -e tmux attach-session -t 0 || |
|
|
st -t "Multiplexer" -e tmux new-session -s 0;; |
|
|
st -t "Multiplexer" -e tmux new-session -s 0;; |
|
|
'Go page') num=$(go_page); pages pager $num;; |
|
|
'Go page') num=$(go_page); pages pager $num;; |
|
@@ -191,7 +191,7 @@ download() { |
|
|
|
|
|
|
|
|
download_music() { |
|
|
download_music() { |
|
|
youtube-dl -x --add-metadata --no-progress --audio-format mp3 -o \ |
|
|
youtube-dl -x --add-metadata --no-progress --audio-format mp3 -o \ |
|
|
"$HOME/music/new/%(track)s - %(artist)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
|
|
|
|
|
"/mnt/media/music/new/%(track)s - %(artist)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
|
|
|
|
|
if [ ! $? ]; then |
|
|
if [ ! $? ]; then |
|
|
youtube-dl -x --add-metadata --no-progress --audio-format mp3 -o \ |
|
|
youtube-dl -x --add-metadata --no-progress --audio-format mp3 -o \ |
|
@@ -478,16 +478,24 @@ choose() { |
|
|
$c "$f" |
|
|
$c "$f" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# It finds all the current files in a known directory without needing to update the mru list of files |
|
|
|
|
|
# If the directory is chosen instead of the file within it, it opens the directory with nnn |
|
|
|
|
|
|
|
|
# It finds all the current files in a known directory without needing to update |
|
|
|
|
|
# the mru list of files If the directory is chosen instead of the file within |
|
|
|
|
|
# it, it opens the directory with nnn |
|
|
pick() { |
|
|
pick() { |
|
|
d=$(mru listdirs | dmenu -i -c -l 20 -p 'from') |
|
|
|
|
|
|
|
|
d=$(printf "$(find $HOME -maxdepth 3 -not -path '*/.*' -not -name \ |
|
|
|
|
|
'node_modules' -not -name 'vendor'; find /mnt/media -maxdepth 3 -type d \ |
|
|
|
|
|
-not -path '*/.*')" | dmenu -i -c -l 20 -p 'from') |
|
|
|
|
|
|
|
|
if [ -z "$d" ]; then exit; fi |
|
|
if [ -z "$d" ]; then exit; fi |
|
|
|
|
|
|
|
|
f=$( |
|
|
f=$( |
|
|
(printf "$d\n"; find "$d" -type f -not \( -path '*/.*/*' -o -path '*node_modules/*' -o -ipath '*backups/my-plugins*' -o -ipath '*/.uuid' -ipath '*.swp*' \)) | |
|
|
|
|
|
|
|
|
(printf "$d\n"; find "$d" -type f -not \( -path '*/.*/*' -o -path \ |
|
|
|
|
|
'*node_modules/*' -o -ipath '*/.uuid' -ipath '*.swp*' \)) | \ |
|
|
dmenu -i -c -l 20 -p 'pick file' |
|
|
dmenu -i -c -l 20 -p 'pick file' |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
if [ -z "$f" ]; then exit; fi |
|
|
if [ -z "$f" ]; then exit; fi |
|
|
|
|
|
|
|
|
if [ "$d" = "$f" ]; then st -t 'Files' -e sh -lc "nnn '$f'"; exit; fi |
|
|
if [ "$d" = "$f" ]; then st -t 'Files' -e sh -lc "nnn '$f'"; exit; fi |
|
|
xdg-open "$f" |
|
|
xdg-open "$f" |
|
|
} |
|
|
} |
|
|