Skip to content

Commit

Permalink
Added query flag (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngraham20 committed Apr 23, 2024
1 parent 20a06f4 commit c9397ab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fanctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,15 @@ def main():
parser.add_argument(
"--no-log", help="Print speed/meanTemp to stdout", action="store_true"
)
parser.add_argument(
"--query", "-q", help="Query the currently active strategy", action="store_true"
)
args = parser.parse_args()

if args.query:
with open("/tmp/.fw-fanctrl.tmp", "r") as fp:
print("Current stragety: ", fp.read())
exit(0)
if args.new_strategy:
with open("/tmp/.fw-fanctrl.tmp", "w") as fp:
fp.write(args.new_strategy)
Expand Down

0 comments on commit c9397ab

Please sign in to comment.