pwr_tray 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pwr_tray/IniTool.py +193 -0
- pwr_tray/SwayIdleMgr.py +139 -0
- pwr_tray/Utils.py +162 -0
- pwr_tray/YamlDump.py +163 -0
- pwr_tray/__init__.py +0 -0
- pwr_tray/main.py +974 -0
- pwr_tray/resources/FullSun-v03.svg +81 -0
- pwr_tray/resources/GoingDown-v03.svg +79 -0
- pwr_tray/resources/PlayingNow-v03.svg +63 -0
- pwr_tray/resources/RisingMoon-v03.svg +75 -0
- pwr_tray/resources/SetA/pwr-inh-v03.svg +1 -0
- pwr_tray/resources/SetA/pwr-no-sleep-v03.svg +1 -0
- pwr_tray/resources/SetA/pwr-uninh-v03.svg +1 -0
- pwr_tray/resources/SetB/LoBattery-v03.svg +698 -0
- pwr_tray/resources/SetB/LockOnlyMode-v03.svg +18 -0
- pwr_tray/resources/SetB/NormMode-v03.svg +645 -0
- pwr_tray/resources/SetC/New-LockOnly-v03.svg +13 -0
- pwr_tray/resources/SetC/New-LowBattery-v03.svg +13 -0
- pwr_tray/resources/SetC/New-NormMode-v03.svg +13 -0
- pwr_tray/resources/SetC/New-PresMode-v03.svg +13 -0
- pwr_tray/resources/SettingSun-v03.svg +71 -0
- pwr_tray/resources/StopSign-v03.svg +90 -0
- pwr_tray/resources/Unlocked-v03.svg +116 -0
- pwr_tray/resources/UnlockedMoon-v03.svg +121 -0
- pwr_tray/resources/__init__.py +0 -0
- pwr_tray/resources/lockpaper.png +0 -0
- pwr_tray-1.0.2.dist-info/METADATA +169 -0
- pwr_tray-1.0.2.dist-info/RECORD +31 -0
- pwr_tray-1.0.2.dist-info/WHEEL +4 -0
- pwr_tray-1.0.2.dist-info/entry_points.txt +3 -0
- pwr_tray-1.0.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
3
|
+
<!-- Created using Krita: https://krita.org -->
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
+
xmlns:krita="http://krita.org/namespaces/svg/krita"
|
|
7
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
8
|
+
width="61.44pt"
|
|
9
|
+
height="61.44pt"
|
|
10
|
+
viewBox="0 0 64 64">
|
|
11
|
+
<defs/>
|
|
12
|
+
<ellipse id="shape0" transform="matrix(1 0 0.0158013544018059 1 -0.296253257870688 11.2788405797101)" rx="30.72" ry="19.1938164251208" cx="30.72" cy="19.1938164251208" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="4.32" stroke-linecap="square" stroke-linejoin="bevel"/><ellipse id="shape01" transform="matrix(1 0 0.0158013544018059 1 14.9745410937652 14.8405797101449)" rx="15.9575315427313" ry="15.3847342995169" cx="15.9575315427313" cy="15.3847342995169" fill="none" stroke="#000000" stroke-width="1.44" stroke-linecap="square" stroke-linejoin="bevel"/><ellipse id="shape02" transform="matrix(1 0 0.0158013544018059 1 17.8960194545316 17.4624154589372)" rx="13.1586473429952" ry="12.6886956521739" cx="13.1586473429952" cy="12.6886956521739" fill="#1e74fd" stroke="#0046aa" stroke-width="1.44" stroke-linecap="square" stroke-linejoin="bevel"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
3
|
+
<!-- Created using Krita: https://krita.org -->
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
+
xmlns:krita="http://krita.org/namespaces/svg/krita"
|
|
7
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
8
|
+
width="61.44pt"
|
|
9
|
+
height="61.44pt"
|
|
10
|
+
viewBox="0 0 64 64">
|
|
11
|
+
<defs/>
|
|
12
|
+
<path id="shape0" transform="translate(8.88, 1.26)" fill="#fe3521" fill-rule="evenodd" stroke="#780422" stroke-width="2.88" stroke-linecap="square" stroke-linejoin="bevel" d="M0 11.64C4.52205 4.93487 10.3224 0.0193856 19.62 0C29.2452 0.527382 36.9654 2.00729 39.9 5.88C47.3306 11.4452 49.1185 18.7163 49.74 26.34C50.1855 36.2333 46.7661 44.3428 40.98 51.36C34.8543 55.7356 27.3872 56.7581 19.68 57.18C8.67949 54.1695 3.53866 45.0499 0 34.26C6.32015 40.7595 10.3599 41.0405 18.6 40.98C28.5677 37.1638 31.9301 35.5545 33.9 28.38C33.0428 17.8338 32.8926 15.9404 24.24 10.86C18.6011 8.58304 10.5211 8.84304 0 11.64Z" sodipodi:nodetypes="ccccccccccc"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
3
|
+
<!-- Created using Krita: https://krita.org -->
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
+
xmlns:krita="http://krita.org/namespaces/svg/krita"
|
|
7
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
8
|
+
width="61.44pt"
|
|
9
|
+
height="61.44pt"
|
|
10
|
+
viewBox="0 0 64 64">
|
|
11
|
+
<defs/>
|
|
12
|
+
<path id="shape0" transform="translate(8.88, 1.26)" fill="#d1b38b" fill-rule="evenodd" stroke="#3b2300" stroke-width="2.88" stroke-linecap="square" stroke-linejoin="bevel" d="M0 11.64C4.52205 4.93487 10.3224 0.0193856 19.62 0C29.2452 0.527382 36.9654 2.00729 39.9 5.88C47.3306 11.4452 49.1185 18.7163 49.74 26.34C50.1855 36.2333 46.7661 44.3428 40.98 51.36C34.8543 55.7356 27.3872 56.7581 19.68 57.18C8.67949 54.1695 3.53866 45.0499 0 34.26C6.32015 40.7595 10.3599 41.0405 18.6 40.98C28.5677 37.1638 31.9301 35.5545 33.9 28.38C33.0428 17.8338 32.8926 15.9404 24.24 10.86C18.6011 8.58304 10.5211 8.84304 0 11.64Z" sodipodi:nodetypes="ccccccccccc"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
3
|
+
<!-- Created using Krita: https://krita.org -->
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
+
xmlns:krita="http://krita.org/namespaces/svg/krita"
|
|
7
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
8
|
+
width="61.44pt"
|
|
9
|
+
height="61.44pt"
|
|
10
|
+
viewBox="0 0 64 64">
|
|
11
|
+
<defs/>
|
|
12
|
+
<ellipse id="shape0" transform="matrix(1 0 0.0158013544018059 1 -0.296253257870688 11.2788405797101)" rx="30.72" ry="19.1938164251208" cx="30.72" cy="19.1938164251208" fill="#ffff00" fill-rule="evenodd" stroke="#000000" stroke-width="4.32" stroke-linecap="square" stroke-linejoin="bevel"/><ellipse id="shape01" transform="matrix(1 0 0.0158013544018059 1 14.9745410937652 14.8405797101449)" rx="15.9575315427313" ry="15.3847342995169" cx="15.9575315427313" cy="15.3847342995169" fill="none" stroke="#000000" stroke-width="1.44" stroke-linecap="square" stroke-linejoin="bevel"/><ellipse id="shape02" transform="matrix(1 0 0.0158013544018059 1 17.8960194545316 17.4624154589372)" rx="13.1586473429952" ry="12.6886956521739" cx="13.1586473429952" cy="12.6886956521739" fill="#d88f57" stroke="#a2402b" stroke-width="1.44" stroke-linecap="square" stroke-linejoin="bevel"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created using Krita: https://krita.org -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="256pt"
|
|
6
|
+
height="256pt"
|
|
7
|
+
viewBox="0 0 256.00001 256.00001"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg1"
|
|
10
|
+
sodipodi:docname="SettingSun-v03.svg"
|
|
11
|
+
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
13
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
16
|
+
<sodipodi:namedview
|
|
17
|
+
id="namedview1"
|
|
18
|
+
pagecolor="#ffffff"
|
|
19
|
+
bordercolor="#000000"
|
|
20
|
+
borderopacity="0.25"
|
|
21
|
+
inkscape:showpageshadow="2"
|
|
22
|
+
inkscape:pageopacity="0.0"
|
|
23
|
+
inkscape:pagecheckerboard="true"
|
|
24
|
+
inkscape:deskcolor="#d1d1d1"
|
|
25
|
+
inkscape:document-units="pt"
|
|
26
|
+
inkscape:zoom="3.3922482"
|
|
27
|
+
inkscape:cx="130.44446"
|
|
28
|
+
inkscape:cy="173.33637"
|
|
29
|
+
inkscape:window-width="2540"
|
|
30
|
+
inkscape:window-height="1378"
|
|
31
|
+
inkscape:window-x="4"
|
|
32
|
+
inkscape:window-y="1126"
|
|
33
|
+
inkscape:window-maximized="1"
|
|
34
|
+
inkscape:current-layer="svg1"
|
|
35
|
+
showgrid="false" />
|
|
36
|
+
<defs
|
|
37
|
+
id="defs1" />
|
|
38
|
+
<ellipse
|
|
39
|
+
id="shape0"
|
|
40
|
+
rx="86.369759"
|
|
41
|
+
ry="83.363029"
|
|
42
|
+
cx="127.2233"
|
|
43
|
+
cy="167.30647"
|
|
44
|
+
fill="#ffac68"
|
|
45
|
+
fill-rule="evenodd"
|
|
46
|
+
stroke="#ff6a00"
|
|
47
|
+
stroke-width="11.2732"
|
|
48
|
+
stroke-linecap="square"
|
|
49
|
+
stroke-linejoin="bevel"
|
|
50
|
+
style="stroke-width:16;stroke-dasharray:none" />
|
|
51
|
+
<path
|
|
52
|
+
id="shape1"
|
|
53
|
+
fill="none"
|
|
54
|
+
stroke="#59932b"
|
|
55
|
+
stroke-width="18.7857"
|
|
56
|
+
stroke-linecap="square"
|
|
57
|
+
stroke-linejoin="miter"
|
|
58
|
+
stroke-miterlimit="2"
|
|
59
|
+
d="M 9.8375884,247.65727 246.97918,246.72197"
|
|
60
|
+
sodipodi:nodetypes="cc" />
|
|
61
|
+
<path
|
|
62
|
+
id="shape01"
|
|
63
|
+
fill="none"
|
|
64
|
+
stroke="#00ff00"
|
|
65
|
+
stroke-width="18.7803"
|
|
66
|
+
stroke-linecap="square"
|
|
67
|
+
stroke-linejoin="miter"
|
|
68
|
+
stroke-miterlimit="2"
|
|
69
|
+
d="M 9.3531264,228.57426 246.18666,227.9849"
|
|
70
|
+
sodipodi:nodetypes="cc" />
|
|
71
|
+
</svg>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
id="0"
|
|
4
|
+
sodipodi:docname="StopSign-v03.svg"
|
|
5
|
+
viewBox="0 0 255.99999 256.00001"
|
|
6
|
+
version="1.0"
|
|
7
|
+
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
|
|
8
|
+
width="256"
|
|
9
|
+
height="256"
|
|
10
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
14
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
15
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
16
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
17
|
+
<defs
|
|
18
|
+
id="defs1" />
|
|
19
|
+
<sodipodi:namedview
|
|
20
|
+
id="namedview12"
|
|
21
|
+
bordercolor="#666666"
|
|
22
|
+
inkscape:pageshadow="2"
|
|
23
|
+
guidetolerance="10"
|
|
24
|
+
pagecolor="#ffffff"
|
|
25
|
+
gridtolerance="10"
|
|
26
|
+
inkscape:window-maximized="0"
|
|
27
|
+
inkscape:window-width="2540"
|
|
28
|
+
inkscape:zoom="3.5543695"
|
|
29
|
+
objecttolerance="10"
|
|
30
|
+
showgrid="false"
|
|
31
|
+
borderopacity="1"
|
|
32
|
+
inkscape:current-layer="0"
|
|
33
|
+
inkscape:cx="162.89809"
|
|
34
|
+
inkscape:cy="143.76671"
|
|
35
|
+
inkscape:window-y="1126"
|
|
36
|
+
inkscape:window-x="4"
|
|
37
|
+
inkscape:window-height="1378"
|
|
38
|
+
inkscape:pageopacity="0"
|
|
39
|
+
inkscape:showpageshadow="0"
|
|
40
|
+
inkscape:pagecheckerboard="1"
|
|
41
|
+
inkscape:deskcolor="#d1d1d1" />
|
|
42
|
+
<path
|
|
43
|
+
id="5"
|
|
44
|
+
style="fill:#da251d;fill-rule:evenodd;stroke-width:0.482844"
|
|
45
|
+
inkscape:connector-curvature="0"
|
|
46
|
+
d="m 255.557,180.61335 -37.35572,37.35862 -37.39484,37.35862 H 75.145647 L 37.790888,217.97294 0.4351633,180.61528 V 74.939996 L 37.790888,37.544678 75.145647,0.18605612 H 180.81127 L 218.2061,37.544678 255.56183,74.94241 v 105.67046 z" />
|
|
47
|
+
<metadata
|
|
48
|
+
id="metadata11">
|
|
49
|
+
<rdf:RDF>
|
|
50
|
+
<cc:Work>
|
|
51
|
+
<dc:format>image/svg+xml</dc:format>
|
|
52
|
+
<dc:type
|
|
53
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
54
|
+
<cc:license
|
|
55
|
+
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
|
|
56
|
+
<dc:publisher>
|
|
57
|
+
<cc:Agent
|
|
58
|
+
rdf:about="http://openclipart.org/">
|
|
59
|
+
<dc:title>Openclipart</dc:title>
|
|
60
|
+
</cc:Agent>
|
|
61
|
+
</dc:publisher>
|
|
62
|
+
</cc:Work>
|
|
63
|
+
<cc:License
|
|
64
|
+
rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
|
65
|
+
<cc:permits
|
|
66
|
+
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
|
67
|
+
<cc:permits
|
|
68
|
+
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
|
69
|
+
<cc:permits
|
|
70
|
+
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
|
71
|
+
</cc:License>
|
|
72
|
+
</rdf:RDF>
|
|
73
|
+
</metadata>
|
|
74
|
+
<path
|
|
75
|
+
sodipodi:type="star"
|
|
76
|
+
style="fill:none;stroke:#ffffff;stroke-width:6.32612;stroke-dasharray:none;stroke-opacity:1"
|
|
77
|
+
id="path1"
|
|
78
|
+
inkscape:flatsided="true"
|
|
79
|
+
sodipodi:sides="8"
|
|
80
|
+
sodipodi:cx="-57.460281"
|
|
81
|
+
sodipodi:cy="18.190466"
|
|
82
|
+
sodipodi:r1="48.607609"
|
|
83
|
+
sodipodi:r2="44.907574"
|
|
84
|
+
sodipodi:arg1="1.0471976"
|
|
85
|
+
sodipodi:arg2="1.4398966"
|
|
86
|
+
inkscape:rounded="0"
|
|
87
|
+
inkscape:randomized="0"
|
|
88
|
+
d="m -33.156479,60.285891 -36.88438,4.855919 -29.514848,-22.647542 -4.855923,-36.8843793 22.647546,-29.5148477 36.88438,-4.855919 29.514848,22.6475416 4.855919,36.8843794 z"
|
|
89
|
+
transform="matrix(-0.30718858,2.3397546,-2.3397546,-0.30718858,153.24035,268.56631)" />
|
|
90
|
+
</svg>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created using Krita: https://krita.org -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="256pt"
|
|
6
|
+
height="256pt"
|
|
7
|
+
viewBox="0 0 256.00001 256.00001"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg1"
|
|
10
|
+
sodipodi:docname="Unlocked-v03.svg"
|
|
11
|
+
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
13
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
16
|
+
<sodipodi:namedview
|
|
17
|
+
id="namedview1"
|
|
18
|
+
pagecolor="#ffffff"
|
|
19
|
+
bordercolor="#000000"
|
|
20
|
+
borderopacity="0.25"
|
|
21
|
+
inkscape:showpageshadow="2"
|
|
22
|
+
inkscape:pageopacity="0.0"
|
|
23
|
+
inkscape:pagecheckerboard="0"
|
|
24
|
+
inkscape:deskcolor="#d1d1d1"
|
|
25
|
+
inkscape:document-units="pt"
|
|
26
|
+
inkscape:zoom="3.3922482"
|
|
27
|
+
inkscape:cx="136.34026"
|
|
28
|
+
inkscape:cy="172.15721"
|
|
29
|
+
inkscape:window-width="1900"
|
|
30
|
+
inkscape:window-height="1018"
|
|
31
|
+
inkscape:window-x="2564"
|
|
32
|
+
inkscape:window-y="46"
|
|
33
|
+
inkscape:window-maximized="1"
|
|
34
|
+
inkscape:current-layer="svg1" />
|
|
35
|
+
<defs
|
|
36
|
+
id="defs1" />
|
|
37
|
+
<path
|
|
38
|
+
id="shape0"
|
|
39
|
+
fill="#bfbfbf"
|
|
40
|
+
fill-rule="evenodd"
|
|
41
|
+
stroke="#000000"
|
|
42
|
+
stroke-width="8.70276"
|
|
43
|
+
stroke-linecap="square"
|
|
44
|
+
stroke-linejoin="bevel"
|
|
45
|
+
d="m 36.648827,112.07935 4.388832,-38.462732 10.5283,-21.355475 13.71125,-15.811399 23.504997,-15.195317 27.422604,-7.597678 31.82963,1.026712 23.75009,7.803015 20.07708,12.115216 12.73205,11.704521 9.79354,13.347387 -35.17667,19.857428 -11.4659,-17.576167 -14.35399,-11.662074 -16.95015,-3.933614 -16.54013,0.55241 -18.27588,7.022259 -11.615804,11.50172 -8.15786,12.08108 -3.427365,9.880723 -2.795486,24.193635 c 0,0 -18.412256,-0.17615 -38.979138,0.50835 z"
|
|
46
|
+
sodipodi:nodetypes="cccccccccccccccccccccc"
|
|
47
|
+
style="fill:#ffe680;stroke:#554400;stroke-width:12;stroke-dasharray:none" />
|
|
48
|
+
<rect
|
|
49
|
+
id="shape01"
|
|
50
|
+
fill="#d9d9d9"
|
|
51
|
+
fill-rule="evenodd"
|
|
52
|
+
stroke="#000000"
|
|
53
|
+
stroke-width="16.2519"
|
|
54
|
+
stroke-linecap="square"
|
|
55
|
+
stroke-linejoin="bevel"
|
|
56
|
+
width="221.0941"
|
|
57
|
+
height="129.65811"
|
|
58
|
+
x="17.148239"
|
|
59
|
+
y="110.25946"
|
|
60
|
+
style="fill:#ffe680;stroke:#554400" />
|
|
61
|
+
<path
|
|
62
|
+
id="shape2"
|
|
63
|
+
fill="none"
|
|
64
|
+
stroke="#8c8c8c"
|
|
65
|
+
stroke-width="10.8346"
|
|
66
|
+
stroke-linecap="square"
|
|
67
|
+
stroke-linejoin="miter"
|
|
68
|
+
stroke-miterlimit="2"
|
|
69
|
+
d="M 38.771384,134.63967 H 214.22248"
|
|
70
|
+
sodipodi:nodetypes="cc"
|
|
71
|
+
style="stroke:#806600" />
|
|
72
|
+
<path
|
|
73
|
+
id="shape011"
|
|
74
|
+
fill="none"
|
|
75
|
+
stroke="#8c8c8c"
|
|
76
|
+
stroke-width="10.8346"
|
|
77
|
+
stroke-linecap="square"
|
|
78
|
+
stroke-linejoin="miter"
|
|
79
|
+
stroke-miterlimit="2"
|
|
80
|
+
d="M 39.281672,155.01121 H 214.73276"
|
|
81
|
+
sodipodi:nodetypes="cc"
|
|
82
|
+
style="stroke:#806600" />
|
|
83
|
+
<path
|
|
84
|
+
id="shape02"
|
|
85
|
+
fill="none"
|
|
86
|
+
stroke="#8c8c8c"
|
|
87
|
+
stroke-width="10.8346"
|
|
88
|
+
stroke-linecap="square"
|
|
89
|
+
stroke-linejoin="miter"
|
|
90
|
+
stroke-miterlimit="2"
|
|
91
|
+
d="M 39.281672,178.38045 H 214.73276"
|
|
92
|
+
sodipodi:nodetypes="cc"
|
|
93
|
+
style="stroke:#806600" />
|
|
94
|
+
<path
|
|
95
|
+
id="shape03"
|
|
96
|
+
fill="none"
|
|
97
|
+
stroke="#8c8c8c"
|
|
98
|
+
stroke-width="10.8346"
|
|
99
|
+
stroke-linecap="square"
|
|
100
|
+
stroke-linejoin="miter"
|
|
101
|
+
stroke-miterlimit="2"
|
|
102
|
+
d="M 39.281672,198.13877 H 214.73276"
|
|
103
|
+
sodipodi:nodetypes="cc"
|
|
104
|
+
style="stroke:#806600" />
|
|
105
|
+
<path
|
|
106
|
+
id="shape04"
|
|
107
|
+
fill="none"
|
|
108
|
+
stroke="#8c8c8c"
|
|
109
|
+
stroke-width="10.8346"
|
|
110
|
+
stroke-linecap="square"
|
|
111
|
+
stroke-linejoin="miter"
|
|
112
|
+
stroke-miterlimit="2"
|
|
113
|
+
d="M 39.281672,217.17491 H 214.73276"
|
|
114
|
+
sodipodi:nodetypes="cc"
|
|
115
|
+
style="stroke:#806600" />
|
|
116
|
+
</svg>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created using Krita: https://krita.org -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="256pt"
|
|
6
|
+
height="256pt"
|
|
7
|
+
viewBox="0 0 256.00001 256.00001"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg1"
|
|
10
|
+
sodipodi:docname="UnlockedMoon-v03.svg"
|
|
11
|
+
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
13
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
16
|
+
<sodipodi:namedview
|
|
17
|
+
id="namedview1"
|
|
18
|
+
pagecolor="#ffffff"
|
|
19
|
+
bordercolor="#000000"
|
|
20
|
+
borderopacity="0.25"
|
|
21
|
+
inkscape:showpageshadow="2"
|
|
22
|
+
inkscape:pageopacity="0.0"
|
|
23
|
+
inkscape:pagecheckerboard="0"
|
|
24
|
+
inkscape:deskcolor="#d1d1d1"
|
|
25
|
+
inkscape:document-units="pt"
|
|
26
|
+
inkscape:zoom="3.3922482"
|
|
27
|
+
inkscape:cx="136.48765"
|
|
28
|
+
inkscape:cy="172.15721"
|
|
29
|
+
inkscape:window-width="1883"
|
|
30
|
+
inkscape:window-height="1378"
|
|
31
|
+
inkscape:window-x="661"
|
|
32
|
+
inkscape:window-y="1126"
|
|
33
|
+
inkscape:window-maximized="1"
|
|
34
|
+
inkscape:current-layer="svg1"
|
|
35
|
+
showgrid="false" />
|
|
36
|
+
<defs
|
|
37
|
+
id="defs1" />
|
|
38
|
+
<path
|
|
39
|
+
id="shape0"
|
|
40
|
+
fill="#bfbfbf"
|
|
41
|
+
fill-rule="evenodd"
|
|
42
|
+
stroke="#000000"
|
|
43
|
+
stroke-width="8.70276"
|
|
44
|
+
stroke-linecap="square"
|
|
45
|
+
stroke-linejoin="bevel"
|
|
46
|
+
d="m 23.733077,175.6443 2.336998,-20.48093 5.606188,-11.37152 7.30107,-8.41938 12.516117,-8.09131 14.602195,-4.04567 16.948881,0.54671 12.646625,4.155 10.690799,6.45121 6.77965,6.23251 5.21494,7.10731 -18.731132,10.57384 -6.10545,-9.35909 -7.643323,-6.20991 -9.025743,-2.0946 -8.807413,0.29415 -9.731678,3.73927 -6.18527,6.12452 -4.343959,6.43302 -1.825029,5.26136 -1.488561,12.88281 c 0,0 -9.804297,-0.0938 -20.755905,0.2707 z"
|
|
47
|
+
sodipodi:nodetypes="cccccccccccccccccccccc"
|
|
48
|
+
style="fill:#ffe680;stroke:#554400;stroke-width:6.38985;stroke-dasharray:none" />
|
|
49
|
+
<rect
|
|
50
|
+
id="shape01"
|
|
51
|
+
fill="#d9d9d9"
|
|
52
|
+
fill-rule="evenodd"
|
|
53
|
+
stroke="#000000"
|
|
54
|
+
stroke-width="8.65393"
|
|
55
|
+
stroke-linecap="square"
|
|
56
|
+
stroke-linejoin="bevel"
|
|
57
|
+
width="117.72985"
|
|
58
|
+
height="69.041321"
|
|
59
|
+
x="13.349257"
|
|
60
|
+
y="174.67522"
|
|
61
|
+
style="fill:#ffe680;stroke:#554400" />
|
|
62
|
+
<path
|
|
63
|
+
id="shape2"
|
|
64
|
+
fill="none"
|
|
65
|
+
stroke="#8c8c8c"
|
|
66
|
+
stroke-width="5.76929"
|
|
67
|
+
stroke-linecap="square"
|
|
68
|
+
stroke-linejoin="miter"
|
|
69
|
+
stroke-miterlimit="2"
|
|
70
|
+
d="M 24.863312,187.65739 H 118.28883"
|
|
71
|
+
sodipodi:nodetypes="cc"
|
|
72
|
+
style="stroke:#806600" />
|
|
73
|
+
<path
|
|
74
|
+
id="shape011"
|
|
75
|
+
fill="none"
|
|
76
|
+
stroke="#8c8c8c"
|
|
77
|
+
stroke-width="5.76929"
|
|
78
|
+
stroke-linecap="square"
|
|
79
|
+
stroke-linejoin="miter"
|
|
80
|
+
stroke-miterlimit="2"
|
|
81
|
+
d="M 25.135034,198.50497 H 118.56055"
|
|
82
|
+
sodipodi:nodetypes="cc"
|
|
83
|
+
style="stroke:#806600" />
|
|
84
|
+
<path
|
|
85
|
+
id="shape02"
|
|
86
|
+
fill="none"
|
|
87
|
+
stroke="#8c8c8c"
|
|
88
|
+
stroke-width="5.76929"
|
|
89
|
+
stroke-linecap="square"
|
|
90
|
+
stroke-linejoin="miter"
|
|
91
|
+
stroke-miterlimit="2"
|
|
92
|
+
d="M 25.135034,210.9488 H 118.56055"
|
|
93
|
+
sodipodi:nodetypes="cc"
|
|
94
|
+
style="stroke:#806600" />
|
|
95
|
+
<path
|
|
96
|
+
id="shape03"
|
|
97
|
+
fill="none"
|
|
98
|
+
stroke="#8c8c8c"
|
|
99
|
+
stroke-width="5.76929"
|
|
100
|
+
stroke-linecap="square"
|
|
101
|
+
stroke-linejoin="miter"
|
|
102
|
+
stroke-miterlimit="2"
|
|
103
|
+
d="M 25.135034,221.46987 H 118.56055"
|
|
104
|
+
sodipodi:nodetypes="cc"
|
|
105
|
+
style="stroke:#806600" />
|
|
106
|
+
<path
|
|
107
|
+
id="shape04"
|
|
108
|
+
fill="none"
|
|
109
|
+
stroke="#8c8c8c"
|
|
110
|
+
stroke-width="5.76929"
|
|
111
|
+
stroke-linecap="square"
|
|
112
|
+
stroke-linejoin="miter"
|
|
113
|
+
stroke-miterlimit="2"
|
|
114
|
+
d="M 25.135034,231.60637 H 118.56055"
|
|
115
|
+
sodipodi:nodetypes="cc"
|
|
116
|
+
style="stroke:#806600" />
|
|
117
|
+
<path
|
|
118
|
+
id="path1"
|
|
119
|
+
style="fill:#ff0000;stroke:#800000;stroke-width:13.6998;stroke-dasharray:none"
|
|
120
|
+
d="m 152.82919,10.417982 a 90.83362,85.920774 0 0 0 -90.83425,85.92015 90.83362,85.920774 0 0 0 0.17797,2.34946 72.607657,68.680584 0 0 1 59.70029,-29.80502 72.607657,68.680584 0 0 1 72.60808,68.680988 72.607657,68.680584 0 0 1 -14.25415,40.57767 90.83362,85.920774 0 0 0 63.43502,-81.803098 90.83362,85.920774 0 0 0 -90.83296,-85.92015 z" />
|
|
121
|
+
</svg>
|
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pwr_tray
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: A GTK tray applet for power management for i3/sway/KDE
|
|
5
|
+
Keywords: power,energy,GTK,applet,tray,kde,i3wm,sway
|
|
6
|
+
Author-email: Joe Defen <joedef@google.com>
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: importlib-metadata; python_version<"3.8"
|
|
14
|
+
Requires-Dist: psutil>=5.9
|
|
15
|
+
Requires-Dist: PyQt5>=5.15
|
|
16
|
+
Project-URL: Bug Tracker, https://github.com/joedefen/pwr-tray/issues
|
|
17
|
+
Project-URL: Homepage, https://github.com/joedefen/pwr-tray
|
|
18
|
+
|
|
19
|
+
# pwr-tray
|
|
20
|
+
|
|
21
|
+
`pwr-tray` is a GTK5 Tray Applet for Power/Energy Saving and System/DE Controls; currently supported/tested DEs are: i3wm, swaywm, and KDE on X11. `systemd` is required. The `pwr-tray` menu will look similar to:
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<img src="https://github.com/joedefen/pwr-tray/blob/main/images/pwr-tray-screenshot.png?raw=true" alt="screenshot">
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
With just a right-click and a left-click, you can do most operations such as change to Presentation Mode, change screen lock and sleep timeouts, log off, lock and blank your monitors, and more. The `pwr-tray` icon changes based on state:
|
|
29
|
+
|
|
30
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/FullSun-v03.svg?raw=true" alt="FullSun" width="24" height="24"> Presentation Mode (i.e., the full sun)
|
|
31
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/SettingSun-v03.svg?raw=true" alt="SettingSun" width="24" height="24"> SleepAfterLock Mode (i.e., the setting sun)
|
|
32
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/RisingMoon-v03.svg?raw=true" alt="RisingMoon" width="24" height="24"> SleepAfterLock Mode and Locking Screen Soon
|
|
33
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/Unlocked-v03.svg?raw=true" alt="Unlocked" width="24" height="24"> LockOnly Mode (i.e., the unlocked lock)
|
|
34
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/UnlockedMoon-v03.svg?raw=true" alt="UnlockedMoon" width="24" height="24"> LockOnly Mode and Locking Screen Soon
|
|
35
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/GoingDown-v03.svg?raw=true" alt="GoingDown" width="24" height="24"> LowBattery State (going down).
|
|
36
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/PlayingNow-v03.svg?raw=true" alt="PlayingNow" width="24" height="24"> Inhibited by playing media.
|
|
37
|
+
* <img src="https://github.com/joedefen/pwr-tray/blob/main/src/pwr_tray/resources/StopSign-v03.svg?raw=true" alt="StopSign" width="24" height="24"> Inhibited by systemd inhibitors.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### HowTo Install and Start pwr-tray
|
|
42
|
+
* Basically: `pipx install pwr-tray` (exactly how depends on your installation and its state)
|
|
43
|
+
* Manually run as `pwr-tray -o`:
|
|
44
|
+
* Creates config (in `~/.config/pwr-tray/config.ini`).
|
|
45
|
+
* Shows system-level commands (DE dependent) that must be installed if missing. Note:
|
|
46
|
+
* `systemctl` is always required.
|
|
47
|
+
* Optionally, install `playerctl` if you wish playing media to inhibit screen saving and sleeping.
|
|
48
|
+
* If you find you are missing the QT5 foundation, then you'll need to install that; examples:
|
|
49
|
+
* `sudo apt install qt5-default` # if debian based
|
|
50
|
+
* `sudo pacman -S qt5-base` # if arch based
|
|
51
|
+
* `sudo dnf install qt5-qtbase` # if fedora based
|
|
52
|
+
|
|
53
|
+
* Then, follow the "Per-DE Specific Notes" below to ensure proper operation. To just kick the tires, you can defer this until ready to go forward.
|
|
54
|
+
* Read the other sections for customization and everyday use.
|
|
55
|
+
* From the CLI, you can start/restart pwr-tray in the background with `setsid pwr-tray`; typically, you will "autostart" `pwr-tray` when you log in however your DE/WM manages autostarts.
|
|
56
|
+
* `pwr-tray -e` edits the config file (`~/.config/pwr-ini/config.ini`)
|
|
57
|
+
* `pwr-tray -f` tails the log file (`~/.config/pwr-ini/debug.log`)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### HowTo Use pwr-tray
|
|
62
|
+
Open the `pwr-tray' menu with a right-click. Then left-click a line to have an effect ...
|
|
63
|
+
|
|
64
|
+
Choose from three *major power modes* (to control the effects of timeouts):
|
|
65
|
+
- **🅟 Presentation ⮜** - Keeps the screen unlocked/on and system up.
|
|
66
|
+
- **🅛 LockOnly ⮜** - Keeps the system up, but the screen may lock.
|
|
67
|
+
- **🅢 SleepAfterLock ⮜** - Allows screen locking and system to go down (the "normal" mode).
|
|
68
|
+
|
|
69
|
+
Ory choose from various locking/blanking/DE operations:
|
|
70
|
+
- **▷ Lock Screen** - locks the screen immediately.
|
|
71
|
+
- **▷ Blank Monitors** - blanks the screen after locking the screen.
|
|
72
|
+
- **▷ Reload i3** - various DE-dependent actions.
|
|
73
|
+
- **▷ Log Off** - terminate your user session.
|
|
74
|
+
|
|
75
|
+
Or choose a new *system state*:
|
|
76
|
+
- **▼ Suspend System** - suspends the system immediately.
|
|
77
|
+
- **▼ Reboot System** - reboots the system immediately.
|
|
78
|
+
- **▼ Poweroff System** - power down the system immediately.
|
|
79
|
+
|
|
80
|
+
Next, you may see:
|
|
81
|
+
- **🗲 Plugged In** (or HiBattery or LoBattery). Shows the state of the battery.
|
|
82
|
+
- **♺ Chg Screen Idle: 15m->30m** - change the time to start the screen saver; each time clicked, it changes to the next choice.
|
|
83
|
+
- **♺ Chg System Idle: 5m->30m** - change the time to take the system down; clicking selects the next choice.
|
|
84
|
+
- **🎝 PlayerCtl** - shows the state (not installed, enabled, disabled); if installed, a click toggles whether playing media inhibits screen locking and sleeping.
|
|
85
|
+
|
|
86
|
+
Or act on the applet itself:
|
|
87
|
+
- **🖹 Edit Applet Config** - edit the applet's .ini file.
|
|
88
|
+
- **☓ Quit this Applet** - exit applet.
|
|
89
|
+
- **↺ Restart this Applet** - restart applet.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### Testing pwr-tray
|
|
95
|
+
- Running `pwr-tray --quick` reduces the lock and sleep timeout to 1 minute (although you can 'click' the current value to try others), and `--quick` runs double-time (so 1 minute timers expire in 30s per the wall clock).
|
|
96
|
+
- You can run in various modes, but the default, `SleepAfterLock`, exercises the most code paths.
|
|
97
|
+
- Then, ensure closing the lid, hitting the power button, etc., have the desired effects.
|
|
98
|
+
- To test systemd inhibits: create a test inhibit with `systemd-inhibit --why="Prevent sleep for demonstration" sleep infinity`
|
|
99
|
+
- To test Hi/Lo Battery states (only on a system w/o a battery), click the battery state which artificially changes to HiBattery or LoBattery states for testing behaviors in those states.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### HowTo Configure pwr-tray
|
|
104
|
+
- When the program is started w/o a `config.ini`, that file is created with defaults.
|
|
105
|
+
- It has three sections:
|
|
106
|
+
* **Settings**: The settings for when plugged in. Missing/invalid settings are inherited from the defaults. Here are the defaults:
|
|
107
|
+
* **HiBattery**: The settings for when on battery on and not a low battery condition. Missing/invalid settings are inherited from 'Settings'.
|
|
108
|
+
* **LoBattery**: The settings for when on battery in a low battery condition. Missing/invalid settings are inherited from 'Settings'.
|
|
109
|
+
|
|
110
|
+
Here are the current 'Settings' defaults with explanation.
|
|
111
|
+
```
|
|
112
|
+
[Settings]
|
|
113
|
+
i3lock_args = -t -i ./lockpaper.png # arguments when running i3lock for wallpaper
|
|
114
|
+
debug_mode = False # more frequent and elaborate logging
|
|
115
|
+
power_down = False # power down (rather than suspend)
|
|
116
|
+
turn_off_monitors = False # turn off monitors after locking screen
|
|
117
|
+
lock_min_list = [15, 30] # lock minutes choices
|
|
118
|
+
sleep_min_list = [5, 30] # sleep minutes choices (after lock)
|
|
119
|
+
lo_battery_pct = 10 # define "low battery" state
|
|
120
|
+
gui_editor = geany # gui editor for .ini file
|
|
121
|
+
```
|
|
122
|
+
**NOTES**:
|
|
123
|
+
* If you have issues with monitors failing to sleep or the system cannot wake when the monitors are off, then disable the `turn_off_monitors` feature.
|
|
124
|
+
* You can set `gui_editor = konsole -e vim`, for example, to use vim in a terminal window. If you don't have `geany` installed, then be sure to change `gui_editor`.
|
|
125
|
+
* `pwr-tray` changes directory to `~/.config/pwr-tray`.
|
|
126
|
+
* If its .ini file is missing, it is created and `lockpaper.png` is copied there too.
|
|
127
|
+
* Your picks of mode, timeouts, etc. are saved to disk when changed, and restored on the next start.
|
|
128
|
+
* Items may be absent depending on the mode and battery state.
|
|
129
|
+
- **NOTE**: when in LoBattery, SleepAfterLock becomes the effective mode. The icon will change per your selection and the battery state.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Per-DE Specific Notes
|
|
134
|
+
|
|
135
|
+
### i3wm Specific Notes
|
|
136
|
+
* Uninstall or disable all competing energy saving programs (e.g., `xscreensaver`, `xfce4-power-manager`, etc.) when running `i3` whether started by `systemd` or `i3/config` or whatever; defeat the X11 defaults somehow such as in `~/.config/i3/config`:
|
|
137
|
+
```
|
|
138
|
+
exec --no-startup-id xset s off ; xset s noblank ; xset -dpms
|
|
139
|
+
```
|
|
140
|
+
* Edit `/etc/systemd/logind.conf` and uncomment `HandlePowerKey=` and `HandleLidSwitch=`, set each action to `suspend`, and then either reboot or restart `systemd-logind`. That enables `xss-lock` to handle those keys.
|
|
141
|
+
* In your config, arrange for the power key (when set to suspend) to also have the system locked on power up with:
|
|
142
|
+
```
|
|
143
|
+
set $screenlock i3lock -t -i ~/.config/pwr-tray/lockpaper.png --ignore-empty-password --show-failed-attempts
|
|
144
|
+
exec --no-startup-id xss-lock --transfer-sleep-lock -- $screenlock --nofork
|
|
145
|
+
bindsym XF86PowerOff exec --no-startup-id $screenlock && systemctl suspend
|
|
146
|
+
bindsym $mod+Escape exec --no-startup-id $screenlock # create shortcut to lock screen only
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
* Finally, start your pwr-tray somehow. Below is a simplest case using `i3status`, but it may depend on your status bar:
|
|
150
|
+
```
|
|
151
|
+
bar {
|
|
152
|
+
status_command i3status
|
|
153
|
+
tray_output primary
|
|
154
|
+
}
|
|
155
|
+
exec_always --no-startup-id ~/.local/bin/pwr-tray
|
|
156
|
+
```
|
|
157
|
+
* If you use `polybar` for status, then it may be best to run `pwr-tray` from polybar's 'launch' script; e.g., `sleep 1.5 && setsid ~/.local/bin/pwr-tray &`; the delay may be need to allow time for the tray to become ready.
|
|
158
|
+
|
|
159
|
+
### sway Specific Notes
|
|
160
|
+
* Uninstall or disable all competing energy saving programs (e.g., `swayidle`, `xfce4-power-manager`, etc.) when running `sway` whether started by `systemd` or `sway/config` or whatever.
|
|
161
|
+
* **NOTE**: on `sway`, `pwr-tray` cannot read the idle time and do its usual micromanagement; instead, it runs a `swayidle` command whose arguments may vary with your settings.
|
|
162
|
+
* Edit `/etc/system/logind.conf` and uncomment `HandlePowerKey=` and `HandleLidSwitch=`, and set each action to `suspend`; then either reboot or restart `systemd-logind`. That enables the ever-running `swayidle` to handle the suspend / resume events.
|
|
163
|
+
* Again, find a way to start `pwr-tray`; perhaps adding to sway's config: `exec_always --no-startup-id sleep 2 && ~/.local/bin/pwr-tray`; a delay may be required to let the tray initialize.
|
|
164
|
+
|
|
165
|
+
### KDE (X11) Specific Notes
|
|
166
|
+
* In Settings/Energy Saving, disable "Screen Energy Saving", "Suspend session", etc., except keep the "Button events handling" and make it as you wish (e.g., "When power button pressed", "Sleep").
|
|
167
|
+
* In Settings/AutoStart, add the full path of `~/.local/bin/pwr-tray`.
|
|
168
|
+
|
|
169
|
+
|