Commit 21bda95a authored by putro's avatar putro
Browse files

added check_if_X_is_running and editMessage functions

parent 921c7dc9
......@@ -159,3 +159,30 @@ def isGpg(message):
def isAscii(text):
return all(ord(c) < 128 for c in text)
def editMessage():
import sys, tempfile, os
from subprocess import call
EDITOR = os.environ.get('EDITOR','vim')
initial_message = "" # if you want to set up the file somehow
with tempfile.NamedTemporaryFile(suffix=".tmp") as tempfile:
f = open(, "r")
return data
def X_is_running():
from subprocess import Popen, PIPE
p = Popen(["xset", "-q"], stdout=PIPE, stderr=PIPE)
return p.returncode == 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment