|
| 1 | +# Configuration |
| 2 | + |
| 3 | +This document contains some popular settings that you may wish to adopt. |
| 4 | + |
| 5 | +## General |
| 6 | + |
| 7 | +### Enable Dropshadows |
| 8 | + |
| 9 | +``` |
| 10 | +<theme> |
| 11 | + <dropShadows>yes</dropShadows> |
| 12 | +</theme> |
| 13 | +``` |
| 14 | + |
| 15 | +### Enable automatic window placement policy |
| 16 | + |
| 17 | +``` |
| 18 | +<placement> |
| 19 | + <policy>automatic</policy> |
| 20 | +</placement> |
| 21 | +``` |
| 22 | + |
| 23 | +## Window Switcher |
| 24 | + |
| 25 | +### Show windows regardless of what workspace they are on |
| 26 | + |
| 27 | +``` |
| 28 | +<windowSwitcher> |
| 29 | + <allWorkspaces>yes</allWorkspaces> |
| 30 | +</windowSwitcher> |
| 31 | +``` |
| 32 | + |
| 33 | +## Keybinds |
| 34 | + |
| 35 | +### Lock Session |
| 36 | + |
| 37 | +``` |
| 38 | +<keybind key="W-l" name.action="Execute" command.action="swaylock -c 000000"/> |
| 39 | +``` |
| 40 | + |
| 41 | +### Bind Super to a Menu |
| 42 | + |
| 43 | +Supported since `0.7.3` |
| 44 | + |
| 45 | +``` |
| 46 | +<keybind key="Super_L" onRelease="yes"> |
| 47 | + <action name="Execute" command="rofi -show drun"/> |
| 48 | +</keybind> |
| 49 | +``` |
| 50 | + |
| 51 | +### Take Screenshot |
| 52 | + |
| 53 | +``` |
| 54 | +<keybind key="Print"> |
| 55 | + <action name="Execute"> |
| 56 | + <command>sh -c 'grim -g "$(slurp)"'</command> |
| 57 | + </action> |
| 58 | +</keybind> |
| 59 | +``` |
| 60 | + |
| 61 | +### Screen Record |
| 62 | + |
| 63 | +``` |
| 64 | +<keybind key="W-F7" name.action="Execute" command.action="wf-recorder --output eDP-1"/> |
| 65 | +<keybind key="W-F8" name.action="Execute" command.action="killall SIGINT wf-recorder"/> |
| 66 | +``` |
| 67 | + |
| 68 | +### Alt-Tab Backwards |
| 69 | + |
| 70 | +``` |
| 71 | +<keybind key="S-A-Tab" name.action="PreviousWindow"/> |
| 72 | +``` |
| 73 | + |
| 74 | +### MoveToEdge, ShrinkToEdge and GrowToEdge |
| 75 | + |
| 76 | +``` |
| 77 | +<keybind key="W-Left"> |
| 78 | + <action name="MoveToEdge" direction="left" snapWindows="true"/> |
| 79 | +</keybind> |
| 80 | +<keybind key="W-Right"> |
| 81 | + <action name="MoveToEdge" direction="right" snapWindows="true"/> |
| 82 | +</keybind> |
| 83 | +<keybind key="W-Up"> |
| 84 | + <action name="MoveToEdge" direction="up" snapWindows="true"/> |
| 85 | +</keybind> |
| 86 | +<keybind key="W-Down"> |
| 87 | + <action name="MoveToEdge" direction="down" snapWindows="true"/> |
| 88 | +</keybind> |
| 89 | +<keybind key="W-S-Left"> |
| 90 | + <action name="ShrinkToEdge" direction="left"/> |
| 91 | +</keybind> |
| 92 | +<keybind key="W-S-Right"> |
| 93 | + <action name="GrowToEdge" direction="right"/> |
| 94 | +</keybind> |
| 95 | +<keybind key="W-S-Up"> |
| 96 | + <action name="ShrinkToEdge" direction="up"/> |
| 97 | +</keybind> |
| 98 | +<keybind key="W-S-Down"> |
| 99 | + <action name="GrowToEdge" direction="down"/> |
| 100 | +</keybind> |
| 101 | +``` |
| 102 | + |
| 103 | +### SnapToEdge |
| 104 | + |
| 105 | +``` |
| 106 | +<keybind key="C-W-Left"> |
| 107 | + <action name="SnapToEdge" direction="left"/> |
| 108 | +</keybind> |
| 109 | +<keybind key="C-W-Right"> |
| 110 | + <action name="SnapToEdge" direction="right"/> |
| 111 | +</keybind> |
| 112 | +<keybind key="C-W-Up"> |
| 113 | + <action name="SnapToEdge" direction="up"/> |
| 114 | +</keybind> |
| 115 | +<keybind key="C-W-Down"> |
| 116 | + <action name="SnapToEdge" direction="down"/> |
| 117 | +</keybind> |
| 118 | +``` |
| 119 | + |
| 120 | +### Unbind alt + arrow |
| 121 | + |
| 122 | +...because they interfere with brower forward/backward binds |
| 123 | + |
| 124 | +``` |
| 125 | +<keybind key="A-Right"/> |
| 126 | +<keybind key="A-Left"/> |
| 127 | +<keybind key="A-Up"/> |
| 128 | +<keybind key="A-Down"/> |
| 129 | +``` |
| 130 | + |
| 131 | +## Mousebinds |
| 132 | + |
| 133 | +### Unfosus all windows when clicking on desktop |
| 134 | + |
| 135 | +This relates to `Desktop` in the sense of a layer-shell client such as `swaybg` |
| 136 | +which does not receive mouse-events. |
| 137 | + |
| 138 | +Note: Clients such as `xfdesktop` and `pcmanfm --desktop` behave like this |
| 139 | +anyway. |
| 140 | + |
| 141 | +``` |
| 142 | +<context name="Root"> |
| 143 | + <mousebind button="Left" action="Press"> |
| 144 | + <action name="Unfocus"/> |
| 145 | + </mousebind> |
| 146 | +</context> |
| 147 | +``` |
| 148 | + |
| 149 | +### Directional maximize |
| 150 | + |
| 151 | +``` |
| 152 | +<context name="Top"> |
| 153 | + <mousebind button="Left" action="DoubleClick"> |
| 154 | + <action name="ToggleMaximize" direction="vertical"/> |
| 155 | + </mousebind> |
| 156 | +</context> |
| 157 | +<context name="Bottom"> |
| 158 | + <mousebind button="Left" action="DoubleClick"> |
| 159 | + <action name="ToggleMaximize" direction="vertical"/> |
| 160 | + </mousebind> |
| 161 | +</context> |
| 162 | +<context name="Left"> |
| 163 | + <mousebind button="Left" action="DoubleClick"> |
| 164 | + <action name="ToggleMaximize" direction="horizontal"/> |
| 165 | + </mousebind> |
| 166 | +</context> |
| 167 | +<context name="Right"> |
| 168 | + <mousebind button="Left" action="DoubleClick"> |
| 169 | + <action name="ToggleMaximize" direction="horizontal"/> |
| 170 | + </mousebind> |
| 171 | +</context> |
| 172 | +``` |
| 173 | + |
| 174 | +### Magnification |
| 175 | + |
| 176 | +Supported since `0.7.3` |
| 177 | + |
| 178 | +``` |
| 179 | +<context name="All"> |
| 180 | + <mousebind direction="W-Up" action="Scroll"> |
| 181 | + <action name="ZoomIn"/> |
| 182 | + </mousebind> |
| 183 | + <mousebind direction="W-Down" action="Scroll"> |
| 184 | + <action name="ZoomOut"/> |
| 185 | + </mousebind> |
| 186 | +</context> |
| 187 | +``` |
| 188 | + |
| 189 | +### Switch workspace with super + scroll |
| 190 | + |
| 191 | +Supported since `0.7.3` |
| 192 | + |
| 193 | +``` |
| 194 | +<context name="All"> |
| 195 | + <mousebind direction="W-Up" action="Scroll"> |
| 196 | + <action name="GoToDesktop" to="right"/> |
| 197 | + </mousebind> |
| 198 | + <mousebind direction="W-Down" action="Scroll"> |
| 199 | + <action name="GoToDesktop" to="left"/> |
| 200 | + </mousebind> |
| 201 | +</context> |
| 202 | +``` |
| 203 | + |
0 commit comments