mirror of
https://github.com/swaywm/sway.git
synced 2024-11-28 19:01:29 +00:00
Small corrections
parent
e7b43ff9ac
commit
42297cb65d
51
Tricks.md
51
Tricks.md
|
@ -123,52 +123,61 @@ save it as `$HOME/bin/tamefox` and add this to your `.config/sway/config`:
|
||||||
# Use space as $mod (when chorded with another key)
|
# Use space as $mod (when chorded with another key)
|
||||||
|
|
||||||
If using Arch Linux, install Interception tools:
|
If using Arch Linux, install Interception tools:
|
||||||
|
```
|
||||||
`pacman -S interception-tools`
|
pacman -S interception-tools
|
||||||
|
```
|
||||||
|
|
||||||
Otherwise follow instructions here: https://gitlab.com/interception/linux/tools
|
Otherwise follow instructions here: https://gitlab.com/interception/linux/tools
|
||||||
|
|
||||||
Also install the space2meta plugin:
|
Also install the space2meta plugin:
|
||||||
|
|
||||||
If using Arch, install from the AUR:
|
If using Arch, install from the AUR:
|
||||||
|
```
|
||||||
`yay -S https://aur.archlinux.org/packages/interception-space2meta`
|
yay -S https://aur.archlinux.org/packages/interception-space2meta
|
||||||
|
```
|
||||||
Otherwise follow instructions here: https://gitlab.com/interception/linux/plugins/space2meta
|
Otherwise follow instructions here: https://gitlab.com/interception/linux/plugins/space2meta
|
||||||
|
|
||||||
Drop this in /etc/interception/udevmon.yaml:
|
Drop this in /etc/interception/udevmon.yaml:
|
||||||
|
|
||||||
`- JOB: intercept -g $DEVNODE | space2meta | uinput -d $DEVNODE`
|
```
|
||||||
`DEVICE:`
|
- JOB: intercept -g $DEVNODE | space2meta | uinput -d $DEVNODE
|
||||||
`EVENTS:`
|
DEVICE:
|
||||||
`EV_KEY: [KEY_SPACE]`
|
EVENTS:
|
||||||
|
EV_KEY: [KEY_SPACE]
|
||||||
|
```
|
||||||
|
|
||||||
Create a systemd service file with the following content:
|
Create a systemd service file with the following content:
|
||||||
|
|
||||||
`[Unit]`
|
```
|
||||||
`Description=Monitor input devices for launching tasks`
|
[Unit]
|
||||||
`Wants=systemd-udev-settle.service`
|
Description=Monitor input devices for launching tasks
|
||||||
`After=systemd-udev-settle.service`
|
Wants=systemd-udev-settle.service
|
||||||
`Documentation=man:udev(7)`
|
After=systemd-udev-settle.service
|
||||||
|
Documentation=man:udev(7)
|
||||||
|
|
||||||
`[Service]`
|
[Service]
|
||||||
`ExecStart=/usr/bin/udevmon -c /etc/interception/udevmon.yaml`
|
ExecStart=/usr/bin/udevmon -c /etc/interception/udevmon.yaml
|
||||||
`Nice=-20`
|
Nice=-20
|
||||||
`Restart=on-failure`
|
Restart=on-failure
|
||||||
`OOMScoreAdjust=-1000`
|
OOMScoreAdjust=-1000
|
||||||
|
|
||||||
`[Install]`
|
[Install]
|
||||||
`WantedBy=multi-user.target`
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
(Taken from: https://gitlab.com/interception/linux/tools/-/blob/master/udevmon.service)
|
(Taken from: https://gitlab.com/interception/linux/tools/-/blob/master/udevmon.service)
|
||||||
|
|
||||||
Enable the service:
|
Enable the service:
|
||||||
|
|
||||||
|
```
|
||||||
sudo systemctl enable udevmon.service
|
sudo systemctl enable udevmon.service
|
||||||
|
```
|
||||||
|
|
||||||
Start the service:
|
Start the service:
|
||||||
|
|
||||||
|
```
|
||||||
sudo systemctl start udevmon
|
sudo systemctl start udevmon
|
||||||
|
```
|
||||||
|
|
||||||
The space key should now behave as the Super/Windows/Mod4 key when held and combined with another key.
|
The space key should now behave as the Super/Windows/Mod4 key when held and combined with another key.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue