Добавлена переменная для указателей в xfce

master-3.5 3.5.0_alpha4
parent 31e4a8a3e7
commit 50d25844f8

@ -25,9 +25,10 @@ from calculate.lib.datavars import (Variable, VariableError, ReadonlyVariable,
from calculate.lib.utils.common import getValueFromConfig from calculate.lib.utils.common import getValueFromConfig
from calculate.lib.variables import user from calculate.lib.variables import user
from calculate.lib.utils.files import (readLinesFile, process, from calculate.lib.utils.files import (readLinesFile, process,
listDirectory) listDirectory, readFile)
from calculate.desktop._cl_keys import getKey from calculate.desktop._cl_keys import getKey
from itertools import * from itertools import *
import glob
from calculate.lib.cl_template import templateFunction from calculate.lib.cl_template import templateFunction
from calculate.lib.cl_ini_parser import iniParser from calculate.lib.cl_ini_parser import iniParser
import hashlib import hashlib
@ -202,6 +203,23 @@ class VariableClDesktopXfceMixer(ReadonlyVariable):
self.Get('cl_desktop_gst_data').get('channels', []))) self.Get('cl_desktop_gst_data').get('channels', [])))
class VariableClDesktopXfcePointers(ReadonlyVariable):
"""
Список устройств-указателей для xfce
"""
type = "list"
def get(self):
def generate():
for name_fn in sorted(
glob.glob("/sys/class/input/mouse*/device/name")):
data = readFile(name_fn)
if data:
yield data.strip().replace(" ", "_")
return list(generate())
class VariableClDesktopOnlineData(ReadonlyTableVariable, DomainInfoHelper): class VariableClDesktopOnlineData(ReadonlyTableVariable, DomainInfoHelper):
""" """
Information about online users Information about online users

Loading…
Cancel
Save