hyprbinds

package module
v0.0.0-...-11db165 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

README

Hyprbinds

Hyprbinds is a little util that shows all keybindings in a simple text table. It can neatly be coupled with fzf like so:

hyprbinds|fzf -e

It is a lot quieter than "hyprkeys", has no options and just does what is asked of it.

Install

Go
go install codeberg.org/slaxor/hyprbinds/cmd/hyprbinds@latest
Arch Linux
cd /tmp
curl -o PKGBUILD https://codeberg.org/slaxor/hyprbinds/raw/branch/master/PKGBUILD
makepkg -si .
# Profit ;)
Your Distro which is probably much better

...see next chapter

Contribution

I don't expect this to be of much interest to anyone but me. But should you dear reader be inclined to take an interest in add or fixing anything. Don't hesitate to fork, branch, code, commit, push and create a pull-request. Or if you notice anything that needs fixing just create an issue.

Disclaimer

This software is provided AS IS with no guarantees for usefulness or even corectness. some development procedures remove file from your filesystem (suppoedly only ones created by said procs, but one never knows). Please check for yourself if it does no harm to you, your pets or your computer.

License

GPL3. A copy of which can be fond in the file COPYING

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToSocket

func ConnectToSocket(socketPath, command string) (net.Conn, error)

ConnectToSocket connects to a Unix socket and sends a command.

Types

type Bind

type Bind struct {
	Modmask    Modmask `json:"modmask"`
	Key        string  `json:"key"`
	Arg        string  `json:"arg"`
	Dispatcher string  `json:"dispatcher"`
}

Bind represents a single bind key and its associated action.

func (Bind) Cmd

func (b Bind) Cmd() string

func (Bind) HotKey

func (b Bind) HotKey() string

func (Bind) String

func (b Bind) String() string

type Binds

type Binds []Bind

BindTable is a collection of Bind structs that can be formatted as a table.

func FetchBinds

func FetchBinds(socketPath string) (Binds, error)

FetchBinds connects to the socket, sends "j/binds", reads the response, and returns it as Binds

func ReadJSON

func ReadJSON(conn io.Reader) (Binds, error)

ReadJSON reads JSON data from a connection and unmarshals it into BindTable.

func (Binds) String

func (bs Binds) String() string

type Modmask

type Modmask uint8

func (Modmask) Modifiers

func (mm Modmask) Modifiers() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL