Skip to content

Commit

Permalink
[chore] Update README.md
Browse files Browse the repository at this point in the history
* Added link to the SXHKD syntax from the official man pages

* Added information about environment variable sourcing
  • Loading branch information
newtoallofthis123 committed Oct 10, 2024
1 parent 671db83 commit 1b5af79
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ After opening `swhkd`, you can control the program through signals:

`swhkd` closely follows `sxhkd` syntax, so most existing `sxhkd` configs should
be functional with `swhkd`.
More information about the sxhkd syntax can be found in the official man pages from the [arch wiki](https://man.archlinux.org/man/sxhkd.1).

The default configuration file is in `~/.config/swhkd/swhkdrc` with a fallback to `etc/swhkd/swhkdrc`.

Expand All @@ -58,6 +59,16 @@ vim-plug with `Plug 'waycrate/swhkd-vim'`.

All supported key and modifier names are listed in `man 5 swhkd-keys`.

## Environment Variables

The environment variables are now sourced using the SWHKS binary, running in the background which are then supplemented
to the command that is to be run, thus emulating the environment variables in the default shell.

The commands are executed via *SHELL -c 'command'*, hence the environment is sourced from the default shell.
If the user wants to use a different set of environment variables, they can set the environment variables
in the default shell or export the environment variables within a logged in instance of their shell before
running the SWHKS binary.

## Autostart

### To autostart `swhkd` you can do one of two things
Expand All @@ -79,7 +90,7 @@ environment variables and sending them to the daemon. The daemon
uses these environment variables while running the shell commands.
The daemon only runs shell commands that have been parsed from the config file and there is no way to
run arbitrary shell commands. The server is responsible for only sending the environment variables to the daemon and nothing else.
This seperation of responsibilities ensures security.
This separation of responsibilities ensures security.

So yes, you're safe!

Expand Down

0 comments on commit 1b5af79

Please sign in to comment.