%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyc

�
���^c@@smdZddlmZmZmZddlZddlZyddlZeZ	Wne
k
rieZ	nXddlZ
y ddlmZmZeZWne
k
r�eZnXeje�ZdZidd6Zd�Zd	efd
��YZd�Zd�Zd
�Zd�Zd�Zd�Zd�Z d�Z!d�Z"dddd�Z$ddddd�Z%dS(u
GNOME implementations
i(tabsolute_importtprint_functiontunicode_literalsN(tGiotGLibugnomeusetuset_cC@strtrtStdfS(u=
    Only load if the Gio and Glib modules are available
    u_The gnome_desktop execution module cannot be loaded: The Gio and GLib modules are not available(tHAS_PWDtHAS_GLIBt__virtualname__tFalse(((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyt__virtual__%st
_GSettingscB@s2eZd�Zed��Zd�Zd�ZRS(cC@s1||_||_||_d|_d|_dS(N(tSCHEMAtKEYtUSERtNonetUIDtHOME(tselftusertschematkey((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyt__init__0s
				cC@s=tjjjdg�r*dddg}ndddg}|S(u@
        return the command to run the gsettings binary
        udbus-run-sessionu--u	gsettingsudbus-launchu--exit-with-session(tsalttutilstpatht	which_bin(Rtcmd((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytgsetting_command7scC@s�|j}ytj|�j}Wntk
r@tjd�tSX|jdt	|j
�t	|j�g}i}dj|�|d<t
d|d|d|dt�}d	|kr�d
|d	kr�tjdd|d	�S|d	SntSd
S(u6
        get the value for user in gsettings

        uUser does not existugetu
/run/user/{0}uXDG_RUNTIME_DIRucmd.run_alltrunastenvtpython_shellustdoutuuint32uuint32 uN(R
tpwdtgetpwnamtpw_uidtKeyErrortlogtinfoRRtstrRRtformatt__salt__tretsub(RRtuidRtenvirontresult((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyt_getBs	

("cC@s�|j}ytj|�j}WnBtk
rctjd�i}d|d<dj|�|d<|SX|jd|j	|j
|g}i}dj|�|d<td	|d
|d|dt�}|S(
u6
        set the value for user in gsettings

        uUser does not existiuretcodeuUser {0} does not existustdoutusetu
/run/user/{0}uXDG_RUNTIME_DIRucmd.run_allRRR(
R
RR R!R"R#R$R&RRRR'R(RtvalueRR*R,RR+((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyt_set[s	


"(t__name__t
__module__RtpropertyRR-R/(((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyR
/s		cK@stS(u�
    A test to ensure the GNOME module is loaded

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.ping user=<username>

    (tTrue(tkwargs((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytpingqscK@s.td|jd�dddd�}|j�S(u�
    Return the current idle delay setting in seconds

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.getIdleDelay user=<username>

    RuuserRuorg.gnome.desktop.sessionRu
idle-delay(R
tgetR-(R4t	_gsession((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytgetIdleDelays	cK@s1td|jd�dddd�}|j|�S(u�
    Set the current idle delay setting in seconds

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.setIdleDelay <seconds> user=<username>

    RuuserRuorg.gnome.desktop.sessionRu
idle-delay(R
R6R/(tdelaySecondsR4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytsetIdleDelay�s	cK@s.td|jd�dddd�}|j�S(u�
    Return the current clock format, either 12h or 24h format.

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.getClockFormat user=<username>

    RuuserRuorg.gnome.desktop.interfaceRuclock-format(R
R6R-(R4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytgetClockFormat�s	cK@sM|dkr|dkrtStd|jd�dddd�}|j|�S(	u�
    Set the clock format, either 12h or 24h format.

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.setClockFormat <12h|24h> user=<username>

    u12hu24hRuuserRuorg.gnome.desktop.interfaceRuclock-format(RR
R6R/(tclockFormatR4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytsetClockFormat�s	cK@s.td|jd�dddd�}|j�S(u�
    Return the current setting, if the date is shown in the clock

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.getClockShowDate user=<username>

    RuuserRuorg.gnome.desktop.interfaceRuclock-show-date(R
R6R-(R4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytgetClockShowDate�s	cK@sM|tk	r|tk	rtStd|jd�dddd�}|j|�S(u�
    Set whether the date is visible in the clock

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.setClockShowDate <True|False> user=<username>

    RuuserRuorg.gnome.desktop.interfaceRuclock-show-date(R3RR
R6R/(tkvalueR4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytsetClockShowDate�s	cK@s.td|jd�dddd�}|j�S(u�
    Get whether the idle activation is enabled

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.getIdleActivation user=<username>

    RuuserRuorg.gnome.desktop.screensaverRuidle-activation-enabled(R
R6R-(R4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytgetIdleActivation�s	cK@sM|tk	r|tk	rtStd|jd�dddd�}|j|�S(u�
    Set whether the idle activation is enabled

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.setIdleActivation <True|False> user=<username>

    RuuserRuorg.gnome.desktop.screensaverRuidle-activation-enabled(R3RR
R6R/(R?R4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytsetIdleActivation�s	cK@s%td|d|d|�}|j�S(u�
    Get key in a particular GNOME schema

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.get user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled

    RRR(R
R-(RRRR4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyR6
scK@s(td|d|d|�}|j|�S(u�
    Set key in a particular GNOME schema

    CLI Example:

    .. code-block:: bash

        salt '*' gnome.set user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled value=False

    RRR(R
R/(RRRR.R4R7((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pytset_s(&t__doc__t
__future__RRRR(tloggingRR3RtImportErrorRtsalt.utils.pathRt
gi.repositoryRRRt	getLoggerR0R#Rt__func_alias__R	tobjectR
R5R8R:R;R=R>R@RARBRR6RC(((s=/usr/lib/python2.7/site-packages/salt/modules/gnomedesktop.pyt<module>s>






	
B									

Zerion Mini Shell 1.0