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

View file

@ -39,5 +39,5 @@ if tmux list-session | grep -q "$SESSION_NAME"; then
fi fi
# Start session # 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() clear_screen()
# Show menu # Show menu
menu_diags() menu_diags(*sys.argv)
# Done # Done
#print_standard('\nDone.') #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+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 foh" 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+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"

View file

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