Files
ansible_role_package/files/nwg-hello/Alpine.patch
Matthew Stobbs a9d817ce05 add nwg-hello
2025-03-11 21:20:14 -06:00

100 lines
3.0 KiB
Diff

diff --git a/install.sh b/install.sh
index fe77638..765b6a1 100755
--- a/install.sh
+++ b/install.sh
@@ -11,7 +11,7 @@ install -D -m 644 -t /usr/share/nwg-hello/ nwg.jpg
install -D -m 644 -t /usr/share/nwg-hello/ img/*
install -d /var/cache/nwg-hello
-install -Dm644 -t /var/cache/nwg-hello cache.json -o greeter
+install -Dm644 -t /var/cache/nwg-hello cache.json -o greetd
install -Dm 644 -t "/usr/share/licenses/nwg-hello" LICENSE
install -Dm 644 -t "/usr/share/doc/nwg-hello" README.md
diff --git a/nwg-hello-default.json b/nwg-hello-default.json
index 1374f67..42e769a 100644
--- a/nwg-hello-default.json
+++ b/nwg-hello-default.json
@@ -1,20 +1,21 @@
{
"session_dirs": [
"/usr/share/wayland-sessions",
- "/usr/share/xsessions"
+ "/usr/share/xsessions",
+ "/usr/local/share/wayland-sessions"
],
"custom_sessions": [
{
"name": "Shell",
- "exec": "/usr/bin/bash"
+ "exec": "/bin/zsh"
}
],
"monitor_nums": [],
"form_on_monitors": [],
"delay_secs": 1,
- "cmd-sleep": "systemctl suspend",
- "cmd-reboot": "systemctl reboot",
- "cmd-poweroff": "systemctl poweroff",
+ "cmd-sleep": "zzz",
+ "cmd-reboot": "openrc reboot",
+ "cmd-poweroff": "openrc poweroff",
"gtk-theme": "Adwaita",
"gtk-icon-theme": "",
"gtk-cursor-theme": "",
diff --git a/nwg_hello/main.py b/nwg_hello/main.py
index c3fe440..de81b29 100755
--- a/nwg_hello/main.py
+++ b/nwg_hello/main.py
@@ -43,7 +43,7 @@ args = parser.parse_args()
if args.log:
args.debug = True
-if args.log and os.getenv("USER") == "greeter":
+if args.log and os.getenv("USER") == "greetd":
now = datetime.now()
eprint(f'[nwg-hello log {now.strftime("%Y-%m-%d %H:%M:%S")}]', log=True)
@@ -68,9 +68,9 @@ defaults = {
"monitor_nums": [],
"form_on_monitors": [],
"delay_secs": 1,
- "cmd-sleep": "systemctl suspend",
- "cmd-reboot": "systemctl reboot",
- "cmd-poweroff": "systemctl poweroff",
+ "cmd-sleep": "zzz",
+ "cmd-reboot": "openrc reboot",
+ "cmd-poweroff": "openrc poweroff",
"gtk-theme": "Adwaita",
"gtk-icon-theme": "",
"gtk-cursor-theme": "",
diff --git a/nwg_hello/tools.py b/nwg_hello/tools.py
index d7eb76d..5a63e4e 100644
--- a/nwg_hello/tools.py
+++ b/nwg_hello/tools.py
@@ -17,7 +17,7 @@ def temp_dir():
def eprint(*args, log=False):
print(*args, file=sys.stderr)
# we don't log testing sessions
- if log and os.getenv("USER") == "greeter":
+ if log and os.getenv("USER") == "greetd":
log_file = os.path.join(temp_dir(), 'nwg-hello.log')
with open(log_file, 'a') as f:
print(*args, file=f)
diff --git a/sway-config b/sway-config
index f51b0e8..d7c67e1 100644
--- a/sway-config
+++ b/sway-config
@@ -3,7 +3,7 @@ exec "nwg-hello; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
- -b 'Poweroff' 'systemctl poweroff' \
- -b 'Reboot' 'systemctl reboot'
+ -b 'Poweroff' 'openrc poweroff' \
+ -b 'Reboot' 'openrc reboot'
-include /etc/sway/config.d/*
\ No newline at end of file
+include /etc/sway/config.d/*