diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml new file mode 100644 index 0000000..fe7b8cd --- /dev/null +++ b/.github/workflows/build-and-release.yml @@ -0,0 +1,96 @@ +name: Build and Release + +on: + push: + tags: + - 'v*' + release: + types: [created] + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Zig + uses: mlugg/setup-zig@v2 + with: + version: 0.14.0 + + - name: Clone pikabar source + run: | + git clone https://git.pika-os.com/wm-packages/pikabar.git + + - name: Create Programs directory + run: mkdir -p ${{ github.workspace }}/Programs + + - name: Build zigstat + run: | + cd pikabar/src/zigstat + zig build-exe src/main.zig -O ReleaseSmall -mcpu x86_64_v2 --name zigstat + mv zigstat ${{ github.workspace }}/Programs/ + + - name: Build zigbrightness + run: | + cd pikabar/src/zigbrightness + zig build-exe src/main.zig -O ReleaseSmall -mcpu x86_64_v2 --name zigbrightness + mv zigbrightness ${{ github.workspace }}/Programs/ + + - name: Create release archive + run: | + # Create a clean output directory + mkdir -p ../noctalia-release + + # Copy all files except .git, .github, and pikabar + cp -r . ../noctalia-release/ + rm -rf ../noctalia-release/.git + rm -rf ../noctalia-release/.github + rm -rf ../noctalia-release/pikabar + + # Create the archives + cd .. + tar -czf noctalia-${{ github.ref_name }}.tar.gz noctalia-release/ + cp noctalia-${{ github.ref_name }}.tar.gz noctalia-latest.tar.gz + + # Move archives to workspace + mv *.tar.gz ${{ github.workspace }}/ + + - name: Upload Release Asset + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./noctalia-${{ github.ref_name }}.tar.gz + asset_name: noctalia-${{ github.ref_name }}.tar.gz + asset_content_type: application/gzip + + - name: Upload Latest Release Asset + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./noctalia-latest.tar.gz + asset_name: noctalia-latest.tar.gz + asset_content_type: application/gzip + + - name: Create Release + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v1 + with: + files: | + noctalia-${{ github.ref_name }}.tar.gz + noctalia-latest.tar.gz + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Bar/Modules/Workspace.qml b/Bar/Modules/Workspace.qml index 7d2f788..8140d43 100644 --- a/Bar/Modules/Workspace.qml +++ b/Bar/Modules/Workspace.qml @@ -188,7 +188,7 @@ Item { anchors.fill: parent cursorShape: Qt.PointingHandCursor onClicked: { - WorkspaceManager.switchToWorkspace(model.id); + WorkspaceManager.switchToWorkspace(model.idx); } z: 20 hoverEnabled: true diff --git a/Programs/zigbrightness b/Programs/zigbrightness deleted file mode 100755 index 99cd214..0000000 Binary files a/Programs/zigbrightness and /dev/null differ diff --git a/Programs/zigstat b/Programs/zigstat deleted file mode 100755 index 4130452..0000000 Binary files a/Programs/zigstat and /dev/null differ diff --git a/README.md b/README.md index 6dc3b90..841ec27 100644 --- a/README.md +++ b/README.md @@ -94,16 +94,16 @@ yay -S quickshell-git or use any other way of installing quickshell-git (flake, paru etc). -_Git clone the repo:_ +_Download and install the latest release:_ ``` -git clone https://github.com/Ly-sec/Noctalia.git +mkdir -p ~/.config/quickshell && curl -sL https://github.com/Ly-sec/Noctalia/releases/latest/download/noctalia-latest.tar.gz | tar -xz --strip-components=1 -C ~/.config/quickshell/ ``` -_Move content to ~/.config/quickshell_ +Or download manually from [releases](https://github.com/Ly-sec/Noctalia/releases) and extract: ``` -cd Noctalia && mv * ~/.config/quickshell/ +mkdir -p ~/.config/quickshell && tar -xzf noctalia-*.tar.gz --strip-components=1 -C ~/.config/quickshell/ ``` ### _niri only_ @@ -183,7 +183,9 @@ You will need to install a few things to get everything working: - `swww` to add fancy wallpaper animations (optional) - `wallust` to theme the setup based on wallpaper (optional) -## zigstat and zigbrightnesss is bundled - source can be found [here](https://git.pika-os.com/wm-packages/pikabar/src/branch/main/src) +## zigstat and zigbrightness + +The zigstat and zigbrightness utilities are automatically built from source during release creation. Source code can be found [here](https://git.pika-os.com/wm-packages/pikabar/src/branch/main/src). ## Known issues diff --git a/Settings/Settings.qml b/Settings/Settings.qml index b5bddb4..541ce59 100644 --- a/Settings/Settings.qml +++ b/Settings/Settings.qml @@ -29,7 +29,9 @@ Singleton { reload() } onLoaded: function() { - WallpaperManager.setCurrentWallpaper(settings.currentWallpaper, true); + Qt.callLater(function () { + WallpaperManager.setCurrentWallpaper(settings.currentWallpaper, true); + }) } onLoadFailed: function(error) { settingAdapter = {}