+
     vi;H  c                   s   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIHtHtHt ^ RIHt ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RI5 ^ RIHt ^ R	IHtHt / R
R bRR bRR bR]bR]bR]bRR bR]bR]bR]P>                  bR]bR]bR]bR]bR]bR]P>                  bR]bR]R ] R!]P>                  R"] R#] R$] R%R& R'R( R)] R*] /
Ct!. RAOt"R+R,R-R.R/R.R0R.R1R,R2R3/t#]PH                  ! ]%4      t&R4 t'R5 t(R6 t)R7 t*R8 t+R9 t,R: t-R; t.R< t/ ! R= R>4      t0R? t1]%R@8X  d   ]
Pd                  ! ]1! 4       4       R# R# )Bu  liquidctl – monitor and control liquid coolers and other devices.

Usage:
  liquidctl [options] list
  liquidctl [options] initialize [all]
  liquidctl [options] status
  liquidctl [options] set <channel> speed (<temperature> <percentage>) ...
  liquidctl [options] set <channel> speed <percentage>
  liquidctl [options] set <channel> color <mode> [<color>] ...
  liquidctl [options] set <channel> screen <mode> [<value>]
  liquidctl --help
  liquidctl --version

Device selection options (see: list -v):
  -m, --match <substring>            Filter devices by description substring
  -n, --pick <number>                Pick among many results for a given filter
  --vendor <id>                      Filter devices by hexadecimal vendor ID
  --product <id>                     Filter devices by hexadecimal product ID
  --release <number>                 Filter devices by hexadecimal release number
  --serial <number>                  Filter devices by serial number
  --bus <bus>                        Filter devices by bus
  --address <address>                Filter devices by address in bus
  --usb-port <port>                  Filter devices by USB port in bus

Animation options (devices/modes can support zero or more):
  --speed <value>                    Abstract animation speed (device/mode specific)
  --time-per-color <value>           Time to wait on each color (seconds)
  --time-off <value>                 Time to wait with the LED turned off (seconds)
  --alert-threshold <number>         Threshold temperature for a visual alert (°C)
  --alert-color <color>              Color used by the visual high temperature alert
  --direction <string>               If the pattern should move forward or backward.
  --start-led <number>               The first led to start the effect at
  --maximum-leds <number>            The number of LED's the effect should apply to

Other device options:
  --single-12v-ocp                   Enable single rail +12V OCP
  --pump-mode <mode>                 Set the pump mode (certain Corsair coolers)
  --fan-mode <channel>:<mode>[,...]  Set the mode for each fan (certain Corsair devices)
  --temperature-sensor <number>      The temperature sensor number for the Commander Pro
  --legacy-690lc                     Use Asetek 690LC in legacy mode (old Krakens)
  --non-volatile                     Store on non-volatile controller memory
  --direct-access                    Directly access the device despite kernel drivers
  --unsafe <features>                Comma-separated bleeding-edge features to enable

Other interface options:
  -v, --verbose                      Output additional information
  -g, --debug                        Show debug information on stderr
  --json                             JSON output (list/initialization/status)
  --version                          Display the version number
  --help                             Show this message

Deprecated:
  -d, --device <index>           Select device by listing index

Copyright 2018–2023 Jonas Malaco, Marshall Asch, CaseySJ, Tom Frey, Andrew
Robertson, ParkerMc, Aleksa Savic, Shady Nawara and contributors

Some modules also incorporate or use as reference work by leaty, Ksenija
Stanojevic, Alexander Tong, Jens Neumaier, Kristóf Jakab, Sean Nelson, Chris
Griffith, notaz, realies and Thomas Pircher. This is mentioned in the module
docstring, along with appropriate additional copyright notices.

SPDX-License-Identifier: GPL-3.0-or-later

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.
N)distributionversionPackageNotFoundError)Number)format_exception)docopt)__version__)Z*)LiquidctlError)color_from_strfan_mode_parserz--vendorc                     \        V ^4      # i   intx   &2/usr/lib/python3.14/site-packages/liquidctl/cli.py<lambda>r   b   s
    #a*    z	--productc                 r
   r   r   r   r   r   r   r   c   
    3q":r   z	--releasec                 r
   r   r   r   r   r   r   r   d   r   r   z--serialz--busz	--addressz
