196 lines
5.6 KiB
Nix
196 lines
5.6 KiB
Nix
{
|
|
services = {
|
|
swayidle = {
|
|
enable = true;
|
|
events = [
|
|
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
|
];
|
|
timeouts = [
|
|
{
|
|
timeout = 300;
|
|
command = "${pkgs.swaylock}/bin/swaylock -fF";
|
|
}
|
|
{
|
|
timeout = 330;
|
|
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
|
|
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
|
|
}
|
|
];
|
|
};
|
|
swaync = {
|
|
enable = true;
|
|
|
|
};
|
|
swayosd = {
|
|
enable = true;
|
|
display = "DP-1";
|
|
};
|
|
};
|
|
swaylock.enable = true;
|
|
waybar = {
|
|
enable = true;
|
|
systemd.enable = true;
|
|
settings = {
|
|
mainBar = {
|
|
layer = "top";
|
|
position = "top";
|
|
height = 24;
|
|
spacing = 3;
|
|
output = [ "DP-1" ];
|
|
modules-left = [
|
|
"sway/workspaces"
|
|
"sway/mode"
|
|
"sway/scratchpad"
|
|
"sway/window"
|
|
"custom/media"
|
|
];
|
|
modules-center = [
|
|
"clock"
|
|
"idle_inhibitor"
|
|
];
|
|
modules-right = [
|
|
"pulseaudio"
|
|
"backlight"
|
|
"network"
|
|
"tray"
|
|
"custom/notification"
|
|
"custom/power"
|
|
];
|
|
"sway/scratchpad" = {
|
|
format = "{icon} {count}";
|
|
show-empty = false;
|
|
format-icons = ["" "<U+F2D2>"];
|
|
tooltip = true;
|
|
tooltip-format = "{app}: {title}";
|
|
};
|
|
"backlight" = {
|
|
device = "ddcci6";
|
|
format = "{percent}% {icon}";
|
|
format-icons = [ "<U+F5D9>" "<U+F5DA>" "<U+F5DB>" "<U+F5DC>" "<U+F5DD>" "<U+F5DE>" "<U+F5DF>"];
|
|
};
|
|
"clock" = {
|
|
format = "{:%d. %B | %H:%M}";
|
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
|
format-alt = "{: KW %OV, %A, %d. %B %Y | %H:%M}";
|
|
calendar = {
|
|
mode = "year";
|
|
mode-mon-col = 3;
|
|
weeks-pos = "right";
|
|
on-scroll = 1;
|
|
on-click-right = "mode";
|
|
format = {
|
|
months = "<span color='#ffead3'><b>{}</b></span>";
|
|
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
|
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
|
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
|
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
|
};
|
|
};
|
|
"actions" = {
|
|
on-click-right = "mode";
|
|
on-click-forward = "tz_up";
|
|
on-click-backward = "tz_down";
|
|
on-scroll-up = "shift_up";
|
|
on-scroll-down = "shift_down";
|
|
};
|
|
};
|
|
"tray" = {
|
|
icon-size = 16;
|
|
spacing = 6;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
wayland.windowManager = {
|
|
sway = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
smart_gaps inverse_outer
|
|
font pango:Atkinson Hyperlegible 16
|
|
'';
|
|
config = {
|
|
bars = [];
|
|
window = {
|
|
commands = [
|
|
{
|
|
command = "floating enable, sticky enable, resize set 20 ppt 40 ppt, border pixel 10";
|
|
criteria = {
|
|
app_id = "^launcher";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
gaps = {
|
|
inner = 30;
|
|
vertical = 50;
|
|
horizontal = 400;
|
|
# smartGaps = true;
|
|
smartBorders = "on";
|
|
};
|
|
input = {
|
|
"type:keyboard" = {
|
|
xkb_layout = "eu";
|
|
xkb_options = "compose:rwin";
|
|
};
|
|
"type:touchpad" = {
|
|
tap = "enabled";
|
|
natural_scroll = "enabled";
|
|
dwt = "enabled";
|
|
accel_profile = "adaptive";
|
|
pointer_accel = "0.5";
|
|
};
|
|
};
|
|
keybindings = let
|
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
|
in lib.mkOptionDefault {
|
|
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
|
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
|
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
"XF86MonBrightnessUp" = "exec brightnessctl set 10%+";
|
|
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
|
|
"XF86AudioPlay" = "exec playerctl play-pause";
|
|
"XF86AudioNext" = "exec playerctl next";
|
|
"XF86AudioPrev" = "exec playerctl previous";
|
|
"${modifier}+o" = "for_window [class=obsidian] scratchpad show";
|
|
};
|
|
menu = "kitty --app-id launcher -e sway-launcher-desktop";
|
|
modifier = "Mod4";
|
|
output = {
|
|
DP-1 = {
|
|
resolution = "3840x2160@30Hz";
|
|
position = "0 1080";
|
|
# background = "/home/muhh/Sync/Backgrounds/wald.jpg fill";
|
|
scale = "1.5";
|
|
};
|
|
HDMI-A-1 = {
|
|
resolution = "1920x1080@60.000Hz";
|
|
transform = "flipped";
|
|
position = "3840 0";
|
|
scale = "1.5";
|
|
# background = "/home/muhh/Sync/Backgrounds/pfuetze.jpg fill";
|
|
};
|
|
};
|
|
seat = {
|
|
"*" = {
|
|
hide_cursor = "5000";
|
|
};
|
|
};
|
|
terminal = "kitty";
|
|
# terminal = "ghostty";
|
|
window = {
|
|
titlebar = false;
|
|
};
|
|
workspaceOutputAssign =
|
|
map (x: {
|
|
workspace = x;
|
|
output = "DP-1";
|
|
}) ["1" "2" "3" "4" "5" "6" "7"]
|
|
++ map (x: {
|
|
workspace = x;
|
|
output = "HDMI-A-1";
|
|
}) ["8" "9" "10"];
|
|
};
|
|
wrapperFeatures.gtk = true;
|
|
};
|
|
};
|
|
}
|