mpv script imporvment

This commit is contained in:
joy 2024-10-09 13:02:52 +02:00
parent e757693059
commit 20110a0d5c
2 changed files with 19 additions and 14 deletions

View file

@ -125,14 +125,20 @@
} }
]; ];
extraConfig = '' extraConfig = ''
bind-key j down bind-key j down
bind-key k up bind-key k up
bind-key j next articlelist bind-key j next articlelist
bind-key k prev articlelist bind-key k prev articlelist
bind-key ge end bind-key ge end
bind-key gg home bind-key gg home
bind-key l open bind-key l open
bind-key h quit bind-key h quit
macro c set browser "setsid -f mpv --no-terminal %u &" ; open-in-browser ; set browser "elinks %u" ''; macro o set browser "setsid -f mpv --no-terminal %u &" ; open-in-browser ; set browser "elinks %u"
# color listnormal white black
color listnormal_unread black white bold
color listfocus white blue bold
color listfocus_unread white blue bold
color info white blue
'';
}; };
} }

View file

@ -1,12 +1,11 @@
#!/bin/sh #!/bin/sh
# Get the link from the clipboard using wl-paste
link=$(wl-paste) link=$(wl-paste)
# Check if a link was provided
if [ -n "$link" ]; then if [ -n "$link" ]; then
# Open the link in mpv mpv "$link" &
mpv "$link"
notify-send "Opening Link" "$link" --icon=video-x-generic
else else
echo "No URL provided." notify-send "Error" "No URL provided." --icon=dialog-error
fi fi