Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 569a77edf2 | |||
| 91d8185ede | |||
| 18daa41e2a | |||
| 747277b121 | |||
| b8e09e83ce | |||
| e798503f6f |
11 changed files with 69 additions and 49 deletions
|
|
@ -52,6 +52,12 @@ class CpuObj():
|
||||||
continue
|
continue
|
||||||
self.lscpu[_field] = _data
|
self.lscpu[_field] = _data
|
||||||
|
|
||||||
|
# Get RAM details as well
|
||||||
|
ram_details = get_ram_details()
|
||||||
|
self.ram_total = human_readable_size(ram_details.pop('Total', 0)).strip()
|
||||||
|
self.ram_dimms = [
|
||||||
|
'{}x {}'.format(v, k) for k, v in sorted(ram_details.items())]
|
||||||
|
|
||||||
def generate_cpu_report(self):
|
def generate_cpu_report(self):
|
||||||
"""Generate CPU report with data from all tests."""
|
"""Generate CPU report with data from all tests."""
|
||||||
report = []
|
report = []
|
||||||
|
|
@ -59,11 +65,8 @@ class CpuObj():
|
||||||
report.append(' {}'.format(self.name))
|
report.append(' {}'.format(self.name))
|
||||||
|
|
||||||
# Include RAM details
|
# Include RAM details
|
||||||
ram_details = get_ram_details()
|
|
||||||
ram_total = human_readable_size(ram_details.pop('Total', 0)).strip()
|
|
||||||
ram_dimms = ['{}x {}'.format(v, k) for k, v in sorted(ram_details.items())]
|
|
||||||
report.append('{BLUE}RAM{CLEAR}'.format(**COLORS))
|
report.append('{BLUE}RAM{CLEAR}'.format(**COLORS))
|
||||||
report.append(' {} ({})'.format(ram_total, ', '.join(ram_dimms)))
|
report.append(' {} ({})'.format(self.ram_total, ', '.join(self.ram_dimms)))
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
for test in self.tests.values():
|
for test in self.tests.values():
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,2 @@
|
||||||
Welcome to the [32m______[0m
|
[2J[HWelcome to the [32m______[0m
|
||||||
|
|
||||||
Some common commands:
|
|
||||||
[34m%[0m hw-diags
|
|
||||||
[34m%[0m hw-info
|
|
||||||
[34m%[0m mount-all-volumes
|
|
||||||
[34m%[0m mount-backup-shares
|
|
||||||
[34m%[0m connect-to-network
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,12 @@
|
||||||
## Setup network and update hostname
|
## Setup network and update hostname
|
||||||
|
|
||||||
# Wait for WiFi
|
# Wait for WiFi
|
||||||
sleep 1s
|
echo -n "Waiting for network... "
|
||||||
|
sleep 3s
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
# Set hostname
|
# Set hostname
|
||||||
|
echo -n "Updating hostname... "
|
||||||
IP="$(ip a show scope global \
|
IP="$(ip a show scope global \
|
||||||
| grep inet \
|
| grep inet \
|
||||||
| head -1 \
|
| head -1 \
|
||||||
|
|
@ -19,4 +22,5 @@ fi
|
||||||
if [[ "${NEW_HOSTNAME:+x}" ]]; then
|
if [[ "${NEW_HOSTNAME:+x}" ]]; then
|
||||||
sudo hostnamectl set-hostname "${NEW_HOSTNAME}"
|
sudo hostnamectl set-hostname "${NEW_HOSTNAME}"
|
||||||
fi
|
fi
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
||||||
0
.linux_items/include_x/airootfs/etc/skel/.Xauthority
Normal file
0
.linux_items/include_x/airootfs/etc/skel/.Xauthority
Normal file
|
|
@ -73,7 +73,7 @@ bindsym $mod+f exec "thunar ~"
|
||||||
bindsym $mod+i exec "hardinfo"
|
bindsym $mod+i exec "hardinfo"
|
||||||
bindsym $mod+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes gui"
|
bindsym $mod+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes gui"
|
||||||
bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags --quick"
|
bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags --quick"
|
||||||
bindsym $mod+t exec "urxvt -e zsh -c 'tmux new-session -A -t general; zsh'"
|
bindsym $mod+t exec "urxvt"
|
||||||
bindsym $mod+v exec "urxvt -title 'Hardware Sensors' -e watch -c -n1 -t hw-sensors"
|
bindsym $mod+v exec "urxvt -title 'Hardware Sensors' -e watch -c -n1 -t hw-sensors"
|
||||||
bindsym $mod+w exec "firefox"
|
bindsym $mod+w exec "firefox"
|
||||||
|
|
||||||
|
|
@ -320,4 +320,4 @@ bar {
|
||||||
height 26
|
height 26
|
||||||
}
|
}
|
||||||
|
|
||||||
exec --no-startup-id /home/tech/.update_x
|
exec urxvt -title "Initializing..." -e /home/tech/.update_x
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
#openbox-autostart
|
#openbox-autostart
|
||||||
|
|
||||||
$HOME/.update_x &
|
/usr/bin/urxvt -title "Initializing..." -e "$HOME/.update_x"
|
||||||
|
"$HOME/.start_desktop_apps" &
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,7 @@
|
||||||
</keybind>
|
</keybind>
|
||||||
<keybind key="W-t">
|
<keybind key="W-t">
|
||||||
<action name="Execute">
|
<action name="Execute">
|
||||||
<command>urxvt -e zsh -c 'tmux new-session -A -t general; zsh'</command>
|
<command>urxvt</command>
|
||||||
</action>
|
</action>
|
||||||
</keybind>
|
</keybind>
|
||||||
<keybind key="W-v">
|
<keybind key="W-v">
|
||||||
|
|
|
||||||
24
.linux_items/include_x/airootfs/etc/skel/.start_desktop_apps
Executable file
24
.linux_items/include_x/airootfs/etc/skel/.start_desktop_apps
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
#
|
||||||
|
## Start desktop apps based on WM
|
||||||
|
|
||||||
|
# Start common apps
|
||||||
|
feh --bg-fill "$HOME/.wallpaper"
|
||||||
|
compton --backend xrender --xrender-sync --xrender-sync-fence &
|
||||||
|
sleep 1s
|
||||||
|
x0vncserver -display :0 -passwordfile $HOME/.vnc/passwd -AlwaysShared &
|
||||||
|
conky &
|
||||||
|
nm-applet &
|
||||||
|
volumeicon &
|
||||||
|
|
||||||
|
# Start WM specific apps
|
||||||
|
if fgrep -q "i3" /proc/cmdline; then
|
||||||
|
# i3
|
||||||
|
i3-msg restart
|
||||||
|
else
|
||||||
|
# openbox
|
||||||
|
openbox --restart
|
||||||
|
tint2 &
|
||||||
|
cbatticon --hide-notification &
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$'
|
REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$'
|
||||||
REGEX_URXVT='(URxvt.geometry:\s+).*'
|
REGEX_URXVT='(URxvt.geometry:\s+).*'
|
||||||
|
|
||||||
|
echo -n "Getting display details... "
|
||||||
|
|
||||||
# Get screen data
|
# Get screen data
|
||||||
xrandr_str="$(xrandr | grep mm | head -1)"
|
xrandr_str="$(xrandr | grep mm | head -1)"
|
||||||
width_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\1/")"
|
width_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\1/")"
|
||||||
|
|
@ -29,8 +31,12 @@ width_urxvt="$(echo "${width_px} * 112/1280" | bc)"
|
||||||
height_urxvt="$(echo "${height_px} * 33/720" | bc)"
|
height_urxvt="$(echo "${height_px} * 33/720" | bc)"
|
||||||
offset_urxvt="24"
|
offset_urxvt="24"
|
||||||
|
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
# Update settings if necessary
|
# Update settings if necessary
|
||||||
if [[ "${dpi}" -ge 192 ]]; then
|
if [[ "${dpi}" -ge 192 ]]; then
|
||||||
|
echo -n "Updating settings for HiDPI... "
|
||||||
|
|
||||||
# Conky
|
# Conky
|
||||||
sed -i 's/minimum_size 180 0/minimum_size 360 0/' "${HOME}/.conkyrc_base"
|
sed -i 's/minimum_size 180 0/minimum_size 360 0/' "${HOME}/.conkyrc_base"
|
||||||
sed -i 's/maximum_width 180/maximum_width 360/' "${HOME}/.conkyrc_base"
|
sed -i 's/maximum_width 180/maximum_width 360/' "${HOME}/.conkyrc_base"
|
||||||
|
|
@ -64,6 +70,9 @@ if [[ "${dpi}" -ge 192 ]]; then
|
||||||
width_urxvt="$(echo "${width_urxvt} / 2" | bc)"
|
width_urxvt="$(echo "${width_urxvt} / 2" | bc)"
|
||||||
height_urxvt="$(echo "${height_urxvt} / 2" | bc)"
|
height_urxvt="$(echo "${height_urxvt} / 2" | bc)"
|
||||||
offset_urxvt="$(echo "${offset_urxvt} * 2" | bc)"
|
offset_urxvt="$(echo "${offset_urxvt} * 2" | bc)"
|
||||||
|
|
||||||
|
# Done
|
||||||
|
echo "Done"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update URxvt (Always)
|
# Update URxvt (Always)
|
||||||
|
|
@ -71,33 +80,19 @@ urxvt_geometry="${width_urxvt}x${height_urxvt}+${offset_urxvt}+${offset_urxvt}"
|
||||||
sed -i -r "s/${REGEX_URXVT}/\1${urxvt_geometry}/" "${HOME}/.Xresources"
|
sed -i -r "s/${REGEX_URXVT}/\1${urxvt_geometry}/" "${HOME}/.Xresources"
|
||||||
|
|
||||||
# Update conky
|
# Update conky
|
||||||
|
echo -n "Updating conky... "
|
||||||
$HOME/.update_conky
|
$HOME/.update_conky
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
# Update X
|
# Update X
|
||||||
|
echo -n "Updating X... "
|
||||||
xset s off
|
xset s off
|
||||||
xset -dpms
|
xset -dpms
|
||||||
xrdb -merge $HOME/.Xresources
|
xrdb -merge $HOME/.Xresources
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
# Start common desktop apps
|
# Start desktop apps for i3
|
||||||
feh --bg-fill "$HOME/.wallpaper"
|
|
||||||
compton --backend xrender --xrender-sync --xrender-sync-fence &
|
|
||||||
sleep 1s
|
|
||||||
x0vncserver -display :0 -passwordfile $HOME/.vnc/passwd -AlwaysShared &
|
|
||||||
conky &
|
|
||||||
nm-applet &
|
|
||||||
volumeicon &
|
|
||||||
|
|
||||||
# Start WM specific apps
|
|
||||||
if fgrep -q "i3" /proc/cmdline; then
|
if fgrep -q "i3" /proc/cmdline; then
|
||||||
# i3
|
i3-msg exec $HOME/.start_desktop_apps
|
||||||
i3-msg restart
|
|
||||||
else
|
|
||||||
# openbox
|
|
||||||
openbox --restart
|
|
||||||
tint2 &
|
|
||||||
cbatticon --hide-notification &
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prevent Xorg from being killed by .zlogin
|
|
||||||
touch "/tmp/x_ok"
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@
|
||||||
dbus-update-activation-environment --systemd DISPLAY
|
dbus-update-activation-environment --systemd DISPLAY
|
||||||
eval $(ssh-agent)
|
eval $(ssh-agent)
|
||||||
export SSH_AUTH_SOCK
|
export SSH_AUTH_SOCK
|
||||||
|
xrdb -merge $HOME/.Xresources
|
||||||
exec openbox-session
|
exec openbox-session
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
setterm -blank 0 -powerdown 0 2>/dev/null
|
setterm -blank 0 -powerdown 0 2>/dev/null
|
||||||
if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
|
if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
|
||||||
# Connect to network and update hostname
|
# Connect to network and update hostname
|
||||||
$HOME/.update_network
|
"${HOME}/.update_network"
|
||||||
|
|
||||||
# Update settings if using i3
|
# Update settings if using i3
|
||||||
if fgrep -q "i3" /proc/cmdline; then
|
if fgrep -q "i3" /proc/cmdline; then
|
||||||
|
|
@ -11,18 +11,16 @@ if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
|
||||||
|
|
||||||
# Start X or HW-diags
|
# Start X or HW-diags
|
||||||
if ! fgrep -q "nox" /proc/cmdline; then
|
if ! fgrep -q "nox" /proc/cmdline; then
|
||||||
# Kill Xorg after 30 seconds if it doesn't fully initialize
|
# Show freeze warning
|
||||||
(sleep 30s; if ! [[ -f "/tmp/x_ok" ]]; then pkill '(Xorg|startx)'; fi) &
|
echo ""
|
||||||
|
echo "NOTE: Not all GPUs/displays are supported."
|
||||||
|
echo " If the system is frozen on this screen"
|
||||||
|
echo " please restart and try CLI mode instead"
|
||||||
|
echo ""
|
||||||
|
|
||||||
# Try starting X
|
# Start x
|
||||||
startx >/dev/null
|
echo "Starting X..."
|
||||||
|
startx >/dev/null 2>&1
|
||||||
# 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
|
else
|
||||||
hw-diags --cli
|
hw-diags --cli
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue