Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--profiles/applications/awesome.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/profiles/applications/awesome.py b/profiles/applications/awesome.py
index 1a5bed9d..e1035cac 100644
--- a/profiles/applications/awesome.py
+++ b/profiles/applications/awesome.py
@@ -5,9 +5,15 @@ installation.add_additional_packages("awesome xorg-server xorg-xrandr xorg-xinit
with open(f'{installation.mountpoint}/etc/X11/xinit/xinitrc', 'r') as xinitrc:
xinitrc_data = xinitrc.read()
-xinitrc_data = xinitrc_data.replace('twm &', '# twm &').replace('\nxclock ', '\n# xclock').replace('exec xterm', '# exec xterm')
-xinitrc_data += '\nxscreensaver -no-splash &\n'
+for line in xinitrc_data.split('\n'):
+ if 'twm &' in line: xinitrc_data.replace(line, f"# {line}")
+ if 'xclock' in line: xinitrc_data.replace(line, f"# {line}")
+ if 'xterm' in line: xinitrc_data.replace(line, f"# {line}")
+
+xinitrc_data += '\n'
+xinitrc_data += 'xscreensaver -no-splash &\n'
xinitrc_data += 'exec awesome\n'
+
with open(f'{installation.mountpoint}/etc/X11/xinit/xinitrc', 'w') as xinitrc:
xinitrc.write(xinitrc_data)