6 次代碼提交 f2e4400e5f ... 75d8b5f963

作者 SHA1 備註 提交日期
  Johan Rong 75d8b5f963 Merge branch 'master' of github.com:johron/nix-dots 5 天之前
  Johan Rong ca397cbe17 try fix bluetooth connection problems 2 5 天之前
  Johan Rong dfb4a6c351 try fix bluetooth connection problems 5 天之前
  Johan Rong 124764d63d add gestures for media stuff 5 天之前
  Johan Rong 98bbdb0d40 add gestures for media stuff 5 天之前
  Johan Rong d5e4299011 add gestures for media stuff 5 天之前

+ 1 - 0
home/modules/desktop/hyprland/default.nix

@@ -11,6 +11,7 @@ in
   home.file.".config/hypr/modules/misc.lua".source = ./lua/modules/misc.lua; 
   home.file.".config/hypr/modules/input.lua".source = ./lua/modules/input.lua; 
   home.file.".config/hypr/modules/keybindings.lua".source = ./lua/modules/keybindings.lua; 
+  home.file.".config/hypr/modules/mousebindings.lua".source = ./lua/modules/mousebindings.lua; 
   home.file.".config/hypr/modules/windows_and_workspaces.lua".source = ./lua/modules/windows_and_workspaces.lua; 
 
   xdg = {

+ 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")

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

@@ -21,4 +21,4 @@ hl.gesture({
     fingers = 3,
     direction = "horizontal",
     action = "workspace"
-})
+})

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

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

+ 15 - 1
nixos/modules/hardware/bluetooth/default.nix

@@ -1,5 +1,19 @@
 { pkgs, ... }:
 {
-  hardware.bluetooth.enable = true;
+  hardware.bluetooth = {
+    enable = true;
+    powerOnBoot = true;
+    settings = {
+      General = {
+        Enable = "Source,Sink,Media,Socket";
+        AutoConnect = true;
+        FastConnectable = true; 
+      };
+    };
+  };
   services.blueman.enable = true;
+
+  boot.extraModprobeConfig = ''
+    options btusb enable_autosuspend=0
+  '';
 }