--usb-portc                 sR    \        \        \        V P                  R 4      4      4      # ).)Ztuplemapr   splitr   r   r   r   r   h   s    E#c1773<"89r   z--matchz--pickz--speedz--time-per-colorz
--time-offz--alert-thresholdz--alert-colorz--temperature-sensorz--directionz--start-ledz--maximum-ledsz--single-12v-ocpz--pump-modez--legacy-690lcz--non-volatilez--direct-accessz
--fan-modec                     \        V 4      # N)r	   r   r   r   r   r   {   s	    OA.r   z--unsafec                 s@    V P                  4       P                  R 4      # )Z,)lowerr   r   r   r   r   r   |   s    !'')//#.r   	--verbose--debugZ%z.0fZAz.2fZVZWZrpmu   °Cz.1fc                 s>   RR lpV  Uu. uF  pRVP                   RVP                  RVP                  RVP                  RV! VRR 4      RVP                  RVP
                  R	VP                  R
\        V4      P                  RRVP                   9   /
NK  	  up# u upi )Nc                sB     \        WV4      #   \         d    Tu # i ; i)z2Call `getattr` and return `default` on exceptions.)Zgetattr	Exception)Zobjectnamedefaults   &&&r   
getattr_orZ&_list_devices_objs.<locals>.getattr_or   s(    	611 	N	s    description	vendor_id
product_idrelease_numberserial_numberbusaddressportZdriverZexperimentalz(experimental)r   )	r!   r"   r#   r$   r&   r'   r(   type__name__)devicesr    devs   &  r   _list_devices_objsr-      s    *  C 3??#..c00Z_dC377s{{CHHd3i((,?	
   s   BBc                s,   \        V 4       EF3  w  rg. pV'       g   \        R V RVP                   24       M;Ve   \        R V RVP                   24       M\        RV RVP                   24       V'       g   Kq  VP                  '       d   \        RVP                  R 24       VP                  '       d   \        RVP                  R 24       VP
                  '       d   \        RVP
                  R 24        VP                  '       d   \        RVP                   24       \        RTP&                   24       \        RTP(                   24       TP*                  '       d8   RP-                  \/        \0        TP*                  4      4      p
\        RT
 24       \        R\        T4      P                   24       T'       dL   R \2        P4                  ! \        T4      4       4       p\        P7                  RRP-                  T4      4       T F  p	\        P9                  T	4       K  	  \        R4       EK6  	  R#    R	p	\        P                  P                  R
4      '       d!   \        P                  '       d   T	R,          p	MB\        P                  R9   d.   R\        TP                  4      P                  9  d
   T	R,          p	T'       d'   \        P!                  T	P#                  4       4        ELTP%                  T	4        EL; i)zDevice #: NzResult #u   ├── Vendor ID: z#06xu   ├── Product ID: u   ├── Release number: u   ├── Serial number: z could not read the serial numberZlinuxz (requires root privileges)ZHidz+ (device possibly requires a kernel driver)u   ├── Bus: u   ├── Address: r   u   ├── Port: u   └── Driver: c              3   s8   "   T F  qP                   x  K  	  R # 5ir   )r*   ).0i   & r   	<genexpr>Z&_list_devices_human.<locals>.<genexpr>   s     I/H!::/Hs   zMRO: %sz,  )win32Zcygwin)Z	enumerateprintr!   r"   r#   r$   r%   sysplatformZ
startswithosZgeteuidr)   devicer*   _LOGGERZ	exceptionZ
capitalizeappendr&   r'   r(   Zjoinr   strinspectZgetmrodebugwarning)r+   using_filters	device_idZverboser>   optsr0   r,   Zwarningsmsgr(   Zdriver_hiers   &$$$$,      r   _list_devices_humanrD      sM   G$HQCr#//!234"HYKr#//):;<HQCr#//!234===)#--)=>?>>>*3>>$*?@A.s/A/A$.GHI	%   1#2C2C1DEF 	y)*#CKK=1288888CSXX./D$TF+,"49#5#5"678Iw~~d3i/HIKMM)TYY{%;<COOC  b	[ %*		%4C||&&w//BJJJ44!44d3::FVF_F_9_DD!!#.."23$s%   ?II>LAL#L?Lc                 s    V'       g   . pR  pRV P                   RV P                  RV P                  RV Uu. uF
  q2! V4      NK  	  up/# u upi )c                 s    V w  rp\        V\        P                  4      '       d   VP                  4       pR pRVRVRV/# )ZskeyZvalueunit)
