Skip to content

Instantly share code, notes, and snippets.

View AntonSol919's full-sized avatar

Anton AntonSol919

View GitHub Profile
@AntonSol919
AntonSol919 / audio-window-shift.py
Last active April 6, 2023 09:48
Balance audio left/right based on window location
import pulsectl
import gi
gi.require_version('Wnck', '3.0')
from gi.repository import Wnck, GLib
screen = Wnck.Screen.get_default()
screen.force_update()
width = screen.get_width()
pulse = pulsectl.Pulse('audio-window-shift')
sink = pulse.sink_list()[0]