mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 07:13:55 -05:00
sway: remove tablet mode
This commit is contained in:
parent
321641391e
commit
bd1b97a191
|
@ -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}";}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue