dotfiles/users/alejandro/sway/sway.nix
Alejandro Angulo ce3d7e48ac
Setup slippi for playing melee online
Also sets up monitor to run at 120Hz and prevents sway from locking when
any window is fullscreen (kept locking while I was playing)
2022-10-27 09:07:11 -07:00

101 lines
2.2 KiB
Nix

{
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;
timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -i ${config.home.homeDirectory}/wallpaper.png";
}
{
timeout = 600;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
}
];
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";
criterira = {class = ".*";};
}
];
focus.followMouse = false;
output = {
"*".bg = "${config.home.homeDirectory}/wallpaper.png fill";
"eDP-1".scale = "1";
"Unknown ASUS VG24V 0x00007AAC".mode = "1920x1080@120Hz";
"Dell Inc. DELL S2721QS 47W7M43" = {
transform = "270";
position = "1920 0";
};
"Dell Inc. DELL S2721QS 4FR7M43".position = "4080 830";
};
};
};
}