fix(x11,docs): use busctl+pkcheck for polkit power actions, increase st font to 18px, and format README overview list

This commit is contained in:
Luxferre
2026-10-20 21:38:49 +03:00
parent 7bab7b7a11
commit 673ee72dbc
10 changed files with 34 additions and 11 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ dwm.selbgcolor: #005577
dwm.selbordercolor: #005577
dwm.selfgcolor: #ffffff
st.font: Fira Code:pixelsize=13:antialias=true:autohint=true
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
st.background: #1c1c1c
st.foreground: #e5e5e5
st.cursorColor: #cccccc
+1 -1
View File
@@ -15,7 +15,7 @@ dwm.selbgcolor: #005577
dwm.selbordercolor: #005577
dwm.selfgcolor: #ffffff
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
st.background: #1c1c1c
st.foreground: #e5e5e5
st.cursorColor: #cccccc
Binary file not shown.
+15 -4
View File
@@ -14,18 +14,29 @@ usage() {
run_polkit_login1() {
method="$1"
python3 - "$method" <<'PYEOF' >/dev/null 2>&1
import os, pty, sys
import os, pty, select, sys
method = sys.argv[1]
if method == "Reboot":
acts = "org.freedesktop.login1.reboot org.freedesktop.login1.reboot-multiple-sessions org.freedesktop.login1.reboot-ignore-inhibit"
else:
acts = "org.freedesktop.login1.power-off org.freedesktop.login1.power-off-multiple-sessions org.freedesktop.login1.power-off-ignore-inhibit"
cmd = (
"pkttyagent --process $$ & AG=$!; sleep 0.15; "
"dbus-send --system --print-reply --dest=org.freedesktop.login1 "
"/org/freedesktop/login1 org.freedesktop.login1.Manager." + method + " boolean:true; "
"RC=$?; kill $AG 2>/dev/null; exit $RC"
"for act in " + acts + "; do "
"pkcheck --action-id $act --process $$ -u >/dev/null 2>&1 || true; "
"done; "
"kill $AG 2>/dev/null || true; "
"exec busctl call --allow-interactive-authorization=true "
"org.freedesktop.login1 /org/freedesktop/login1 "
"org.freedesktop.login1.Manager " + method + " b true"
)
pid, fd = pty.fork()
if pid == 0:
os.execlp("sh", "sh", "-c", cmd)
while True:
r, _, _ = select.select([fd], [], [], 3.0)
if not r:
break
try:
d = os.read(fd, 1024)
if not d:
@@ -15,7 +15,7 @@ dwm.selbgcolor: #005577
dwm.selbordercolor: #005577
dwm.selfgcolor: #ffffff
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
st.background: #1c1c1c
st.foreground: #e5e5e5
st.cursorColor: #cccccc