Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ curl -fsSL https://raw.githubusercontent.com/jyje/pifanctl/main/install.sh -o in
chmod +x install-pifanctl.sh
./install-pifanctl.sh
rm install-pifanctl.sh

## Uninstall
# rm -rf $HOME/.pifanctl
```

After installation, you can use the following command to control the fan, `pifanctl --help`
Expand Down
4 changes: 4 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ echo "[INFO] Cloning repository..."
git clone -b $BRANCH https://github.com/jyje/pifanctl.git $INSTALL_DIR
cd $INSTALL_DIR

# Set version information
echo "[INFO] Setting version information..."
git rev-parse --short=7 HEAD > ${INSTALL_DIR}/sources/version

# Create virtual environment
echo "[INFO] Creating virtual environment..."
cd "${INSTALL_DIR}/sources"
Expand Down
6 changes: 0 additions & 6 deletions sources/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,13 @@ def common_callback(


@app.command(
cls = TyperGroup,
help = "Show current status"
)
def status(ctx: typer.Context):
router.status(state)


@app.command(
cls = TyperGroup,
help = "Start fan control"
)
def start(
Expand Down Expand Up @@ -180,31 +178,27 @@ def start(


@app.command(
cls = TyperGroup,
help = "Stop fan control"
)
def stop(ctx: typer.Context):
router.stop(state)


@app.command(
cls = TyperGroup,
help = "Set and enable fan control in system service"
)
def enable(ctx: typer.Context):
router.enable(state)


@app.command(
cls = TyperGroup,
help = "Disable fan control from system service"
)
def disable(ctx: typer.Context):
router.disable(state)


@app.command(
cls = TyperGroup,
help = "Manage a configuration of fan control"
)
def config(ctx: typer.Context):
Expand Down