parent
f40385ae65
commit
5c6773d87a
@ -0,0 +1,38 @@
|
||||
# AUR:
|
||||
|
||||
We have packaged `swhkd-git`. `swhkd-bin` has been packaged separately by a user of swhkd.
|
||||
|
||||
# Building:
|
||||
|
||||
`swhkd` and `swhks` install to `/usr/local/bin/` by default. You can change this behaviour by editing the [Makefile](../Makefile) variable, `TARGET_DIR`.
|
||||
|
||||
# Dependencies:
|
||||
|
||||
**Runtime:**
|
||||
|
||||
- Policy Kit Daemon ( polkit )
|
||||
- Uinput kernel module
|
||||
- Evdev kernel module
|
||||
|
||||
**Compile time:**
|
||||
|
||||
- git
|
||||
- scdoc (If present, man-pages will be generated)
|
||||
- make
|
||||
- rustup
|
||||
|
||||
# Compiling:
|
||||
|
||||
- `git clone https://github.com/waycrate/swhkd;cd swhkd`
|
||||
- `make setup`
|
||||
- `make clean`
|
||||
- `make` for a musl compile.
|
||||
- `make glibc` for a glibc compile.
|
||||
- `sudo make install`
|
||||
|
||||
# Running:
|
||||
|
||||
```
|
||||
swhks &
|
||||
pkexec swhkd
|
||||
```
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<action id="com.github.swhkd.pkexec">
|
||||
<message>Authentication is required to run Simple Wayland Hotkey Daemon</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/sohkd</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
@ -1,28 +0,0 @@
|
||||
# Install
|
||||
|
||||
`sohkd` and `sohks` install to `/usr/local/bin/` by default. You can change this behaviour by editing the [Makefile](../Makefile) variable, `TARGET_DIR`.
|
||||
|
||||
# Dependencies:
|
||||
|
||||
## Runtime:
|
||||
|
||||
* Policy Kit Daemon (polkit)
|
||||
|
||||
## Compile time:
|
||||
|
||||
* rustup
|
||||
* make
|
||||
|
||||
# Compiling:
|
||||
|
||||
* `git clone https://github.com/waycrate/sohkd;cd sohkd`
|
||||
* `make setup`
|
||||
* `make clean`
|
||||
* `make` for a musl compile.
|
||||
* `make glibc` for a glibc compile.
|
||||
* `sudo make install`
|
||||
|
||||
# Running:
|
||||
|
||||
`sohks`
|
||||
`pkexec sohkd`
|
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 31 KiB |
@ -1,26 +0,0 @@
|
||||
# This goes in /etc/sohkd/sohkdrc
|
||||
# ! = consume key
|
||||
# [XYZ] = only in mode XYZ; if not mode is specified, the hotkey is *always* used
|
||||
|
||||
! + [browse] + h
|
||||
sohkctl "nextInTree" "role=Header"
|
||||
! + [browse] + k
|
||||
sohkctl "nextInTree" "role=Link"
|
||||
! + [browse] + b
|
||||
sohkctl "nextInTree" "role=Button"
|
||||
! + [browse] + t
|
||||
sohkctl "nextInTree" "role=Table"
|
||||
! + [browse] + Shift + h
|
||||
sohkctl "prevInTree" "role=Header"
|
||||
! + [browse] + Shift + k
|
||||
sohkctl "prevInTree" "role=Link"
|
||||
! + [browse] + Shift + b
|
||||
sohkctl "prevInTree" "role=Button"
|
||||
! + [browse] + Shift + t
|
||||
sohkctl "prevInTree" "role=Table"
|
||||
|
||||
! + super + b
|
||||
sohkmc "browse" "browse mode"
|
||||
|
||||
! + super + f
|
||||
sohkmc "focus" "focus mode"
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,174 @@
|
||||
swhkd(5) "github.com/waycrate/swhkd" "File Formats Manual"
|
||||
|
||||
# NAME
|
||||
|
||||
swhkd - Hotkey daemon inspired by sxhkd written in rust
|
||||
|
||||
# VALID MODIFIERS
|
||||
|
||||
- Ctrl
|
||||
- Control
|
||||
- Super
|
||||
- Mod4
|
||||
- Alt
|
||||
- Mod1
|
||||
- Shift
|
||||
|
||||
# VALID KEYS
|
||||
- q
|
||||
- w
|
||||
- e
|
||||
- r
|
||||
- t
|
||||
- y
|
||||
- u
|
||||
- i
|
||||
- o
|
||||
- p
|
||||
- a
|
||||
- s
|
||||
- d
|
||||
- f
|
||||
- g
|
||||
- h
|
||||
- j
|
||||
- k
|
||||
- l
|
||||
- z
|
||||
- x
|
||||
- c
|
||||
- v
|
||||
- b
|
||||
- n
|
||||
- m
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- 0
|
||||
- escape
|
||||
- backspace
|
||||
- capslock
|
||||
- return
|
||||
- enter
|
||||
- tab
|
||||
- space
|
||||
- plus
|
||||
- kp0
|
||||
- kp1
|
||||
- kp2
|
||||
- kp3
|
||||
- kp4
|
||||
- kp5
|
||||
- kp6
|
||||
- kp7
|
||||
- kp8
|
||||
- kp9
|
||||
- kpasterisk
|
||||
- kpcomma
|
||||
- kpdot
|
||||
- kpenter
|
||||
- kpequal
|
||||
- kpjpcomma
|
||||
- kpleftparen
|
||||
- kpminus
|
||||
- kpplusminus
|
||||
- kprightparen
|
||||
- minus
|
||||
- -
|
||||
- equal
|
||||
- =
|
||||
- grave
|
||||
- `
|
||||
- print
|
||||
- volumeup
|
||||
- xf86audioraisevolume
|
||||
- volumedown
|
||||
- xf86audiolowervolume
|
||||
- mute
|
||||
- xf86audiomute
|
||||
- brightnessup
|
||||
- xf86monbrightnessup
|
||||
- brightnessdown
|
||||
- xf86audiomedia
|
||||
- xf86audiomicmute
|
||||
- micmute
|
||||
- xf86audionext
|
||||
- xf86audioplay
|
||||
- xf86audioprev
|
||||
- xf86audiostop
|
||||
- xf86monbrightnessdown
|
||||
- ,
|
||||
- comma
|
||||
- .
|
||||
- dot
|
||||
- period
|
||||
- /
|
||||
- question
|
||||
- slash
|
||||
- backslash
|
||||
- leftbrace
|
||||
- [
|
||||
- bracketleft
|
||||
- rightbrace
|
||||
- ]
|
||||
- bracketright
|
||||
- ;
|
||||
- scroll_lock
|
||||
- semicolon
|
||||
- '
|
||||
- apostrophe
|
||||
- left
|
||||
- right
|
||||
- up
|
||||
- down
|
||||
- pause
|
||||
- home
|
||||
- delete
|
||||
- insert
|
||||
- end
|
||||
- pause
|
||||
- prior
|
||||
- next
|
||||
- pagedown
|
||||
- pageup
|
||||
- f1
|
||||
- f2
|
||||
- f3
|
||||
- f4
|
||||
- f5
|
||||
- f6
|
||||
- f7
|
||||
- f8
|
||||
- f9
|
||||
- f10
|
||||
- f11
|
||||
- f12
|
||||
- f13
|
||||
- f14
|
||||
- f15
|
||||
- f16
|
||||
- f17
|
||||
- f18
|
||||
- f19
|
||||
- f20
|
||||
- f21
|
||||
- f22
|
||||
- f23
|
||||
- f24
|
||||
|
||||
# AUTHORS
|
||||
|
||||
Maintained by Shinyzenith <aakashsensharma@gmail.com>, EdenQwQ <lsahlm1eden@gmail.com>, and Angelo Fallaria <ba.fallaria@gmail.com>.
|
||||
For more information about development, see <https://github.com/waycrate/swhkd>.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
- *swhkd(1)*
|
||||
- *swhkd(5)*
|
||||
- *swhks(1)*
|
@ -0,0 +1,157 @@
|
||||
.\" Generated by scdoc 1.11.2
|
||||
.\" Complete documentation for this program is not available as a GNU info page
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.nh
|
||||
.ad l
|
||||
.\" Begin generated content:
|
||||
.TH "swhkd" "1" "2022-08-14" "github.com/shinyzenith/swhkd" "General Commands Manual"
|
||||
.P
|
||||
.SH NAME
|
||||
.P
|
||||
swhkd - Hotkey daemon inspired by sxhkd written in rust
|
||||
.P
|
||||
.SH SYNOPSIS
|
||||
.P
|
||||
\fBpkexec swhkd\fR [\fIflags\fR]
|
||||
.P
|
||||
.SH CONFIG FILE
|
||||
.P
|
||||
The config file goes in \fB/etc/swhkd/swhkdrc\fR.\& Since swhkd is written with a pkexec privilege escalation model in mind, we can'\&t detect
|
||||
\fB$XDG_CONFIG_HOME\fR.\&
|
||||
.P
|
||||
This can be avoided as such:
|
||||
.RS 4
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
Using the \fBinclude\fR statement in your config file.\&
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
Using the \fB-c\fR flag to mention a custom config file at runtime.\&
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
Symlinking the config file from \fB~/.\&config/swhkd/swhkdrc\fR or any other directory of choice to \fB/etc/swhkd/swhkdrc\fR.\&
|
||||
|
||||
.RE
|
||||
.P
|
||||
.RE
|
||||
More about the config file syntax in `swhkd(5)`
|
||||
.P
|
||||
.SH OPTIONS
|
||||
.P
|
||||
\fB-h\fR, \fB--help\fR
|
||||
.RS 4
|
||||
Print help message and quit.\&
|
||||
.P
|
||||
.RE
|
||||
\fB-V\fR, \fB--version\fR
|
||||
.RS 4
|
||||
Print version information.\&
|
||||
.P
|
||||
.RE
|
||||
\fB-c\fR, \fB--config\fR <CONFIG_FILE_PATH>
|
||||
.RS 4
|
||||
Set a custom config file path.\&
|
||||
.P
|
||||
.RE
|
||||
\fB-C\fR, \fB--cooldown\fR <COOLDOWN_IN_MS>
|
||||
.RS 4
|
||||
Set a custom repeat cooldown duration.\& Default is 250ms.\& Most wayland
|
||||
compositors handle this server side however, either way works.\&
|
||||
.P
|
||||
.RE
|
||||
\fB-d\fR, \fB--debug\fR
|
||||
.RS 4
|
||||
Enable debug mode.\&
|
||||
.P
|
||||
.RE
|
||||
\fB-D, --device\fR <DEVICE_NAME>
|
||||
.RS 4
|
||||
Manually set the keyboard devices to use.\& Can occur multiple times.\&
|
||||
.P
|
||||
.RE
|
||||
.SH SIGNALS
|
||||
.P
|
||||
.RS 4
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
Reload config file: `sudo pkill -HUP swhkd`
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
Pause Hotkey checking: `sudo pkill -USR1 swhkd`
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
Resume key checking: `sudo pkill -USR2 swhkd`
|
||||
|
||||
.RE
|
||||
.P
|
||||
.RE
|
||||
.SH AUTHORS
|
||||
.P
|
||||
Maintained by Shinyzenith <aakashsensharma@gmail.\&com>, EdenQwQ <lsahlm1eden@gmail.\&com>, and Angelo Fallaria <ba.\&fallaria@gmail.\&com>.\&
|
||||
For more information about development, see <https://github.\&com/waycrate/swhkd>.\&
|
||||
.P
|
||||
.SH SEE ALSO
|
||||
.P
|
||||
.RS 4
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhkd(5)\fR
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhkd-keys(5)\fR
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhks(1)\fR
|
||||
.RE
|
@ -0,0 +1,59 @@
|
||||
swhkd(1) "github.com/shinyzenith/swhkd" "General Commands Manual"
|
||||
|
||||
# NAME
|
||||
|
||||
swhkd - Hotkey daemon inspired by sxhkd written in rust
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
*pkexec swhkd* [_flags_]
|
||||
|
||||
# CONFIG FILE
|
||||
|
||||
The config file goes in */etc/swhkd/swhkdrc*. Since swhkd is written with a pkexec privilege escalation model in mind, we can't detect
|
||||
*$XDG_CONFIG_HOME*.
|
||||
|
||||
This can be avoided as such:
|
||||
- Using the *include* statement in your config file.
|
||||
- Using the *-c* flag to mention a custom config file at runtime.
|
||||
- Symlinking the config file from *~/.config/swhkd/swhkdrc* or any other directory of choice to */etc/swhkd/swhkdrc*.
|
||||
|
||||
More about the config file syntax in `swhkd(5)`
|
||||
|
||||
# OPTIONS
|
||||
|
||||
*-h*, *--help*
|
||||
Print help message and quit.
|
||||
|
||||
*-V*, *--version*
|
||||
Print version information.
|
||||
|
||||
*-c*, *--config* <CONFIG_FILE_PATH>
|
||||
Set a custom config file path.
|
||||
|
||||
*-C*, *--cooldown* <COOLDOWN_IN_MS>
|
||||
Set a custom repeat cooldown duration. Default is 250ms. Most wayland
|
||||
compositors handle this server side however, either way works.
|
||||
|
||||
*-d*, *--debug*
|
||||
Enable debug mode.
|
||||
|
||||
*-D, --device* <DEVICE_NAME>
|
||||
Manually set the keyboard devices to use. Can occur multiple times.
|
||||
|
||||
# SIGNALS
|
||||
|
||||
- Reload config file: `sudo pkill -HUP swhkd`
|
||||
- Pause Hotkey checking: `sudo pkill -USR1 swhkd`
|
||||
- Resume key checking: `sudo pkill -USR2 swhkd`
|
||||
|
||||
# AUTHORS
|
||||
|
||||
Maintained by Shinyzenith <aakashsensharma@gmail.com>, EdenQwQ <lsahlm1eden@gmail.com>, and Angelo Fallaria <ba.fallaria@gmail.com>.
|
||||
For more information about development, see <https://github.com/waycrate/swhkd>.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
- *swhkd(5)*
|
||||
- *swhkd-keys(5)*
|
||||
- *swhks(1)*
|
@ -0,0 +1,186 @@
|
||||
.\" Generated by scdoc 1.11.2
|
||||
.\" Complete documentation for this program is not available as a GNU info page
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.nh
|
||||
.ad l
|
||||
.\" Begin generated content:
|
||||
.TH "swhkd" "5" "2022-08-14" "github.com/waycrate/swhkd" "File Formats Manual"
|
||||
.P
|
||||
.SH NAME
|
||||
.P
|
||||
swhkd - Hotkey daemon inspired by sxhkd written in rust
|
||||
.P
|
||||
.SH CONFIG FILE
|
||||
.P
|
||||
.RS 4
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
A global config can be defined in \fB/etc/swhkd/swhkdrc\fR.\& Swhkd attempts to look in your \fB$XDG_CONFIG_HOME\fR, failing which it defaults to \fB~/.\&config\fR.\&
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
A local config overrides the global one.\& Local configs should be placed in the root of the project.\&
|
||||
|
||||
.RE
|
||||
.P
|
||||
.RE
|
||||
.SH SYNTAX
|
||||
.P
|
||||
Each line of the configuration file is interpreted as so:
|
||||
.RS 4
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
If it is empty or starts with #, it is ignored.\&
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
If it starts with a space, it is read as a command.\&
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
Otherwise, it is read as a hotkey.\&
|
||||
|
||||
.RE
|
||||
.P
|
||||
.RE
|
||||
For valid keys and modifiers, check \fBswhkd-keys(5)\fR
|
||||
.P
|
||||
.SH EXAMPLE
|
||||
.P
|
||||
.nf
|
||||
.RS 4
|
||||
# Import another configuration file\&.
|
||||
# NOTE: the path provided must be absolute and not relative such as `~`\&.
|
||||
include /home/YourUserName/\&.config/swhkd/swhkdrc
|
||||
|
||||
ignore alt + print # globally ignore a key binding
|
||||
|
||||
# terminal
|
||||
super + ReTuRn # case insensitive
|
||||
alacritty
|
||||
|
||||
super + shift + enter # enter = return
|
||||
kitty
|
||||
|
||||
# file manager
|
||||
super + shift + f
|
||||
pcmanfm
|
||||
|
||||
# web-browser
|
||||
super + w
|
||||
firefox
|
||||
|
||||
# bspwm
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
||||
super + ctrl + alt + {Left
|
||||
,Down
|
||||
,Up
|
||||
,Right}
|
||||
n=10;
|
||||
{ d1=left; d2=right; dx=-$n; dy=0;
|
||||
, d1=bottom; d2=top; dx=0; dy=$n;
|
||||
, d1=top; d2=bottom; dx=0; dy=-$n;
|
||||
, d1=right; d2=left; dx=$n; dy=0;
|
||||
}
|
||||
bspc node --resize $d1 $dx $dy || bspc node --resize $d2 $dx $dy
|
||||
|
||||
super + {,, \&.}
|
||||
bspc node -f {next\&.local,prev\&.local}
|
||||
|
||||
# screenshot
|
||||
print
|
||||
scrot
|
||||
|
||||
any + print # any represent at least one of the valid modifiers
|
||||
scrot -s
|
||||
|
||||
# Append with @ to run on key-release\&.
|
||||
@super + shift + f
|
||||
pcmanfm
|
||||
|
||||
# Append with ~ to emit the hotkey after the command is triggered\&. Aka, don\&'t swallow the hotkey\&.
|
||||
~super + shift + f
|
||||
pcmanfm
|
||||
|
||||
super + m
|
||||
# commands starting with @ are internal commands\&.
|
||||
# internal commands can be combined with normal commands with \&'&&\&'\&.
|
||||
# \&'@enter\&' pushes a mode into the mode stack and starts listening only the
|
||||
# key bindings defined in that mode
|
||||
@enter music && echo "music" > ~/\&.config/waybar/swhkd-mode
|
||||
|
||||
mode music # use the mode statement to define a mode
|
||||
q
|
||||
# \&'@escape\&' pops the current mode out of the mode stack
|
||||
# the default mode is \&'normal mode\&', which is always on the bottom of the mode
|
||||
# stack and can never be escaped
|
||||
@escape && echo "normal" > ~/\&.config/waybar/swhkd-mode
|
||||
{n, p, space, r, z, y}
|
||||
mpc {next, prev, toggle, repeat, random, single}
|
||||
endmode # use endmode if you want to set more key bindings for normal mode
|
||||
|
||||
.fi
|
||||
.RE
|
||||
.SH AUTHORS
|
||||
.P
|
||||
Maintained by Shinyzenith <aakashsensharma@gmail.\&com>, EdenQwQ <lsahlm1eden@gmail.\&com>, and Angelo Fallaria <ba.\&fallaria@gmail.\&com>.\&
|
||||
For more information about development, see <https://github.\&com/waycrate/swhkd>.\&
|
||||
.P
|
||||
.SH SEE ALSO
|
||||
.P
|
||||
.RS 4
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhkd(1)\fR
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhkd-keys(5)\fR
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhks(1)\fR
|
||||
.RE
|
@ -0,0 +1,106 @@
|
||||
swhkd(5) "github.com/waycrate/swhkd" "File Formats Manual"
|
||||
|
||||
# NAME
|
||||
|
||||
swhkd - Hotkey daemon inspired by sxhkd written in rust
|
||||
|
||||
# CONFIG FILE
|
||||
|
||||
- A global config can be defined in */etc/swhkd/swhkdrc*. Swhkd attempts to look in your *$XDG_CONFIG_HOME*, failing which it defaults to *~/.config*.
|
||||
- A local config overrides the global one. Local configs should be placed in the root of the project.
|
||||
|
||||
# SYNTAX
|
||||
|
||||
Each line of the configuration file is interpreted as so:
|
||||
- If it is empty or starts with #, it is ignored.
|
||||
- If it starts with a space, it is read as a command.
|
||||
- Otherwise, it is read as a hotkey.
|
||||
|
||||
For valid keys and modifiers, check *swhkd-keys(5)*
|
||||
|
||||
# EXAMPLE
|
||||
|
||||
```
|
||||
# Import another configuration file.
|
||||
# NOTE: the path provided must be absolute and not relative such as `~`.
|
||||
include /home/YourUserName/.config/swhkd/swhkdrc
|
||||
|
||||
ignore alt + print # globally ignore a key binding
|
||||
|
||||
# terminal
|
||||
super + ReTuRn # case insensitive
|
||||
alacritty
|
||||
|
||||
super + shift + enter # enter = return
|
||||
kitty
|
||||
|
||||
# file manager
|
||||
super + shift + f
|
||||
pcmanfm
|
||||
|
||||
# web-browser
|
||||
super + w
|
||||
firefox
|
||||
|
||||
# bspwm
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
||||
super + ctrl + alt + {Left\
|
||||
,Down\
|
||||
,Up\
|
||||
,Right}
|
||||
n=10; \
|
||||
{ d1=left; d2=right; dx=-$n; dy=0; \
|
||||
, d1=bottom; d2=top; dx=0; dy=$n; \
|
||||
, d1=top; d2=bottom; dx=0; dy=-$n; \
|
||||
, d1=right; d2=left; dx=$n; dy=0; \
|
||||
} \
|
||||
bspc node --resize $d1 $dx $dy || bspc node --resize $d2 $dx $dy
|
||||
|
||||
super + {\,, .}
|
||||
bspc node -f {next.local,prev.local}
|
||||
|
||||
# screenshot
|
||||
print
|
||||
scrot
|
||||
|
||||
any + print # any represent at least one of the valid modifiers
|
||||
scrot -s
|
||||
|
||||
# Append with @ to run on key-release.
|
||||
@super + shift + f
|
||||
pcmanfm
|
||||
|
||||
# Append with ~ to emit the hotkey after the command is triggered. Aka, don't swallow the hotkey.
|
||||
~super + shift + f
|
||||
pcmanfm
|
||||
|
||||
super + m
|
||||
# commands starting with @ are internal commands.
|
||||
# internal commands can be combined with normal commands with '&&'.
|
||||
# '@enter' pushes a mode into the mode stack and starts listening only the
|
||||
# key bindings defined in that mode
|
||||
@enter music && echo "music" > ~/.config/waybar/swhkd-mode
|
||||
|
||||
mode music # use the mode statement to define a mode
|
||||
q
|
||||
# '@escape' pops the current mode out of the mode stack
|
||||
# the default mode is 'normal mode', which is always on the bottom of the mode
|
||||
# stack and can never be escaped
|
||||
@escape && echo "normal" > ~/.config/waybar/swhkd-mode
|
||||
{n, p, space, r, z, y}
|
||||
mpc {next, prev, toggle, repeat, random, single}
|
||||
endmode # use endmode if you want to set more key bindings for normal mode
|
||||
|
||||
```
|
||||
# AUTHORS
|
||||
|
||||
Maintained by Shinyzenith <aakashsensharma@gmail.com>, EdenQwQ <lsahlm1eden@gmail.com>, and Angelo Fallaria <ba.fallaria@gmail.com>.
|
||||
For more information about development, see <https://github.com/waycrate/swhkd>.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
- *swhkd(1)*
|
||||
- *swhkd-keys(5)*
|
||||
- *swhks(1)*
|
@ -0,0 +1,52 @@
|
||||
.\" Generated by scdoc 1.11.2
|
||||
.\" Complete documentation for this program is not available as a GNU info page
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.nh
|
||||
.ad l
|
||||
.\" Begin generated content:
|
||||
.TH "swhks" "1" "2022-08-14" "github.com/shinyzenith/swhkd" "General Commands Manual"
|
||||
.P
|
||||
.SH NAME
|
||||
.P
|
||||
swhks - Server for swhkd, used to run user level commands over IPC.\&
|
||||
.P
|
||||
.SH SYNOPSIS
|
||||
.P
|
||||
\fBswhks\fR
|
||||
.P
|
||||
.SH AUTHORS
|
||||
.P
|
||||
Maintained by Shinyzenith <aakashsensharma@gmail.\&com>, EdenQwQ <lsahlm1eden@gmail.\&com>, and Angelo Fallaria <ba.\&fallaria@gmail.\&com>.\&
|
||||
For more information about development, see <https://github.\&com/waycrate/swhks>.\&
|
||||
.P
|
||||
.SH SEE ALSO
|
||||
.P
|
||||
.RS 4
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhkd(1)\fR
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhkd(5)\fR
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.IP \(bu 4
|
||||
.\}
|
||||
\fBswhkd-keys(5)\fR
|
||||
.RE
|
@ -0,0 +1,20 @@
|
||||
swhks(1) "github.com/shinyzenith/swhkd" "General Commands Manual"
|
||||
|
||||
# NAME
|
||||
|
||||
swhks - Server for swhkd, used to run user level commands over IPC.
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
*swhks*
|
||||
|
||||
# AUTHORS
|
||||
|
||||
Maintained by Shinyzenith <aakashsensharma@gmail.com>, EdenQwQ <lsahlm1eden@gmail.com>, and Angelo Fallaria <ba.fallaria@gmail.com>.
|
||||
For more information about development, see <https://github.com/waycrate/swhks>.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
- *swhkd(1)*
|
||||
- *swhkd(5)*
|
||||
- *swhkd-keys(5)*
|
@ -0,0 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "stable"
|
Loading…
Reference in new issue