复制到剪贴板并使用libnotify发送通知
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了复制到剪贴板并使用libnotify发送通知相关的知识,希望对你有一定的参考价值。
This nautilus script was written for Wuala to duplicate the "Copy Public Link" feature from Dropbox.
#!/bin/bash #|||||||||||||||||||||||||||||||| # # ---- BASH SCRIPT FOR WUALA ---- # ---- DOWNLOAD LINK ---- # __by flexgrip at gmail dot com_ # http://rayaguilar.net/portfolio # # predicts the wuala public files link and copies it to the clipboard (paste it with CTRL+v) # REMEMBER you must enter your username and name of your public folder. # required packages: (These are in the ubuntu repositories... use apt-get) # xclip (to copy ip to the clipboard) # notify-send (to send notifications) uname='flex1grip' publicfolder='Public' # build the url buildurl='http://content.wuala.com/contents/'$uname'/'$publicfolder'/'$@'?dl=1' if [ -n "$buildurl" ]; then # copy url into clipboard echo $buildurl | xclip -selection clipboard # echo wuala public link in console echo "Copied public Wuala link: $buildurl" # confirm successful fetch of ip with notification notify-send --icon=/usr/share/icons/gnome/32x32/actions/edit-paste.png "Download link copied!" "$buildurl" else # echo wuala public link in console echo "Error... Wuala link not copied: $buildurl" # confirm successful fetch of ip with notification notify-send --icon=/usr/share/icons/gnome/32x32/actions/gtk-stop.png "Error! Link was not copied..." fi
以上是关于复制到剪贴板并使用libnotify发送通知的主要内容,如果未能解决你的问题,请参考以下文章
使用 libnotify 的 Python 3 脚本作为 cron 作业失败
vb.net 2008 我想用代码复制一个文件到剪贴板。 用户然后在QQ对话框中右击粘贴就可直接发送。 代码怎么写
python 简单的黑客使用gnome-screenshot和dropbox上传快速公开截图 - 需要libnotify-bin进行通知