Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
2Shirt 2018-12-28 17:04:39 -07:00
commit dd34c987fb
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
33 changed files with 131 additions and 95 deletions

View file

@ -781,6 +781,9 @@ def menu_ddrescue(source_path, dest_path, run_mode):
def menu_main(state):
"""Main menu is used to set ddrescue settings."""
checkmark = '*'
if 'DISPLAY' in global_vars['Env']:
checkmark = ''
title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}\n\n'.format(**COLORS)
title += '{BLUE}Current pass: {CLEAR}'.format(**COLORS)
@ -804,8 +807,8 @@ def menu_main(state):
while True:
# Update entries
for opt in main_options:
opt['Name'] = '{} {}'.format(
'[✓]' if opt['Enabled'] else '[ ]',
opt['Name'] = '[{}] {}'.format(
checkmark if opt['Enabled'] else ' ',
opt['Base Name'])
selection = menu_select(

View file

@ -756,6 +756,9 @@ def get_read_rate(s):
def menu_diags(state, args):
"""Main menu to select and run HW tests."""
args = [a.lower() for a in args]
checkmark = '*'
if 'DISPLAY' in global_vars['Env']:
checkmark = ''
title = '{}\nMain Menu'.format(TOP_PANE_TEXT)
# NOTE: Changing the order of main_options will break everything
main_options = [
@ -825,8 +828,8 @@ def menu_diags(state, args):
# Update checkboxes
for opt in main_options:
_nvme_smart = opt['Base Name'] == 'NVMe / SMART'
opt['Name'] = '{} {} {}'.format(
'[✓]' if opt['Enabled'] else '[ ]',
opt['Name'] = '[{}] {} {}'.format(
checkmark if opt['Enabled'] else ' ',
opt['Base Name'],
QUICK_LABEL if state.quick_mode and _nvme_smart else '')

View file

@ -6,30 +6,6 @@ if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
# Trust added root CAs
sudo trust extract-compat
# Update settings if using i3
if fgrep -q "i3" /proc/cmdline; then
sed -i -r 's/#(own_window_type override)/\1/' ~/.conkyrc
sed -i -r 's/openbox-session/i3/' ~/.xinitrc
fi
# Update Conky
$HOME/.update_conky
# Start X or HW-diags
if ! fgrep -q "nox" /proc/cmdline; then
# Kill Xorg after 30 seconds if it doesn't fully initialize
(sleep 30s; if ! [[ -f "/tmp/x_ok" ]]; then pkill '(Xorg|startx)'; fi) &
# Try starting X
startx >/dev/null
# Run Hw-Diags CLI if necessary
if ! [[ -f "/tmp/x_ok" ]]; then
echo "There was an issue starting Xorg, starting CLI interface..."
sleep 2s
hw-diags --cli
fi
else
hw-diags --cli
fi
# Start HW-diags
hw-diags --cli
fi

View file

@ -0,0 +1,35 @@
setterm -blank 0 -powerdown 0 2>/dev/null
if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
# Connect to network and update hostname
$HOME/.update_network
# Trust added root CAs
sudo trust extract-compat
# Update settings if using i3
if fgrep -q "i3" /proc/cmdline; then
sed -i -r 's/#(own_window_type override)/\1/' ~/.conkyrc
sed -i -r 's/openbox-session/i3/' ~/.xinitrc
fi
# Update Conky
$HOME/.update_conky
# Start X or HW-diags
if ! fgrep -q "nox" /proc/cmdline; then
# Kill Xorg after 30 seconds if it doesn't fully initialize
(sleep 30s; if ! [[ -f "/tmp/x_ok" ]]; then pkill '(Xorg|startx)'; fi) &
# Try starting X
startx >/dev/null
# Run Hw-Diags CLI if necessary
if ! [[ -f "/tmp/x_ok" ]]; then
echo "There was an issue starting Xorg, starting CLI interface..."
sleep 2s
hw-diags --cli
fi
else
hw-diags --cli
fi
fi

View file

@ -1,89 +1,50 @@
aic94xx-firmware
alsa-utils
antiword
arandr
arc-gtk-theme
bash-pipes
bc
bluez
bluez-utils
cbatticon
chntpw
cmatrix
colordiff
compton
conky
cpio
curl
dmidecode
dos2unix
dunst
e2fsprogs
evince
feh
ffmpeg
firefox
gnome-keyring
gparted
gpicview-gtk3
gsmartcontrol
hardinfo
hexedit
hfsprogs
htop
i3-gaps
i3lock-fancy-git
i3status
ldns
leafpad
lha
libewf
libinput
linux-firmware
lm_sensors
lzip
mariadb-clients
mdadm
mediainfo
mesa-demos
mkvtoolnix-cli
mprime
mpv
ncdu
network-manager-applet
networkmanager
noto-fonts
noto-fonts-cjk
oblogout
openbox-patched
otf-font-awesome-4
p7zip
papirus-icon-theme
progsreiserfs
python
python-gnuplot
python-mysql-connector
python-psutil
python-requests
qemu-guest-agent
reiserfsprogs
rfkill
rng-tools
rofi
rxvt-unicode
rxvt-unicode-terminfo
smartmontools-svn
speedtest-cli
spice-vdagent
terminus-font
testdisk-wip
thunar
tigervnc
tint2
tk
tmux
tree
ttf-font-awesome-4
ttf-inconsolata
udevil
udisks2
ufw
@ -91,23 +52,8 @@ unarj
unrar
unzip
util-linux
veracrypt
vim
virtualbox-guest-modules-arch
virtualbox-guest-utils
volumeicon
wd719x-firmware
wimlib
xarchiver
xf86-input-libinput
xf86-video-amdgpu
xf86-video-fbdev
xf86-video-nouveau
xf86-video-vesa
xorg-server
xorg-xdpyinfo
xorg-xev
xorg-xinit
xorg-xinput
zip
zsh

View file

@ -0,0 +1,55 @@
arandr
arc-gtk-theme
cbatticon
compton
conky
dunst
evince
feh
ffmpeg
firefox
gnome-keyring
gparted
gpicview-gtk3
gsmartcontrol
hardinfo
i3-gaps
i3lock-fancy-git
i3status
leafpad
libinput
mesa-demos
mkvtoolnix-cli
mpv
network-manager-applet
noto-fonts
noto-fonts-cjk
oblogout
openbox-patched
otf-font-awesome-4
papirus-icon-theme
qemu-guest-agent
rofi
rxvt-unicode
spice-vdagent
thunar
tigervnc
tint2
tk
ttf-font-awesome-4
ttf-inconsolata
veracrypt
virtualbox-guest-modules-arch
virtualbox-guest-utils
volumeicon
xarchiver
xf86-input-libinput
xf86-video-amdgpu
xf86-video-fbdev
xf86-video-nouveau
xf86-video-vesa
xorg-server
xorg-xdpyinfo
xorg-xev
xorg-xinit
xorg-xinput

View file

@ -119,6 +119,9 @@ function copy_live_env() {
# Add items
rsync -aI "$ROOT_DIR/.linux_items/include/" "$LIVE_DIR/"
if [[ "${1:-}" != "--minimal" ]]; then
rsync -aI "$ROOT_DIR/.linux_items/include_x/" "$LIVE_DIR/"
fi
mkdir -p "$LIVE_DIR/airootfs/usr/local/bin"
rsync -aI "$ROOT_DIR/.bin/Scripts/" "$LIVE_DIR/airootfs/usr/local/bin/"
cp -a "$BUILD_DIR/main.py" "$LIVE_DIR/airootfs/usr/local/bin/settings/"
@ -195,6 +198,9 @@ function update_live_env() {
sed -i "/$p/d" "$LIVE_DIR/packages.x86_64"
done < "$ROOT_DIR/.linux_items/packages/live_remove"
cat "$ROOT_DIR/.linux_items/packages/live_add" >> "$LIVE_DIR/packages.x86_64"
if [[ "${1:-}" != "--minimal" ]]; then
cat "$ROOT_DIR/.linux_items/packages/live_add_x" >> "$LIVE_DIR/packages.x86_64"
fi
echo "[custom]" >> "$LIVE_DIR/pacman.conf"
echo "SigLevel = Optional TrustAll" >> "$LIVE_DIR/pacman.conf"
echo "Server = file://$REPO_DIR" >> "$LIVE_DIR/pacman.conf"
@ -213,10 +219,12 @@ function update_live_env() {
rm -Rf "$SKEL_DIR/.oh-my-zsh/.git"
curl -o "$SKEL_DIR/.oh-my-zsh/themes/lean.zsh-theme" https://raw.githubusercontent.com/miekg/lean/master/prompt_lean_setup
# Openbox theme
git clone --depth=1 https://github.com/addy-dclxvi/Openbox-Theme-Collections.git "$TEMP_DIR/ob-themes"
mkdir -p "$LIVE_DIR/airootfs/usr/share/themes"
cp -a "$TEMP_DIR/ob-themes/Triste-Orange" "$LIVE_DIR/airootfs/usr/share/themes/"
if [[ "${1:-}" != "--minimal" ]]; then
# Openbox theme
git clone --depth=1 https://github.com/addy-dclxvi/Openbox-Theme-Collections.git "$TEMP_DIR/ob-themes"
mkdir -p "$LIVE_DIR/airootfs/usr/share/themes"
cp -a "$TEMP_DIR/ob-themes/Triste-Orange" "$LIVE_DIR/airootfs/usr/share/themes/"
fi
# Services
sed -i -r 's/^(.*pacman-init.*)$/#NOPE#\1/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
@ -259,13 +267,15 @@ function update_live_env() {
# udevil fix
echo "mkdir /media" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
# VNC password
echo "mkdir '/home/$username/.vnc'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
echo "echo '$TECH_PASSWORD' | vncpasswd -f > '/home/$username/.vnc/passwd'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
if [[ "${1:-}" != "--minimal" ]]; then
# VNC password
echo "mkdir '/home/$username/.vnc'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
echo "echo '$TECH_PASSWORD' | vncpasswd -f > '/home/$username/.vnc/passwd'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh"
# Wallpaper
mkdir -p "$LIVE_DIR/airootfs/usr/share/wallpaper"
cp "$ROOT_DIR/Images/Linux.png" "$LIVE_DIR/airootfs/usr/share/wallpaper/burned.in"
# Wallpaper
mkdir -p "$LIVE_DIR/airootfs/usr/share/wallpaper"
cp "$ROOT_DIR/Images/Linux.png" "$LIVE_DIR/airootfs/usr/share/wallpaper/burned.in"
fi
}
function update_repo() {
@ -386,6 +396,13 @@ case ${1:-} in
echo Done
;;
-m|--prep-minimal-env)
load_settings --edit
copy_live_env --minimal
update_live_env --minimal
echo Done
;;
-o|--build-iso)
load_settings
build_iso
@ -414,6 +431,7 @@ case ${1:-} in
echo "Advanced options:"
echo " -f --fix-perms Fix folder permissions"
echo " -i --install-deps Install build dependencies"
echo " -m --prep-minimal-env Prep live & airootfs folders (minimal packages)"
echo " -o --build-iso Build ISO (using current setup)"
echo " -p --prep-live-env Prep live & airootfs folders"
echo " -u --update-repo Update custom pacman repo"