aboutsummaryrefslogtreecommitdiff
path: root/modules/user/desktop/swayfx.nix
diff options
context:
space:
mode:
authorRosa <rosaontheweb@proton.me>2026-01-12 21:40:55 -0500
committerRosa <rosaontheweb@proton.me>2026-01-12 21:40:55 -0500
commit00085b663dbe8b9f903a9648bdf596ef63719585 (patch)
tree2c3011695d2de65ce4c77a7c6550d59e1df42a87 /modules/user/desktop/swayfx.nix
parent5570be9c9c64e0ba2474d73c2b6b23508b916fd6 (diff)
initial swayfx module
Diffstat (limited to 'modules/user/desktop/swayfx.nix')
-rw-r--r--modules/user/desktop/swayfx.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/modules/user/desktop/swayfx.nix b/modules/user/desktop/swayfx.nix
new file mode 100644
index 0000000..2ea2e85
--- /dev/null
+++ b/modules/user/desktop/swayfx.nix
@@ -0,0 +1,78 @@
+{
+ config,
+ lib,
+ options,
+ ...
+}:
+{
+ options.desktop.windowManager = lib.mkOption { type = with lib.types; nullOr (enum [ "swayfx" ]); };
+
+ config.wayland.windowManager.sway =
+ if (config.desktop.windowManager == "swayfx") then
+ {
+ enable = lib.mkForce true;
+ package = null; # use the nixos module
+ config = {
+ bars = [ ];
+ bindswitches = {
+ "lid:off" = {
+ action = "output eDP-1 power on";
+ locked = true;
+ };
+
+ "lid:on" = {
+ action = "output eDP-1 power off";
+ locked = true;
+ };
+ };
+
+ floating.titlebar = false;
+ focus.followMouse = false;
+ gaps = {
+ inner = 4;
+ outer = 8;
+ };
+
+ input = {
+ "*" = {
+ accel_profile = "flat";
+ };
+
+ "type:touchpad" = {
+ drag = "enabled";
+ dwt = "enabled";
+ natural_scroll = "enabled";
+ tap = "enabled";
+ };
+ };
+
+ keybindings =
+ let
+ mod = config.wayland.windowManager.sway.config.modifier;
+ in
+ lib.mkOptionDefault {
+ "${mod}+Return" = "exec foot";
+ "${mod}+Q" = "kill";
+ };
+
+ modifier = "Mod4";
+ output = {
+ "eDP-1" = {
+ mode = "2256x1504@60Hz";
+ position = "0 0";
+ scale = "1.5";
+ };
+ };
+
+ window.titlebar = false;
+ };
+
+ extraConfig = ''
+ blur enable
+ corner_radius 10
+ shadows enable
+ '';
+ }
+ else
+ { };
+}