Skip to content

Commit

Permalink
New package: walker-0.12.10
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfortier1 committed Jan 22, 2025
1 parent 0afe89f commit f658ec9
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
62 changes: 62 additions & 0 deletions srcpkgs/walker/patches/systemd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
--- a/cmd/walker.go 2025-01-18 10:14:55.000000000 -0500
+++ b/cmd/walker.go 2025-01-18 11:13:15.037907898 -0500
@@ -7,7 +7,6 @@
"log"
"os"
"os/signal"
- "path/filepath"
"slices"
"strconv"
"strings"
@@ -21,7 +20,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/diamondburned/gotk4/pkg/gio/v2"
"github.com/diamondburned/gotk4/pkg/glib/v2"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
@@ -107,34 +105,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())
}
@@ -160,8 +130,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))

34 changes: 34 additions & 0 deletions srcpkgs/walker/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Template file for 'walker'
pkgname=walker
version=0.12.10
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=7579fccbe22685237b96667d39dd347ffe5a19426c4f4ecb3fe6ef4c56b18376
make_check=no # See https://github.com/void-linux/void-packages/actions/runs/12772808861/job/35603242980

# 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 f658ec9

Please sign in to comment.