Skip to content

Commit

Permalink
New package: walker-0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfortier1 committed Jan 12, 2025
1 parent 0afe89f commit 3df35be
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
54 changes: 54 additions & 0 deletions srcpkgs/walker/patches/systemd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
--- a/cmd/walker.go
+++ b/cmd/walker.go
@@ -21,7 +21,6 @@
"github.com/abenz1267/walker/internal/state"
"github.com/abenz1267/walker/internal/ui"
"github.com/abenz1267/walker/internal/util"
- "github.com/adrg/xdg"
"github.com/davidbyttow/govips/v2/vips"
"github.com/diamondburned/gotk4/pkg/gio/v2"
"github.com/diamondburned/gotk4/pkg/glib/v2"
@@ -125,34 +124,6 @@
}
}

- if slices.Contains(args, "-A") || slices.Contains(args, "--enableautostart") {
- content := `
-[Desktop Entry]
-Name=Walker
-Comment=Walker Service
-Exec=walker --gapplication-service
-StartupNotify=false
-Terminal=false
-Type=Application
- `
-
- err := os.WriteFile(filepath.Join(xdg.ConfigHome, "autostart", "walker-service.desktop"), []byte(strings.TrimSpace(content)), 0644)
- if err != nil {
- log.Panicln(err)
- }
-
- return
- }
-
- if slices.Contains(args, "-D") || slices.Contains(args, "--disableautostart") {
- err := os.Remove(filepath.Join(xdg.ConfigHome, "autostart", "walker-service.desktop"))
- if err != nil {
- log.Panicln(err)
- }
-
- return
- }
-
if isNew {
appName = fmt.Sprintf("%s-%d", appName, time.Now().Unix())
}
@@ -178,8 +149,6 @@
app.AddMainOption("forceprint", 'f', glib.OptionFlagNone, glib.OptionArgNone, "forces printing input if no item is selected", "")
app.AddMainOption("bench", 'b', glib.OptionFlagNone, glib.OptionArgNone, "prints nanoseconds for start and displaying in both service and client", "")
app.AddMainOption("active", 'a', glib.OptionFlagNone, glib.OptionArgString, "active item", "")
- app.AddMainOption("enableautostart", 'A', glib.OptionFlagNone, glib.OptionArgNone, "creates a desktop file for autostarting on login", "")
- app.AddMainOption("disableautostart", 'D', glib.OptionFlagNone, glib.OptionArgNone, "removes the autostart desktop file", "")

app.Connect("activate", ui.Activate(state))

33 changes: 33 additions & 0 deletions srcpkgs/walker/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Template file for 'walker'
pkgname=walker
version=0.12.0
revision=1
build_style=go
build_helper="gir"
go_import_path=github.com/abenz1267/walker
go_package="./cmd"
hostmakedepends="gobject-introspection pkg-config"
makedepends="gtk4-layer-shell-devel libvips-devel"
depends="gtk4-layer-shell $(vopt_if calculator qalculate)
$(vopt_if clipboard wl-clipboard)"
short_desc="Multi-Purpose highly extendable application launcher for Wayland"
maintainer="Xavier Fortier <[email protected]>"
license="MIT"
homepage="https://github.com/abenz1267/walker"
changelog="https://github.com/abenz1267/walker/releases"
distfiles="https://github.com/abenz1267/walker/archive/v${version}.tar.gz"
checksum=71df6b623d5363d4db1075afb33e078b3d3099328f6922f2e481edb506713917

# Package options
build_options="calculator clipboard"
build_options_default="clipboard"
desc_option_calculator="Enable calculator module"
desc_option_clipboard="Enable clipboard module"

do_build() {
go build -o ${GOPATH}/bin/${pkgname} ${go_package}
}

post_install() {
vlicense LICENSE
}

0 comments on commit 3df35be

Please sign in to comment.