Skip to content

Commit 4706874

Browse files
committed
Add AwesomeWM/SomeWM to autostart instructions
1 parent fc4f22c commit 4706874

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎src/components/InteractiveInstaller.vue‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
shells,
1111
deWms,
1212
environments,
13+
resolveWM,
1314
initSystems,
1415
logic,
1516
fcitx5Config,
@@ -41,13 +42,15 @@ const deIcons: Record<string, string> = {
4142
Sway: 'simple-icons:sway',
4243
Hyprland: 'simple-icons:hyprland',
4344
Niri: 'simple-icons:niri',
45+
AwesomeWM: 'simple-icons:awesomewm',
4446
};
4547
4648
const envBaseIcons: Record<string, string> = {
4749
Wayland: 'simple-icons:wayland',
4850
};
4951
5052
const deIcon = (de: string): string | undefined => deIcons[de];
53+
const wmLabel = (de: string): string => resolveWM(de, selectedEnv.value);
5154
5255
const envIcon = (env: string): string | undefined =>
5356
env === 'X11'
@@ -222,7 +225,7 @@ const copyToClipboard = async (text: string) => {
222225
const autostartText = computed(
223226
() =>
224227
logic.steps.autostart[
225-
selectedDe.value as keyof typeof logic.steps.autostart
228+
resolveWM(selectedDe.value, selectedEnv.value) as keyof typeof logic.steps.autostart
226229
],
227230
);
228231
@@ -265,7 +268,7 @@ const chromiumWaylandFlags = computed(() =>
265268
<div v-for="de in deWms" :key="de" class="de-card" :class="{ active: selectedDe === de }" role="button"
266269
tabindex="0" :aria-pressed="selectedDe === de" @click="selectedDe = de" @keydown.enter="selectedDe = de">
267270
<v-icon v-if="deIcon(de)" :icon="deIcon(de)" width="1.25em" height="1.25em" />
268-
<span>{{ de }}</span>
271+
<span>{{ wmLabel(de) }}</span>
269272
</div>
270273
</div>
271274
</div>

‎src/data/installer.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ export const deWms = [
2929
'Sway',
3030
'Hyprland',
3131
'Niri',
32+
'AwesomeWM'
3233
];
3334
export const environments = ['X11', 'Wayland'];
3435
export const initSystems = ['systemd', 'OpenRC', 'runit'];
36+
const wmAliases: Record<string, Partial<Record<string, string>>> = {
37+
AwesomeWM: { Wayland: 'SomeWM' },
38+
};
39+
export const resolveWM = (wm: string, env: string): string => {
40+
return wmAliases[wm]?.[env] ?? wm;
41+
};
3542

3643
export const logic = {
3744
steps: {
@@ -246,6 +253,10 @@ export const logic = {
246253
Hyprland:
247254
'Thêm `hl.exec_cmd("fcitx5 -d")` vào ~/.config/hypr/hyprland.lua',
248255
Niri: 'Thêm `spawn-sh-at-startup "fcitx5 -d"` vào ~/.config/niri/config.kdl',
256+
AwesomeWM:
257+
'Thêm `awful.spawn.once("fcitx5 -d")` vào ~/.config/awesome/rc.lua',
258+
SomeWM:
259+
'Thêm `awful.spawn.once("fcitx5 -d")` vào ~/.config/somewm/rc.lua',
249260
},
250261
wayland_extras: {
251262
General: {

0 commit comments

Comments
 (0)