diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..d5d19e0 --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,5 @@ +# inherits settings from https://github.com/Manjaro-Sway/.github/blob/main/.github/settings.yml +_extends: manjaro-contrib/.github +repository: + homepage: https://aur.archlinux.org/sworkstyle.git +# you can extend settings using https://probot.github.io/apps/settings/ diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml new file mode 100644 index 0000000..e04ace8 --- /dev/null +++ b/.github/workflows/bootstrap.yml @@ -0,0 +1,19 @@ +name: bootstrap +on: + workflow_dispatch: + schedule: + - cron: '0 1-23/2 * * *' + +jobs: + bootstrap_actions: + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: checkout + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + token: ${{ secrets.BOOTSTRAP_WORKFLOWS || github.token }} + - id: bootstrap + uses: manjaro-contrib/action-bootstrap-actions@main + with: + upstream: https://aur.archlinux.org/sworkstyle.git diff --git a/.github/workflows/pkgbuild.yml b/.github/workflows/pkgbuild.yml new file mode 100644 index 0000000..21c0b15 --- /dev/null +++ b/.github/workflows/pkgbuild.yml @@ -0,0 +1,51 @@ +name: pkgbuild + +on: + repository_dispatch: + types: + - rebase + workflow_dispatch: + push: + branches: + - master + - main + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + version: + name: gather information + runs-on: ubuntu-latest + steps: + - name: check out repo + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - id: version + uses: manjaro-contrib/action-pkgbuild-info@main + outputs: + runs-on: ${{ steps.version.outputs.runs-on }} + version: ${{ steps.version.outputs.version }} + branches: ${{ steps.version.outputs.branches }} + pkgbuild: + name: building version ${{ needs.version.outputs.version }} against ${{ matrix.branch }} on ${{ matrix.runs-on }} + needs: [version] + if: needs.version.outputs.branches != '' + strategy: + matrix: + branch: ${{ fromJSON(needs.version.outputs.branches) }} + runs-on: ${{ fromJSON(needs.version.outputs.runs-on) }} + runs-on: ${{ matrix.runs-on }} + container: + image: docker://manjarolinux/build:latest + steps: + - name: pkgbuild + uses: manjaro-contrib/action-makepkg@main + with: + branch: ${{ matrix.branch }} + release: ${{ matrix.branch }}-${{ needs.version.outputs.version }} + dispatch-target: ${{ vars.PACKAGES_REPO }} + dispatch-token: ${{ secrets.DISPATCH_TOKEN }} + gpg_secret_base64: ${{ secrets.gpg_secret_base64 }} + additional_gpg: ${{ vars.ADDITIONAL_GPG }} + additional_repo: ${{ vars.ADDITIONAL_REPO }} diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml new file mode 100644 index 0000000..ef13a84 --- /dev/null +++ b/.github/workflows/rebase.yml @@ -0,0 +1,21 @@ +name: rebase + +on: + workflow_dispatch: + schedule: + - cron: '*/30 * * * *' + +concurrency: + group: rebase + cancel-in-progress: true + +jobs: + rebase: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: rebase + uses: manjaro-contrib/action-rebase@main + with: + upstream: https://aur.archlinux.org/sworkstyle.git diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml new file mode 100644 index 0000000..a768dce --- /dev/null +++ b/.github/workflows/submit.yml @@ -0,0 +1,27 @@ +name: submit + +on: + workflow_dispatch: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + resubmit: + runs-on: ubuntu-latest + strategy: + matrix: + branch: [stable, testing, unstable] + permissions: + contents: write + steps: + - name: submit + uses: manjaro-contrib/action-submit@main + with: + dispatch-target: ${{ vars.PACKAGES_REPO }} + dispatch-token: ${{ secrets.DISPATCH_TOKEN }} + branch: ${{ matrix.branch }} diff --git a/.gitignore b/.gitignore index 89841d0..2a5fa68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -pkg -src -swayest_workstyle -*.pkg.tar.zst \ No newline at end of file +* +!static/ +!static/* +!PKGBUILD +!SRCINFO +!.github +!.github/**/* diff --git a/PKGBUILD b/PKGBUILD index 96bd285..c07a702 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,9 +4,9 @@ pkgname=sworkstyle _pkgname=swayest_workstyle pkgver=1.3.2 -pkgrel=1 +pkgrel=3 pkgdesc="Swayest Workstyle - This tool will rename workspaces to the icons configured. Mainly meant for Sway WM" -arch=("x86_64") +arch=("x86_64" "aarch64") url="https://github.com/Lyr-7D1h/swayest_workstyle" license=("MIT") depends=("gcc-libs") @@ -14,9 +14,14 @@ optdepends=("otf-font-awesome") makedepends=("cargo") conflicts=(sworkstyle-git) source=("$_pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" - "sworkstyle.man") + "sworkstyle.man") sha256sums=('5796bfb2f868d2e4f6bfb63750588f282a57fb48e003f3d66c67b15c0e957a5c' - 'd16f4284fe6419603db058b878a32a56574a51409648a6ddbd1b516d50cb3eb7') + 'd16f4284fe6419603db058b878a32a56574a51409648a6ddbd1b516d50cb3eb7') + +prepare() { + cd "$_pkgname-$pkgver" + cp ../../static/default_config.toml default_config.toml +} build() { cd "$_pkgname-$pkgver" @@ -28,4 +33,4 @@ package() { install -D -m755 "target/release/$pkgname" "$pkgdir/usr/bin/sworkstyle" install -D -m644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -D -m644 "$srcdir/$pkgname.man" "$pkgdir/usr/share/man/man1/$pkgname.1" -} \ No newline at end of file +} diff --git a/static/default_config.toml b/static/default_config.toml new file mode 100644 index 0000000..3d69c32 --- /dev/null +++ b/static/default_config.toml @@ -0,0 +1,90 @@ +# +# pattern: Can either be the exact "app_name" (app_id/class) of the window or a regex string in the format of `"/{regex}/"` which will match the window "title". +# icon: Your beatiful icon +# +# verbose format: +# +# '{pattern}' = { type = 'generic' | 'exact', value = '{icon}' } +# +# +# If it couldn't match something it will print: +# +# WARN [sworkstyle:config] No match for '{app_name}' with title '{title}' +# +# You can use {title} to do a generic matching +# You can use {app_name} to do an exact match +# You can find icons for nerd fonts here: https://www.nerdfonts.com/cheat-sheet + +fallback = '' + +[matching] +## partials +'/GitHub/' = '' +'/GitLab/' = '' +'/NVIM ?\w*/' = '' +'/npm/' = '' +'/node/' = '' +'/yarn/' = '' +'/Stack Overflow/' = '' + +## browsers +'google-chrome' = '' +'Google-chrome' = '' +'Google-chrome-unstable' = '' +'google-chrome-unstable' = '' +'Google-chrome-beta' = '' +'google-chrome-beta' = '' +'chromium' = '' +'firefox' = '' +'firefoxdeveloperedition' = '' + +## default applications +'foot' = '' +'/foot/' = '' +'floating_shell' = '' +'pcmanfm' = '' +'pamac-manager' = '' +'/Bluetooth/' = '' +'file-roller' = '' +'swappy' = '' + +## email +'Thunderbird' = '' +'thunderbird' = '' +'evolution' = '' + +## ide +'code' = '﬏' +'Code' = '﬏' +'/- Visual Studio Code/' = '﬏' +'/IntelliJ/' = '' +'code-url-handler' = '﬏' + +# messenger +'whatsapp-for-linux' = '' +'Slack' = '' +'/Telegram/' = '' +'/Microsoft Teams/' = '' +'Signal' = '' + +## auth +'polkit-gnome-authentication-agent-1' = '' +'Keybase' = '' + +## additional applications +'balena-etcher' = '' +'Steam' = '' +'vlc' = '嗢' +'org.qbittorrent.qBittorrent' = '' +'transmission-gtk' = '' +'Insomnia' = '' +'Bitwarden' = '' +'Spotify' = '' +'YouTube Music' = 'ﱘ' +'Alacritty' = '' +'kitty' = '' +'font-manager' = '' +'lutris' = '' +'/Wine/' = '' +'Arctype' = '' +'Around' = ''