Skip to content

Commit cf3d5a3

Browse files
committed
Update
1 parent e61b966 commit cf3d5a3

116 files changed

Lines changed: 3146 additions & 3123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

archinstall/__init__.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _fetch_arch_db() -> None:
4646
try:
4747
Pacman.run("-Sy")
4848
except Exception as e:
49-
debug(f'Failed to sync Arch Linux package database: {e}')
49+
debug(f"Failed to sync Arch Linux package database: {e}")
5050
exit(1)
5151

5252

@@ -57,10 +57,10 @@ def _check_new_version() -> None:
5757
try:
5858
upgrade = Pacman.run("-Qu archinstall").decode()
5959
except Exception as e:
60-
debug(f'Failed determine pacman version: {e}')
60+
debug(f"Failed determine pacman version: {e}")
6161

6262
if upgrade:
63-
text = f'New version available: {upgrade}'
63+
text = f"New version available: {upgrade}"
6464
info(text)
6565
time.sleep(3)
6666

@@ -71,7 +71,7 @@ def main() -> int:
7171
OR straight as a module: python -m archinstall
7272
In any case we will be attempting to load the provided script to be run from the scripts/ folder
7373
"""
74-
if '--help' in sys.argv or '-h' in sys.argv:
74+
if "--help" in sys.argv or "-h" in sys.argv:
7575
arch_config_handler.print_help()
7676
return 0
7777

@@ -89,7 +89,7 @@ def main() -> int:
8989

9090
script = arch_config_handler.args.script
9191

92-
mod_name = f'archinstall.scripts.{script}'
92+
mod_name = f"archinstall.scripts.{script}"
9393
# by loading the module we'll automatically run the script
9494
importlib.import_module(mod_name)
9595

@@ -109,13 +109,13 @@ def run_as_a_module() -> None:
109109
Tui.shutdown()
110110

111111
if exc:
112-
err = ''.join(traceback.format_exception(exc))
112+
err = "".join(traceback.format_exception(exc))
113113
error(err)
114114

115115
text = (
116-
'Archinstall experienced the above error. If you think this is a bug, please report it to\n'
116+
"Archinstall experienced the above error. If you think this is a bug, please report it to\n"
117117
'https://github.com/archlinux/archinstall and include the log file "/var/log/archinstall/install.log".\n\n'
118-
'Hint: To extract the log from a live ISO \ncurl -F\'file=@/var/log/archinstall/install.log\' https://0x0.st\n'
118+
"Hint: To extract the log from a live ISO \ncurl -F'file=@/var/log/archinstall/install.log' https://0x0.st\n"
119119
)
120120

121121
warn(text)
@@ -125,20 +125,20 @@ def run_as_a_module() -> None:
125125

126126

127127
__all__ = [
128-
'DeferredTranslation',
129-
'FormattedOutput',
130-
'Language',
131-
'Pacman',
132-
'SysInfo',
133-
'Tui',
134-
'arch_config_handler',
135-
'debug',
136-
'disk_layouts',
137-
'error',
138-
'info',
139-
'load_plugin',
140-
'log',
141-
'plugin',
142-
'translation_handler',
143-
'warn',
128+
"DeferredTranslation",
129+
"FormattedOutput",
130+
"Language",
131+
"Pacman",
132+
"SysInfo",
133+
"Tui",
134+
"arch_config_handler",
135+
"debug",
136+
"disk_layouts",
137+
"error",
138+
"info",
139+
"load_plugin",
140+
"log",
141+
"plugin",
142+
"translation_handler",
143+
"warn",
144144
]

archinstall/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import archinstall
22

3-
if __name__ == '__main__':
3+
if __name__ == "__main__":
44
archinstall.run_as_a_module()

archinstall/default_profiles/applications/pipewire.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,24 @@
99

1010
class PipewireProfile(Profile):
1111
def __init__(self) -> None:
12-
super().__init__('Pipewire', ProfileType.Application)
12+
super().__init__("Pipewire", ProfileType.Application)
1313

1414
@property
1515
@override
1616
def packages(self) -> list[str]:
1717
return [
18-
'pipewire',
19-
'pipewire-alsa',
20-
'pipewire-jack',
21-
'pipewire-pulse',
22-
'gst-plugin-pipewire',
23-
'libpulse',
24-
'wireplumber'
18+
"pipewire",
19+
"pipewire-alsa",
20+
"pipewire-jack",
21+
"pipewire-pulse",
22+
"gst-plugin-pipewire",
23+
"libpulse",
24+
"wireplumber",
2525
]
2626

27-
def _enable_pipewire_for_all(self, install_session: 'Installer') -> None:
27+
def _enable_pipewire_for_all(self, install_session: "Installer") -> None:
2828
from archinstall.lib.args import arch_config_handler
29+
2930
users: list[User] | None = arch_config_handler.config.users
3031

3132
if users is None:
@@ -37,20 +38,20 @@ def _enable_pipewire_for_all(self, install_session: 'Installer') -> None:
3738
service_dir.mkdir(parents=True, exist_ok=True)
3839

3940
# Set ownership of the entire user catalogue
40-
install_session.arch_chroot(f'chown -R {user.username}:{user.username} /home/{user.username}')
41+
install_session.arch_chroot(f"chown -R {user.username}:{user.username} /home/{user.username}")
4142

4243
# symlink in the correct pipewire systemd items
4344
install_session.arch_chroot(
44-
f'ln -sf /usr/lib/systemd/user/pipewire-pulse.service /home/{user.username}/.config/systemd/user/default.target.wants/pipewire-pulse.service',
45-
run_as=user.username
45+
f"ln -sf /usr/lib/systemd/user/pipewire-pulse.service /home/{user.username}/.config/systemd/user/default.target.wants/pipewire-pulse.service",
46+
run_as=user.username,
4647
)
4748
install_session.arch_chroot(
48-
f'ln -sf /usr/lib/systemd/user/pipewire-pulse.socket /home/{user.username}/.config/systemd/user/default.target.wants/pipewire-pulse.socket',
49-
run_as=user.username
49+
f"ln -sf /usr/lib/systemd/user/pipewire-pulse.socket /home/{user.username}/.config/systemd/user/default.target.wants/pipewire-pulse.socket",
50+
run_as=user.username,
5051
)
5152

5253
@override
53-
def install(self, install_session: 'Installer') -> None:
54+
def install(self, install_session: "Installer") -> None:
5455
super().install(install_session)
5556
install_session.add_additional_packages(self.packages)
5657
self._enable_pipewire_for_all(install_session)

archinstall/default_profiles/desktop.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
class DesktopProfile(Profile):
1616
def __init__(self, current_selection: list[Profile] = []) -> None:
1717
super().__init__(
18-
'Desktop',
18+
"Desktop",
1919
ProfileType.Desktop,
2020
current_selection=current_selection,
21-
support_greeter=True
21+
support_greeter=True,
2222
)
2323

2424
@property
2525
@override
2626
def packages(self) -> list[str]:
2727
return [
28-
'nano',
29-
'vim',
30-
'openssh',
31-
'htop',
32-
'wget',
33-
'iwd',
34-
'wireless_tools',
35-
'wpa_supplicant',
36-
'smartmontools',
37-
'xdg-utils'
28+
"nano",
29+
"vim",
30+
"openssh",
31+
"htop",
32+
"wget",
33+
"iwd",
34+
"wireless_tools",
35+
"wpa_supplicant",
36+
"smartmontools",
37+
"xdg-utils",
3838
]
3939

4040
@property
@@ -61,8 +61,9 @@ def do_on_select(self) -> SelectResult:
6161
MenuItem(
6262
p.name,
6363
value=p,
64-
preview_action=lambda x: x.value.preview_text()
65-
) for p in profile_handler.get_desktop_profiles()
64+
preview_action=lambda x: x.value.preview_text(),
65+
)
66+
for p in profile_handler.get_desktop_profiles()
6667
]
6768

6869
group = MenuItemGroup(items, sort_items=True, sort_case_sensitive=False)
@@ -74,8 +75,8 @@ def do_on_select(self) -> SelectResult:
7475
allow_reset=True,
7576
allow_skip=True,
7677
preview_style=PreviewStyle.RIGHT,
77-
preview_size='auto',
78-
preview_frame=FrameProperties.max('Info')
78+
preview_size="auto",
79+
preview_frame=FrameProperties.max("Info"),
7980
).run()
8081

8182
match result.type_:
@@ -89,17 +90,17 @@ def do_on_select(self) -> SelectResult:
8990
return SelectResult.ResetCurrent
9091

9192
@override
92-
def post_install(self, install_session: 'Installer') -> None:
93+
def post_install(self, install_session: "Installer") -> None:
9394
for profile in self.current_selection:
9495
profile.post_install(install_session)
9596

9697
@override
97-
def install(self, install_session: 'Installer') -> None:
98+
def install(self, install_session: "Installer") -> None:
9899
# Install common packages for all desktop environments
99100
install_session.add_additional_packages(self.packages)
100101

101102
for profile in self.current_selection:
102-
info(f'Installing profile {profile.name}...')
103+
info(f"Installing profile {profile.name}...")
103104

104105
install_session.add_additional_packages(profile.packages)
105106
install_session.enable_service(profile.services)

archinstall/default_profiles/desktops/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33

44
class SeatAccess(Enum):
5-
seatd = 'seatd'
6-
polkit = 'polkit'
5+
seatd = "seatd"
6+
polkit = "polkit"

archinstall/default_profiles/desktops/awesome.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@
99

1010
class AwesomeProfile(XorgProfile):
1111
def __init__(self) -> None:
12-
super().__init__('Awesome', ProfileType.WindowMgr)
12+
super().__init__("Awesome", ProfileType.WindowMgr)
1313

1414
@property
1515
@override
1616
def packages(self) -> list[str]:
1717
return super().packages + [
18-
'awesome',
19-
'alacritty',
20-
'xorg-xinit',
21-
'xorg-xrandr',
22-
'xterm',
23-
'feh',
24-
'slock',
25-
'terminus-font',
26-
'gnu-free-fonts',
27-
'ttf-liberation',
28-
'xsel',
18+
"awesome",
19+
"alacritty",
20+
"xorg-xinit",
21+
"xorg-xrandr",
22+
"xterm",
23+
"feh",
24+
"slock",
25+
"terminus-font",
26+
"gnu-free-fonts",
27+
"ttf-liberation",
28+
"xsel",
2929
]
3030

3131
@override
32-
def install(self, install_session: 'Installer') -> None:
32+
def install(self, install_session: "Installer") -> None:
3333
super().install(install_session)
3434

3535
# TODO: Copy a full configuration to ~/.config/awesome/rc.lua instead.
@@ -39,7 +39,7 @@ def install(self, install_session: 'Installer') -> None:
3939
# Replace xterm with alacritty for a smoother experience.
4040
awesome_lua = awesome_lua.replace('"xterm"', '"alacritty"')
4141

42-
with open(f"{install_session.target}/etc/xdg/awesome/rc.lua", 'w') as fh:
42+
with open(f"{install_session.target}/etc/xdg/awesome/rc.lua", "w") as fh:
4343
fh.write(awesome_lua)
4444

4545
# TODO: Configure the right-click-menu to contain the above packages that were installed. (as a user config)
@@ -49,16 +49,16 @@ def install(self, install_session: 'Installer') -> None:
4949
with open(f"{install_session.target}/etc/X11/xinit/xinitrc") as xinitrc:
5050
xinitrc_data = xinitrc.read()
5151

52-
for line in xinitrc_data.split('\n'):
52+
for line in xinitrc_data.split("\n"):
5353
if "twm &" in line:
5454
xinitrc_data = xinitrc_data.replace(line, f"# {line}")
5555
if "xclock" in line:
5656
xinitrc_data = xinitrc_data.replace(line, f"# {line}")
5757
if "xterm" in line:
5858
xinitrc_data = xinitrc_data.replace(line, f"# {line}")
5959

60-
xinitrc_data += '\n'
61-
xinitrc_data += 'exec awesome\n'
60+
xinitrc_data += "\n"
61+
xinitrc_data += "exec awesome\n"
6262

63-
with open(f"{install_session.target}/etc/X11/xinit/xinitrc", 'w') as xinitrc:
63+
with open(f"{install_session.target}/etc/X11/xinit/xinitrc", "w") as xinitrc:
6464
xinitrc.write(xinitrc_data)

archinstall/default_profiles/desktops/bspwm.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
class BspwmProfile(XorgProfile):
88
def __init__(self) -> None:
9-
super().__init__('Bspwm', ProfileType.WindowMgr)
9+
super().__init__("Bspwm", ProfileType.WindowMgr)
1010

1111
@property
1212
@override
1313
def packages(self) -> list[str]:
1414
# return super().packages + [
1515
return [
16-
'bspwm',
17-
'sxhkd',
18-
'dmenu',
19-
'xdo',
20-
'rxvt-unicode'
16+
"bspwm",
17+
"sxhkd",
18+
"dmenu",
19+
"xdo",
20+
"rxvt-unicode",
2121
]
2222

2323
@property

archinstall/default_profiles/desktops/budgie.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class BudgieProfile(XorgProfile):
88
def __init__(self) -> None:
9-
super().__init__('Budgie', ProfileType.DesktopEnv)
9+
super().__init__("Budgie", ProfileType.DesktopEnv)
1010

1111
@property
1212
@override
@@ -16,7 +16,7 @@ def packages(self) -> list[str]:
1616
"budgie",
1717
"mate-terminal",
1818
"nemo",
19-
"papirus-icon-theme"
19+
"papirus-icon-theme",
2020
]
2121

2222
@property

archinstall/default_profiles/desktops/cinnamon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class CinnamonProfile(XorgProfile):
88
def __init__(self) -> None:
9-
super().__init__('Cinnamon', ProfileType.DesktopEnv)
9+
super().__init__("Cinnamon", ProfileType.DesktopEnv)
1010

1111
@property
1212
@override
@@ -22,7 +22,7 @@ def packages(self) -> list[str]:
2222
"gnome-screenshot",
2323
"gvfs-smb",
2424
"xed",
25-
"xdg-user-dirs-gtk"
25+
"xdg-user-dirs-gtk",
2626
]
2727

2828
@property

archinstall/default_profiles/desktops/cosmic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class CosmicProfile(XorgProfile):
88
def __init__(self) -> None:
9-
super().__init__('cosmic-epoch', ProfileType.DesktopEnv, advanced=True)
9+
super().__init__("cosmic-epoch", ProfileType.DesktopEnv, advanced=True)
1010

1111
@property
1212
@override

0 commit comments

Comments
 (0)