sway: disable ide timeout for fullscreen browsers

This commit is contained in:
Roman Godmaire 2024-04-14 08:35:09 -04:00
parent 3206d6b49a
commit c220c8f939

View file

@ -1,54 +1,32 @@
# Default config for sway
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
# Recommends: foot
set $term foot
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
# Recommends: rofi-wayland
set $rofi_cmd rofi \
-terminal '$term'
# Shows a combined list of the applications with desktop files and
# executables from PATH.
# TODO: add window with the next release of rofi-wayland
set $menu $rofi_cmd -show drun
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
# Requires: desktop-backgrounds-compat, swaybg
output * bg /var/home/digyx/Pictures/ina_bday_2021_4k.png fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
output eDP-1 resolution 2256x1504 scale 1.5
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000'
for_window [app_id="Librewolf"] mark Browser
for_window [app_id="firefox"] mark Browser
for_window [con_mark="Browser"] {
inhibit_idle fullscreen
}
### Input configuration
input type:touchpad {