-
Notifications
You must be signed in to change notification settings - Fork 7
/
04-Arch-Dwm
83 lines (76 loc) · 4.98 KB
/
04-Arch-Dwm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# This declarative configuration file for Linuxloops will install Arch with Dwm from AUR in an image file (without display manager, start dwm with startx command).
# Main parameters
distribution="Arch" # Use `sudo -E bash ~/bin/linuxloops -l` to list available distributions
version="Current" # Use `sudo -E bash ~/bin/linuxloops -l` to list available versions
environment="None" # Use `sudo -E bash ~/bin/linuxloops -l` to list available environments
# Parameters obtained interactively if not provided
#destination="/home/user/Arch.img" # Drive path (e.g. /dev/sdX) or disk image path (e.g. /home/user/Debian.img)
#install_size=40 # Size in GB (default: all available space for disk installs | 14 GB for images)
#useraccount_name="myusername" # User account name
#useraccount_password="myuserpassword" # User account password
#encryption_password="myencryptionpassword" # Encryption password
# Optional parameters
#useraccount_autologin="No" # Enable autologin for default user: "Yes" or "No" (default: "No")
#user_password_for_encryption="No" # Use user account password for encryption: "Yes" or "No" (default: "No")
hostname="Arch-Dwm" # String (default: automatically generated hostname)
#locale="en_US" # System language (default: en_US). Use `sudo -E bash ~/bin/linuxloops -ll` to list available locales
#keymap="us" # Keyboard configuration (default: us). Use `sudo -E bash ~/bin/linuxloops -lk` to list available keymaps
#timezone="America/New_York" # Timezone (default: UTC). Use `sudo -E bash ~/bin/linuxloops -lt` to list available timezones
#grub_hide="No" # Hide the GRUB Bootloader "Yes" or "No" (default: "No")
#nvidia="No" # Install Nvidia proprietary drivers "Yes" or "No" (default: "No")
#surface="No" # Apply linux-surface patches "Yes" / "No" (default: "No")
#kernel_parameters="" # String (default: "")
# Optional partitioning parameters
# By default linuxloops create a standard setup with 3 partitions (EFI, Boot and Root)
# Additional partitions can be added by defining partition4 to partition8 variables in the format "<Mountpoint>*<Name>*<FS Type>*<Mountoptions>*<Size in GB>*<Encryption>"
#efi_name="EFI" # Specific name for the efi partition (default: "EFI", warning:using a custom EFI partition name is not recommended as incompatible with some BIOS)
#efi_mountoptions="" # Specific mountoptions for the efi partition (default: "")
#boot_name="Boot" # Specific name for the boot partition (default: "Boot")
#boot_mountoptions="" # Specific mountoptions for the boot partition (default: "")
#root_name="Root" # Specific name for the root partition (default: "Root")
#root_fstype="btrfs" # FS type for root partition: "ext4" or "btrfs" (default: "ext4")
#root_mountoptions="" # Specific mountoptions for the root partition
#root_encryption="Yes" # Yes / No (default: No)
#partition4="" # Add a custom partition defined in the format "<Mountpoint>*<Name>*<FS Type>*<Mountoptions>*<Size in GB>*<Encryption>"
#partition5="" # Add a custom partition defined in the format "<Mountpoint>*<Name>*<FS Type>*<Mountoptions>*<Size in GB>*<Encryption>"
#partition6="" # Add a custom partition defined in the format "<Mountpoint>*<Name>*<FS Type>*<Mountoptions>*<Size in GB>*<Encryption>"
#partition7="" # Add a custom partition defined in the format "<Mountpoint>*<Name>*<FS Type>*<Mountoptions>*<Size in GB>*<Encryption>"
#partition8="" # Add a custom partition defined in the format "<Mountpoint>*<Name>*<FS Type>*<Mountoptions>*<Size in GB>*<Encryption>"
# Swap:A swap file of the defined size will be created on the rootfs (Swap is not mandatory but a minimum of 4 GB is generally recommended or 1.5 times the amount of RAM if you intend to use hibernation)
#swap_size=0 # Swap size in GB (default: 0)
# List of additional packages to install (default: "")
custom_packages="
dmenu
firefox
pcmanfm
xorg-server
xorg-xinit
xorg-xsetroot
"
# Script that will be executed as root at the end of the install process (default: "").
# Make sure to escape special characters inside the "custom_commands" variable, notably double quotes and dollar signs (for variables that should be interpreted inside the target install).
custom_commands="
git clone https://aur.archlinux.org/dwm.git /tmp/dwm # Install dwm from AUR
chown -R 'nobody':'nobody' /tmp/dwm
su -s /bin/bash nobody -c 'cd /tmp/dwm && makepkg -s'
yes | pacman -U /tmp/dwm/*.pkg.tar.*
rm -r /tmp/dwm
git clone https://aur.archlinux.org/st.git /tmp/st # Install st from AUR
chown -R 'nobody':'nobody' /tmp/st
su -s /bin/bash nobody -c 'cd /tmp/st && makepkg -s'
yes | pacman -U /tmp/st/*.pkg.tar.*
rm -r /tmp/st
# Run commands as user in a bash shell
sudo -u ${username} bash <<'RUNASUSER'
cat >~/.xinitrc <<'XINITRC' # Create the .xinitrc for our user
# Statusbar loop
while true; do
xsetroot -name \"\$( date +\"%F %R\" )\"
sleep 1m # Update time every minute
done &
# Autostart section
pcmanfm &
exec dwm
XINITRC
RUNASUSER
"