%PDF- %PDF-
Direktori : /lib/python3/dist-packages/LanguageSelector/__pycache__/ |
Current File : //lib/python3/dist-packages/LanguageSelector/__pycache__/ImConfig.cpython-312.pyc |
� k�!f� � �F � d dl Z d dlZd dlZ G d� de� Zedk( r� e� Z edej � z � edej � z � ed� ej d� edej � z � ed � ej d � yy)� Nc �* � e Zd Zd� Zd� Zd� Zd� Zd� Zy)�ImConfigc � � y )N� ��selfs �;/usr/lib/python3/dist-packages/LanguageSelector/ImConfig.py�__init__zImConfig.__init__ s � �� c �@ � t j j d� S )Nz/usr/bin/im-config)�os�path�existsr s r � availablezImConfig.available s � ��w�w�~�~�2�3�3r c � � t t j ddg� j � j � � }|j d� |S )N� im-configz-l�none)�sorted� subprocess�check_output�decode�split�append)r �inputMethodss r �getAvailableInputMethodsz!ImConfig.getAvailableInputMethods sB � ��j�5�5�{�D�6I�J�Q�Q�S�Y�Y�[�\�����F�#��r c �P � t j ddg� j � j � d d \ }}}|dk7 r|S d}|dk( r|}nUt j j d� r6t d� D ]( }|j d� s�|j � d } n |s|}|S ) Nr z-m� �missing� �defaultz/etc/X11/xinit/xinputrc�run_im� ) r r r r r r r �open� startswith)r �systemConfig� userConfig� autoConfig�system_conf�lines r �getCurrentInputMethodzImConfig.getCurrentInputMethod s� � � � !� !�;��"5� 6� =� =� ?� E� E� G��� K� /��z�:���"��� � ���9�$�$�K� �W�W�^�^�5� 6��6�7� ���?�?�8�,�"&�*�*�,�q�/�K�� � �$�K��r c �4 � t j dd|g� y )Nr z-n)r �call)r �ims r �setInputMethodzImConfig.setInputMethod. s � �����d�B�/�0r N)�__name__� __module__�__qualname__r r r r* r. r r r r r s � � �4�� �,1r r �__main__zavailable input methods: %szcurrent method: %szsetting method 'fcitx'�fcitxzremoving ~/.xinputrc�REMOVE)r r �locale�objectr r/ r- �printr r* r. r r r �<module>r8 s� �� � � �$1�v� $1�L �z�� ��B� � '�"�*E�*E�*G� G�H� � ��!9�!9�!;� ;�<� � "�#����g�� � ��!9�!9�!;� ;�<� � �!����h�� r