mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-06-30 17:22:02 +00:00
Swtich desktops with mouse buttons
This commit is contained in:
15
scripts/i3-mouse.py
Normal file
15
scripts/i3-mouse.py
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
import i3ipc
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
up = sys.argv[1] == 'up'
|
||||
|
||||
i3 = i3ipc.Connection()
|
||||
focused = i3.get_tree().find_focused()
|
||||
if focused.window_instance not in ['overwatch.exe']:
|
||||
if sys.argv[1] == 'forward':
|
||||
os.system('i3-msg workspace prev_on_output')
|
||||
else:
|
||||
os.system('i3-msg workspace next_on_output')
|
Reference in New Issue
Block a user