|
|
@@ -22,6 +22,7 @@ launch() { |
|
|
|
Page |
|
|
|
Go page |
|
|
|
Package info |
|
|
|
Images |
|
|
|
Play clipboard |
|
|
|
Play downloads |
|
|
|
Processes" | tr -d '\t' | |
|
|
@@ -45,6 +46,7 @@ launch() { |
|
|
|
Browser) $browser_cmd;; |
|
|
|
'Hidden browser') $browser_cmd --incognito;; |
|
|
|
Email) $browser_cmd mail.protonmail.com/login;; |
|
|
|
Images) view_images;; |
|
|
|
'Play clipboard') mpv "$(xclip -o -selection clipboard)";; |
|
|
|
'Play downloads') mpv "$HOME/downloads/tmp/$(ls ~/downloads/tmp/ | dmenu -i -l 10 -p 'play')";; |
|
|
|
Processes) st -t "Processes" -e htop;; |
|
|
@@ -55,6 +57,7 @@ action() { |
|
|
|
action=$(printf "Toggle Music |
|
|
|
Pause Music |
|
|
|
Play Music |
|
|
|
Single on |
|
|
|
Command |
|
|
|
Command to clipboard |
|
|
|
Select VPN |
|
|
@@ -76,7 +79,8 @@ action() { |
|
|
|
case $action in |
|
|
|
'Play Music') mpc play ;; |
|
|
|
'Pause Music') mpc pause ;; |
|
|
|
'Toggle Music') mpc toggle ;; |
|
|
|
'Toggle Music') mpc toggle;; |
|
|
|
'Single on') mpc toggle;; |
|
|
|
'Rebind Keys') setup-xbindkeys;; |
|
|
|
'Disable Bar') tmux set -g status off;; |
|
|
|
'Enable Bar') tmux set -g status on;; |
|
|
@@ -129,19 +133,26 @@ do_search() { |
|
|
|
} |
|
|
|
|
|
|
|
download() { |
|
|
|
youtube-dl --no-progress -o "$HOME/downloads/%(title)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
youtube-dl --add-metadata --no-progress -o "$HOME/downloads/%(title)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
notify-send -u low -t 3000 "Download complete" |
|
|
|
} |
|
|
|
download_music() { |
|
|
|
youtube-dl --no-progress -f bestaudio -o \ |
|
|
|
"$HOME/downloads/music/%(track)s - %(artist)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
youtube-dl -x --add-metadata --no-progress --audio-format mp3 -o \ |
|
|
|
"$HOME/music/%(track)s - %(artist)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
if [ ! $? ]; then |
|
|
|
youtube-dl --no-progress -f bestaudio -o \ |
|
|
|
"$HOME/downloads/music/%(title)s - %(artist)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
youtube-dl -x --no-progress --audio-format mp3 -o \ |
|
|
|
"$HOME/music/%(title)s - %(artist)s.%(ext)s" "$(xclip -selection clipboard -o)" |
|
|
|
fi |
|
|
|
notify-send -u low -t 3000 "Download complete" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
view_images() { |
|
|
|
d=$(mru listdirs | dmenu -l 20 -i -p 'where?') |
|
|
|
if [ -z "$d" ]; then exit; fi |
|
|
|
sxiv -r "$d" |
|
|
|
} |
|
|
|
|
|
|
|
package() { |
|
|
|
type=$(printf "search\ninfo" | dmenu -p 'package') |
|
|
|
if [ -z "$type" ]; then |
|
|
|