dotfiles/users/alejandro/sway/sway.nix

104 lines
2.3 KiB
Nix
Raw Normal View History

2022-09-18 19:42:30 +00:00
{
config,
pkgs,
...
}: {
imports = [
./keybindings.nix
./waybar.nix
];
home.packages = with pkgs; [
#light # TODO: Not enough to have this package, need it enabled in system config.
pamixer
playerctl
rofi
swaylock
wl-clipboard
];
services.playerctld.enable = true;
services.swayidle = {
enable = true;
2022-09-18 19:42:30 +00:00
timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -i ${config.home.homeDirectory}/wallpaper.png";
}
{
timeout = 600;
2022-09-22 04:56:45 +00:00
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
2022-09-18 19:42:30 +00:00
}
];
events = [
{
event = "before-sleep";
command = "${pkgs.swaylock}/bin/swaylock";
}
];
};
wayland.windowManager.sway = {
enable = true;
swaynag.enable = true;
wrapperFeatures.gtk = true; # so that gtk works properly
config = {
modifier = "Mod4";
terminal = "alacritty"; # TODO: include in packages above?
menu = "rofi -show run";
colors = {
focused = {
border = "#484848";
background = "#2B3C44";
text = "#FFFFFF";
indicator = "#333333";
childBorder = "#000000";
};
focusedInactive = {
border = "#484848";
background = "#333333";
text = "#FFFFFF";
indicator = "#000000";
childBorder = "#000000";
};
unfocused = {
border = "#484848";
background = "#333333";
text = "#FFFFFF";
indicator = "#000000";
childBorder = "#000000";
};
};
window.commands = [
{
command = "inhibit_idle fullscreen";
2022-11-01 00:17:10 +00:00
criteria = {class = ".*";};
}
];
focus.followMouse = false;
2022-09-18 19:42:30 +00:00
output = {
"*".bg = "${config.home.homeDirectory}/wallpaper.png fill";
"eDP-1".scale = "1";
"Unknown ASUS VG24V 0x00007AAC" = {
mode = "1920x1080@120Hz";
position = "0 830";
};
2022-09-18 19:42:30 +00:00
"Dell Inc. DELL S2721QS 47W7M43" = {
transform = "270";
position = "1920 0";
};
"Dell Inc. DELL S2721QS 4FR7M43".position = "4080 830";
};
};
};
}