ソースを参照

add gestures for media stuff

Johan Rong 5 日 前
親
コミット
d5e4299011

+ 1 - 0
home/modules/desktop/hyprland/lua/hyprland.lua

@@ -7,4 +7,5 @@ require("modules.look_and_feel")
 require("modules.misc")
 require("modules.input")
 require("modules.keybindings")
+require("modules.mousebindings")
 require("modules.windows_and_workspaces")

+ 19 - 0
home/modules/desktop/hyprland/lua/modules/mousebindings.lua

@@ -0,0 +1,19 @@
+hl.bind("mouse:274", function()
+    hl.exec_cmd("playerctl play-pause")
+end)
+
+hl.gesture({
+    fingers = 3,
+    direction = "up",
+    action = function()
+        hl.exec_cmd("playerctl previous")
+    end
+})
+
+hl.gesture({
+    fingers = 3,
+    direction = "down",
+    action = function()
+        hl.exec_cmd("playerctl next")
+    end
+})