Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new page on popular configuration options #56

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 203 additions & 0 deletions src/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# Configuration

This document contains some popular settings that you may wish to adopt.

## General

### Enable Dropshadows

```
<theme>
<dropShadows>yes</dropShadows>
</theme>
```

### Enable automatic window placement policy

```
<placement>
<policy>automatic</policy>
</placement>
```

## Window Switcher

### Show windows regardless of what workspace they are on

```
<windowSwitcher>
<allWorkspaces>yes</allWorkspaces>
</windowSwitcher>
```

## Keybinds

### Unbind alt + arrow

...because they interfere with brower forward/backward binds

```
<keybind key="A-Right"/>
<keybind key="A-Left"/>
<keybind key="A-Up"/>
<keybind key="A-Down"/>
```

### Lock Session

```
<keybind key="W-l" name.action="Execute" command.action="swaylock -c 000000"/>
```

### Bind Super to a Menu

Supported since `0.7.3`

```
<keybind key="Super_L" onRelease="yes">
<action name="Execute" command="rofi -show drun"/>
</keybind>
```

### Take Screenshot

```
<keybind key="Print">
<action name="Execute">
<command>sh -c 'grim -g "$(slurp)"'</command>
</action>
</keybind>
```

### Screen Record

```
<keybind key="W-F7" name.action="Execute" command.action="wf-recorder --output eDP-1"/>
<keybind key="W-F8" name.action="Execute" command.action="killall SIGINT wf-recorder"/>
```

### Alt-Tab Backwards

```
<keybind key="S-A-Tab" name.action="PreviousWindow"/>
```

### MoveToEdge, ShrinkToEdge and GrowToEdge

```
<keybind key="W-Left">
<action name="MoveToEdge" direction="left" snapWindows="true"/>
</keybind>
<keybind key="W-Right">
<action name="MoveToEdge" direction="right" snapWindows="true"/>
</keybind>
<keybind key="W-Up">
<action name="MoveToEdge" direction="up" snapWindows="true"/>
</keybind>
<keybind key="W-Down">
<action name="MoveToEdge" direction="down" snapWindows="true"/>
</keybind>
<keybind key="W-S-Left">
<action name="ShrinkToEdge" direction="left"/>
</keybind>
<keybind key="W-S-Right">
<action name="GrowToEdge" direction="right"/>
</keybind>
<keybind key="W-S-Up">
<action name="ShrinkToEdge" direction="up"/>
</keybind>
<keybind key="W-S-Down">
<action name="GrowToEdge" direction="down"/>
</keybind>
```

### SnapToEdge

```
<keybind key="C-W-Left">
<action name="SnapToEdge" direction="left"/>
</keybind>
<keybind key="C-W-Right">
<action name="SnapToEdge" direction="right"/>
</keybind>
<keybind key="C-W-Up">
<action name="SnapToEdge" direction="up"/>
</keybind>
<keybind key="C-W-Down">
<action name="SnapToEdge" direction="down"/>
</keybind>
```

## Mousebinds

### Unfosus all windows when clicking on desktop

This relates to `Desktop` in the sense of a layer-shell client such as `swaybg`
which does not receive mouse-events.

Note: Clients such as `xfdesktop` and `pcmanfm --desktop` behave like this
anyway.

```
<context name="Root">
<mousebind button="Left" action="Press">
<action name="Unfocus"/>
</mousebind>
</context>
```

### Directional maximize

```
<context name="Top">
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximize" direction="vertical"/>
</mousebind>
</context>
<context name="Bottom">
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximize" direction="vertical"/>
</mousebind>
</context>
<context name="Left">
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximize" direction="horizontal"/>
</mousebind>
</context>
<context name="Right">
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximize" direction="horizontal"/>
</mousebind>
</context>
```

### Magnification

Supported since `0.7.3`

```
<context name="All">
<mousebind direction="W-Up" action="Scroll">
<action name="ZoomIn"/>
</mousebind>
<mousebind direction="W-Down" action="Scroll">
<action name="ZoomOut"/>
</mousebind>
</context>
```

### Switch workspace with super + scroll

Supported since `0.7.3`

```
<context name="All">
<mousebind direction="W-Up" action="Scroll">
<action name="GoToDesktop" to="right"/>
</mousebind>
<mousebind direction="W-Down" action="Scroll">
<action name="GoToDesktop" to="left"/>
</mousebind>
</context>
```

1 change: 1 addition & 0 deletions src/more.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [configuration](configuration.html)
- [troubleshooting](troubleshooting.html)
- [tips and tricks](tips-and-tricks.html)
- [hidpi scaling](hidpi-scaling.html)
Expand Down