%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/byobu/include/__pycache__/
Upload File :
Create Path :
Current File : //lib/byobu/include/__pycache__/config.cpython-312.pyc

�

h��e�)���ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	d�Z
	ddlZddl�dZ
ejd�Zejd�Zejd	ed
z�Zejdedz�Zejd
d�Zejdd�Zejdd�Zedze
zZedze
zZej0j3e�sedzezZej0j3e�sedze
zZej0j3e�sedzezZdZdZdezZdZee�ej>e<eej>ee�<ej@e
edz�ejBe
�ejZ"d�Z#d�Z$d�Z%d�Z&de"d �d!fe"d"�d#efffd$�Z'd%�Z(d&�Z)d'�Z*d(�Z+d)�Z,d*�Z-d+�Z.d,�Z/d-�Z0d.�Z1d/�Z2d0�Z3e4d1k(re3�yy#e$re
d�Y���wxYw)2�)�print_functionNc�J�td|z�tjd�y)Nz	ERROR: %s�)�print�sys�exit)�msgs � /usr/lib/byobu/include/config.py�errorr%s���{�S������!��)�*z(Could not import the python snack module�byobu�HOME�USER�BYOBU_CONFIG_DIRz/.byobu�
BYOBU_RUN_DIRz
/.cache/byobu�
BYOBU_BACKEND�tmux�	SOCKETDIRz/var/run/screen�BYOBU_PREFIXz/usrz/share/z/share/doc/�/z/share/doc/packages/�Az�If you are using the default set of keybindings, press
<F5> or <ctrl-a-R> to activate these changes.

Otherwise, exit this session and start a new one.z%s/reload-required�z/poc��	ddl}ddl}ddl}ddl}|j	d|j||jd��}|S#t$rYywxYw)Nr�hh�1234)�fcntl�termios�struct�os�unpack�ioctl�
TIOCGWINSZ�	Exception)�fdrrrr �crs      r
�ioctl_GWINSZr'LsQ�������
�}�}�T�5�;�;�r�7�+=�+=�v�F�G�"�	���	��	
��s�=A�	A
�A
c	�>�	tjjt�stjtd�ttd�}|j�tdk(r'tjtdddddtzg�yy#t$rYywxYw)	Ni��w�screenz-X�at�0�sourcez
%s/profile)r �path�existsr�makedirs�open�RELOAD_FLAG�closer�
subprocess�callr$)�fs r
�reload_requiredr7Ys|��
�	�����(�	)��;�;���%�
�;���!��'�'�)��h��
�?�?�M�4��s�H�l�M]�>]�^�_�������s�BB�	B�Bc��td�xstd�xstd�}|sW	tjtj�tj�}t|�}tj
|�|s	tdtdf}t|ddz
�t|ddz
�fS#t$rY�BwxYw#t$rd}Y�>wxYw)Nrr��LINES�COLUMNS)��P�)	r'r r1�ctermid�O_RDONLYr3r$�env�int)r&r%s  r
�
terminal_sizerCgs����1�o�;��a��;�L��O��
��
����
�
��b�k�k�*�2��R��2��8�8�B�<�	��	�W��s�9�~�&�2�	�B�q�E�A�I���B�q�E�A�I��&�&��
�����
���2��s$�AB6�C�6	C�C�C�Cc�*�|rtd�}ntd�}tddd��}|jtd�d�|jtd�d	�|jtd
�d�|j|d�t|d
dtffd��}t|td�dd	�}|j
|ddd��|j
|ddd��|j|j��dk(ry|j�S)Nz.Byobu currently launches at login (toggle off)z4Byobu currently does not launch at login (toggle on)��<r)�height�width�
returnExitzHelp -- Quick Start Guide�Toggle status notificationsr9�Change escape sequence���Exitr��compactz Byobu Configuration Menur)rMr9rMr9��padding�rrrr)
�_�Listbox�append�	ButtonBar�ESC�GridForm�add�
buttonPressed�runOnce�current)�snackScreen�size�isInstalled�installtext�li�bb�gs       r
�menure}s�����B�C�+��H�I�+�
�Q�b�Q�/�����1�
(�)�1�-����1�
*�+�Q�/����1�
%�&��*����;�����v�v�s�3�5�q�A��
�k�1�8�9�1�a�@�����r�1�a���&����r�1�a���&����Q�Y�Y�[�!�V�+�	
�	����r�Okay�okay�Cancel�cancelc���t||||��}t||d��}t||dd�}	|	j|ddd��|	j|ddd��|j	|	j��S)	N��scrollrrOr9r)rrrrrQrS)�TextboxrWrYrZr[r\)
r^rHrG�title�textrl�buttons�trcrds
          r
