Giter Site home page Giter Site logo

walker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

walker's Issues

runtime error: invalid memory address or nil pointer dereference

Getting this runtime error after packaging walker for Nix/NixOS.
startup time: 77.806913mspanic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: closure error: unexpected panic caught: runtime error: invalid memory address or nil pointer dereference

Closure added at:
	main.main at github.com/abenz1267/walker/main.go:81
	runtime.main at runtime/proc.go:271
	runtime.goexit at runtime/asm_amd64.s:1695
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5ce633]

goroutine 1 [running, locked to thread]:
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).Panicf(0xc0000aa390, {0xa845b1, 0x1b}, {0xc000040760, 0x1, 0x1})
	github.com/diamondburned/gotk4/pkg@v0.2.2/core/closure/funcstack.go:104 +0x908
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).TryRepanic(0xc0000aa390)
	github.com/diamondburned/gotk4/pkg@v0.2.2/core/closure/funcstack.go:122 +0xc5
panic({0x8ee540?, 0xe72230?})
	runtime/panic.go:770 +0x132
github.com/abenz1267/walker/processors.parse.func1({0xa82d7e, 0x18}, {0x0?, 0x0?}, {0x4e8d85?, 0x18?})
	github.com/abenz1267/walker/processors/applications.go:93 +0x73
path/filepath.Walk({0xa82d7e, 0x18}, 0xc000040b88)
	path/filepath/path.go:558 +0x4a
github.com/abenz1267/walker/processors.parse()
	github.com/abenz1267/walker/processors/applications.go:92 +0x23a
github.com/abenz1267/walker/processors.GetApplications()
	github.com/abenz1267/walker/processors/applications.go:37 +0x25
main.setupInteractions()
	github.com/abenz1267/walker/interactions.go:32 +0x78
main.activate(0xc00012e018)
	github.com/abenz1267/walker/main.go:153 +0x41f
reflect.Value.call({0x8b5b40?, 0xa921d0?, 0x18?}, {0xa7b398, 0x4}, {0xc00012e000, 0x1, 0xc00012e000?})
	reflect/value.go:596 +0xce5
reflect.Value.Call({0x8b5b40?, 0xa921d0?, 0xa0b000?}, {0xc00012e000?, 0x10?, 0xe8d1e0?})
	reflect/value.go:380 +0xb9
github.com/diamondburned/gotk4/pkg/core/glib._gotk4_goMarshal(0x2ba5e20, 0x0, 0x1, 0x7ffd88db4880, 0x4df985?, 0x2ba4550)
	github.com/diamondburned/gotk4/pkg@v0.2.2/core/glib/glib.go:294 +0x998
github.com/diamondburned/gotk4/pkg/gio/v2._Cfunc_g_application_run(0x2ba4550, 0x1, 0x2ba5f50)
	_cgo_gotypes.go:13795 +0x4b
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run.func3(0x2ba4550, 0x1, 0x2ba5f50)
	github.com/diamondburned/gotk4/pkg@v0.2.2/gio/v2/gio.go:41611 +0x67
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run(0xc0001bd4b8, {0xc000016060, 0x1, 0x1})
	github.com/diamondburned/gotk4/pkg@v0.2.2/gio/v2/gio.go:41611 +0x1f1
main.main()
	github.com/abenz1267/walker/main.go:83 +0x27e

Steps to reproduce: nix run github:donovanglover/nixpkgs/walker#walker

Many icons missing?!

There are many icons missing in the applications list. I don't know if it has anything to do with these errors?!

Screenshot_29-03-24_12-13

External module configuration

Hey, thanks for this tool, this is great.

However, I'm encountering a config problem.
If I understand correctly, in the README you state that we can define external modules in two ways :

  • defining a script that returns a JSON list of Entry
  • defining a script that returns a list of String and using the transform and cmd properties

That said, I have the following config, trying the first way :

"external": [
        {
            "name": "code",
            "prefix": ">",
            "src": "nu ~/.config/walker/ext_code.nu"
        }
]

and a script that returns a list of JSON entries :