isinstancedatetime	timedeltaZtotal_seconds)r0   rE   valrF   s   &   r   convertZ _dev_status_obj.<locals>.convert   sD    $c8--..##%CDWc6499r   r&   r'   r!   status)r&   r'   r!   )r,   rL   rK   r   s   &&  r   _dev_status_objrM      sS    : 	sww3;;sv.v!71:v.	  /s   Ac           	      s|   V'       g   R # \        V P                  4       . p^ ^ rCV F  w  rVp\        V\        P                  4      '       d   \        V4      pMD\        V\        4      '       d   V'       d   RMRpM!Vf   RpM\        P                  VR4      pWh  p\        V\        V4      4      p\        V\        V4      4      pVP                  WVV34       K  	  VR R  F"  w  rVp\        RVRV 2 RVRV 2 R	V 24       K$  	  VR,          w  rVp\        R
VRV 2 RVRV 2 R	V 24       \        R4       R # )NZYesZNozN/Ar3   u
   ├── Z<z    Z>z  u
   └── i)r5   r!   rG   rH   rI   r<   bool_VALUE_FORMATSZgetZmaxlenr;   )	r,   rL   ZtmpZkcolsZvcolsZkZvZuZvalfmts	   &&       r   _print_dev_statusrQ      s5   	#//
Ca5aa++,,AA4  AYA#''2.FX,AE3q6"E3q6"

A!9  s8a
1QugI,d1QugI,b<= "gGA!	Jq5'	l$q5'	l"QC
89	"Ir   c                 s    \        \        VR ,          4      pV P                  ! VR,          P                  4       VR,          P                  4       V3/ VB  R# )z<color>	<channel><mode>N)r   r   Z	set_colorr   )r,   argsrB   color   &&, r   _device_set_colorrW     sB    Y0EMM${#))+T(^-A-A-CUSdSr   c                 sZ    V P                   ! VR ,          VR,          VR,          3/ VB  R# )rR   rS   z<value>N)Z
set_screen)r,   rT   rB   s   &&,r   _device_set_screenrX     s$    NN4$d8nd9oNNr   c                 sv   \        VR ,          4      ^ 8  db   \        \        \        VR ,          4      \        \        VR,          4      4      pV P                  ! VR,          P                  4       V3/ VB  R# V P                  ! VR,          P                  4       \        VR,          ^ ,          4      3/ VB  R# )z<temperature>z<percentage>rR   N)rP   Zzipr   r   Zset_speed_profiler   Zset_fixed_speed)r,   rT   rB   ZprofilerV   r   _device_set_speedrY   !  s    
4 !A%c#tO45s3^@T7UVd;/557IDID-335s4;OPQ;R7S\W[\r   c                 s    / pV P                  4        FO  w  r#Vf   K  V\        9   g   K  VP                  RR4      P                  RR4      p\        V,          ! V4      W&   KQ  	  V# )Nz--r3   Z-Z_)items
_PARSE_ARGreplace)rT   rB   ZargrJ   opts   &    r   
_make_optsr^   )  sY    DJJL?sj0++dB'//S9C"3,DI ! Kr   c                  s|   \         P                  R \        P                  ^ ,          4       \         P                  R\        4       \         P                  R\
        P
                  ! 4       4       \         P                  R\        P                  P                  RR4      4       \         P                  R\        P                  ! 4       ^,          \        P                  ! 4       \        P                  P                  4        \        R4      p T P                   FJ  p\         P"                  ! R
T4      P%                  ^ 4      p \         P                  RT\        T4      4       KL  	  R	#   \         d    \         P                  R4        R	# i ; i  \&         d"   p\         P                  RY#4        R	p?K  R	p?ii ; i)z
script: %szversion: %szplatform: %sz
python: %sZ
Z z0encoding: %s current, %s preferred, utf8_mode %s	liquidctlz-not installed, package metadata not availableNz^[a-zA-Z0-9]([a-zA-Z0-9._-]*)zwith %s: %szwith %s: version n/a (%s))r:   r>   r6   Zargvr   r7   r   r\   localeZ	getlocaleZgetpreferredencodingZflagsZ	utf8_moder    r   ZrequiresreZsearchZgroupr   )ZdistZreqr   errs       r   _log_env_infosrc   2  s/   MM,,MM--MM.("3"3"56MM, 3 3D# >?MMD""$Q')D)D)F		H[H[]K(
 }}yy8#>DDQG	BMM-wt}= 	   EF  	BMM5tAA	Bs*   E(  F( FFF;F66F;c                   sJ   a  ] tR tRt o R.tR tRRRR/R ltR	 tR
 tRt	V t
