Code Monkey home page Code Monkey logo

keyb's People

Contributors

dependabot[bot] avatar epixman avatar kencx avatar mfgbhatti avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

keyb's Issues

Keyboard input with xdotool

xdotool can simulate keystrokes from stdin.

Although untested, perhaps keyb could start in a special mode where any selection could be piped into xdotool to simulate the keystroke:

$ keyb --xdotool | xdotool key

like how fzf is often used.

Questions related to the config

I test keyboarders since a week and this is certainly a great tool event in its first stages.

I'm on macos with no declared XGD variables and as a result, after installation the source file to add keybindings is at the following directory : $HOME/Library/Application Support/keyb/keyb.yml

I have two questions :

  • there is no config.yml file in this folder, should I create one there to set various UI elements ?
  • would it not be a good idea to display the kb by alphabetical order by default ?

Thanks for the excellent work keyb has already its own keybinding to open it in a tmux popup and send the "/" key to query for a keybinding

issue when building

go build -go build -ldflags "-s -w -X main.version=v0.3.0-7-g1a92895" -o keyb
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
# github.com/rivo/uniseg
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:137:20: error: expected ‘(’
  137 | func propertySearch[E interface{ [3]int | [4]int }](dictionary []E, r rune) (result E) {
      |                    ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:137:23: error: expected ‘]’
  137 | func propertySearch[E interface{ [3]int | [4]int }](dictionary []E, r rune) (result E) {
      |                       ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:137:23: error: expected ‘;’ or newline after top level declaration
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:140:9: error: expected declaration
  140 |         to := len(dictionary)
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:141:9: error: expected declaration
  141 |         for to > from {
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:143:17: error: expected declaration
  143 |                 cpRange := dictionary[middle]
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:144:17: error: expected declaration
  144 |                 if int(r) < cpRange[0] {
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:146:25: error: expected declaration
  146 |                         continue
      |                         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:147:17: error: expected declaration
  147 |                 }
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:148:17: error: expected declaration
  148 |                 if int(r) > cpRange[1] {
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:150:25: error: expected declaration
  150 |                         continue
      |                         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:151:17: error: expected declaration
  151 |                 }
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:152:17: error: expected declaration
  152 |                 return cpRange
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:153:9: error: expected declaration
  153 |         }
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:154:9: error: expected declaration
  154 |         return
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:155:1: error: expected declaration
  155 | }
      | ^
make: *** [Makefile:29: build] Error 2 "-s -w -X main.version=v0.3.0-7-g1a92895" -o keyb
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
# github.com/rivo/uniseg
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:137:20: error: expected ‘(’
  137 | func propertySearch[E interface{ [3]int | [4]int }](dictionary []E, r rune) (result E) {
      |                    ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:137:23: error: expected ‘]’
  137 | func propertySearch[E interface{ [3]int | [4]int }](dictionary []E, r rune) (result E) {
      |                       ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:137:23: error: expected ‘;’ or newline after top level declaration
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:140:9: error: expected declaration
  140 |         to := len(dictionary)
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:141:9: error: expected declaration
  141 |         for to > from {
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:143:17: error: expected declaration
  143 |                 cpRange := dictionary[middle]
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:144:17: error: expected declaration
  144 |                 if int(r) < cpRange[0] {
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:146:25: error: expected declaration
  146 |                         continue
      |                         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:147:17: error: expected declaration
  147 |                 }
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:148:17: error: expected declaration
  148 |                 if int(r) > cpRange[1] {
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:150:25: error: expected declaration
  150 |                         continue
      |                         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:151:17: error: expected declaration
  151 |                 }
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:152:17: error: expected declaration
  152 |                 return cpRange
      |                 ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:153:9: error: expected declaration
  153 |         }
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:154:9: error: expected declaration
  154 |         return
      |         ^
../go/pkg/mod/github.com/rivo/[email protected]/properties.go:155:1: error: expected declaration
  155 | }
      | ^
make: *** [Makefile:29: build] Error 2

> 

homebrew support

I like to manage my packages with homebrew.
Fragmenting my packages over different sources is less ideal.
With 1 package manager, I can easily switch computers, or get a list of what I have installed.

Pick up config file from $XDG_CONFIG_HOME if set

I'm on a Mac, but use the XDG dirs.
A lot of apps use these directories even though its not the default mac location.
My suggestion is to use the XDG_CONFIG_HOME env var if it exists and if not fallback to ~/.config.
If that also doesn't exist, you can fallback to Application Support.
I've seen that I can use the --config flag but that means I have to use the app with an alias.

More color configurations

I'd like to be able to change the colors of:

  • The titles of sections (defined as top level - name: "title")
  • The name of a keybinding
  • The separator (default to ;)
  • The keybinding itself

Key Remapping

xremap and keyd are two examples of key remapping tools in Linux.

Both utilize a simple configuration file to declaratively define remapped keys. It would be nice if keyb could export its own keybinds to a xremap or keyd configuration file like so:

$ keyb --export-xremap > ~/.config/xremap/config.yml

Clearing display on clear

Is it possible to clear the command display after closing it? Whenever I leave it, it just remains above my prompt which is not the best.

If it's possible to implement some way of either having it open its own container, or clearing its output when you exit that would be amazing

Don't prefill config files

keyb creates a default config file that contains prefilled configuration. If a new configuration key is added in the future or an existing one is modified, users can easily miss them if they don't read the release notes.

Instead, create a default file in the same location pointing to the documentation.

Reference

Ampersand as a key breaks things

Setting an entry with an & as the key breaks the loading of the keymap. You can escape it with &, but the slash shows up in the key display.

Allow keyb to read config files in a directory

keyb should be able to read multiple config files in a given directory.

Things to note:

  • Handle duplicate keys for the same program in multiple files
  • Don't read and parse non-keyb config files

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.