mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-04-29 17:25:34 +00:00
Swtich desktops with mouse buttons
This commit is contained in:
parent
ebf268e0ea
commit
6f45dbc0f6
@ -13,7 +13,7 @@ workspace $ws10 output HDMI-0
|
|||||||
mode "$g13" {
|
mode "$g13" {
|
||||||
bindsym 1 exec --no-startup-id cat ~/.config/g13/overwatch.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/overwatch.lpbm > /tmp/g13-0; mode "default"
|
bindsym 1 exec --no-startup-id cat ~/.config/g13/overwatch.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/overwatch.lpbm > /tmp/g13-0; mode "default"
|
||||||
bindsym 2 exec --no-startup-id cat ~/.config/g13/resolve.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/resolve.lpbm > /tmp/g13-0; mode "default"
|
bindsym 2 exec --no-startup-id cat ~/.config/g13/resolve.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/resolve.lpbm > /tmp/g13-0; mode "default"
|
||||||
|
bindsym 3 exec --no-startup-id python3 ~/.config/scripts/i3-toggle.sh up; mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ for_window [title="Google Play Music Desktop Player"] move to workspace $ws10
|
|||||||
for_window [class="Wine" title="Overwatch"] move to workspace $ws4
|
for_window [class="Wine" title="Overwatch"] move to workspace $ws4
|
||||||
for_window [class="Wine" title="Overwatch"] exec --no-startup-id cat ~/.config/g13/overwatch.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/overwatch.lpbm > /tmp/g13-0
|
for_window [class="Wine" title="Overwatch"] exec --no-startup-id cat ~/.config/g13/overwatch.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/overwatch.lpbm > /tmp/g13-0
|
||||||
for_window [class="Wine" title="Blizzard Battle.net"] move to workspace $ws4
|
for_window [class="Wine" title="Blizzard Battle.net"] move to workspace $ws4
|
||||||
for_window [class="Lutris"] move to workspace $ws8
|
for_window [class="Lutris"] move to workspace $ws4
|
||||||
|
|
||||||
# Starting DaVinci Resolve
|
# Starting DaVinci Resolve
|
||||||
for_window [class="resolve"] move to workspace $ws1
|
for_window [class="resolve"] move to workspace $ws1
|
||||||
@ -58,4 +58,9 @@ for_window [title="^Steam Keyboard$"] floating enable
|
|||||||
|
|
||||||
# Jetbrains
|
# Jetbrains
|
||||||
for_window [class="^com-intellij-updater-Runner$" title="^Update$"] floating enable
|
for_window [class="^com-intellij-updater-Runner$" title="^Update$"] floating enable
|
||||||
for_window [instance="^sun-awt-X11-XDialogPeer$" title="^Complete Installation$"] floating enable
|
for_window [instance="^sun-awt-X11-XDialogPeer$" title="^Complete Installation$"] floating enable
|
||||||
|
|
||||||
|
# The side buttons move the window around
|
||||||
|
bindsym --whole-window button9 exec python3 ~/.config/scripts/i3-mouse.py back
|
||||||
|
bindsym --whole-window button8 exec python3 ~/.config/scripts/i3-mouse.py forward
|
||||||
|
|
||||||
|
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')
|
Loading…
x
Reference in New Issue
Block a user