Esempio n. 1
0
File: Mixer.py Progetto: klniu/xkeys
def volumeDown():
    os.popen("pamixer --decrease 5")
    volume = SystemUtil.getProcessOutput("pamixer --get-volume --allow-boost")
    Message.hint(volume)
Esempio n. 2
0
File: Mixer.py Progetto: klniu/xkeys
def volumeUp():
    os.popen("pamixer --increase 5 --allow-boost")
    volume = SystemUtil.getProcessOutput("pamixer --get-volume")
    Message.hint(volume)
Esempio n. 3
0
def volumeDown():
    os.popen("pamixer --decrease 5")
    volume = SystemUtil.getProcessOutput("pamixer --get-volume --allow-boost")
    Message.hint(volume)
Esempio n. 4
0
def volumeUp():
    os.popen("pamixer --increase 5 --allow-boost")
    volume = SystemUtil.getProcessOutput("pamixer --get-volume")
    Message.hint(volume)
Esempio n. 5
0
Since 2011-02-01
"""

import logging
import os
import subprocess
import sys
import gtk
import ClipboardUtil
import Message
import subprocess
import SendToUi
import SendToUi
import SystemUtil

fireFoxPid=SystemUtil.getProcessOutput("pidof firefox")

if fireFoxPid == "":
    sys.exit("Firefox window is not found")
lines = fireFoxPid.split(None, 4)
fireFoxPid = lines[0]

fireFoxWindowName=SystemUtil.getWindowNameByProcessId(fireFoxPid)
(title,s,url) = fireFoxWindowName.partition('- Firefox -')
lines = title.split(None, 4)
title = lines[4]

# sometimes there are several browser windows are opened get the url of the first window
lines = url.split(None, 2)
url = lines[0]
Esempio n. 6
0
def getLanguage():
    return SystemUtil.getProcessOutput("setxkbmap -print | grep xkb_symbols | awk -F'+' '{print $2}'")