Skip to content

Commit

Permalink
feat: add bootstrap and custom icons
Browse files Browse the repository at this point in the history
  • Loading branch information
boredland committed Feb 6, 2023
1 parent 710363a commit 3152700
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -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/
19 changes: 19 additions & 0 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions .github/workflows/pkgbuild.yml
Original file line number Diff line number Diff line change
@@ -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 }}
21 changes: 21 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .github/workflows/submit.yml
Original file line number Diff line number Diff line change
@@ -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 }}
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
pkg
src
swayest_workstyle
*.pkg.tar.zst
*
!static/
!static/*
!PKGBUILD
!SRCINFO
!.github
!.github/**/*
15 changes: 10 additions & 5 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@
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")
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"
Expand All @@ -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"
}
}
90 changes: 90 additions & 0 deletions static/default_config.toml
Original file line number Diff line number Diff line change
@@ -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' = ''

0 comments on commit 3152700

Please sign in to comment.