~tardypad/dotfiles

a1f1caa575215ff285fb5279c548704b61a68792 — Damien Tardy-Panis 8 months ago 0a16562
Hide sway bar when presentation-mode is enabled
2 files changed, 7 insertions(+), 0 deletions(-)

M files/docs/shell/presentation-mode.scd
M files/scripts/shell/presentation-mode
M files/docs/shell/presentation-mode.scd => files/docs/shell/presentation-mode.scd +3 -0
@@ 12,6 12,8 @@ presentation-mode [ *status* | *enable* | *disable* | *toggle* ]

Manage presentation mode.

It hides sway bar when enabled.

# OPTIONS

None


@@ 45,3 47,4 @@ _$XDG_RUNTIME_DIR/presentation_mode_
# DEPENDENCIES

- pkill
- swaymsg

M files/scripts/shell/presentation-mode => files/scripts/shell/presentation-mode +4 -0
@@ 27,11 27,15 @@ exit_error() {
} >&2

pres_enable() {
  swaymsg -q bar mode invisible

  touch "${FILE_PATH}" \
    && update_i3blocks
}

pres_disable() {
  swaymsg -q bar mode dock

  rm -f "${FILE_PATH}" \
    && update_i3blocks
}