Re-added hw-diags quick disk check function
This commit is contained in:
parent
62c77fb696
commit
6ddf3fca67
5 changed files with 10 additions and 5 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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" $*
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.')
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue