diff --git a/dots/.config/hypr/hypridle.conf.nix b/dots/.config/hypr/hypridle.conf.nix new file mode 100644 index 0000000..a8bc82f --- /dev/null +++ b/dots/.config/hypr/hypridle.conf.nix @@ -0,0 +1,35 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf mkEnableOption; + inherit (builtins) concatStringsSep; + + cfg = config.horseman.dots.hypr.hypridle; + username = config.horseman.username; + hypr = config.horseman.wm.hyprland.config; +in { + options = { + horseman.dots.hypr.hypridle = { + enable = mkEnableOption "~/.config/hypr/hypridle.conf"; + }; + }; + + config = mkIf cfg.enable { + home-manager.users.${username}.xdg.configFile."hypr/hypridle.conf".text = '' + general { + lock_cmd = ${hypr.sleep.lockCommand} + } + + ${concatStringsSep "\n\n" (map (lis: '' + listener { + timeout = ${toString lis.timeout} + on-timeout = ${lis.onTimeout} + on-resume = ${lis.onResume} + } + '') + hypr.sleep.listeners)} + ''; + }; +} diff --git a/dots/.config/hypr/hyprland.conf.nix b/dots/.config/hypr/hyprland.conf.nix new file mode 100644 index 0000000..60a3826 --- /dev/null +++ b/dots/.config/hypr/hyprland.conf.nix @@ -0,0 +1,389 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf trivial strings mkEnableOption; + inherit (builtins) concatStringsSep elem genList elemAt length; + inherit (trivial) boolToString; + inherit (strings) floatToString; + + cfg = config.horseman.dots.hypr.hyprland; + username = config.horseman.username; + hypr = config.horseman.wm.hyprland.config; +in { + options = { + horseman.dots.hypr.hyprland = { + enable = mkEnableOption "~/.config/hypr/hyprland.conf"; + }; + }; + + config = mkIf cfg.enable { + home-manager.users.${username}.xdg.configFile."hypr/hyprland.conf".text = '' + ${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${ + if (elem "m" kb.flags) # Mouse binds take one argument less + then "" + else ", ${kb.params}" + }") + hypr.keybindings.binds)} + + ${concatStringsSep "\n\n" (map (sm: '' + bind${concatStringsSep "" sm.enterBind.flags} = ${concatStringsSep " " sm.enterBind.mods}, ${sm.enterBind.key}, submap, ${sm.name} + submap = ${sm.name} + + ${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${ + if (elem "m" kb.flags) # Mouse binds take one argument less + then "" + else ", ${kb.params}" + }") + sm.binds)} + + bind${concatStringsSep "" sm.exitBind.flags} = ${concatStringsSep " " sm.exitBind.mods}, ${sm.exitBind.key}, submap, reset + submap = reset + '') + hypr.keybindings.submaps)} + + ${concatStringsSep "\n" (map (x: "exec-once = " + x) hypr.execOnce)} + + ${concatStringsSep "\n" (map (x: "env = " + x) hypr.env)} + + general { + border_size = ${toString hypr.general.borderSize} + no_border_on_floating = ${boolToString hypr.general.noBorderOnFloating} + gaps_in = ${toString hypr.general.gapsIn} + gaps_out = ${toString hypr.general.gapsOut} + gaps_workspaces = ${toString hypr.general.gapsWorkspaces} + col.inactive_border = ${hypr.general.col.inactiveBorder} + col.active_border = ${hypr.general.col.activeBorder} + col.nogroup_border = ${hypr.general.col.nogroupBorder} + col.nogroup_border_active = ${hypr.general.col.nogroupBorderActive} + layout = ${hypr.general.layout} + no_focus_fallback = ${boolToString hypr.general.noFocusFallback} + resize_on_border = ${boolToString hypr.general.resizeOnBorder} + extend_border_grab_area = ${toString hypr.general.extendBorderGrabArea} + hover_icon_on_border = ${boolToString hypr.general.hoverIconOnBorder} + allow_tearing = ${boolToString hypr.general.allowTearing} + resize_corner = ${toString hypr.general.resizeCorner} + + snap { + enabled = ${boolToString hypr.general.snap.enabled} + window_gap = ${toString hypr.general.snap.windowGap} + monitor_gap = ${toString hypr.general.snap.monitorGap} + border_overlap = ${boolToString hypr.general.snap.borderOverlap} + } + } + + decoration { + rounding = ${toString hypr.decoration.rounding} + rounding_power = ${toString hypr.decoration.roundingPower} + active_opacity = ${toString hypr.decoration.activeOpacity} + inactive_opacity = ${toString hypr.decoration.inactiveOpacity} + fullscreen_opacity = ${toString hypr.decoration.fullscreenOpacity} + dim_inactive = ${boolToString hypr.decoration.dimInactive} + dim_strength = ${toString hypr.decoration.dimStrength} + dim_special = ${toString hypr.decoration.dimSpecial} + dim_around = ${toString hypr.decoration.dimAround} + screen_shader = ${toString hypr.decoration.screenShader} + border_part_of_window = ${boolToString hypr.decoration.borderPartOfWindow} + + blur { + enabled = ${boolToString hypr.decoration.blur.enabled} + size = ${toString hypr.decoration.blur.size} + passes = ${toString hypr.decoration.blur.passes} + ignore_opacity = ${boolToString hypr.decoration.blur.ignoreOpacity} + new_optimizations = ${boolToString hypr.decoration.blur.newOptimizations} + xray = ${boolToString hypr.decoration.blur.xray} + noise = ${toString hypr.decoration.blur.noise} + contrast = ${toString hypr.decoration.blur.contrast} + brightness = ${toString hypr.decoration.blur.brightness} + vibrancy = ${toString hypr.decoration.blur.vibrancy} + vibrancy_darkness = ${toString hypr.decoration.blur.vibrancyDarkness} + special = ${boolToString hypr.decoration.blur.special} + popups = ${boolToString hypr.decoration.blur.popups} + popups_ignorealpha = ${toString hypr.decoration.blur.popupsIgnorealpha} + input_methods = ${boolToString hypr.decoration.blur.inputMethods} + input_methods_ignorealpha = ${toString hypr.decoration.blur.inputMethodsIgnorealpha} + } + + shadow { + enabled = ${boolToString hypr.decoration.shadow.enabled} + range = ${toString hypr.decoration.shadow.range} + render_power = ${toString hypr.decoration.shadow.renderPower} + sharp = ${boolToString hypr.decoration.shadow.sharp} + ignore_window = ${boolToString hypr.decoration.shadow.ignoreWindow} + color = ${toString hypr.decoration.shadow.color} + ${ + if (hypr.decoration.shadow.colorInactive == null) + then "" + else "color_inactive = ${toString hypr.decoration.shadow.colorInactive}" + } + offset = ${toString hypr.decoration.shadow.offset.x} ${toString hypr.decoration.shadow.offset.y} + scale = ${toString hypr.decoration.shadow.scale} + } + } + + animations { + enabled = ${boolToString hypr.animations.enabled} + workspace_wraparound = ${boolToString hypr.animations.workspaceWraparound} + + ${concatStringsSep "\n " (map (bez: "bezier = ${bez.name}, ${floatToString bez.startX}, ${floatToString bez.startY}, ${floatToString bez.endX}, ${floatToString bez.endY}") hypr.animations.beziers)} + + ${concatStringsSep "\n " (map (anim: "animation = ${anim.name}, ${toString anim.on}, ${floatToString anim.speed}, ${anim.curve}, ${anim.style}") hypr.animations.animations)} + } + + input { + kb_model = ${toString hypr.input.kbModel} + kb_layout = ${toString hypr.input.kbLayout} + kb_variant = ${toString hypr.input.kbVariant} + kb_options = ${toString hypr.input.kbOptions} + kb_rules = ${toString hypr.input.kbRules} + kb_file = ${toString hypr.input.kbFile} + numlock_by_default = ${boolToString hypr.input.numlockByDefault} + resolve_binds_by_sym = ${boolToString hypr.input.resolveBindsBySym} + repeat_rate = ${toString hypr.input.repeatRate} + repeat_delay = ${toString hypr.input.repeatDelay} + sensitivity = ${toString hypr.input.sensitivity} + accel_profile = ${toString hypr.input.accelProfile} + force_no_accel = ${boolToString hypr.input.forceNoAccel} + left_handed = ${boolToString hypr.input.leftHanded} + scroll_points = ${toString hypr.input.scrollPoints} + scroll_method = ${toString hypr.input.scrollMethod} + scroll_button = ${toString hypr.input.scrollButton} + scroll_button_lock = ${boolToString hypr.input.scrollButtonLock} + scroll_factor = ${toString hypr.input.scrollFactor} + natural_scroll = ${boolToString hypr.input.naturalScroll} + follow_mouse = ${toString hypr.input.followMouse} + follow_mouse_threshold = ${toString hypr.input.followMouseThreshold} + focus_on_close = ${toString hypr.input.focusOnClose} + mouse_refocus = ${boolToString hypr.input.mouseRefocus} + float_switch_override_focus = ${toString hypr.input.floatSwitchOverrideFocus} + special_fallthrough = ${boolToString hypr.input.specialFallthrough} + off_window_axis_events = ${toString hypr.input.offWindowAxisEvents} + emulate_discrete_scroll = ${toString hypr.input.emulateDiscreteScroll} + + touchpad { + disable_while_typing = ${boolToString hypr.input.touchpad.disableWhileTyping} + natural_scroll = ${boolToString hypr.input.touchpad.naturalScroll} + scroll_factor = ${toString hypr.input.touchpad.scrollFactor} + middle_button_emulation = ${boolToString hypr.input.touchpad.middleButtonEmulation} + tap_button_map = ${toString hypr.input.touchpad.tapButtonMap} + clickfinger_behavior = ${boolToString hypr.input.touchpad.clickfingerBehavior} + tap-to-click = ${boolToString hypr.input.touchpad.tapToClick} + drag_lock = ${toString hypr.input.touchpad.dragLock} + tap-and-drag = ${toString hypr.input.touchpad.tapAndDrag} + flip_x = ${boolToString hypr.input.touchpad.flipX} + flip_y = ${boolToString hypr.input.touchpad.flipY} + } + + touchdevice { + transform = ${toString hypr.input.touchdevice.transform} + output = ${toString hypr.input.touchdevice.output} + enabled = ${boolToString hypr.input.touchdevice.enabled} + } + + tablet { + transform = ${toString hypr.input.tablet.transform} + output = ${toString hypr.input.tablet.output} + region_position = ${toString hypr.input.tablet.regionPosition.x} ${toString hypr.input.tablet.regionPosition.y} + absolute_region_position = ${boolToString hypr.input.tablet.absoluteRegionPosition} + region_size = ${toString hypr.input.tablet.regionSize.x} ${toString hypr.input.tablet.regionSize.y} + relative_input = ${boolToString hypr.input.tablet.relativeInput} + left_handed = ${boolToString hypr.input.tablet.leftHanded} + active_area_size = ${toString hypr.input.tablet.activeAreaSize.x} ${toString hypr.input.tablet.activeAreaSize.y} + active_area_position = ${toString hypr.input.tablet.activeAreaPosition.x} ${toString hypr.input.tablet.activeAreaPosition.y} + } + } + + gestures { + workspace_swipe = ${boolToString hypr.gestures.workspaceSwipe} + workspace_swipe_fingers = ${toString hypr.gestures.workspaceSwipeFingers} + workspace_swipe_min_fingers = ${boolToString hypr.gestures.workspaceSwipeMinFingers} + workspace_swipe_distance = ${toString hypr.gestures.workspaceSwipeDistance} + workspace_swipe_touch = ${boolToString hypr.gestures.workspaceSwipeTouch} + workspace_swipe_invert = ${boolToString hypr.gestures.workspaceSwipeInvert} + workspace_swipe_touch_invert = ${boolToString hypr.gestures.workspaceSwipeTouchInvert} + workspace_swipe_min_speed_to_force = ${toString hypr.gestures.workspaceSwipeMinSpeedToForce} + workspace_swipe_cancel_ratio = ${floatToString hypr.gestures.workspaceSwipeCancelRatio} + workspace_swipe_create_new = ${boolToString hypr.gestures.workspaceSwipeCreateNew} + workspace_swipe_direction_lock = ${boolToString hypr.gestures.workspaceSwipeDirectionLock} + workspace_swipe_direction_lock_threshold = ${toString hypr.gestures.workspaceSwipeDirectionLockThreshold} + workspace_swipe_forever = ${boolToString hypr.gestures.workspaceSwipeForever} + workspace_swipe_use_r = ${boolToString hypr.gestures.workspaceSwipeUseR} + } + + group { + auto_group = ${boolToString hypr.group.autoGroup} + insert_after_current = ${boolToString hypr.group.insertAfterCurrent} + focus_removed_window = ${boolToString hypr.group.focusRemovedWindow} + drag_into_group = ${toString hypr.group.dragIntoGroup} + merge_groups_on_drag = ${boolToString hypr.group.mergeGroupsOnDrag} + merge_groups_on_groupbar = ${boolToString hypr.group.mergeGroupsOnGroupbar} + merge_floated_into_tiled_on_groupbar = ${boolToString hypr.group.mergeFloatedIntoTiledOnGroupbar} + group_on_movetoworkspace = ${boolToString hypr.group.groupOnMovetoworkspace} + col.border_active = ${toString hypr.group.col.borderActive} + col.border_inactive = ${toString hypr.group.col.borderInactive} + col.border_locked_active = ${toString hypr.group.col.borderLockedActive} + col.border_locked_inactive = ${toString hypr.group.col.borderLockedInactive} + + groupbar { + enabled = ${boolToString hypr.group.groupbar.enabled} + font_family = ${toString hypr.group.groupbar.fontFamily} + font_size = ${toString hypr.group.groupbar.fontSize} + font_weight_active = ${toString hypr.group.groupbar.fontWeightActive} + font_weight_inactive = ${toString hypr.group.groupbar.fontWeightInactive} + gradients = ${boolToString hypr.group.groupbar.gradients} + height = ${toString hypr.group.groupbar.height} + indicator_gap = ${toString hypr.group.groupbar.indicatorGap} + indicator_height = ${toString hypr.group.groupbar.indicatorHeight} + stacked = ${boolToString hypr.group.groupbar.stacked} + priority = ${toString hypr.group.groupbar.priority} + render_titles = ${boolToString hypr.group.groupbar.renderTitles} + text_offset = ${toString hypr.group.groupbar.textOffset} + scrolling = ${boolToString hypr.group.groupbar.scrolling} + rounding = ${toString hypr.group.groupbar.rounding} + gradient_rounding = ${toString hypr.group.groupbar.gradientRounding} + round_only_edges = ${boolToString hypr.group.groupbar.roundOnlyEdges} + gradient_round_only_edges = ${boolToString hypr.group.groupbar.gradientRoundOnlyEdges} + text_color = ${toString hypr.group.groupbar.textColor} + col.active = ${toString hypr.group.groupbar.col.active} + col.inactive = ${toString hypr.group.groupbar.col.inactive} + col.locked_active = ${toString hypr.group.groupbar.col.lockedActive} + col.locked_inactive = ${toString hypr.group.groupbar.col.lockedInactive} + gaps_in = ${toString hypr.group.groupbar.gapsIn} + gaps_out = ${toString hypr.group.groupbar.gapsOut} + keep_upper_gap = ${boolToString hypr.group.groupbar.keepUpperGap} + } + } + + misc { + disable_hyprland_logo = ${boolToString hypr.misc.disableHyprlandLogo} + disable_splash_rendering = ${boolToString hypr.misc.disableSplashRendering} + col.splash = ${toString hypr.misc.col.splash} + font_family = ${toString hypr.misc.fontFamily} + splash_font_family = ${toString hypr.misc.splashFontFamily} + force_default_wallpaper = ${toString hypr.misc.forceDefaultWallpaper} + vfr = ${toString hypr.misc.vfr} + vrr = ${toString hypr.misc.vrr} + mouse_move_enables_dpms = ${boolToString hypr.misc.mouseMoveEnablesDPMS} + key_press_enables_dpms = ${boolToString hypr.misc.keyPressEnablesDPMS} + always_follow_on_dnd = ${boolToString hypr.misc.alwaysFollowOnDnd} + layers_hog_keyboard_focus = ${boolToString hypr.misc.layersHogKeyboardFocus} + animate_manual_resizes = ${boolToString hypr.misc.animateManualResizes} + animate_mouse_windowdragging = ${boolToString hypr.misc.animateMouseWindowdragging} + disable_autoreload = ${boolToString hypr.misc.disableAutoreload} + enable_swallow = ${boolToString hypr.misc.enableSwallow} + swallow_regex = ${toString hypr.misc.swallowRegex} + swallow_exception_regex = ${toString hypr.misc.swallowExceptionRegex} + focus_on_activate = ${boolToString hypr.misc.focusOnActivate} + mouse_move_focuses_monitor = ${boolToString hypr.misc.mouseMoveFocusesMonitor} + allow_session_lock_restore = ${boolToString hypr.misc.allowSessionLockRestore} + background_color = ${toString hypr.misc.backgroundColor} + close_special_on_empty = ${boolToString hypr.misc.closeSpecialOnEmpty} + new_window_takes_over_fullscreen = ${toString hypr.misc.newWindowTakesOverFullscreen} + exit_window_retains_fullscreen = ${boolToString hypr.misc.exitWindowRetainsFullscreen} + initial_workspace_tracking = ${toString hypr.misc.initialWorkspaceTracking} + middle_click_paste = ${boolToString hypr.misc.middleClickPaste} + render_unfocused_fps = ${toString hypr.misc.renderUnfocusedFps} + disable_xdg_env_checks = ${boolToString hypr.misc.disableXdgEnvChecks} + disable_hyprland_qtutils_check = ${boolToString hypr.misc.disableHyprlandQtutilsCheck} + lockdead_screen_delay = ${toString hypr.misc.lockdeadScreenDelay} + enable_anr_dialog = ${boolToString hypr.misc.enableAnrDialog} + anr_missed_pings = ${toString hypr.misc.anrMissedPings} + } + + binds { + pass_mouse_when_bound = ${boolToString hypr.binds.passMouseWhenBound} + scroll_event_delay = ${toString hypr.binds.scrollEventDelay} + workspace_back_and_forth = ${boolToString hypr.binds.workspaceBackAndForth} + hide_special_on_workspace_change = ${boolToString hypr.binds.hideSpecialOnWorkspaceChange} + allow_workspace_cycles = ${boolToString hypr.binds.allowWorkspaceCycles} + workspace_center_on = ${toString hypr.binds.workspaceCenterOn} + focus_preferred_method = ${toString hypr.binds.focusPreferredMethod} + ignore_group_lock = ${boolToString hypr.binds.ignoreGroupLock} + movefocus_cycles_fullscreen = ${boolToString hypr.binds.movefocusCyclesFullscreen} + movefocus_cycles_groupfirst = ${boolToString hypr.binds.movefocusCyclesGroupfirst} + disable_keybind_grabbing = ${boolToString hypr.binds.disableKeybindGrabbing} + window_direction_monitor_fallback = ${boolToString hypr.binds.windowDirectionMonitorFallback} + allow_pin_fullscreen = ${boolToString hypr.binds.allowPinFullscreen} + drag_threshold = ${toString hypr.binds.dragThreshold} + } + + xwayland { + enabled = ${boolToString hypr.xwayland.enabled} + use_nearest_neighbor = ${boolToString hypr.xwayland.useNearestNeighbor} + force_zero_scaling = ${boolToString hypr.xwayland.forceZeroScaling} + create_abstract_socket = ${boolToString hypr.xwayland.createAbstractSocket} + } + + opengl { + nvidia_anti_flicker = ${boolToString hypr.opengl.nvidiaAntiFlicker} + } + + render { + direct_scanout = ${toString hypr.render.directScanout} + expand_undersized_textures = ${boolToString hypr.render.expandUndersizedTextures} + xp_mode = ${boolToString hypr.render.xpMode} + ctm_animation = ${toString hypr.render.ctmAnimation} + cm_fs_passthrough = ${toString hypr.render.cmFsPassthrough} + cm_enabled = ${boolToString hypr.render.cmEnabled} + send_content_type = ${boolToString hypr.render.sendContentType} + } + + cursor { + sync_gsettings_theme = ${boolToString hypr.cursor.syncGsettingsTheme} + no_hardware_cursors = ${toString hypr.cursor.noHardwareCursors} + no_break_fs_vrr = ${toString hypr.cursor.noBreakFsVrr} + min_refresh_rate = ${toString hypr.cursor.minRefreshRate} + hotspot_padding = ${toString hypr.cursor.hotspotPadding} + inactive_timeout = ${toString hypr.cursor.inactiveTimeout} + no_warps = ${boolToString hypr.cursor.noWarps} + persistent_warps = ${boolToString hypr.cursor.persistentWarps} + warp_on_change_workspace = ${toString hypr.cursor.warpOnChangeWorkspace} + warp_on_toggle_special = ${toString hypr.cursor.warpOnToggleSpecial} + default_monitor = ${toString hypr.cursor.defaultMonitor} + zoom_factor = ${toString hypr.cursor.zoomFactor} + zoom_rigid = ${boolToString hypr.cursor.zoomRigid} + enable_hyprcursor = ${boolToString hypr.cursor.enableHyprcursor} + hide_on_key_press = ${boolToString hypr.cursor.hideOnKeyPress} + hide_on_touch = ${boolToString hypr.cursor.hideOnTouch} + use_cpu_buffer = ${toString hypr.cursor.useCpuBuffer} + warp_back_after_non_mouse_input = ${boolToString hypr.cursor.warpBackAfterNonMouseInput} + } + + ecosystem { + no_update_news = ${boolToString hypr.ecosystem.noUpdateNews} + no_donation_nag = ${boolToString hypr.ecosystem.noDonationNag} + enforce_permissions = ${boolToString hypr.ecosystem.enforcePermissions} + } + + dwindle { + pseudotile = ${boolToString hypr.dwindle.pseudotile} + preserve_split = ${boolToString hypr.dwindle.preserveSplit} + } + + master { + new_status = ${toString hypr.master.newStatus} + } + + ${concatStringsSep "\n" (map (mon: "monitor = ${mon.output}, ${mon.resolution}@${mon.refreshRate}, ${toString mon.x}x${toString mon.y}, ${floatToString mon.scale}, transform, ${toString mon.transform}") hypr.monitors.displays)} + + ${ + if hypr.monitors.defaultMonitor + then "monitor = ,preferred, auto, auto" + else "" + } + + ${concatStringsSep "\n" (map (wr: "windowrule = " + wr) hypr.windowrules)} + + ${concatStringsSep "\n" (map (ws: "workspace = " + ws) hypr.workspaces)} + + ${ + concatStringsSep "\n" ( + if hypr.monitors.bindWorkspaces == "interlaced" + then (map (x: "workspace = ${toString (x + 1)}, persistent:true, monitor:${(elemAt hypr.monitors.displays (x - ((length hypr.monitors.displays) * (x / (length hypr.monitors.displays))))).output}") (genList (x: x) 10)) + else [] + ) + } + ''; + }; +} diff --git a/dots/.config/hypr/hyprlock.conf.nix b/dots/.config/hypr/hyprlock.conf.nix new file mode 100644 index 0000000..2082e15 --- /dev/null +++ b/dots/.config/hypr/hyprlock.conf.nix @@ -0,0 +1,76 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf mkEnableOption; + + cfg = config.horseman.dots.hypr.hyprlock; + username = config.horseman.username; +in { + options = { + horseman.dots.hypr.hyprlock = { + enable = mkEnableOption "~/.config/hypr/hyprlock.conf"; + }; + }; + + config = mkIf cfg.enable { + home-manager.users.${username}.xdg.configFile."hypr/hyprlock.conf".text = '' + $font = Monospace + + general { + hide_cursor = false + } + + animations { + enabled = true + bezier = linear, 1, 1, 0, 0 + animation = fadeIn, 1, 5, linear + animation = fadeOut, 1, 5, linear + animation = inputFieldDots, 1, 2, linear + } + + background { + monitor = + path = screenshot + blur_passes = 3 + } + + input-field { + monitor = + size = 20%, 5% + outline_thickness = 3 + inner_color = rgba(0, 0, 0, 0.0) # no fill + + outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg + check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg + fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg + + font_color = rgb(143, 143, 143) + fade_on_empty = false + rounding = 15 + + font_family = $font + placeholder_text = Input password... + fail_text = $PAMFAIL + + dots_spacing = 0.3 + + position = 0, -20 + halign = center + valign = center + } + + label { + monitor = + text = $TIME + font_size = 90 + font_family = $font + + position = 0, -50 + halign = center + valign = top + } + ''; + }; +} diff --git a/dots/.config/hypr/hyprpaper.conf.nix b/dots/.config/hypr/hyprpaper.conf.nix new file mode 100644 index 0000000..78dc0d6 --- /dev/null +++ b/dots/.config/hypr/hyprpaper.conf.nix @@ -0,0 +1,34 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf mkEnableOption; + inherit (builtins) concatStringsSep; + + cfg = config.horseman.dots.hypr.hyprpaper; + username = config.horseman.username; + hypr = config.horseman.wm.hyprland.config; +in { + options = { + horseman.dots.hypr.hyprpaper = { + enable = mkEnableOption "~/.config/hypr/hyprpaper.conf"; + }; + }; + + config = mkIf cfg.enable { + home-manager.users.${username}.xdg.configFile."hypr/hyprpaper.conf".text = '' + ${concatStringsSep "\n" (map (dis: + if dis.wallpaper != null + then '' + preload = ${dis.wallpaper} + wallpaper = ${dis.output}, ${dis.wallpaper} + '' + else "") + hypr.monitors.displays)} + + preload = /home/${username}/nix-config/misc/wallpaper.jpg + wallpaper = , /home/${username}/nix-config/misc/wallpaper.jpg + ''; + }; +} diff --git a/dots/default.nix b/dots/default.nix index 172e76c..ffa0c7c 100644 --- a/dots/default.nix +++ b/dots/default.nix @@ -1,8 +1,13 @@ {...}: { imports = [ ./.warprc.nix - ./.config/kitty/kitty.conf.nix ./.config/eza/theme.yml.nix + ./.config/hypr/hypridle.conf.nix + ./.config/hypr/hyprlock.conf.nix + ./.config/hypr/hyprland.conf.nix + ./.config/hypr/hyprpaper.conf.nix + ./.config/kitty/kitty.conf.nix ./.config/wofi/style.css.nix + ./.config/waybar/style.css.nix ]; } diff --git a/machines/terra/modules.nix b/machines/terra/modules.nix index ee2db2d..52cae86 100644 --- a/machines/terra/modules.nix +++ b/machines/terra/modules.nix @@ -4,7 +4,7 @@ ]; config.horseman = { - catppuccin.flavor = "macchiato"; + catppuccin.flavor = "mocha"; users.default.enable = true; diff --git a/modules/apps/terminal/default.nix b/modules/apps/terminal/default.nix index a6cad74..5111abc 100644 --- a/modules/apps/terminal/default.nix +++ b/modules/apps/terminal/default.nix @@ -6,7 +6,7 @@ }: let inherit (lib) mkEnableOption mkIf; cfg = config.horseman.apps.terminal; - homeCfg = config.horseman; + username = config.horseman.username; in { options = { horseman.apps.terminal = { @@ -19,7 +19,7 @@ in { ]; config = mkIf cfg.enable { - home-manager.users.${homeCfg.username} = { + home-manager.users.${username} = { imports = [./helix.nix]; }; diff --git a/modules/apps/terminal/helix.nix b/modules/apps/terminal/helix.nix index 076210d..10bea16 100644 --- a/modules/apps/terminal/helix.nix +++ b/modules/apps/terminal/helix.nix @@ -1,9 +1,11 @@ -{...}: { +{osConfig, ...}: let + flavor = osConfig.horseman.catppuccin.flavor; +in { programs.helix = { enable = true; defaultEditor = true; settings = { - theme = "catppuccin_macchiato"; + theme = "catppuccin_${flavor}"; editor = { clipboard-provider = "wayland"; cursor-shape = { diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index 7d2ad20..1f9726a 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -5,7 +5,10 @@ ... }: let inherit (lib) mkIf mkEnableOption; + inherit (builtins) replaceStrings; + cfg = config.horseman.wm.hyprland; + colors = config.horseman.catppuccin.colors; in { imports = [ ./options.nix @@ -82,8 +85,8 @@ in { resizeOnBorder = true; allowTearing = false; - col.activeBorder = "rgba(b7bdf8ff)"; - col.inactiveBorder = "rgba(b7bdf840)"; + col.activeBorder = replaceStrings [" "] [""] colors.lavender-rgb; + col.inactiveBorder = replaceStrings [" " ")" "rgb"] ["" ",64)" "rgba"] colors.lavender-rgb; # Make transparent layout = "dwindle"; }; diff --git a/modules/wm/hyprland/options.nix b/modules/wm/hyprland/options.nix index 600d9ae..8506bd8 100644 --- a/modules/wm/hyprland/options.nix +++ b/modules/wm/hyprland/options.nix @@ -3,10 +3,7 @@ config, ... }: let - inherit (lib) mkOption types mkIf recursiveUpdate trivial strings lists; - inherit (builtins) concatStringsSep elem genList elemAt length; - inherit (trivial) boolToString; - inherit (strings) floatToString; + inherit (lib) mkOption types mkIf recursiveUpdate lists; inherit (lists) remove; # v0.49.0 @@ -1266,467 +1263,16 @@ in { config = mkIf cfg.enable { horseman.dots = { wofi.enable = true; + waybar.enable = true; + hypr = { + hyprland.enable = true; + hypridle.enable = true; + hyprpaper.enable = true; + hyprlock.enable = true; + }; }; home-manager.users.${homeCfg.username} = { - xdg.configFile."hypr/hypridle.conf".text = '' - # This file has been auto-generated. - general { - lock_cmd = ${cfg.config.sleep.lockCommand} - } - - ${concatStringsSep "\n\n" (map (lis: '' - listener { - timeout = ${toString lis.timeout} - on-timeout = ${lis.onTimeout} - on-resume = ${lis.onResume} - } - '') - cfg.config.sleep.listeners)} - ''; - - xdg.configFile."hypr/hyprpaper.conf".text = '' - # This file has been auto-generated. - ${concatStringsSep "\n" (map (dis: - if dis.wallpaper != null - then '' - preload = ${dis.wallpaper} - wallpaper = ${dis.output}, ${dis.wallpaper} - '' - else "") - cfg.config.monitors.displays)} - - preload = /home/horseman/nix-config/misc/wallpaper.jpg - wallpaper = , /home/horseman/nix-config/misc/wallpaper.jpg - ''; - - xdg.configFile."hypr/hyprlock.conf".text = '' - $font = Monospace - - general { - hide_cursor = false - } - - animations { - enabled = true - bezier = linear, 1, 1, 0, 0 - animation = fadeIn, 1, 5, linear - animation = fadeOut, 1, 5, linear - animation = inputFieldDots, 1, 2, linear - } - - background { - monitor = - path = screenshot - blur_passes = 3 - } - - input-field { - monitor = - size = 20%, 5% - outline_thickness = 3 - inner_color = rgba(0, 0, 0, 0.0) # no fill - - outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg - check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg - fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg - - font_color = rgb(143, 143, 143) - fade_on_empty = false - rounding = 15 - - font_family = $font - placeholder_text = Input password... - fail_text = $PAMFAIL - - dots_spacing = 0.3 - - position = 0, -20 - halign = center - valign = center - } - - label { - monitor = - text = $TIME - font_size = 90 - font_family = $font - - position = 0, -50 - halign = center - valign = top - } - ''; - - xdg.configFile."hypr/hyprland.conf".text = '' - # This file has been auto-generated. - - ${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${ - if (elem "m" kb.flags) # Mouse binds take one argument less - then "" - else ", ${kb.params}" - }") - cfg.config.keybindings.binds)} - - ${concatStringsSep "\n\n" (map (sm: '' - bind${concatStringsSep "" sm.enterBind.flags} = ${concatStringsSep " " sm.enterBind.mods}, ${sm.enterBind.key}, submap, ${sm.name} - submap = ${sm.name} - - ${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${ - if (elem "m" kb.flags) # Mouse binds take one argument less - then "" - else ", ${kb.params}" - }") - sm.binds)} - - bind${concatStringsSep "" sm.exitBind.flags} = ${concatStringsSep " " sm.exitBind.mods}, ${sm.exitBind.key}, submap, reset - submap = reset - '') - cfg.config.keybindings.submaps)} - - ${concatStringsSep "\n" (map (x: "exec-once = " + x) cfg.config.execOnce)} - - ${concatStringsSep "\n" (map (x: "env = " + x) cfg.config.env)} - - general { - border_size = ${toString cfg.config.general.borderSize} - no_border_on_floating = ${boolToString cfg.config.general.noBorderOnFloating} - gaps_in = ${toString cfg.config.general.gapsIn} - gaps_out = ${toString cfg.config.general.gapsOut} - gaps_workspaces = ${toString cfg.config.general.gapsWorkspaces} - col.inactive_border = ${cfg.config.general.col.inactiveBorder} - col.active_border = ${cfg.config.general.col.activeBorder} - col.nogroup_border = ${cfg.config.general.col.nogroupBorder} - col.nogroup_border_active = ${cfg.config.general.col.nogroupBorderActive} - layout = ${cfg.config.general.layout} - no_focus_fallback = ${boolToString cfg.config.general.noFocusFallback} - resize_on_border = ${boolToString cfg.config.general.resizeOnBorder} - extend_border_grab_area = ${toString cfg.config.general.extendBorderGrabArea} - hover_icon_on_border = ${boolToString cfg.config.general.hoverIconOnBorder} - allow_tearing = ${boolToString cfg.config.general.allowTearing} - resize_corner = ${toString cfg.config.general.resizeCorner} - - snap { - enabled = ${boolToString cfg.config.general.snap.enabled} - window_gap = ${toString cfg.config.general.snap.windowGap} - monitor_gap = ${toString cfg.config.general.snap.monitorGap} - border_overlap = ${boolToString cfg.config.general.snap.borderOverlap} - } - } - - decoration { - rounding = ${toString cfg.config.decoration.rounding} - rounding_power = ${toString cfg.config.decoration.roundingPower} - active_opacity = ${toString cfg.config.decoration.activeOpacity} - inactive_opacity = ${toString cfg.config.decoration.inactiveOpacity} - fullscreen_opacity = ${toString cfg.config.decoration.fullscreenOpacity} - dim_inactive = ${boolToString cfg.config.decoration.dimInactive} - dim_strength = ${toString cfg.config.decoration.dimStrength} - dim_special = ${toString cfg.config.decoration.dimSpecial} - dim_around = ${toString cfg.config.decoration.dimAround} - screen_shader = ${toString cfg.config.decoration.screenShader} - border_part_of_window = ${boolToString cfg.config.decoration.borderPartOfWindow} - - blur { - enabled = ${boolToString cfg.config.decoration.blur.enabled} - size = ${toString cfg.config.decoration.blur.size} - passes = ${toString cfg.config.decoration.blur.passes} - ignore_opacity = ${boolToString cfg.config.decoration.blur.ignoreOpacity} - new_optimizations = ${boolToString cfg.config.decoration.blur.newOptimizations} - xray = ${boolToString cfg.config.decoration.blur.xray} - noise = ${toString cfg.config.decoration.blur.noise} - contrast = ${toString cfg.config.decoration.blur.contrast} - brightness = ${toString cfg.config.decoration.blur.brightness} - vibrancy = ${toString cfg.config.decoration.blur.vibrancy} - vibrancy_darkness = ${toString cfg.config.decoration.blur.vibrancyDarkness} - special = ${boolToString cfg.config.decoration.blur.special} - popups = ${boolToString cfg.config.decoration.blur.popups} - popups_ignorealpha = ${toString cfg.config.decoration.blur.popupsIgnorealpha} - input_methods = ${boolToString cfg.config.decoration.blur.inputMethods} - input_methods_ignorealpha = ${toString cfg.config.decoration.blur.inputMethodsIgnorealpha} - } - - shadow { - enabled = ${boolToString cfg.config.decoration.shadow.enabled} - range = ${toString cfg.config.decoration.shadow.range} - render_power = ${toString cfg.config.decoration.shadow.renderPower} - sharp = ${boolToString cfg.config.decoration.shadow.sharp} - ignore_window = ${boolToString cfg.config.decoration.shadow.ignoreWindow} - color = ${toString cfg.config.decoration.shadow.color} - ${ - if (cfg.config.decoration.shadow.colorInactive == null) - then "" - else "color_inactive = ${toString cfg.config.decoration.shadow.colorInactive}" - } - offset = ${toString cfg.config.decoration.shadow.offset.x} ${toString cfg.config.decoration.shadow.offset.y} - scale = ${toString cfg.config.decoration.shadow.scale} - } - } - - animations { - enabled = ${boolToString cfg.config.animations.enabled} - workspace_wraparound = ${boolToString cfg.config.animations.workspaceWraparound} - - ${concatStringsSep "\n " (map (bez: "bezier = ${bez.name}, ${floatToString bez.startX}, ${floatToString bez.startY}, ${floatToString bez.endX}, ${floatToString bez.endY}") cfg.config.animations.beziers)} - - ${concatStringsSep "\n " (map (anim: "animation = ${anim.name}, ${toString anim.on}, ${floatToString anim.speed}, ${anim.curve}, ${anim.style}") cfg.config.animations.animations)} - } - - input { - kb_model = ${toString cfg.config.input.kbModel} - kb_layout = ${toString cfg.config.input.kbLayout} - kb_variant = ${toString cfg.config.input.kbVariant} - kb_options = ${toString cfg.config.input.kbOptions} - kb_rules = ${toString cfg.config.input.kbRules} - kb_file = ${toString cfg.config.input.kbFile} - numlock_by_default = ${boolToString cfg.config.input.numlockByDefault} - resolve_binds_by_sym = ${boolToString cfg.config.input.resolveBindsBySym} - repeat_rate = ${toString cfg.config.input.repeatRate} - repeat_delay = ${toString cfg.config.input.repeatDelay} - sensitivity = ${toString cfg.config.input.sensitivity} - accel_profile = ${toString cfg.config.input.accelProfile} - force_no_accel = ${boolToString cfg.config.input.forceNoAccel} - left_handed = ${boolToString cfg.config.input.leftHanded} - scroll_points = ${toString cfg.config.input.scrollPoints} - scroll_method = ${toString cfg.config.input.scrollMethod} - scroll_button = ${toString cfg.config.input.scrollButton} - scroll_button_lock = ${boolToString cfg.config.input.scrollButtonLock} - scroll_factor = ${toString cfg.config.input.scrollFactor} - natural_scroll = ${boolToString cfg.config.input.naturalScroll} - follow_mouse = ${toString cfg.config.input.followMouse} - follow_mouse_threshold = ${toString cfg.config.input.followMouseThreshold} - focus_on_close = ${toString cfg.config.input.focusOnClose} - mouse_refocus = ${boolToString cfg.config.input.mouseRefocus} - float_switch_override_focus = ${toString cfg.config.input.floatSwitchOverrideFocus} - special_fallthrough = ${boolToString cfg.config.input.specialFallthrough} - off_window_axis_events = ${toString cfg.config.input.offWindowAxisEvents} - emulate_discrete_scroll = ${toString cfg.config.input.emulateDiscreteScroll} - - touchpad { - disable_while_typing = ${boolToString cfg.config.input.touchpad.disableWhileTyping} - natural_scroll = ${boolToString cfg.config.input.touchpad.naturalScroll} - scroll_factor = ${toString cfg.config.input.touchpad.scrollFactor} - middle_button_emulation = ${boolToString cfg.config.input.touchpad.middleButtonEmulation} - tap_button_map = ${toString cfg.config.input.touchpad.tapButtonMap} - clickfinger_behavior = ${boolToString cfg.config.input.touchpad.clickfingerBehavior} - tap-to-click = ${boolToString cfg.config.input.touchpad.tapToClick} - drag_lock = ${toString cfg.config.input.touchpad.dragLock} - tap-and-drag = ${toString cfg.config.input.touchpad.tapAndDrag} - flip_x = ${boolToString cfg.config.input.touchpad.flipX} - flip_y = ${boolToString cfg.config.input.touchpad.flipY} - } - - touchdevice { - transform = ${toString cfg.config.input.touchdevice.transform} - output = ${toString cfg.config.input.touchdevice.output} - enabled = ${boolToString cfg.config.input.touchdevice.enabled} - } - - tablet { - transform = ${toString cfg.config.input.tablet.transform} - output = ${toString cfg.config.input.tablet.output} - region_position = ${toString cfg.config.input.tablet.regionPosition.x} ${toString cfg.config.input.tablet.regionPosition.y} - absolute_region_position = ${boolToString cfg.config.input.tablet.absoluteRegionPosition} - region_size = ${toString cfg.config.input.tablet.regionSize.x} ${toString cfg.config.input.tablet.regionSize.y} - relative_input = ${boolToString cfg.config.input.tablet.relativeInput} - left_handed = ${boolToString cfg.config.input.tablet.leftHanded} - active_area_size = ${toString cfg.config.input.tablet.activeAreaSize.x} ${toString cfg.config.input.tablet.activeAreaSize.y} - active_area_position = ${toString cfg.config.input.tablet.activeAreaPosition.x} ${toString cfg.config.input.tablet.activeAreaPosition.y} - } - } - - gestures { - workspace_swipe = ${boolToString cfg.config.gestures.workspaceSwipe} - workspace_swipe_fingers = ${toString cfg.config.gestures.workspaceSwipeFingers} - workspace_swipe_min_fingers = ${boolToString cfg.config.gestures.workspaceSwipeMinFingers} - workspace_swipe_distance = ${toString cfg.config.gestures.workspaceSwipeDistance} - workspace_swipe_touch = ${boolToString cfg.config.gestures.workspaceSwipeTouch} - workspace_swipe_invert = ${boolToString cfg.config.gestures.workspaceSwipeInvert} - workspace_swipe_touch_invert = ${boolToString cfg.config.gestures.workspaceSwipeTouchInvert} - workspace_swipe_min_speed_to_force = ${toString cfg.config.gestures.workspaceSwipeMinSpeedToForce} - workspace_swipe_cancel_ratio = ${floatToString cfg.config.gestures.workspaceSwipeCancelRatio} - workspace_swipe_create_new = ${boolToString cfg.config.gestures.workspaceSwipeCreateNew} - workspace_swipe_direction_lock = ${boolToString cfg.config.gestures.workspaceSwipeDirectionLock} - workspace_swipe_direction_lock_threshold = ${toString cfg.config.gestures.workspaceSwipeDirectionLockThreshold} - workspace_swipe_forever = ${boolToString cfg.config.gestures.workspaceSwipeForever} - workspace_swipe_use_r = ${boolToString cfg.config.gestures.workspaceSwipeUseR} - } - - group { - auto_group = ${boolToString cfg.config.group.autoGroup} - insert_after_current = ${boolToString cfg.config.group.insertAfterCurrent} - focus_removed_window = ${boolToString cfg.config.group.focusRemovedWindow} - drag_into_group = ${toString cfg.config.group.dragIntoGroup} - merge_groups_on_drag = ${boolToString cfg.config.group.mergeGroupsOnDrag} - merge_groups_on_groupbar = ${boolToString cfg.config.group.mergeGroupsOnGroupbar} - merge_floated_into_tiled_on_groupbar = ${boolToString cfg.config.group.mergeFloatedIntoTiledOnGroupbar} - group_on_movetoworkspace = ${boolToString cfg.config.group.groupOnMovetoworkspace} - col.border_active = ${toString cfg.config.group.col.borderActive} - col.border_inactive = ${toString cfg.config.group.col.borderInactive} - col.border_locked_active = ${toString cfg.config.group.col.borderLockedActive} - col.border_locked_inactive = ${toString cfg.config.group.col.borderLockedInactive} - - groupbar { - enabled = ${boolToString cfg.config.group.groupbar.enabled} - font_family = ${toString cfg.config.group.groupbar.fontFamily} - font_size = ${toString cfg.config.group.groupbar.fontSize} - font_weight_active = ${toString cfg.config.group.groupbar.fontWeightActive} - font_weight_inactive = ${toString cfg.config.group.groupbar.fontWeightInactive} - gradients = ${boolToString cfg.config.group.groupbar.gradients} - height = ${toString cfg.config.group.groupbar.height} - indicator_gap = ${toString cfg.config.group.groupbar.indicatorGap} - indicator_height = ${toString cfg.config.group.groupbar.indicatorHeight} - stacked = ${boolToString cfg.config.group.groupbar.stacked} - priority = ${toString cfg.config.group.groupbar.priority} - render_titles = ${boolToString cfg.config.group.groupbar.renderTitles} - text_offset = ${toString cfg.config.group.groupbar.textOffset} - scrolling = ${boolToString cfg.config.group.groupbar.scrolling} - rounding = ${toString cfg.config.group.groupbar.rounding} - gradient_rounding = ${toString cfg.config.group.groupbar.gradientRounding} - round_only_edges = ${boolToString cfg.config.group.groupbar.roundOnlyEdges} - gradient_round_only_edges = ${boolToString cfg.config.group.groupbar.gradientRoundOnlyEdges} - text_color = ${toString cfg.config.group.groupbar.textColor} - col.active = ${toString cfg.config.group.groupbar.col.active} - col.inactive = ${toString cfg.config.group.groupbar.col.inactive} - col.locked_active = ${toString cfg.config.group.groupbar.col.lockedActive} - col.locked_inactive = ${toString cfg.config.group.groupbar.col.lockedInactive} - gaps_in = ${toString cfg.config.group.groupbar.gapsIn} - gaps_out = ${toString cfg.config.group.groupbar.gapsOut} - keep_upper_gap = ${boolToString cfg.config.group.groupbar.keepUpperGap} - } - } - - misc { - disable_hyprland_logo = ${boolToString cfg.config.misc.disableHyprlandLogo} - disable_splash_rendering = ${boolToString cfg.config.misc.disableSplashRendering} - col.splash = ${toString cfg.config.misc.col.splash} - font_family = ${toString cfg.config.misc.fontFamily} - splash_font_family = ${toString cfg.config.misc.splashFontFamily} - force_default_wallpaper = ${toString cfg.config.misc.forceDefaultWallpaper} - vfr = ${toString cfg.config.misc.vfr} - vrr = ${toString cfg.config.misc.vrr} - mouse_move_enables_dpms = ${boolToString cfg.config.misc.mouseMoveEnablesDPMS} - key_press_enables_dpms = ${boolToString cfg.config.misc.keyPressEnablesDPMS} - always_follow_on_dnd = ${boolToString cfg.config.misc.alwaysFollowOnDnd} - layers_hog_keyboard_focus = ${boolToString cfg.config.misc.layersHogKeyboardFocus} - animate_manual_resizes = ${boolToString cfg.config.misc.animateManualResizes} - animate_mouse_windowdragging = ${boolToString cfg.config.misc.animateMouseWindowdragging} - disable_autoreload = ${boolToString cfg.config.misc.disableAutoreload} - enable_swallow = ${boolToString cfg.config.misc.enableSwallow} - swallow_regex = ${toString cfg.config.misc.swallowRegex} - swallow_exception_regex = ${toString cfg.config.misc.swallowExceptionRegex} - focus_on_activate = ${boolToString cfg.config.misc.focusOnActivate} - mouse_move_focuses_monitor = ${boolToString cfg.config.misc.mouseMoveFocusesMonitor} - allow_session_lock_restore = ${boolToString cfg.config.misc.allowSessionLockRestore} - background_color = ${toString cfg.config.misc.backgroundColor} - close_special_on_empty = ${boolToString cfg.config.misc.closeSpecialOnEmpty} - new_window_takes_over_fullscreen = ${toString cfg.config.misc.newWindowTakesOverFullscreen} - exit_window_retains_fullscreen = ${boolToString cfg.config.misc.exitWindowRetainsFullscreen} - initial_workspace_tracking = ${toString cfg.config.misc.initialWorkspaceTracking} - middle_click_paste = ${boolToString cfg.config.misc.middleClickPaste} - render_unfocused_fps = ${toString cfg.config.misc.renderUnfocusedFps} - disable_xdg_env_checks = ${boolToString cfg.config.misc.disableXdgEnvChecks} - disable_hyprland_qtutils_check = ${boolToString cfg.config.misc.disableHyprlandQtutilsCheck} - lockdead_screen_delay = ${toString cfg.config.misc.lockdeadScreenDelay} - enable_anr_dialog = ${boolToString cfg.config.misc.enableAnrDialog} - anr_missed_pings = ${toString cfg.config.misc.anrMissedPings} - } - - binds { - pass_mouse_when_bound = ${boolToString cfg.config.binds.passMouseWhenBound} - scroll_event_delay = ${toString cfg.config.binds.scrollEventDelay} - workspace_back_and_forth = ${boolToString cfg.config.binds.workspaceBackAndForth} - hide_special_on_workspace_change = ${boolToString cfg.config.binds.hideSpecialOnWorkspaceChange} - allow_workspace_cycles = ${boolToString cfg.config.binds.allowWorkspaceCycles} - workspace_center_on = ${toString cfg.config.binds.workspaceCenterOn} - focus_preferred_method = ${toString cfg.config.binds.focusPreferredMethod} - ignore_group_lock = ${boolToString cfg.config.binds.ignoreGroupLock} - movefocus_cycles_fullscreen = ${boolToString cfg.config.binds.movefocusCyclesFullscreen} - movefocus_cycles_groupfirst = ${boolToString cfg.config.binds.movefocusCyclesGroupfirst} - disable_keybind_grabbing = ${boolToString cfg.config.binds.disableKeybindGrabbing} - window_direction_monitor_fallback = ${boolToString cfg.config.binds.windowDirectionMonitorFallback} - allow_pin_fullscreen = ${boolToString cfg.config.binds.allowPinFullscreen} - drag_threshold = ${toString cfg.config.binds.dragThreshold} - } - - xwayland { - enabled = ${boolToString cfg.config.xwayland.enabled} - use_nearest_neighbor = ${boolToString cfg.config.xwayland.useNearestNeighbor} - force_zero_scaling = ${boolToString cfg.config.xwayland.forceZeroScaling} - create_abstract_socket = ${boolToString cfg.config.xwayland.createAbstractSocket} - } - - opengl { - nvidia_anti_flicker = ${boolToString cfg.config.opengl.nvidiaAntiFlicker} - } - - render { - direct_scanout = ${toString cfg.config.render.directScanout} - expand_undersized_textures = ${boolToString cfg.config.render.expandUndersizedTextures} - xp_mode = ${boolToString cfg.config.render.xpMode} - ctm_animation = ${toString cfg.config.render.ctmAnimation} - cm_fs_passthrough = ${toString cfg.config.render.cmFsPassthrough} - cm_enabled = ${boolToString cfg.config.render.cmEnabled} - send_content_type = ${boolToString cfg.config.render.sendContentType} - } - - cursor { - sync_gsettings_theme = ${boolToString cfg.config.cursor.syncGsettingsTheme} - no_hardware_cursors = ${toString cfg.config.cursor.noHardwareCursors} - no_break_fs_vrr = ${toString cfg.config.cursor.noBreakFsVrr} - min_refresh_rate = ${toString cfg.config.cursor.minRefreshRate} - hotspot_padding = ${toString cfg.config.cursor.hotspotPadding} - inactive_timeout = ${toString cfg.config.cursor.inactiveTimeout} - no_warps = ${boolToString cfg.config.cursor.noWarps} - persistent_warps = ${boolToString cfg.config.cursor.persistentWarps} - warp_on_change_workspace = ${toString cfg.config.cursor.warpOnChangeWorkspace} - warp_on_toggle_special = ${toString cfg.config.cursor.warpOnToggleSpecial} - default_monitor = ${toString cfg.config.cursor.defaultMonitor} - zoom_factor = ${toString cfg.config.cursor.zoomFactor} - zoom_rigid = ${boolToString cfg.config.cursor.zoomRigid} - enable_hyprcursor = ${boolToString cfg.config.cursor.enableHyprcursor} - hide_on_key_press = ${boolToString cfg.config.cursor.hideOnKeyPress} - hide_on_touch = ${boolToString cfg.config.cursor.hideOnTouch} - use_cpu_buffer = ${toString cfg.config.cursor.useCpuBuffer} - warp_back_after_non_mouse_input = ${boolToString cfg.config.cursor.warpBackAfterNonMouseInput} - } - - ecosystem { - no_update_news = ${boolToString cfg.config.ecosystem.noUpdateNews} - no_donation_nag = ${boolToString cfg.config.ecosystem.noDonationNag} - enforce_permissions = ${boolToString cfg.config.ecosystem.enforcePermissions} - } - - dwindle { - pseudotile = ${boolToString cfg.config.dwindle.pseudotile} - preserve_split = ${boolToString cfg.config.dwindle.preserveSplit} - } - - master { - new_status = ${toString cfg.config.master.newStatus} - } - - ${concatStringsSep "\n" (map (mon: "monitor = ${mon.output}, ${mon.resolution}@${mon.refreshRate}, ${toString mon.x}x${toString mon.y}, ${floatToString mon.scale}, transform, ${toString mon.transform}") cfg.config.monitors.displays)} - - ${ - if cfg.config.monitors.defaultMonitor - then "monitor = ,preferred, auto, auto" - else "" - } - - ${concatStringsSep "\n" (map (wr: "windowrule = " + wr) cfg.config.windowrules)} - - ${concatStringsSep "\n" (map (ws: "workspace = " + ws) cfg.config.workspaces)} - - ${ - concatStringsSep "\n" ( - if cfg.config.monitors.bindWorkspaces == "interlaced" - then (map (x: "workspace = ${toString (x + 1)}, persistent:true, monitor:${(elemAt cfg.config.monitors.displays (x - ((length cfg.config.monitors.displays) * (x / (length cfg.config.monitors.displays))))).output}") (genList (x: x) 10)) - else [] - ) - } - ''; - programs.waybar = { enable = true; @@ -1790,7 +1336,6 @@ in { } (recursiveUpdate cfg.config.waybar.modules cfg.config.waybar.formats.vertical); }; }; - xdg.configFile."waybar/style.css".source = ./config/waybar/style.css; }; }; }