Sway : Dim inactive windows.

This commit is contained in:
Dmitry Voronin 2024-03-31 01:37:15 +03:00
parent b8d8147cb9
commit 11ab47ba94
3 changed files with 9 additions and 1 deletions

View file

@ -16,6 +16,7 @@
mako # Notification system. mako # Notification system.
networkmanagerapplet # Internet configuration. networkmanagerapplet # Internet configuration.
pamixer pavucontrol pulseaudio # Audio. pamixer pavucontrol pulseaudio # Audio.
sway-contrib.inactive-windows-transparency
wl-clipboard # Clipboard. wl-clipboard # Clipboard.
]; ];
@ -34,6 +35,7 @@
variables = { variables = {
FOOT_CONFIG = ./foot/Foot.ini; FOOT_CONFIG = ./foot/Foot.ini;
SWAY_CONFIG = ./sway/module; SWAY_CONFIG = ./sway/module;
SWAY_SCRIPT_IWT = "${pkgs.sway-contrib.inactive-windows-transparency}/bin/inactive-windows-transparency.py";
# PATH = [ "/etc/swaybin" ]; # NOTE: Kept as an example on PATH modification. # PATH = [ "/etc/swaybin" ]; # NOTE: Kept as an example on PATH modification.
}; };
}; };

View file

@ -146,7 +146,10 @@ function _twice() {
local period=${1} local period=${1}
local command="${@:2}" local command="${@:2}"
[[ "$(cat ${file} 2> /dev/null)" = "${command}" ]] && ${command} if [[ "$(cat ${file} 2> /dev/null)" = "${command}" ]]; then
${command}
return 0
fi
echo "${command}" > "${file}" echo "${command}" > "${file}"
sleep ${period} sleep ${period}
rm "${file}" 2> /dev/null rm "${file}" 2> /dev/null

View file

@ -16,3 +16,6 @@ bindsym $mod+c layout toggle split tabbed
# Fullscreen. # Fullscreen.
bindsym $mod+f fullscreen bindsym $mod+f fullscreen
# Dim inactive windows.
exec $SWAY_SCRIPT_IWT --opacity 0.85