{ config, pkgs, lib, ... }: { home.packages = with pkgs; [ flameshot swaylock ]; programs.foot = { enable = true; settings = { main = { font = "JetBrainsMono Nerd Font:size=10"; dpi-aware = "yes"; }; # nordiq from https://codeberg.org/dnkl/foot/src/branch/master/themes/ colors = { background = "2E3440"; foreground = "D8DEE9"; regular0 = "5b6272"; regular1 = "bf616a"; regular2 = "a3be8c"; regular3 = "ebcb8b"; regular4 = "81a1c1"; regular5 = "b48ead"; regular6 = "88c0d0"; regular7 = "e5e9f0"; bright0 = "5E5C64"; bright1 = "F66151"; bright2 = "33DA7A"; bright3 = "E9AD0C"; bright4 = "2A7BDE"; bright5 = "C061CB"; bright6 = "33C7DE"; bright7 = "FFFFFF"; }; }; }; programs.rofi = { enable = true; font = "JetBrains Mono Nerd Font 10"; theme = "Arc-Dark"; }; programs.waybar = { enable = true; settings = { mainBar = { position = "bottom"; height = 24; modules-left = [ "sway/workspaces" "sway/mode" ]; modules-right = [ "network" "cpu" "memory" "battery" "tray" "clock" ]; "network" = { format-wifi = " {essid} {ipaddr} ({signalStrength}%)"; format-ethernet = "{ipaddr}"; }; "clock" = { format = "{:%a, %d.%m.%Y CW%V %H:%M}"; }; "cpu" = { interval = 30; format = "󰗉 {load}"; }; "memory" = { interval = 30; format = " {percentage}%"; }; "battery" = { interval = 10; format = "󰁹 {capacity}% ({time})"; format-charging = " {capacity}%"; format-plugged = " {capacity}%"; format-full = " {capacity}%"; states = { "warning" = 30; "critical" = 15; }; }; }; }; style = ./waybar.css; }; # Automatic display output management services.kanshi = { enable = true; settings = [ { profile.name = "undocked"; profile.outputs = [ { criteria = "eDP-1"; status = "enable"; } ]; } { profile.name = "home_office"; profile.outputs = [ { criteria = "eDP-1"; status = "disable"; } { criteria = "HDMI-A-2"; status = "enable"; } ]; } { profile.name = "office"; profile.outputs = [ { criteria = "eDP-1"; status = "disable"; } { criteria = "DP-1"; status = "enable"; } ]; } ]; }; services.swayidle = { enable = true; timeouts = [ { timeout = 1800; command = "${pkgs.swaylock}/bin/swaylock -f -c 000000"; } { timeout = 3600; 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 -f -c 000000"; } ]; }; services.gammastep = { enable = true; latitude = 50.81; longitude = 6.37; }; services.mako = { enable = true; defaultTimeout = 5000; }; wayland.windowManager.sway = { enable = true; checkConfig = false; package = pkgs.sway; wrapperFeatures.gtk = true; config = let wallpaper = "~/.wallpapers/voxel-city-by-huntingfluff.jpg"; in { modifier = "Mod4"; focus.followMouse = false; bars = [{ command = "waybar"; }]; output = { "*" = { bg = "${wallpaper} fill"; }; }; input = { "*" = { xkb_layout = "de"; }; }; menu = "rofi -show drun"; startup = [ { command = "logseq"; } ]; window = { hideEdgeBorders = "smart"; titlebar = false; commands = [ { command = "move scratchpad, resize set 1280 800"; criteria = { title = "Logseq"; }; } ]; }; keybindings = let modifier = config.wayland.windowManager.sway.config.modifier; in lib.mkOptionDefault { "--release Print" = "exec flameshot gui"; "Mod1+l" = "exec swaylock -f -i ${wallpaper} -s fill"; "${modifier}+m" = "scratchpad show"; "XF86MonBrightnessDown" = "exec light -U 10"; "XF86MonBrightnessUp" = "exec light -A 10"; "XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'"; "XF86AudioLowerVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'"; "XF86AudioMute" = "exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'"; }; }; }; home.file = { ".wallpapers".source = ./wallpapers; }; }