diff --git a/Makefile b/Makefile deleted file mode 100644 index 8a9908e..0000000 --- a/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -DAEMON_BINARY := sohkd -SERVER_BINARY := sohks -CONTROL_BINARY := sohkctl -MODE_CHANGE_BINARY := sohkmc -BUILDFLAGS := --release -UDEV_DIR := /etc/udev/rules.d/ -UDEV_RULE := sohkd.rules -TARGET_DIR := /usr/bin - -all: build - -build: - @cargo build $(BUILDFLAGS) --target=x86_64-unknown-linux-musl - @cp ./target/x86_64-unknown-linux-musl/release/$(DAEMON_BINARY) ./bin/$(DAEMON_BINARY) - @cp ./target/x86_64-unknown-linux-musl/release/$(SERVER_BINARY) ./bin/$(SERVER_BINARY) - -glibc: - @cargo build $(BUILDFLAGS) - @cp ./target/release/$(DAEMON_BINARY) ./bin/$(DAEMON_BINARY) - @cp ./target/release/$(SERVER_BINARY) ./bin/$(SERVER_BINARY) - @cp ./target/release/$(CONTROL_BINARY) ./bin/$(CONTROL_BINARY) - -install: - @mkdir -p $(TARGET_DIR) - @mkdir -p $(UDEV_DIR) - @mkdir -p /etc/$(DAEMON_BINARY) - @touch /etc/$(DAEMON_BINARY)/$(DAEMON_BINARY)rc - @cp ./bin/$(DAEMON_BINARY) $(TARGET_DIR) - @cp ./bin/$(SERVER_BINARY) $(TARGET_DIR) - @cp ./bin/$(CONTROL_BINARY) $(TARGET_DIR) - @cp ./bin/$(CHANGE_MODE_BINARY) $(TARGET_DIR) - @cp ./$(UDEV_RULE) $(UDEV_DIR)/$(UDEV_RULE) - @chmod +x $(TARGET_DIR)/$(DAEMON_BINARY) - @chmod +x $(TARGET_DIR)/$(SERVER_BINARY) - @chmod +x $(TARGET_DIR)/$(CONTROL_BINARY) - @chmod +x $(TARGET_DIR)/$(CHANGE_MODE_BINARY) - -uninstall: - @rm $(TARGET_DIR)/$(SERVER_BINARY) - @rm $(TARGET_DIR)/$(DAEMON_BINARY) - @rm $(TARGET_DIR)/$(CONTROL_BINARY) - @rm $(TARGET_DIR)/$(CHANGE_MODE_BINARY) - @rm $(UDEV_DIR)/$(UDEV_RULE) - -check: - @cargo fmt - @cargo check --target=x86_64-unknown-linux-musl - -clean: - @cargo clean - -setup: - @mkdir -p ./bin - @rustup install stable - @rustup default stable - @rustup target add x86_64-unknown-linux-musl - -.PHONY: check clean setup all install build glibc diff --git a/README.md b/README.md index f0577ad..28cb18e 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,78 @@ -# SOHKD +
+ -**S**imple **O**dilia **H**ot**K**ey **D**aemon +
A next-generation hotkey daemon for Wayland/X11 written in Rust.
-*A next-generation hotkey daemon for Wayland/X11 written in Rust.* + + -sohkd is a display protocol-independent hotkey daemon made in Rust (based off the original, [swhkd](https://waycrate.github.io/swhkd/)). sohkd uses an easy-to-use configuration system inspired by swhkd so you can easily add or remove hotkeys, and it integrates with the [Odilia screen reader](https://odilia.app) to provide modal access to key bindings. +## SWHKD: -Because sohkd can be used anywhere, the same sohkd config can be used across Xorg or Wayland desktops, and you can even use sohkd in a tty. +**S**imple **W**ayland **H**ot**K**ey **D**aemon -**Note: The project is a WIP.** +swhkd is a display protocol-independent hotkey daemon made in Rust. swhkd uses an easy-to-use configuration system inspired by sxhkd so you can easily add or remove hotkeys. -**BUT!! It does work right now [Example config file](./docs/sohkdrc).** +It also attempts to be a drop-in replacement for sxhkd, meaning your sxhkd config file is also compatible with swhkd. -## Installation +Because swhkd can be used anywhere, the same swhkd config can be used across Xorg or Wayland desktops, and you can even use swhkd in a tty. -See [INSTALL.md](./docs/INSTALL.md) for installing sohkd. +## Installation and Building: + +[Installation and building instructions can be found here.](./INSTALL.md) ## Running: -```bash -sohks & -sohkd -``` -To refresh the config at runtime, make a script like so: ```bash -#!/bin/sh -killall sohkd -sohkd +swhks & +pkexec swhkd ``` -Mark it as executable using `chmod +x