57 lines
1.7 KiB
Nix
57 lines
1.7 KiB
Nix
{ lib, config, ... }:
|
|
{
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
wrapperFeatures.gtk = true;
|
|
checkConfig = false; # necessary for wallpaper since the file is not available in sandbox.
|
|
config = rec {
|
|
bars = [
|
|
{
|
|
extraConfig = "
|
|
position top
|
|
status_command while date +'%Y-%m-%d %H:%M:%S'; do sleep 1; done
|
|
font Hack 9";
|
|
}
|
|
];
|
|
modifier = "Mod4";
|
|
input = {
|
|
"type:keyboard" = {
|
|
xkb_layout = "no";
|
|
};
|
|
"type:touchpad" = {
|
|
accel_profile = "flat";
|
|
pointer_accel = "1";
|
|
};
|
|
};
|
|
output = {
|
|
"*" = {
|
|
scale = "0";
|
|
bg = "${config.xdg.userDirs.pictures}/Wallpapers/d3.png fill";
|
|
};
|
|
};
|
|
defaultWorkspace = "workspace number 1";
|
|
fonts = {
|
|
names = [ "Hack" ];
|
|
style = "Regular";
|
|
size = 11.0;
|
|
};
|
|
terminal = "foot";
|
|
menu = "tofi-drun --drun-launch=true";
|
|
keybindings = lib.mkOptionDefault {
|
|
"${modifier}+Return" = "exec ${terminal}";
|
|
"${modifier}+Shift+q" = "kill";
|
|
"${modifier}+p" = "exec ${menu}";
|
|
"XF86Search" = "exec ${menu}";
|
|
"${modifier}+Shift+e" = "exec swaymsg exit";
|
|
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+";
|
|
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-";
|
|
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
"XF86AudioMicMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
|
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
|
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
|
"${modifier}+Delete" = "exec shutdown now";
|
|
};
|
|
};
|
|
};
|
|
}
|