Arch Wiki script added

This commit is contained in:
Luke Smith
2018-09-15 10:05:32 -04:00
parent 8de1ac2fe7
commit 4ab18960b3
2 changed files with 18 additions and 1 deletions

17
.scripts/dmenuarchwiki Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# Gives a dmenu prompt to search the Arch Wiki in your preferred web browser
# Home goes to the home page of the Arch Wiki
# Anything else, it search it
# Original idea/script by Github user @Caedis. Minor changes by Luke.
pgrep -x dmenu && exit
choice=$(echo "📖" | dmenu -i -p "Type ArchWiki page or search term:") || exit 1
if [ "$choice" = "📖" ]; then
$BROWSER "https://wiki.archlinux.org"
else
$BROWSER "https://wiki.archlinux.org/index.php?search=$choice"
fi