R# )	_ErrorAcciH  _errorsc                s    ^ V n         R# )    Nre   selfr   r   __init__Z_ErrorAcc.__init__K  s	    r   rb   Nshow_errFc               s   V ;P                   ^,          un         V'       d   \        P                  ! RW.VO5RR/  V'       d$   V'       d   \        P                  ! RW.VO5!   R# \        P                  ! V.VO5!   R# )   zdetailed error: %s: %rZexc_infoTz%s: %rN)re   r:   ZinfoZerror)ri   rC   rb   rk   rT   s   &&$$*r   logZ_ErrorAcc.logN  sW     LL13RdRTRMM(C4t4MM#%%r   c                s6    V P                  4       '       d   ^ # ^# )rf   )is_emptyrh   r   r   	exit_codeZ_ErrorAcc.exit_code[  s    MMOOq**r   c                s6    \        V P                  4      '       * # r   )rN   re   rh   r   r   rn   Z_ErrorAcc.is_empty^  s    %%%r   rg   )r*   Z
__module__Z__qualname__Z__firstlineno__Z	__slots__rj   rm   ro   rn   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   rd   rd   H  s3     I&$ & &+& &r   rd   c            
      s   \        \        4      p V R ,          '       d@   \        R\         R\        P                  ! 4        R24       \
        P                  ! ^ 4       V R,          '       d   RV R&   Rp\        P                  pM?V R,          '       d   Rp\        P                  pMRp\        P                  p^ \
        n        \
        P                  R	8X  d   R
RRRRRRRRR/pMR
RRRRRRRRR/p\        P                  ! V\
        P                  VR7      p\        P                  ! 4       pVP!                  V4       \        P"                  ! W%.R7       \%        4        \&        R8X  d   \(        P+                  R4       \-        4       pV R,          '       d   RV R&   \/        V 4      p\1        R V 4       4      pRp	V R,          '       g   \3        \5        R</ VB 4      p
EM$\(        P+                  R4       \7        V R,          4      p	VP9                  4        UUu/ uF  w  rV\:        9  g   K  WbK  	  ppp\3        \5        R</ VB 4      pV	^ 8  g   V	\=        V4      8  d"   VP?                  R4       VPA                  4       # V'       dq   \5        R</ VB  Uu. uF  qPB                  NK  	  ppW,          PB                  V9  d"   VP?                  R 4       VPA                  4       # \(        P+                  R!4       W,          .p
V R",          '       dw   V R,          '       dG   \E        V
4      p\        \F        PH                  ! V\J        PL                  ! R#R4      R$8H  R%7      4       R# \O        V
3R&\Q        V4      R'V	R(\F        /VB  R# \=        V
4      ^8  d@   V R),          '       g1   V R*,          '       g"   VP?                  R+4       VPA                  4       # \=        V
4      ^ 8X  d"   VP?                  R,4       VPA                  4       # . pV
 EFz  p\(        PS                  R-VPT                  4        VPV                  ! R</ VB ;_uu_ 4        V R.,          '       dK   VPX                  ! R</ VB pV R,          '       d   VP[                  \]        VV4      4       M\_        VV4       MV R),          '       dK   VP`                  ! R</ VB pV R,          '       d   VP[                  \]        VV4      4       M\_        VV4       MV R/,          '       d   V R0,          '       d   \c        W3/ VB  MUV R/,          '       d   V R1,          '       d   \e        W3/ VB  M*V R/,          '       d   V R2,          '       d   \g        W3/ VB  RRR4       EK}  	  VPw                  4       '       dK   V R,          '       d<   \        \F        PH                  ! V\J        PL                  ! R#R4      R$8H  R: R;7      4       VPA                  4       # u uppi u upi   + '       g   i     EK  ; i  \h         d/   pTP?                  TPT                   R3T 2TR47        Rp?EKC  Rp?i\j         d   pTPl                  \l        Pn                  \l        Pp                  39   d(   TP?                  TPT                   R52TR47        Rp?EK  TPr                  R=8X  d(   TP?                  TPT                   R62TR47        Rp?EK  TP?                  TPT                   R72TRR87        Rp?EK  Rp?i\t         d.   pTP?                  TPT                   R92TRR87        Rp?EK=  Rp?ii ; i)>z	--versionzliquidctl vz (Z)r   Tr   zE%(log_color)s[%(levelname)s] (%(module)s) (%(funcName)s): %(message)sz'%(log_color)s%(levelname)s: %(message)sr4   DEBUGZ	bold_blueINFOZbold_purpleWARNINGzyellow,boldZERRORzred,boldZCRITICALzred,bold,bg_whiteZblueZpurple)ZfmtZstream
