summaryrefslogtreecommitdiff
path: root/dwm-6.3/scripts/dwm-goto
blob: f297b2568002e64267589e9c6882af61e280406e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

URL=$(cat ~/.config/surf/history.txt | sed 's/^[^ *]* //' | sort -u | dmenu -p "Enter a URL: ")
POSTURL=$(echo $URL | sed 's/-e//; s/reddit.com/old.reddit.com/')
CMD="firejail --noprofile --hosts-file=~/.config/surf/ads.txt tabbed -dn tabbed-surf -r 2 surf -e '' $POSTURL"

echo $POSTURL
if [[ -z "$URL" ]]; then
	exit
else
	# saves url to history
	echo $URL >> ~/.config/surf/history.txt
	$CMD
fi