mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 13:51:54 -05:00
sway: added autorotate support with rot8
This commit is contained in:
parent
00ccd66008
commit
3d520d2eb5
13
homeManagerModules/desktop/sway/autoRotate.nix
Normal file
13
homeManagerModules/desktop/sway/autoRotate.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.alyraffauf.desktop.sway.autoRotate {
|
||||
home.packages = with pkgs; [rot8];
|
||||
wayland.windowManager.sway.config.startup = [
|
||||
{command = "${lib.getExe pkgs.rot8}";}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
osConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [./randomWallpaper.nix];
|
||||
imports = [./autoRotate.nix ./randomWallpaper.nix];
|
||||
options = {
|
||||
alyraffauf.desktop.sway.enable = lib.mkEnableOption "Sway with extra apps.";
|
||||
alyraffauf.desktop.sway.autoSuspend = lib.mkOption {
|
||||
|
@ -13,6 +13,16 @@
|
|||
default = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
alyraffauf.desktop.sway.autoRotate = lib.mkOption {
|
||||
description = "Whether to autorotate screen.";
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
alyraffauf.desktop.sway.randomWallpaper = lib.mkOption {
|
||||
description = "Whether to enable random wallpaper script.";
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.alyraffauf.desktop.sway.enable {
|
||||
|
|
|
@ -34,11 +34,6 @@
|
|||
fi
|
||||
'';
|
||||
in {
|
||||
options = {
|
||||
alyraffauf.desktop.sway.randomWallpaper =
|
||||
lib.mkEnableOption "Enable Sway random wallpaper script.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.alyraffauf.desktop.sway.randomWallpaper {
|
||||
# Packages that should be installed to the user profile.
|
||||
home.packages = with pkgs; [swaybg sway-randomWallpaper];
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
}: {
|
||||
home-manager.users.aly = {
|
||||
imports = [../../homeManagerModules ../../aly.nix];
|
||||
alyraffauf.desktop.sway.autoRotate = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue