mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
added a variable for the target scroll speed
parent
bec1de8439
commit
f705c4f5c7
|
@ -285,9 +285,9 @@ This script set 6x scroll speed only if app like chromium is focused, require ht
|
|||
```python
|
||||
#!/usr/bin/env python
|
||||
import i3ipc
|
||||
scroll_apps = ['discord']
|
||||
scroll_apps = ['discord', 'kitty']
|
||||
default_speed = 1 # Reading current value would be nice
|
||||
|
||||
increased_speed = 6
|
||||
|
||||
def on_window_focus(i3, e):
|
||||
v = default_speed
|
||||
|
@ -301,7 +301,7 @@ def on_window_focus(i3, e):
|
|||
return
|
||||
|
||||
if c in scroll_apps:
|
||||
v = 8
|
||||
v = increased_speed
|
||||
i3.command(f'input type:pointer scroll_factor {v}')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue