Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (16 sloc) 483 Bytes
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#
#
__author__ = '@r0ark - Howard Roark'
import os
import pyperclip
cmd = '/usr/bin/notify-send "{title}" "{message}" -t {timeout} -i "{icon}"'
def notify(title, msg, duration=3, icon=None):
os.popen(cmd.format(title=title, message=msg, timeout=duration * 1000, icon=icon)).read()
def get_clipboard():
return pyperclip.paste()
def set_clipboard(text=None):
if text == None:
text = ' '
pyperclip.copy(text)