#!/usr/bin/env nu
def main [] {
    ls `~/.config/Code - OSS/User/workspaceStorage/**/workspace.json`
    | each {|f| (
        open --raw $f.name
        | from json
        | update folder {|row| $row.folder | str replace 'file://' '' }
        | insert label {|row| $row.folder | path basename }
        | insert sub {|row| $row.folder }
        | insert exec {|row| 'code-oss ' + $row.folder }
        | insert terminal {|row| false }
        | insert icon {|row| 'com.visualstudio.code.oss' }
        | insert history {|row| true }
        | insert searchable {|row| $row.label | path basename }
    )}
    | to json
    | print
}
[
  {
    "folder": "/home/blitz/.config",
    "label": ".config",
    "sub": "/home/blitz/.config",
    "exec": "code-oss /home/blitz/.config",
    "terminal": false,
    "icon": "com.visualstudio.code.oss",
    "history": true,
    "searchable": ".config"
  }
]

But reading your source code, it seems that most of the Entry properties are ignored or overwritten by the external module.

walker/modules/external.go

Lines 115 to 119 in f8c4eee

for k, v := range entries {
entries[k].Class = e.ModuleName
entries[k].Sub = e.ModuleName
entries[k].Exec = strings.ReplaceAll(e.cmd, "%RESULT%", v.Label)
}

So I have my list displaying (ignoring the custom sub), doing nothing on item selection (no cmd defined, exec ignored).

GTK error?

When I run walker from the terminal I see the following repeated error (every keystroke shows this error again):

ERROR gotk4_gbox_list_get_item: assertion 'index < objects_get_size(&self->items)' failed glib_old_log_api=1 priority=4

I am using the 0.0.44-1 version installed via yay.

no applications?

No applications shown when launching walker

image

yet the other modes works as intended.

I don't get any logs when launching from terminal

Ranking issues

Dolphin is oddly prioritized, and emacs still shows over element when searching for element.

image
image
image

Three options that would greatly improve ranking quality are

  1. Associate which strings are used to open which programs, e.g. "el" goes to "Element" over "Emacs" even if emacs is used far more often
  2. Increase weighting of connected characters in the search results ("em" in "EMacs" over "em" in "filE Manager")
  3. Increase weighting of the first connected string of characters more than subsequent ones ("l" goes to "Libreoffice" over "doLphin")

Move nix files into a nix directory

The top level directory is getting quite cluttered with nix files. Even more so if my module pr gets merged.
It may make sense to move more files into a nix/ directory.

One downside i can see is that having the default.nix (for the package) and the shell.nix for developing inside the nix folder would make it more cumbersome for non flake users.
However, this repo is only packaged in flakes at the moment so most/all of the people that would utilize these files can do so through the flake.

As @diniamo is the one who implemented all the nix things until now he might have an opinion about this.

Walker won't run apps if runAsService = true;

I'm on nixOS, I installed walker using the homemanager module;
I have three different scenarios:

  • Launch walker normally, everything works as expected;
  • Launch walker as service walker --gapplication-service, same as above, works fine and speeds up following launches
  • Launch walker as service programs.walker.runAsService = true;, walker manages to open just fine, but when trying to launch something it returns terminal is not set and doesn't do anything, I am able to continue scrolling through the entries without the possibility to run it. Killing the service and running it again with walker --gapplication-service works fine.

Alternative keybinds

Would be cool if the up/down arrow keys and tab/shift+tab worked in addition to Ctrl+J/K

Panic if ssh known_hosts file does not exist

Walker currently panics with the following error if the ssh known_hosts file does not exist:

panic: open /home/tepri/.ssh/known_hosts: no such file or directory [recovered] panic: closure error: unexpected panic caught: open /home/tepri/.ssh/known_hosts: no such file or directory

I store my file in a different location (~/.config/ssh/known_hosts), some users may not use ssh at all.

Lockfile breaks walker options

When walker --help is used it becomes impossible to use walker again without manually removing /tmp/walker.lock. Suggested fix:

  • Don't create a lockfile for options like --help
  • If there is a lockfile, users should still be able to use options like --help

alternative AM key

I think it would be great to be able to use an alternative AM key, whether that be multiple options or just the option to use alt instead of control.

My muscle memory currently has me pressing control + A to select my search text and replace it, which is causing me to open apps by accident.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.