log_colors)ZlevelZhandlers__main__zApython -m liquidctl.cli is deprecated, prefer python -m liquidctlz--jsonc              3   s>   "   T F  q\         9   g   K  ^x  K  	  R# 5i)rl   N)_FILTER_OPTIONS)r/   r]   r1   r   r2   Zmain.<locals>.<genexpr>  s     CDS?,BqqDs   
Nz--devicezD-d/--device is deprecated, prefer --match or other selection optionszdevice index out of boundsz8device index does not match remaining selection criteriazrmixing --device <id> with other filters is not recommended; to disambiguate between results prefer --pick <result>listZLANGZC)ensure_asciir@   rA   jsonrL   ZallzMmultiple devices available, use filters to select one (see: liquidctl --help)z:no device matches available drivers and selection criteriaz
device: %s
initializeZsetZspeedrU   Zscreenr.   )rb   z: insufficient permissionsz:: could not open, possibly due to insufficient permissionsz: unexpected OS error)rb   rk   z: unexpected errorc                 r   r   )r<   r   r   r   r   Zmain.<locals>.<lambda>  s    3q6r   )rw   r    )zopen failed)<r   __doc__r5   r   r7   r6   exitloggingrp   rq   rr   ZtracebacklimitcolorlogZTTYColoredFormatterZstderrZStreamHandlerZsetFormatterZbasicConfigrc   r*   r:   r?   rd   r^   Zsumrv   Zfind_liquidctl_devicesr   rZ   ru   rP   rm   ro   r9   r-   rx   Zdumpsr8   ZgetenvrD   rN   r>   r!   Zconnectry   r;   rM   rQ   Z
get_statusrY   rW   rX   r   ZOSErrorerrnoZEACCESZEPERMrT   r   rn   )rT   Zlog_fmtZ	log_levelrs   Z
log_fmtterZlog_handlerZerrorsrB   Zfilter_countrA   Zselectedr]   rJ   Z
no_filtersZcompatr,   Zmatched_devsZobjsZobj_bufrL   rb   s                        r   mainr   b  s   '?DKK=8+<+<+>*?qABI [YMM		k		;LL	;OO	
||wyk}Z+

 tf}Z+

 --'#**9CEJ '')KZ(i-@:[\[F
 H~~ [dDCDCCLI
.667^_Z()	/3zz|Z|83s/?Yhch|
Z,:z:;q=IV4JJ34##%%2H2P42PQ2P3JJ2PLQ ''|;

UV''))OO U V%&F||>>%h/D$**T641HC1OQR 	   H\8J H*3H:>HBFH
8}q$x..DKK

bc!!	X!	

OP!! GlCOO4%	W$t$$%% ^^3d3FH~~sF'CD)#v6(^^ ^^3d3FH~~sF'CD)#v6%[[T']]%c848%[[T']]%c848%[[T(^^&s9D9% %$ R T(^^ 	djj		&$0G30N!13 	4 c [ R< %$$*  	=JJ#//*"SE2J<< 	^ yyU\\5;;77

coo..HIs
SS..

''ab   
 

coo..CD#X\
]] 	WJJ#//**<=3QUJVV	Ws   W?1W?X5X0X
 7X
8 X
7X
X
 X
<X
X
'X
6X
X
XXX]*"Y] ]!A\71\/!\]$]%!]]rt   )	ZvendorZproductZreleaseZserialr&   r'   zusb-portZmatchZpick)3r{   rH   r   r=   rx   r`   r}   r8   r7   ra   r6   Zimportlib.metadatar    r   r   Znumbersr   Z	tracebackr   r~   r   r_   r   Zliquidctl.driverZliquidctl.errorr   Zliquidctl.utilr   r	   r<   r   r   rN   r[   ru   rO   Z	getLoggerr*   r:   r-   rD   rM   rQ   rW   rX   rY   r^   rc   rd   r   r|   rz   r   r   <module>r      s  CJ       	  	 
 J J  &   !  * :$% % 	
 S  9 s c syy  #  ^  C!" 399#$ 3%& c399ddt..t;
B 	5	5 

H
%60^f,4TO]B,& &4Rj zHHTV r   