�
messageboxrr�so���U�F�D��0����W�a�0��
�k�5�!�Q�'�����q�!�Q���%����r�1�a���&�
�������%�%rc���ttdztzdz�}|j�}|j	�|jdt
�d�}tdd|dd��}t|td�d	tffd�
�}t|td�dd
�}|j|dd�|j|ddd��|j|j��}y)Nz/help.z.txtz<esckey>r�C�)rl�wrap�MenurerOz
Byobu Helpr9rMrrSrQ�d)r1�DOCr�readr3�replace�	getesckeyrmrWrTrXrYrZr[r\)r^r_r6rorqrcrd�buttons        r
�helpr~�s���	�#��.�=�
(�6�
1�2��	������������Z���a�0���R��T�!�!�,����q��y�&�#�6�8�!�D��
�k�1�\�?�A�q�1�����q�!�Q�����r�1�a���&�
�
�
�1�9�9�;�
'��rc	��i}i}i}tdztdzfD]�}tjj	|�s�#	tt
|�j�||�tdk(r|d�d|d��}n|d�d|d	�d|d
�d|d��}|j�D]0}|jd�r|jdd
�}d||<�,d||<�2��g}t|j��}t!|�D]#}t#||�|g}|j%|��%|S#t$rtd|z�Y��wxYw)N�/status/status�/statuszInvalid configuration [%s]r�	tmux_left� �
tmux_right�screen_upper_left�screen_upper_right�screen_lower_left�screen_lower_right�#�r,�1)�SHARErr r.r/�execr1rzr$rr�split�
startswithr{�list�keys�sortedrBrV)	�status�glo�locr6�items�irbr��windows	         r
�
readstatusr��s^��
��	��	���#�#�%5�	�%A�
B��Q��W�W�^�^�A��,���a������c�"��v���;�'��\�):�;�E� �!4�5�s�;O�7P�RU�Vi�Rj�lo�qE�mF�
G�E��K�K�M��q��|�|�C��	
���3��	�Q��V�A�Y��V�A�Y��� 	���V�[�[�]���
��,��Q���q�	�N�A��&��)�)�F���	���#�,�	�
&��
*�+�,�s�$D$�$D>�=D>c��d}i}i}tttdz�j�||�||j	�D]>}|jd�r|j
dd�}||dk(r	|d|zz
}�7|d|zz
}�@|S)Nr�r�r�rr�z #)r�r1r�rzr�r�r{)�sr��newr�r�r�s      r
�genstatusstringr��s���	��	��	���d�5�#�#�$�)�)�+�S�#�6�

�a�&�,�,�.��Q��\�\�#���y�y��b��1��A�Y�!�^��#��'�>�3��$��(�?�3�
�	�rc��i}tdz}|D]
}|d||d<�dD]�}|jt�s�	t|d�}|j
�}|j�	t|d�}|D]K}|jd	|z�r$t||�}|j|�d
|�d���;|j|��M|j��y#t$rtt
dzd�}Y��wxYw#t$rt|d�}Y��wxYw)Nr�rr)r�r�r�r�r�r��rr�r)za+z%s=z="z"
)
rr�rr1r$r��	readlinesr3r��write)	r�r�r.r��keyr6�lines�l�vals	         r
�writestatusr��s��
���9�$��
��Q��1��&��1��,��}��S��^�^�M�"�,��T�3��A�
�;�;�=�5��7�7�9���T�3��A�
��q��|�|�E�C�K� ��3��'�S��W�W�c�3�
'�(��W�W�Q�Z���7�7�%���,��U�%�
%�s�+�A�,�����T�4��A��s#�C�'C4�C1�0C1�4D�Dc�r�t�}td�}tdd��}d}|D])}|ddk7r|j|d||d��|dz}�+t	|td�d	ftd
�dtffd��}t|td
�dd�}|j|ddddd��|j|dd�|j|ddd��|j|j��dk7rBd}|D]&}|ddk7r|j|�d|d<|dz}�(t|�t�y)Nr��rrkr���)�selected�Apply�applyrhrirOrJr9rM)rMrrr)�
anchorLeft�	anchorToprR)rMrrrrQrx)r��Label�CheckboxTreerVrWrTrXrYrZr[r\�
getEntryValuer�r7)	r^r_�itemlist�rlr��count�itemrcrds	         r
�togglestatusr��sF���L���B�i���"�Q���	
��
��T�	�!�W��]��8�8�D��G�U�T�!�W�8�-�
�!�)�%����q��z�7�3�a��k�8�S�5Q�R�\]�^��
�k�1�:�;�Q��B�����r�1�a�A��L��A����q�!�Q�����r�1�a���&����Q�Y�Y�[�!�X�-�
�%���d�
�1�g��m��o�o�e�$�Q�'�D��G��1�9�5���h����rc
��d}|rItjdg�dk(rtd�}t|ddtd�|td�f�	�}y
tjdg�dk(rtd�}t|ddd|td�f�	�}y
)Nr�zbyobu-launcher-uninstallrz/Byobu will not be launched next time you login.rFr9�Messagerw)rp�ezbyobu-launcher-installz9Byobu will be launched automatically next time you login.rx)r4r5rTrr)r^r_r`�outr}s     r
�installr�s���	����_�_�0�1�2�a�7�	
�<�	=�3��k�2�q�!�I�,��q��y�m�U�&�	��_�_�.�/�0�A�5�	
�F�	G�3��k�2�q�)�S�A�f�I�=�R�&�	rc��t|d�}	|j|�|j�y#t$r|j�YywxYw)N�a)r1r��IOErrorr3)�pr�r6s   r
�appendtofiler�sH��	�!�S�\��	��'�'�!�*�������		�	��'�'�)��	�s�0�A�Ac��d}tdk(rStdz}tjj	|�r%t|�D]}|j
d�s�|}�nYtStdz}tjj	|�r%t|�D]}|j
d�s�|}�ntS|dk(rtS||jd�dz}|d	k(rd
}|S)Nr�rz/keybindings.tmuxzset -g prefix z/keybindingszescape �^r�`r�)	rrr r.r/r1r��DEF_ESC�find)�liner.r��escs    r
r|r|s���
���V��	�/�	/�$��W�W�^�^�D����J��q��|�|�$�%�
�T���>�	�N�	*�$��W�W�^�^�D����J��q��|�|�I��
�T���>��B�J�	�.��D�I�I�c�N�Q�����3�J��#��rc��|j�rEttjd�}t	j
dd|g|��|j
�yy)Nr)zbyobu-ctrl-ar*)�stdout)�isalphar1r �devnullr4r5r3)r��nullfs  r
�	setesckeyr�9s>���K�K�M�
�r�z�z�3�
�%��/�/�>�8�S�1�%�@��+�+�-�	rc�x�tdt�d��}ttd��}t	|td�dftd�dt
ffd�	�}t
|td
�dd�}|j|dddd
��|j|ddd��|j|dd�|jd�d}|r�|j�}|dk(r�|j�}t|�dkDr|j|d�|dk(s|dk(r|jt�	t|j��}	|jt�nd}|r��|j!�|j#�}
|
dk7r)t%|j��t'�|
dk(ryy#t$rd}	Y�`wxYw)Nr9r)rorIzEscape key: ctrl-r�r�rhrirOrKrMr)rrrr)r�rR)r�rx�TIMERr�\�foor)�Entryr|r�rTrWrXrYrZ�setTimer�run�value�len�setr�rBr$�	popWindowr[r�r7)r^r_r��esclrcrd�loop�whichr��dummyr}s           r
�chgescr�As����Q�Y�[�Q�/��
�a�#�$�%����q��z�7�3�a��k�8�S�5Q�R�\]�^��
�k�1�5�6��1�=�����t�Q��a���6����s�A�q�Q������r�1�a�����C��	���
�%�%�'�%�
�g��	����3�	�#�h��l��G�G�C��F�O�	�S�j�C�4�K��G�G�G�����	�	���E��G�G�G��
�4�#�$
����
�
�
�5�
!��
�h���C�I�I�K�����v��
������E��s�'.F+�+F9�8F9c��tjjtdz�ry	t	dt
z�D]}d|vs�y	tjjdtz�ryy#t$rYywxYw)Nz/disable-autolaunchrz%s/.profilezbyobu-launchrz/etc/profile.d/Z97-%s.sh)r r.r/rr1rr$�PKG)r�s r
�
autolaunchr�gsw���G�G�N�N�#�&;�;�<�	
���=�4�'�(�
�d�����
�
�G�G�N�N�-��3�4�	
�	��		��	
��s�A/�A/�A/�/	A;�:A;c���t�}t�}|jddtd��|j	td��t�}d}|dkDret
|||�}|dk(r
t||�}n@|dk(r
t||�}n.|dk(r
t||�}n|dk(rt|||�}t�}|dkDr�e|j�tjd�y	)
z$This is the main loop of our utilityrrzByobu Configuration Menuz6<Tab> between elements | <Enter> selects | <Esc> exitsrxr9rLrMN)rC�SnackScreen�drawRootTextrT�pushHelpLiner�rer~r�r�r��finishrr)r_r^r`�tags    r
�mainr�us�������}�����!�Q��"<� =�>����!�T�U�V��|��
��
�Q�w��[�$��,�#��A�X�	
�k�4�	 �3�
�a�x�	�k�4�	(�3�
�a�x�	��T�	"�3�
�a�x�	��d�K�	0�3���;��Q�w�
�������!�r�__main__)5�
__future__rrr �os.path�time�stringr4�gettext�globr�snackr$r��getenvrrrrr�BYOBU_SOCKETDIRrr�ryr.r/r��RELOADr2rX�ord�hotkeys�bindtextdomain�
textdomainrTr'r7rCrerrr~r�r�r�r�r�r�r|r�r�r�r��__name__�rr
�<module>r�sX��4&�
�	���
����
�
3�
��
���r�y�y�����r�y�y�����2�9�9�/��	�1A�B����	�	�/�4�/�+A�B�
���	�	�/�6�2�
��"�)�)�K�):�;���r�y�y���0���y� �3�&���]�"�S�(��	�w�w�~�~�e��	�C�	�%�	'��	�w�w�~�~�c���,�,�s�2��	�w�w�~�~�c���#���#��

��
f��"�m�4��	����X��
�
�c����
�
�c�#�h������s�E�E�M�*�����3���O�O��
��'�,�(@A�A�f�I�W]�K^�ab�ck�al�nv�x{�`|�J}�&���8��4�2
���4�#�L
�
�.�z������
�3��1�2�3�s�	G8�8
H	�H	

Zerion Mini Shell 1.0