Skip to content

Commit

Permalink
#16 disable displays
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis committed Jan 22, 2022
1 parent d77f901 commit 5b14b05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions README.md
Expand Up @@ -241,18 +241,22 @@ User must be in the `input` group to monitor libinput events.

Changes to `cfg.yaml` will be immediately applied without needing to restart. Following are some recipes for such changes, using [yq](https://mikefarah.gitbook.io/yq/).

You can create a sway keybinding for these changes e.g. `bindsym Mod1+Ctrl+Shift+s exec yq -y -i '...`
You can create a sway keybinding for these changes e.g.
```
bindsym Mod1+Ctrl+Shift+s exec yq -y -i '...
```

Note that comments / whitespace will be stripped from your `cfg.yaml` when using this method.

<details><summary>Disabling Displays</summary><br>
<details><summary>Disable/Enable Displays</summary><br>

We can disable/enable displays via the `DISABLED` list e.g.
We can add/remove from the `DISABLED` list e.g.

Disable eDP-1:
```
yq -y -i 'if .DISABLED then .DISABLED |= . - [ "eDP-1" ] else . end' ~/.config/way-displays/cfg.yaml
```

Enable eDP-1:
```
yq -y -i 'if .DISABLED then .DISABLED |= . - [ "eDP-1" ] else . end | .DISABLED |= . + [ "eDP-1"]' ~/.config/way-displays/cfg.yaml
Expand Down
2 changes: 1 addition & 1 deletion cfg.yaml
Expand Up @@ -46,7 +46,7 @@ LOG_THRESHOLD: INFO


# Disable the specified displays.
# See TODO recipe to disable/enable on-the-fly.
# To disable/enable on-the-fly see recipe: https://github.com/alex-courtis/way-displays#on-the-fly-recipes
DISABLED:
#- "eDP-1"

0 comments on commit 5b14b05

Please sign in to comment.