summaryrefslogtreecommitdiffstats
path: root/current
blob: 31a02ae1680984c4fb063b29c655454b9d27f8b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/zsh
setopt shwordsplit
isurl () {
         url="[email protected]"
         curl -I -s "$url" &>/dev/null || return 1
         return 0
 }
export yprofile="current"

while :;do
    object=$(tac ~/.current | awk 'NF>0 { print $0 }' | ${DMENU} )
    [[ -z $object ]] && break
    object=${(Q)object}
    if isurl $object;then firefox -new-tab $object; continue ;fi
    xclip -i <<< "$object"
    if =$object;then  $object &!;fi
done