Re-added hw-diags quick disk check function

This commit is contained in:
2Shirt 2017-12-27 04:45:59 -07:00
parent 62c77fb696
commit 6ddf3fca67
5 changed files with 10 additions and 5 deletions

View file

@ -60,7 +60,7 @@ def get_status_color(s):
color = COLORS['GREEN']
return color
def menu_diags():
def menu_diags(*args):
diag_modes = [
{'Name': 'All tests',
'Tests': ['Prime95', 'NVMe/SMART', 'badblocks']},
@ -83,6 +83,11 @@ def menu_diags():
{'Letter': 'Q', 'Name': 'Quit', 'CRLF': True},
]
# Quick disk check
if 'quick' in args:
run_tests(['Quick', 'NVMe/SMART'])
exit_script()
# Show menu
while True:
selection = menu_select(

View file

@ -39,5 +39,5 @@ if tmux list-session | grep -q "$SESSION_NAME"; then
fi
# Start session
tmux new-session -s "$SESSION_NAME" -n "$WINDOW_NAME" "$MENU"
tmux new-session -s "$SESSION_NAME" -n "$WINDOW_NAME" "$MENU" $*

View file

@ -17,7 +17,7 @@ if __name__ == '__main__':
clear_screen()
# Show menu
menu_diags()
menu_diags(*sys.argv)
# Done
#print_standard('\nDone.')

View file

@ -72,7 +72,7 @@ bindsym $mod+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
bindsym $mod+f exec "thunar ~"
bindsym $mod+i exec "hardinfo"
bindsym $mod+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes foh"
bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags foh"
bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags quick"
bindsym $mod+t exec "urxvt"
bindsym $mod+v exec "urxvt -title 'Hardware Sensors' -e watch -c -n1 -t hw-sensors"
bindsym $mod+w exec "firefox"

View file

@ -324,7 +324,7 @@
</keybind>
<keybind key="W-s">
<action name="Execute">
<command>urxvt -title "Hardware Diagnostics" -e hw-diags foh</command>
<command>urxvt -title "Hardware Diagnostics" -e hw-diags quick</command>
</action>
</keybind>
<keybind key="W-t">