From bd1b97a191e87aef03fbddb25ed414bc1400b489 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 4 Jun 2024 14:33:27 -0400 Subject: [PATCH] sway: remove tablet mode --- .../desktop/sway/autoRotate.nix | 13 -------- homeManagerModules/desktop/sway/default.nix | 30 ++----------------- .../desktop/sway/virtKeyboard.nix | 18 ----------- 3 files changed, 3 insertions(+), 58 deletions(-) delete mode 100644 homeManagerModules/desktop/sway/autoRotate.nix delete mode 100644 homeManagerModules/desktop/sway/virtKeyboard.nix diff --git a/homeManagerModules/desktop/sway/autoRotate.nix b/homeManagerModules/desktop/sway/autoRotate.nix deleted file mode 100644 index 3e7550f3..00000000 --- a/homeManagerModules/desktop/sway/autoRotate.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - config = lib.mkIf config.alyraffauf.desktop.sway.tabletMode.autoRotate { - home.packages = with pkgs; [rot8]; - wayland.windowManager.sway.config.startup = [ - {command = "${lib.getExe pkgs.rot8}";} - ]; - }; -} diff --git a/homeManagerModules/desktop/sway/default.nix b/homeManagerModules/desktop/sway/default.nix index 2924603a..5c2be6d0 100644 --- a/homeManagerModules/desktop/sway/default.nix +++ b/homeManagerModules/desktop/sway/default.nix @@ -5,7 +5,7 @@ inputs, ... }: { - imports = [./autoRotate.nix ./randomWallpaper.nix ./redShift.nix ./virtKeyboard.nix]; + imports = [./randomWallpaper.nix ./redShift.nix]; options = { alyraffauf.desktop.sway = { @@ -26,24 +26,6 @@ default = config.alyraffauf.desktop.sway.enable; type = lib.types.bool; }; - tabletMode = { - enable = lib.mkEnableOption "Tablet mode for sway."; - autoRotate = lib.mkOption { - description = "Whether to autorotate screen."; - default = config.alyraffauf.desktop.sway.tabletMode.enable; - type = lib.types.bool; - }; - menuButton = lib.mkOption { - description = "Whether to add menu button for waybar."; - default = config.alyraffauf.desktop.sway.tabletMode.enable; - type = lib.types.bool; - }; - virtKeyboard = lib.mkOption { - description = "Whether to enable dynamic virtual keyboard."; - default = config.alyraffauf.desktop.sway.tabletMode.enable; - type = lib.types.bool; - }; - }; }; }; @@ -57,19 +39,13 @@ programs.waybar = { settings = { mainBar = { - modules-left = - if config.alyraffauf.desktop.sway.tabletMode.menuButton - then ["custom/menu" "custom/sway-close" "sway/workspaces" "sway/scratchpad" "sway/mode"] - else ["sway/workspaces" "sway/scratchpad" "sway/mode"]; + modules-left = ["sway/workspaces" "sway/scratchpad" "sway/mode"]; }; }; }; wayland.windowManager.sway.enable = true; - wayland.windowManager.sway.package = - if config.alyraffauf.desktop.sway.tabletMode.enable - then pkgs.sway - else pkgs.swayfx; + wayland.windowManager.sway.package = pkgs.swayfx; wayland.windowManager.sway.wrapperFeatures.gtk = true; wayland.windowManager.sway.checkConfig = false; diff --git a/homeManagerModules/desktop/sway/virtKeyboard.nix b/homeManagerModules/desktop/sway/virtKeyboard.nix deleted file mode 100644 index df1be3ab..00000000 --- a/homeManagerModules/desktop/sway/virtKeyboard.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - config = lib.mkIf config.alyraffauf.desktop.sway.tabletMode.virtKeyboard { - home.packages = with pkgs; [squeekboard]; - wayland.windowManager.sway.config.startup = [ - {command = "${lib.getExe' pkgs.squeekboard "squeekboard"}";} - ]; - - wayland.windowManager.sway.extraConfig = '' - bindswitch --reload --locked tablet:on exec ${lib.getExe pkgs.dconf} write /org/gnome/desktop/a11y/applications/screen-keyboard-enabled true - bindswitch --reload --locked tablet:off exec ${lib.getExe pkgs.dconf} write /org/gnome/desktop/a11y/applications/screen-keyboard-enabled false - ''; - }; -}