Merge branch 'end-4:main' into main

This commit is contained in:
jwihardi
2025-10-10 01:03:32 -04:00
committed by GitHub
9 changed files with 78 additions and 13 deletions
@@ -9,6 +9,7 @@ import QtQuick.Layouts
DialogListItem {
id: root
required property WifiAccessPoint wifiNetwork
enabled: !(Network.wifiConnectTarget === root.wifiNetwork && !wifiNetwork?.active)
active: (wifiNetwork?.askingPassword || wifiNetwork?.active) ?? false
onClicked: {
@@ -0,0 +1,45 @@
name: Comment on Discussion When dist-arch/ Changes
on:
push:
paths:
- 'dist-arch/**'
# workflow_dispatch:
jobs:
comment_on_discussion:
runs-on: ubuntu-latest
steps:
- name: Create comment on discussion #2140
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCUSSION_NUMBER: 2140
# https://docs.github.com/en/graphql/reference/mutations#adddiscussioncomment
run: |
MESSAGE="**Auto notification:**\n"
MESSAGE+="Directory \`dist-arch\` has been updated.\n"
MESSAGE+="Commit HASH: ${{ github.sha }}\n"
MESSAGE+="Commit message: ${{ github.event.head_commit.message }}"
REPO_OWNER="${{ github.repository_owner }}"
REPO_NAME="${{ github.event.repository.name }}"
DISCUSSION_NODE_ID=$(gh api graphql -f query='
query {
repository( owner: "'${REPO_OWNER}'", name: "'${REPO_NAME}'" )
{ discussion(number: '${DISCUSSION_NUMBER}') { id } }
}' | \
jq -r '.data.repository.discussion.id')
gh api graphql -f query='
mutation {
addDiscussionComment(input:{
discussionId: "'$DISCUSSION_NODE_ID'",
body: "'"$MESSAGE"'",
}) {
clientMutationId
comment {
id
body
}
}
}
'
+14
View File
@@ -0,0 +1,14 @@
name: Dump github context
on:
workflow_dispatch:
jobs:
dump_github_context:
runs-on: ubuntu-latest
steps:
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
@@ -7,6 +7,7 @@ license=(None)
depends=(
fuzzel
glib2 # for `gsettings` it seems?
imagemagick
hypridle
hyprutils
hyprlock
+1
View File
@@ -1,4 +1,5 @@
# Install scripts for Gentoo
Note:
- The scripts here are **not** meant to be executed directly.
- This folder should reflect the equivalents of `/dist-arch/` but under Gentoo.
@@ -21,5 +21,4 @@ RDEPEND="
net-libs/libsoup
dev-libs/libportal
dev-libs/gobject-introspection
media-libs/opencv
"
+1 -1
View File
@@ -74,7 +74,7 @@ gui-libs/libadwaita introspection
net-libs/libsoup brotli introspection ssl
#dev-libs/gobject-introspection (nothing needed)
# dart-sassc handled in the ebuild
media-libs/opencv eigen ffmpeg jpeg opencl opengl python wayland gtk3 webp
eigen ffmpeg jpeg opencl opengl python wayland gtk3 webp
################### SCREENCAPTURE ###################
+3 -3
View File
@@ -107,9 +107,9 @@ elif [[ -f "./dist-${OS_DISTRO_ID}/install-deps.sh" ]]; then
printf "${STY_BOLD}===URGENT===${STY_RED}\n"
printf "The community provided ./dist-${TARGET_ID}/ is not updated (update status: ${tmp_update_status}),\n"
printf "which means it does not fully reflect the latest changes of ./dist-arch/ .\n"
printf "You are highly recommended to abort this script, until someone (maybe you?) has updated the ./dist-${TARGET_ID}/ to fully reflect the latest changes in ./dist-arch/ . PR is welcomed.\n"
printf "For commit history on ./dist-arch/, see\n"
printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/commits/main/dist-arch${STY_RESET}\n"
printf "You are highly recommended to abort this script, until someone (maybe you?) has updated the ./dist-${TARGET_ID}/ to fully reflect the latest changes in ./dist-arch/ .\n"
printf "PR is welcomed. Please see discussion#2140 for details.\n"
printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/discussions/2140${STY_RESET}\n"
printf "${STY_RED}${STY_INVERT}If you are proceeding anyway, illogical-impulse will very likely not work as expected.${STY_RESET}\n"
printf "${STY_RED}Still proceed?${STY_RESET}\n"
read -p "[y/N]: " p
+12 -8
View File
@@ -6,20 +6,24 @@ This is important because there has been so many complaints about the failure in
## How to add/remove python package?
1. Edit `requirements.in`. You may refer to [PyPI](https://pypi.org/) for possible package names.
- If PyPI does not have the needed package, we probably need to build it manually inside the venv. In such case we need to edit the install scripts.
2. Run `uv pip compile requirements.in -o requirements.txt` in this folder.
**Notes:**
- See also [uv doc](https://docs.astral.sh/uv/pip/dependencies/#using-requirementsin).
- `requirements.txt` is included in Git. It's for locking package versions to enhance stability and reproducibility.
- In fact, including package version lock file in Git is also the most common way for similar situations, for example the `package-lock.json` of Node.js projects (see also [this stackoverflow question](https://stackoverflow.com/questions/48524417/should-the-package-lock-json-file-be-added-to-gitignore)). Although there are some situations when it's not suitable to include the lock file, for example [the poetry document](https://python-poetry.org/docs/basic-usage/#committing-your-poetrylock-file-to-version-control) recommend application developers to include package version lock file in Git, but library developers should consider more, such as not inluding the lock file or including it but refreshing regularly.
- For reference see [uv doc](https://docs.astral.sh/uv/pip/dependencies/#using-requirementsin).
- `requirements.txt` is included in Git. It's for locking package versions to enhance stability and reproducibility.[^1]
[^1]: In fact, including package version lock file in Git is also the most common way for similar situations, for example the `package-lock.json` of Node.js projects (see also [this stackoverflow question](https://stackoverflow.com/questions/48524417/should-the-package-lock-json-file-be-added-to-gitignore)). Although there are some situations when it's not suitable to include the lock file, for example [the poetry document](https://python-poetry.org/docs/basic-usage/#committing-your-poetrylock-file-to-version-control) recommend application developers to include package version lock file in Git, but library developers should consider more, such as not inluding the lock file or including it but refreshing regularly.
## How will the python packages get installed?
For summary:
- They will be installed to the virtual environment `$ILLOGICAL_IMPULSE_VIRTUAL_ENV`.
- The default value of `$ILLOGICAL_IMPULSE_VIRTUAL_ENV` is `$XDG_STATE_HOME/quickshell/.venv`.
- The default value of `$XDG_STATE_HOME` is `$HOME/.local/state`.
- Currently we use `env = ILLOGICAL_IMPULSE_VIRTUAL_ENV, ~/.local/state/quickshell/.venv` in `~/.config/hypr/hyprland/env.conf` to set this environment variable.[^2]
- See the function `install-python-packages()` defined in `/scriptdata/lib/package-installers.sh` for details.
- Currently we use `env = ILLOGICAL_IMPULSE_VIRTUAL_ENV, ~/.local/state/quickshell/.venv` in `~/.config/hypr/hyprland/env.conf` to set this environment variable.[^2]
For details: see the function `install-python-packages()` defined in `/scriptdata/lib/package-installers.sh`.
[^2]: Hyprland seems to have weird problem dealing with recursive variable, so we can not use `$XDG_STATE_HOME/quickshell/.venv` even if we had set `$XDG_STATE_HOME` to `~/.local/state` explicitly, else `$XDG_STATE_HOME` will possibly not get expanded but get recognised as literally `$XDG_STATE_HOME`. This problem never happens for some users, but according to some issues when we were using recursive variable setting in the past, it's possible to happen for other users. Reason unknown.
@@ -68,9 +72,9 @@ And that's it!
**Note:** This is the simplest solution as it only modifies the shebang of python script.
However:
- It's only for python script, not the command provided by python package.
- P.S. Run the script directly, eg. `./foo.py`, not `python3 foo.py`, or the shebang will be ignored.
- It can not deal with complex argument (e.g. filaname containing spaces) passed to the python script.
- The example above is actually unstable, considering that `--image '${StringUtils.shellSingleQuoteEscape(panelWindow.screenshotPath)}'` could be a rather complex argument.
- It can not deal with complex argument (e.g. filename containing spaces) passed to the python script.
- If we apply this solution to the example above, it may cause problem, considering that `--image '${StringUtils.shellSingleQuoteEscape(panelWindow.screenshotPath)}'` could be a rather complex argument passed to `find_regions.py`.
- This solution rely on shebang to activate the correct python venv, but the shebang will be ignored if the script is passed as a parameter to python, e.g. `python3 foo.py`.
#### Solution B: bash script as wrapper