{ pkgs, config, inputs, ... }: let noctalia = cmd: ["noctalia-shell" "ipc" "call"] ++ (pkgs.lib.splitString " " cmd); in { imports = [inputs.niri.homeModules.niri inputs.noctalia.homeModules.default]; home.packages = with pkgs; [ wayland-utils libsecret cage xwayland-satellite libnotify cliphist cava kdePackages.polkit-kde-agent-1 nautilus direnv imv ]; programs.niri = { enable = true; settings = { prefer-no-csd = true; hotkey-overlay.skip-at-startup = true; environment = { NIXOS_OZONE_WL = "1"; QT_QPA_PLATFORM = "wayland"; ELECTRON_OZON_PLATFORM_HINT = "wayland"; DISPLAY = ":0"; # Or null _JAVA_AWT_WM_NONREPARENTING = "1"; }; cursor = { hide-when-typing = true; hide-after-inactive-ms = 1000; }; binds = with config.lib.niri.actions; { "Mod+Space".action.spawn = noctalia "launcher toggle"; "Mod+P".action.spawn = noctalia "sessionMenu toggle"; "Mod+V".action.spawn = noctalia "launcher clipboard"; "Mod+Shift+C".action.spawn = noctalia "launcher calculator"; "Mod+C".action.spawn = noctalia "calendar toggle"; "Mod+S".action.spawn = noctalia "controlCenter toggle"; "Mod+F12".action.spawn = noctalia "powerProfile cycle"; "XF86AudioLowerVolume".action.spawn = noctalia "volume decrease"; "XF86AudioRaiseVolume".action.spawn = noctalia "volume increase"; "XF86AudioMute".action.spawn = noctalia "volume muteOutput"; "XF86MonBrightnessUp".action.spawn = noctalia "brightness increase"; "XF86MonBrightnessDown".action.spawn = noctalia "brightness decrease"; "XF86AudioPlay".action.spawn = noctalia "media playPause"; "XF86AudioNext".action.spawn = noctalia "media next"; "XF86AudioPrev".action.spawn = noctalia "media previous"; "Mod+Shift+Q".action.spawn = noctalia "lockScreen lock"; "Mod+Return".action.spawn = ["alacritty"]; "Mod+E".action.spawn = ["nautilus"]; "Mod+B".action.spawn = ["firefox"]; "Mod+U".action = move-workspace-up; "Mod+I".action = move-workspace-down; "Mod+Shift+Slash".action = show-hotkey-overlay; "Mod+Q".action = close-window; "Mod+H".action = focus-column-or-monitor-left; "Mod+L".action = focus-column-or-monitor-right; "Mod+J".action = focus-window-or-monitor-down; "Mod+K".action = focus-window-or-monitor-up; "Mod+Shift+H".action = move-column-left-or-to-monitor-left; "Mod+Shift+L".action = move-column-right-or-to-monitor-right; "Mod+Shift+J".action = move-window-down-or-to-workspace-down; "Mod+Shift+K".action = move-window-up-or-to-workspace-up; "Mod+Ctrl+K".action = move-window-to-workspace-up; "Mod+Ctrl+J".action = move-window-to-workspace-down; "Mod+0".action = focus-workspace 0; "Mod+1".action = focus-workspace 1; "Mod+2".action = focus-workspace 2; "Mod+3".action = focus-workspace 3; "Mod+4".action = focus-workspace 4; "Mod+5".action = focus-workspace 5; "Mod+6".action = focus-workspace 6; "Mod+7".action = focus-workspace 7; "Mod+8".action = focus-workspace 8; "Mod+9".action = focus-workspace 9; "Mod+Shift+Period".action = move-workspace-to-monitor-next; "Mod+Shift+Comma".action = move-workspace-to-monitor-previous; "Mod+Comma".action = consume-or-expel-window-left; "Mod+Period".action = consume-or-expel-window-right; "Mod+Grave".action = toggle-overview; "Mod+Tab".action = focus-workspace-previous; "Mod+Equal".action = set-column-width "+5%"; "Mod+Minus".action = set-column-width "-5%"; "Mod+Shift+Equal".action = set-window-height "+5%"; "Mod+Shift+Minus".action = set-window-height "-5%"; "Mod+F".action = maximize-column; "Mod+Shift+F".action = fullscreen-window; "Mod+Ctrl+Shift+F".action = toggle-windowed-fullscreen; "Mod+Y".action = toggle-window-floating; "Mod+Shift+Y".action = switch-focus-between-floating-and-tiling; "Mod+W".action = toggle-column-tabbed-display; "Mod+Parenright".action = switch-layout "next"; "Mod+Parenleft".action = switch-layout "prev"; "Mod+Shift+E".action = quit; }; input = { warp-mouse-to-focus.enable = true; focus-follows-mouse.enable = false; trackpoint = { accel-profile = "adaptive"; accel-speed = 0.6; }; }; layout = { focus-ring = { width = 2; }; }; window-rules = [ { geometry-corner-radius = let r = 4.0; in { top-left = r; top-right = r; bottom-left = r; bottom-right = r; }; clip-to-geometry = true; } { matches = [{app-id = "firefox";}]; open-maximized = true; } { matches = [{app-id = "chromium-browser";}]; open-maximized = true; } ]; # debug = { # honor-xdg-activation-with-invalid-serial = 1; # }; }; }; programs.noctalia-shell = { enable = true; systemd.enable = true; settings = { general = { animationSpeed = 2; compactLockScreen = true; }; wallpaper = { enabled = false; directory = "~/Pictures/wallpapers"; }; dock.enabled = false; bar = { density = "compact"; position = "right"; showCapsule = false; widgets = { left = [ { id = "SidePanelToggle"; useDistroLogo = true; } { id = "WiFi"; } { id = "Bluetooth"; } ]; center = [ { hideUnoccupied = false; id = "Workspace"; labelMode = "none"; } ]; right = [ { colorizeIcons = true; drawerEnabled = true; id = "Tray"; } { alwaysShowPercentage = false; id = "Battery"; warningThreshold = 30; } { formatHorizontal = "HH:mm"; formatVertical = "HH mm"; id = "Clock"; useMonospacedFont = true; usePrimaryColor = true; } ]; }; }; colorSchemes.predefinedScheme = "Monochrome"; general = { avatarImage = "/home/dim/.face"; radiusRatio = 0.2; }; location = { monthBeforeDay = false; name = "Tangerang"; }; }; # this may also be a string or a path to a JSON file, # but in this case must include *all* settings. }; programs.alacritty = { enable = true; settings = { window.decorations = "None"; }; }; services.kanshi = { enable = true; profiles = { rumah = { outputs = [ { criteria = "LG Electronics 16EN33 305INKH5P181"; position = "0,0"; } { criteria = "eDP-1"; position = "0,768"; } ]; }; }; }; }