Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
eb80580794
6 changed files with 51 additions and 6 deletions
|
|
@ -239,9 +239,13 @@ def mount_volumes(
|
|||
else:
|
||||
fstype = vol_data.get('fstype', 'UNKNOWN FS')
|
||||
size_used = human_readable_size(
|
||||
mounted_volumes[vol_path]['used'])
|
||||
mounted_volumes[vol_path]['used'],
|
||||
decimals=1,
|
||||
)
|
||||
size_avail = human_readable_size(
|
||||
mounted_volumes[vol_path]['avail'])
|
||||
mounted_volumes[vol_path]['avail'],
|
||||
decimals=1,
|
||||
)
|
||||
vol_data['size_avail'] = size_avail
|
||||
vol_data['size_used'] = size_used
|
||||
vol_data['mount_point'] = mounted_volumes[vol_path]['target']
|
||||
|
|
|
|||
|
|
@ -87,7 +87,15 @@ class DiskObj():
|
|||
self.get_size()
|
||||
|
||||
# Try enabling SMART
|
||||
run_program(['sudo', 'smartctl', '--smart=on', self.path], check=False)
|
||||
run_program(
|
||||
cmd=[
|
||||
'sudo',
|
||||
'smartctl',
|
||||
'--tolerance=permissive',
|
||||
'--smart=on',
|
||||
self.path,
|
||||
],
|
||||
check=False)
|
||||
|
||||
# Get NVMe/SMART data and set description
|
||||
self.get_smart_details()
|
||||
|
|
@ -353,7 +361,14 @@ class DiskObj():
|
|||
|
||||
def get_smart_details(self):
|
||||
"""Get data from smartctl."""
|
||||
cmd = ['sudo', 'smartctl', '--all', '--json', self.path]
|
||||
cmd = [
|
||||
'sudo',
|
||||
'smartctl',
|
||||
'--tolerance=verypermissive',
|
||||
'--all',
|
||||
'--json',
|
||||
self.path,
|
||||
]
|
||||
self.smartctl = get_json_from_command(cmd, check=False)
|
||||
|
||||
# Check for attributes
|
||||
|
|
@ -1579,7 +1594,13 @@ def run_smart_short_test(state, test):
|
|||
|
||||
# Start short test
|
||||
print_standard('Running self-test...')
|
||||
cmd = ['sudo', 'smartctl', '--test=short', dev.path]
|
||||
cmd = [
|
||||
'sudo',
|
||||
'smartctl',
|
||||
'--tolerance=normal',
|
||||
'--test=short',
|
||||
dev.path,
|
||||
]
|
||||
run_program(cmd, check=False)
|
||||
|
||||
# Monitor progress
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
BLUE='\033[34m'
|
||||
CLEAR='\033[0m'
|
||||
IFS=$'\n'
|
||||
|
||||
# List devices
|
||||
IFS=$'\n'
|
||||
for line in $(lsblk -do NAME,TRAN,SIZE,VENDOR,MODEL,SERIAL); do
|
||||
if [[ "${line:0:4}" == "NAME" ]]; then
|
||||
echo -e "${BLUE}${line}${CLEAR}"
|
||||
|
|
@ -15,6 +15,18 @@ for line in $(lsblk -do NAME,TRAN,SIZE,VENDOR,MODEL,SERIAL); do
|
|||
done
|
||||
echo ""
|
||||
|
||||
# List loopback devices
|
||||
if [[ "$(losetup -l | wc -l)" > 0 ]]; then
|
||||
for line in $(losetup -lO NAME,PARTSCAN,RO,BACK-FILE); do
|
||||
if [[ "${line:0:4}" == "NAME" ]]; then
|
||||
echo -e "${BLUE}${line}${CLEAR}"
|
||||
else
|
||||
echo "${line}" | sed -r 's#/dev/(loop[0-9]+)#\1 #'
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# List partitions
|
||||
for line in $(lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT); do
|
||||
if [[ "${line:0:4}" == "NAME" ]]; then
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ ITEMS_HIDDEN = (
|
|||
'dgpu',
|
||||
'EFI',
|
||||
'isolinux',
|
||||
# Main Kit
|
||||
'{}/.bin'.format(KIT_NAME_FULL),
|
||||
'{}/.cbin'.format(KIT_NAME_FULL),
|
||||
# WinPE
|
||||
'boot',
|
||||
'bootmgr',
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@ rofi.color-normal: argb:d02d3036, #d8d8d8, argb:d02d3036, #2d3036, #d64937
|
|||
rofi.color-active: argb:d0222222, #d64937, argb:d0222222, #d64937, #d8d8d8
|
||||
rofi.color-urgent: argb:d0888888, #d8d8d8, argb:d0888888, #888888, #d64937
|
||||
|
||||
rofi.font: Noto Sans 12
|
||||
|
||||
rofi.separator-style: solid
|
||||
rofi.hide-scrollbar: true
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ if [[ "${dpi}" -ge 192 ]]; then
|
|||
# i3
|
||||
sed -i -r 's/(height\s+) 26/\1 52/' "${HOME}/.config/i3/config"
|
||||
|
||||
# Rofi
|
||||
sed -i -r 's/Noto Sans 12/Noto Sans 24/' "${HOME}/.config/rofi/config"
|
||||
|
||||
# Tint2
|
||||
sed -i 's/panel_size = 100% 30/panel_size = 100% 60/' \
|
||||
"${HOME}/.config/tint2/tint2rc"
|
||||
|
|
|
|||
Loading…
Reference in a new issue