diff --git a/.config/mimeapps.list b/.config/mimeapps.list new file mode 100644 index 0000000..5ed6c0d --- /dev/null +++ b/.config/mimeapps.list @@ -0,0 +1,17 @@ +[Default Applications] + +# Author: Luke Smith + +text/x-shellscript=text.desktop; +x-scheme-handler/magnet=torrent.desktop; +application/x-bittorrent=torrent.desktop; +x-scheme-handler/mailto=mail.desktop; +text/plain=text.desktop; +application/postscript=pdf.desktop; +application/pdf=pdf.desktop; +image/png=img.desktop; +image/jpeg=img.desktop; +image/gif=img.desktop; +application/rss+xml=rss.desktop +video/x-matroska=video.desktop +inode/directory=file.desktop diff --git a/.local/bin/scripts/rssadd b/.local/bin/scripts/rssadd new file mode 100755 index 0000000..2ce421b --- /dev/null +++ b/.local/bin/scripts/rssadd @@ -0,0 +1,10 @@ +#!/bin/sh + +! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null && + notify-send "That doesn't look like a full URL." && exit +RSSFILE="${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls" +if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then + notify-send "You already have this RSS feed." +else + echo "$1" >> "$RSSFILE" && notify-send "RSS feed added." +fi diff --git a/.local/share/applications/file.desktop b/.local/share/applications/file.desktop new file mode 100644 index 0000000..04631cd --- /dev/null +++ b/.local/share/applications/file.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=File Manager +Exec=/usr/local/bin/st -e vifm %u diff --git a/.local/share/applications/img.desktop b/.local/share/applications/img.desktop new file mode 100644 index 0000000..d1582a5 --- /dev/null +++ b/.local/share/applications/img.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Image viewer +Exec=/usr/bin/sxiv -a %u diff --git a/.local/share/applications/mail.desktop b/.local/share/applications/mail.desktop new file mode 100644 index 0000000..d24aea2 --- /dev/null +++ b/.local/share/applications/mail.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Mail +Exec=/usr/local/bin/st -e neomutt %u diff --git a/.local/share/applications/pdf.desktop b/.local/share/applications/pdf.desktop new file mode 100644 index 0000000..8c38677 --- /dev/null +++ b/.local/share/applications/pdf.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=PDF reader +Exec=/usr/bin/zathura %u diff --git a/.local/share/applications/rss.desktop b/.local/share/applications/rss.desktop new file mode 100644 index 0000000..6fafc4f --- /dev/null +++ b/.local/share/applications/rss.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=RSS feed addition +Exec=/usr/bin/env rssadd %U diff --git a/.local/share/applications/text.desktop b/.local/share/applications/text.desktop new file mode 100644 index 0000000..41ee05f --- /dev/null +++ b/.local/share/applications/text.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Text editor +Exec=/usr/local/bin/st -e nvim %u diff --git a/.local/share/applications/torrent.desktop b/.local/share/applications/torrent.desktop new file mode 100644 index 0000000..bdf6a71 --- /dev/null +++ b/.local/share/applications/torrent.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Torrent +Exec=/usr/bin/env torradd %U