summaryrefslogtreecommitdiffstats
path: root/current
blob: 3811d29f8b405487241ce076877affbb8f13c8d0 (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=$(paste ~/.current  ~/note | tac | 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