From 0420088fbfc24231abf5a69c232c73e7754016f5 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 14 Oct 2023 22:49:55 -0500 Subject: [PATCH 1/6] add requirements for linting --- .github/workflows/pylint.yml | 7 ++++--- requirements.txt | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 383e65c..5ebdd1b 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -16,8 +16,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install pylint + python3 -m pip install --upgrade pip + pip3 install -r requirements.txt + pip3 install pylint - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5d5cd85 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +i3ipc +xdg +systemd-python +PyYAML From 1e431b77a54fb3089091e4eb5ea0aa9c30907b08 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 14 Oct 2023 22:58:35 -0500 Subject: [PATCH 2/6] requirement: libsystemd-dev --- .github/workflows/pylint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 5ebdd1b..604d4a5 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -19,6 +19,7 @@ jobs: python3 -m pip install --upgrade pip pip3 install -r requirements.txt pip3 install pylint + apt install -y libsystemd-dev - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') From 74b585b046a8feffd4d44c7258a55c52605ae034 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 14 Oct 2023 22:59:26 -0500 Subject: [PATCH 3/6] requirement: fix libsystemd-dev placement --- .github/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 604d4a5..ff07e99 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -16,10 +16,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + apt install -y libsystemd-dev python3 -m pip install --upgrade pip pip3 install -r requirements.txt pip3 install pylint - apt install -y libsystemd-dev - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') From 1560ba722caa657cc829f882e04a723dc85ac30d Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 14 Oct 2023 23:01:09 -0500 Subject: [PATCH 4/6] requirement: try sudo apt --- .github/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index ff07e99..8be26b6 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -16,7 +16,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - apt install -y libsystemd-dev + sudo apt install -y libsystemd-dev python3 -m pip install --upgrade pip pip3 install -r requirements.txt pip3 install pylint From 6e6089c2df422b870c5b6f6e9d640c8ddda07b5a Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 14 Oct 2023 23:04:24 -0500 Subject: [PATCH 5/6] pylint: ignore line-too-long --- startup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/startup.py b/startup.py index 75205fe..ec92586 100755 --- a/startup.py +++ b/startup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# pylint: disable=line-too-long """ A smart but also lazy login autostart manager for i3/Sway. From 66b2de5b3c4e1ab93cf931696e29ec0f2a774da3 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 15 Oct 2023 00:12:08 -0500 Subject: [PATCH 6/6] readme: rearrange --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9ac05c9..9d3db6c 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,6 @@ Required i3/Sway config line: exec path/to/startup.py ``` -Work days may be temporarily disabled by creating and removing -`~/.vacation` when appropriate. - -The config may be chosen with `-c path/to/autostart.yml`. - -The default is `XDG_CONFIG_HOME/autostart-i3ipc.yml` _(typically in ~/.config)_ - ## Config sample ```yaml @@ -23,6 +16,13 @@ The default is `XDG_CONFIG_HOME/autostart-i3ipc.yml` _(typically in ~/.config)_ autostarts: pre: [] # blocking tasks that run every day, before any other section. intended for backups/updates common: [] # non-blocking tasks that run every day - weekend: [] # blocking tasks for weekends, after 'pre' but before 'common' + weekend: [] # blocking tasks for Saturday/Sunday, after 'pre' but before 'common' work: [] # non-blocking tasks run if Monday through Friday between 8AM - 4PM ``` + +The config may be chosen with `-c path/to/autostart.yml`. + +The default is `XDG_CONFIG_HOME/autostart-i3ipc.yml` _(typically in ~/.config)_ + +Work day autostarts may be temporarily disabled by creating `~/.vacation`. +When desired again, remove the file.