Last active
August 29, 2015 14:19
-
-
Save mohemohe/e11d590dc90311bb0add to your computer and use it in GitHub Desktop.
こんきーたんはぁはぁ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# coding:utf-8 | |
import subprocess | |
p = subprocess.Popen(['pgrep', '--count', 'conky'], shell=False, stdout=subprocess.PIPE) | |
p.wait() | |
if p.communicate()[0] == b'0\n' : | |
subprocess.Popen('conky', shell=True, stdin=None, stdout=None, stderr=None, close_fds=True) | |
#start conky 2 | |
#start conky 3 | |
if p.communicate()[0] == b'1\n' : | |
#start conky 2 | |
#start conky 3 | |
if p.communicate()[0] == b'2\n' : | |
#start conky 3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment