Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles/applications
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-09-30 11:09:26 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-09-30 11:09:26 +0000
commit95cd1beb808a37e5438f520a2d37b8728b02062a (patch)
treec906d5e4176aea3fb77768def449f732abe3dd9e /profiles/applications
parent4597ea1a21d12661614f153d628844bba4a224e5 (diff)
Attempt to enhance the search and replace of default apps in xorg.
Diffstat (limited to 'profiles/applications')
-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)