From 74e63c6c405d683f27b22032c8b4ecbce835e1a3 Mon Sep 17 00:00:00 2001 From: quirinecker Date: Thu, 28 May 2026 18:51:25 +0200 Subject: [PATCH] ported hyprland config to lua --- homemanager/hyprland.nix | 7 +- homemanager/hyprland/.luarc.json | 7 + homemanager/hyprland/hl.meta.lua | 1266 ++++++++++++++++++++++++++ homemanager/hyprland/hyprland.conf | 298 ------ homemanager/hyprland/hyprland.lua | 369 ++++++++ homemanager/hyprland/hyprlaptop.conf | 105 --- homemanager/hyprland/hyprlock.conf | 142 --- homemanager/hyprland/hyprpaper.conf | 9 - 8 files changed, 1647 insertions(+), 556 deletions(-) create mode 100644 homemanager/hyprland/.luarc.json create mode 100644 homemanager/hyprland/hl.meta.lua delete mode 100644 homemanager/hyprland/hyprland.conf create mode 100644 homemanager/hyprland/hyprland.lua delete mode 100644 homemanager/hyprland/hyprlaptop.conf delete mode 100644 homemanager/hyprland/hyprlock.conf delete mode 100644 homemanager/hyprland/hyprpaper.conf diff --git a/homemanager/hyprland.nix b/homemanager/hyprland.nix index 7cb8ff1..ad1c29c 100644 --- a/homemanager/hyprland.nix +++ b/homemanager/hyprland.nix @@ -23,11 +23,14 @@ in ]; xdg.configFile = { - "hypr/hyprland.conf".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hyprland.conf; + "hypr/hyprland.lua".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hyprland.lua; + + # The stups get linked to the config directory as well in order to use the autocomplete without copying it over in other places. + "hypr/hl.meta.lua".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hl.meta.lua; "hypr/hypridle.conf".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hypridle.conf; "backgrounds".source = config.lib.file.mkOutOfStoreSymlink ./backgrounds; - "hypr/hyprland.hardware.conf".text = config.modules.hyprland.hardwareConfig; + "hypr/hyprland_hardware.lua".text = config.modules.hyprland.hardwareConfig; "hypr/nix.conf".text = '' $defaultBrowser=${defaultBrowser} diff --git a/homemanager/hyprland/.luarc.json b/homemanager/hyprland/.luarc.json new file mode 100644 index 0000000..fcc04f3 --- /dev/null +++ b/homemanager/hyprland/.luarc.json @@ -0,0 +1,7 @@ +{ + "workspace": { + "library": [ + "./hl.meta.lua" + ] + } +} diff --git a/homemanager/hyprland/hl.meta.lua b/homemanager/hyprland/hl.meta.lua new file mode 100644 index 0000000..0e6884a --- /dev/null +++ b/homemanager/hyprland/hl.meta.lua @@ -0,0 +1,1266 @@ +-- This file is autogenerated. Do not edit by hand. +-- Generator: scripts/generateLuaStubs.py +---@meta + +---@alias HL.EventName +---| "config.reloaded" +---| "hyprland.shutdown" +---| "hyprland.start" +---| "keybinds.submap" +---| "layer.closed" +---| "layer.opened" +---| "monitor.added" +---| "monitor.focused" +---| "monitor.layout_changed" +---| "monitor.removed" +---| "screenshare.state" +---| "window.active" +---| "window.class" +---| "window.close" +---| "window.destroy" +---| "window.fullscreen" +---| "window.kill" +---| "window.move_to_workspace" +---| "window.open" +---| "window.open_early" +---| "window.pin" +---| "window.title" +---| "window.update_rules" +---| "window.urgent" +---| "workspace.active" +---| "workspace.created" +---| "workspace.move_to_monitor" +---| "workspace.removed" + +---@alias HL.ConfigKey +---| "animations.enabled" +---| "animations.workspace_wraparound" +---| "binds.allow_pin_fullscreen" +---| "binds.allow_workspace_cycles" +---| "binds.disable_keybind_grabbing" +---| "binds.drag_threshold" +---| "binds.focus_preferred_method" +---| "binds.hide_special_on_workspace_change" +---| "binds.ignore_group_lock" +---| "binds.movefocus_cycles_fullscreen" +---| "binds.movefocus_cycles_groupfirst" +---| "binds.pass_mouse_when_bound" +---| "binds.scroll_event_delay" +---| "binds.window_direction_monitor_fallback" +---| "binds.workspace_back_and_forth" +---| "binds.workspace_center_on" +---| "cursor.default_monitor" +---| "cursor.enable_hyprcursor" +---| "cursor.hide_on_key_press" +---| "cursor.hide_on_tablet" +---| "cursor.hide_on_touch" +---| "cursor.hotspot_padding" +---| "cursor.inactive_timeout" +---| "cursor.invisible" +---| "cursor.min_refresh_rate" +---| "cursor.no_break_fs_vrr" +---| "cursor.no_hardware_cursors" +---| "cursor.no_warps" +---| "cursor.persistent_warps" +---| "cursor.sync_gsettings_theme" +---| "cursor.use_cpu_buffer" +---| "cursor.warp_back_after_non_mouse_input" +---| "cursor.warp_on_change_workspace" +---| "cursor.warp_on_toggle_special" +---| "cursor.zoom_detached_camera" +---| "cursor.zoom_disable_aa" +---| "cursor.zoom_factor" +---| "cursor.zoom_rigid" +---| "debug.colored_stdout_logs" +---| "debug.damage_blink" +---| "debug.damage_tracking" +---| "debug.disable_logs" +---| "debug.disable_scale_checks" +---| "debug.disable_time" +---| "debug.ds_handle_same_buffer" +---| "debug.ds_handle_same_buffer_fifo" +---| "debug.enable_stdout_logs" +---| "debug.error_limit" +---| "debug.error_position" +---| "debug.fifo_pending_workaround" +---| "debug.full_cm_proto" +---| "debug.gl_debugging" +---| "debug.invalidate_fp16" +---| "debug.log_damage" +---| "debug.manual_crash" +---| "debug.overlay" +---| "debug.pass" +---| "debug.render_solitary_wo_damage" +---| "debug.suppress_errors" +---| "debug.vfr" +---| "decoration.active_opacity" +---| "decoration.blur.brightness" +---| "decoration.blur.contrast" +---| "decoration.blur.enabled" +---| "decoration.blur.ignore_opacity" +---| "decoration.blur.input_methods" +---| "decoration.blur.input_methods_ignorealpha" +---| "decoration.blur.new_optimizations" +---| "decoration.blur.noise" +---| "decoration.blur.passes" +---| "decoration.blur.popups" +---| "decoration.blur.popups_ignorealpha" +---| "decoration.blur.size" +---| "decoration.blur.special" +---| "decoration.blur.vibrancy" +---| "decoration.blur.vibrancy_darkness" +---| "decoration.blur.xray" +---| "decoration.border_part_of_window" +---| "decoration.dim_around" +---| "decoration.dim_inactive" +---| "decoration.dim_modal" +---| "decoration.dim_special" +---| "decoration.dim_strength" +---| "decoration.fullscreen_opacity" +---| "decoration.glow.color" +---| "decoration.glow.color_inactive" +---| "decoration.glow.enabled" +---| "decoration.glow.range" +---| "decoration.glow.render_power" +---| "decoration.inactive_opacity" +---| "decoration.rounding" +---| "decoration.rounding_power" +---| "decoration.screen_shader" +---| "decoration.shadow.color" +---| "decoration.shadow.color_inactive" +---| "decoration.shadow.enabled" +---| "decoration.shadow.offset" +---| "decoration.shadow.range" +---| "decoration.shadow.render_power" +---| "decoration.shadow.scale" +---| "decoration.shadow.sharp" +---| "dwindle.default_split_ratio" +---| "dwindle.force_split" +---| "dwindle.permanent_direction_override" +---| "dwindle.precise_mouse_move" +---| "dwindle.preserve_split" +---| "dwindle.smart_resizing" +---| "dwindle.smart_split" +---| "dwindle.special_scale_factor" +---| "dwindle.split_bias" +---| "dwindle.split_width_multiplier" +---| "dwindle.use_active_for_splits" +---| "ecosystem.enforce_permissions" +---| "ecosystem.no_donation_nag" +---| "ecosystem.no_update_news" +---| "experimental.wp_cm_1_2" +---| "general.allow_tearing" +---| "general.border_size" +---| "general.col.active_border" +---| "general.col.inactive_border" +---| "general.col.nogroup_border" +---| "general.col.nogroup_border_active" +---| "general.extend_border_grab_area" +---| "general.float_gaps" +---| "general.gaps_in" +---| "general.gaps_out" +---| "general.gaps_workspaces" +---| "general.hover_icon_on_border" +---| "general.layout" +---| "general.locale" +---| "general.modal_parent_blocking" +---| "general.no_focus_fallback" +---| "general.resize_corner" +---| "general.resize_on_border" +---| "general.snap.border_overlap" +---| "general.snap.enabled" +---| "general.snap.monitor_gap" +---| "general.snap.respect_gaps" +---| "general.snap.window_gap" +---| "gestures.close_max_timeout" +---| "gestures.scrolling.move_snap_cursor" +---| "gestures.scrolling.move_snap_to_grid" +---| "gestures.workspace_swipe_cancel_ratio" +---| "gestures.workspace_swipe_create_new" +---| "gestures.workspace_swipe_direction_lock" +---| "gestures.workspace_swipe_direction_lock_threshold" +---| "gestures.workspace_swipe_distance" +---| "gestures.workspace_swipe_forever" +---| "gestures.workspace_swipe_invert" +---| "gestures.workspace_swipe_min_speed_to_force" +---| "gestures.workspace_swipe_touch" +---| "gestures.workspace_swipe_touch_invert" +---| "gestures.workspace_swipe_use_r" +---| "group.auto_group" +---| "group.col.border_active" +---| "group.col.border_inactive" +---| "group.col.border_locked_active" +---| "group.col.border_locked_inactive" +---| "group.drag_into_group" +---| "group.focus_removed_window" +---| "group.group_on_movetoworkspace" +---| "group.groupbar.blur" +---| "group.groupbar.col.active" +---| "group.groupbar.col.inactive" +---| "group.groupbar.col.locked_active" +---| "group.groupbar.col.locked_inactive" +---| "group.groupbar.enabled" +---| "group.groupbar.font_family" +---| "group.groupbar.font_size" +---| "group.groupbar.font_weight_active" +---| "group.groupbar.font_weight_inactive" +---| "group.groupbar.gaps_in" +---| "group.groupbar.gaps_out" +---| "group.groupbar.gradient_round_only_edges" +---| "group.groupbar.gradient_rounding" +---| "group.groupbar.gradient_rounding_power" +---| "group.groupbar.gradients" +---| "group.groupbar.height" +---| "group.groupbar.indicator_gap" +---| "group.groupbar.indicator_height" +---| "group.groupbar.keep_upper_gap" +---| "group.groupbar.middle_click_close" +---| "group.groupbar.priority" +---| "group.groupbar.render_titles" +---| "group.groupbar.round_only_edges" +---| "group.groupbar.rounding" +---| "group.groupbar.rounding_power" +---| "group.groupbar.scrolling" +---| "group.groupbar.stacked" +---| "group.groupbar.text_color" +---| "group.groupbar.text_color_inactive" +---| "group.groupbar.text_color_locked_active" +---| "group.groupbar.text_color_locked_inactive" +---| "group.groupbar.text_offset" +---| "group.groupbar.text_padding" +---| "group.insert_after_current" +---| "group.merge_floated_into_tiled_on_groupbar" +---| "group.merge_groups_on_drag" +---| "group.merge_groups_on_groupbar" +---| "input.accel_profile" +---| "input.emulate_discrete_scroll" +---| "input.float_switch_override_focus" +---| "input.focus_on_close" +---| "input.follow_mouse" +---| "input.follow_mouse_shrink" +---| "input.follow_mouse_threshold" +---| "input.force_no_accel" +---| "input.kb_file" +---| "input.kb_layout" +---| "input.kb_model" +---| "input.kb_options" +---| "input.kb_rules" +---| "input.kb_variant" +---| "input.left_handed" +---| "input.mouse_refocus" +---| "input.natural_scroll" +---| "input.numlock_by_default" +---| "input.off_window_axis_events" +---| "input.repeat_delay" +---| "input.repeat_rate" +---| "input.resolve_binds_by_sym" +---| "input.rotation" +---| "input.scroll_button" +---| "input.scroll_button_lock" +---| "input.scroll_factor" +---| "input.scroll_method" +---| "input.scroll_points" +---| "input.sensitivity" +---| "input.special_fallthrough" +---| "input.tablet.absolute_region_position" +---| "input.tablet.active_area_position" +---| "input.tablet.active_area_size" +---| "input.tablet.left_handed" +---| "input.tablet.output" +---| "input.tablet.region_position" +---| "input.tablet.region_size" +---| "input.tablet.relative_input" +---| "input.tablet.transform" +---| "input.tablettool.eraser_button_mode" +---| "input.tablettool.eraser_button_override" +---| "input.tablettool.pressure_range_max" +---| "input.tablettool.pressure_range_min" +---| "input.touchdevice.enabled" +---| "input.touchdevice.output" +---| "input.touchdevice.transform" +---| "input.touchpad.clickfinger_behavior" +---| "input.touchpad.disable_while_typing" +---| "input.touchpad.drag_3fg" +---| "input.touchpad.drag_lock" +---| "input.touchpad.flip_x" +---| "input.touchpad.flip_y" +---| "input.touchpad.middle_button_emulation" +---| "input.touchpad.natural_scroll" +---| "input.touchpad.scroll_factor" +---| "input.touchpad.tap_and_drag" +---| "input.touchpad.tap_button_map" +---| "input.touchpad.tap_to_click" +---| "input.virtualkeyboard.release_pressed_on_close" +---| "input.virtualkeyboard.share_states" +---| "layout.single_window_aspect_ratio" +---| "layout.single_window_aspect_ratio_tolerance" +---| "master.allow_small_split" +---| "master.always_keep_position" +---| "master.center_ignores_reserved" +---| "master.center_master_fallback" +---| "master.drop_at_cursor" +---| "master.focus_master_on_close" +---| "master.mfact" +---| "master.new_on_active" +---| "master.new_on_top" +---| "master.new_status" +---| "master.orientation" +---| "master.slave_count_for_center_master" +---| "master.smart_resizing" +---| "master.special_scale_factor" +---| "misc.allow_session_lock_restore" +---| "misc.always_follow_on_dnd" +---| "misc.animate_manual_resizes" +---| "misc.animate_mouse_windowdragging" +---| "misc.anr_missed_pings" +---| "misc.background_color" +---| "misc.close_special_on_empty" +---| "misc.col.splash" +---| "misc.disable_autoreload" +---| "misc.disable_hyprland_guiutils_check" +---| "misc.disable_hyprland_logo" +---| "misc.disable_scale_notification" +---| "misc.disable_splash_rendering" +---| "misc.disable_watchdog_warning" +---| "misc.disable_xdg_env_checks" +---| "misc.enable_anr_dialog" +---| "misc.enable_swallow" +---| "misc.exit_window_retains_fullscreen" +---| "misc.focus_on_activate" +---| "misc.font_family" +---| "misc.force_default_wallpaper" +---| "misc.initial_workspace_tracking" +---| "misc.key_press_enables_dpms" +---| "misc.layers_hog_keyboard_focus" +---| "misc.lockdead_screen_delay" +---| "misc.middle_click_paste" +---| "misc.mouse_move_enables_dpms" +---| "misc.mouse_move_focuses_monitor" +---| "misc.name_vk_after_proc" +---| "misc.on_focus_under_fullscreen" +---| "misc.render_unfocused_fps" +---| "misc.screencopy_force_8b" +---| "misc.session_lock_xray" +---| "misc.size_limits_tiled" +---| "misc.splash_font_family" +---| "misc.swallow_exception_regex" +---| "misc.swallow_regex" +---| "misc.vrr" +---| "opengl.nvidia_anti_flicker" +---| "quirks.prefer_hdr" +---| "quirks.skip_non_kms_dmabuf_formats" +---| "render.cm_auto_hdr" +---| "render.cm_enabled" +---| "render.cm_sdr_eotf" +---| "render.commit_timing_enabled" +---| "render.ctm_animation" +---| "render.direct_scanout" +---| "render.expand_undersized_textures" +---| "render.fp16_sdr_tf" +---| "render.icc_vcgt_enabled" +---| "render.keep_unmodified_copy" +---| "render.new_render_scheduling" +---| "render.non_shader_cm" +---| "render.non_shader_cm_interop" +---| "render.send_content_type" +---| "render.use_fp16" +---| "render.use_shader_blur_blend" +---| "render.xp_mode" +---| "scrolling.column_width" +---| "scrolling.direction" +---| "scrolling.explicit_column_widths" +---| "scrolling.focus_fit_method" +---| "scrolling.follow_focus" +---| "scrolling.follow_min_visible" +---| "scrolling.fullscreen_on_one_column" +---| "scrolling.wrap_focus" +---| "scrolling.wrap_swapcol" +---| "xwayland.create_abstract_socket" +---| "xwayland.enabled" +---| "xwayland.force_zero_scaling" +---| "xwayland.use_nearest_neighbor" + +---@alias HL.MonitorSelector string|integer|HL.Monitor +---@alias HL.WorkspaceSelector string|integer|HL.Workspace +---@alias HL.WindowSelector string|integer|HL.Window +---@alias HL.Vec2Like HL.Vec2|{x:number, y:number}|{number, number}|string +---@alias HL.CssGap integer|{top?:integer, right?:integer, bottom?:integer, left?:integer} +---@alias HL.Gradient string|{colors:string[], angle?:number} + +---@class HL.Dispatcher +local __HL_Dispatcher = {} + +---@class HL.Vec2 +---@field x number +---@field y number +local __HL_Vec2 = {} + +---@class HL.Box +---@field x number +---@field y number +---@field w number +---@field h number +local __HL_Box = {} + +---@class HL.LayoutTarget +---@field index integer +---@field window HL.Window|nil +---@field box HL.Box +---@field place fun(self: HL.LayoutTarget, box: HL.Box): nil +---@field set_box fun(self: HL.LayoutTarget, box: HL.Box): nil +local __HL_LayoutTarget = {} + +---@class HL.LayoutContext +---@field area HL.Box +---@field targets HL.LayoutTarget[] +---@field grid_cell fun(self: HL.LayoutContext, i: integer, cols: integer, rows?: integer): HL.Box +---@field column fun(self: HL.LayoutContext, i: integer, n: integer): HL.Box +---@field row fun(self: HL.LayoutContext, i: integer, n: integer): HL.Box +---@field split fun(self: HL.LayoutContext, box: HL.Box, side: 'left'|'right'|'top'|'bottom'|'up'|'down', ratio: number): HL.Box +local __HL_LayoutContext = {} + +---@class HL.LayoutProvider +---@field recalculate fun(ctx: HL.LayoutContext): nil +---@field layout_msg? fun(ctx: HL.LayoutContext, msg: string): boolean|string|nil +local __HL_LayoutProvider = {} + +---@class HL.BindOptions +---@field repeating? boolean +---@field locked? boolean +---@field release? boolean +---@field non_consuming? boolean +---@field transparent? boolean +---@field ignore_mods? boolean +---@field dont_inhibit? boolean +---@field long_press? boolean +---@field submap_universal? boolean +---@field click? boolean +---@field drag? boolean +---@field description? string +---@field desc? string +---@field device? {inclusive?: boolean, list?: string[]} +local __HL_BindOptions = {} + +---@class HL.TimerOptions +---@field timeout integer +---@field type "repeat"|"oneshot" +local __HL_TimerOptions = {} + +---@class HL.GestureSpec +---@field fingers integer +---@field direction string +---@field action string|function +---@field mods? string +---@field scale? number +---@field mode? string +---@field zoom_level? number +---@field workspace_name? string +---@field disable_inhibit? boolean +local __HL_GestureSpec = {} + +---@class HL.PermissionSpec +---@field binary string +---@field type string +---@field mode string +local __HL_PermissionSpec = {} + +---@class HL.NotificationOptions +---@field text string +---@field timeout number +---@field color? string +---@field icon? integer|string +---@field font_size? number +local __HL_NotificationOptions = {} + +---@class HL.LayerQueryFilter +---@field monitor? HL.MonitorSelector +---@field namespace? string +local __HL_LayerQueryFilter = {} + +---@class HL.WindowQueryFilter +---@field class? string +---@field floating? boolean +---@field mapped? boolean +---@field monitor? HL.MonitorSelector +---@field tag? string +---@field title? string +---@field workspace? HL.WorkspaceSelector +local __HL_WindowQueryFilter = {} + +---@class HL.DeviceSpec +---@field absolute_region_position? boolean +---@field accel_profile? string +---@field active_area_position? HL.Vec2Like +---@field active_area_size? HL.Vec2Like +---@field clickfinger_behavior? boolean +---@field disable_while_typing? boolean +---@field drag_3fg? integer|boolean +---@field drag_lock? integer|boolean +---@field enabled? boolean +---@field flip_x? boolean +---@field flip_y? boolean +---@field kb_file? string +---@field kb_layout? string +---@field kb_model? string +---@field kb_options? string +---@field kb_rules? string +---@field kb_variant? string +---@field keybinds? boolean +---@field left_handed? boolean +---@field middle_button_emulation? boolean +---@field name string +---@field natural_scroll? boolean +---@field numlock_by_default? boolean +---@field output? string +---@field region_position? HL.Vec2Like +---@field region_size? HL.Vec2Like +---@field relative_input? boolean +---@field release_pressed_on_close? boolean +---@field repeat_delay? integer|boolean +---@field repeat_rate? integer|boolean +---@field resolve_binds_by_sym? boolean +---@field rotation? integer|boolean +---@field scroll_button? integer|boolean +---@field scroll_button_lock? boolean +---@field scroll_factor? number|boolean +---@field scroll_method? string +---@field scroll_points? string +---@field sensitivity? number|boolean +---@field share_states? integer|boolean +---@field tags? string +---@field tap_and_drag? boolean +---@field tap_button_map? string +---@field tap_to_click? boolean +---@field transform? integer|boolean +local __HL_DeviceSpec = {} + +---@class HL.LayerRuleSpec +---@field above_lock? integer|boolean +---@field animation? string +---@field blur? boolean +---@field blur_popups? boolean +---@field dim_around? boolean +---@field enabled? boolean +---@field ignore_alpha? number|boolean +---@field match? table +---@field name? string +---@field no_anim? boolean +---@field no_screen_share? boolean +---@field order? integer|boolean +---@field xray? boolean +local __HL_LayerRuleSpec = {} + +---@class HL.MonitorSpec +---@field bitdepth? integer|boolean +---@field cm? string +---@field disabled? boolean +---@field icc? string +---@field max_avg_luminance? integer|boolean +---@field max_luminance? integer|boolean +---@field min_luminance? number|boolean +---@field mirror? string +---@field mode? string +---@field output string +---@field position? string +---@field reserved? integer|HL.CssGap +---@field reserved_area? integer|HL.CssGap +---@field scale? string|number +---@field sdr_eotf? string +---@field sdr_max_luminance? integer|boolean +---@field sdr_min_luminance? number|boolean +---@field sdrbrightness? number|boolean +---@field sdrsaturation? number|boolean +---@field supports_hdr? integer|boolean +---@field supports_wide_color? integer|boolean +---@field transform? integer|boolean +---@field vrr? integer|boolean +local __HL_MonitorSpec = {} + +---@class HL.WindowRuleSpec +---@field enabled? boolean +---@field match? table +---@field name? string +local __HL_WindowRuleSpec = {} + +---@class HL.WorkspaceRuleSpec +---@field animation? string +---@field border_size? integer|boolean +---@field decorate? boolean +---@field default? boolean +---@field default_name? string +---@field enabled? boolean +---@field float_gaps? integer|HL.CssGap +---@field gaps_in? integer|HL.CssGap +---@field gaps_out? integer|HL.CssGap +---@field layout? string +---@field layout_opts? table +---@field monitor? string +---@field no_border? boolean +---@field no_rounding? boolean +---@field no_shadow? boolean +---@field on_created_empty? string +---@field persistent? boolean +---@field workspace string +local __HL_WorkspaceRuleSpec = {} + +---@class HL.EventSubscription +---@field is_active fun(self: HL.EventSubscription, ...): any +---@field remove fun(self: HL.EventSubscription, ...): any +local __HL_EventSubscription = {} + +---@class HL.Group +---@field current HL.Window|nil +---@field current_index integer +---@field denied boolean +---@field locked boolean +---@field members HL.Window|table|nil +---@field size integer +local __HL_Group = {} + +---@class HL.Keybind +---@field is_enabled fun(self: HL.Keybind, ...): any +---@field remove fun(self: HL.Keybind, ...): any +---@field set_enabled fun(self: HL.Keybind, ...): any +---@field unbind fun(self: HL.Keybind, ...): any +---@field arg string +---@field auto_consuming boolean +---@field catchall boolean +---@field click boolean +---@field description any +---@field device_inclusive boolean +---@field devices nil +---@field display_key string +---@field dont_inhibit boolean +---@field drag boolean +---@field enabled boolean +---@field handler string +---@field has_description boolean +---@field ignore_mods boolean +---@field key string +---@field keycode integer +---@field locked boolean +---@field long_press boolean +---@field modmask integer +---@field mouse boolean +---@field non_consuming boolean +---@field release boolean +---@field repeating boolean +---@field submap string +---@field submap_universal boolean +---@field transparent boolean +local __HL_Keybind = {} + +---@class HL.LayerRule +---@field is_enabled fun(self: HL.LayerRule, ...): any +---@field set_enabled fun(self: HL.LayerRule, ...): any +local __HL_LayerRule = {} + +---@class HL.LayerSurface +---@field above_fullscreen boolean|nil +---@field address string +---@field h integer +---@field interactivity integer +---@field layer integer +---@field mapped boolean +---@field monitor HL.Monitor|nil +---@field namespace string +---@field pid integer +---@field w integer +---@field x integer +---@field y integer +local __HL_LayerSurface = {} + +---@class HL.Monitor +---@field active_special_workspace HL.Workspace|nil +---@field active_workspace HL.Workspace|nil +---@field cm string +---@field description string +---@field dpms_status boolean +---@field focused boolean +---@field height integer +---@field id integer +---@field is_mirror boolean +---@field mirrors HL.Monitor|table +---@field name string +---@field physical_height integer +---@field physical_width integer +---@field position integer|table +---@field refresh_rate number +---@field reserved number|table|nil +---@field scale number +---@field size integer|table +---@field transform integer +---@field vrr_active boolean +---@field width integer +---@field x integer +---@field y integer +local __HL_Monitor = {} + +---@class HL.Notification +---@field dismiss fun(self: HL.Notification, ...): any +---@field get_color fun(self: HL.Notification, ...): any +---@field get_elapsed fun(self: HL.Notification, ...): any +---@field get_elapsed_since_creation fun(self: HL.Notification, ...): any +---@field get_font_size fun(self: HL.Notification, ...): any +---@field get_icon fun(self: HL.Notification, ...): any +---@field get_text fun(self: HL.Notification, ...): any +---@field get_timeout fun(self: HL.Notification, ...): any +---@field is_alive fun(self: HL.Notification, ...): any +---@field is_paused fun(self: HL.Notification, ...): any +---@field pause fun(self: HL.Notification, ...): any +---@field resume fun(self: HL.Notification, ...): any +---@field set_color fun(self: HL.Notification, ...): any +---@field set_font_size fun(self: HL.Notification, ...): any +---@field set_icon fun(self: HL.Notification, ...): any +---@field set_paused fun(self: HL.Notification, ...): any +---@field set_text fun(self: HL.Notification, ...): any +---@field set_timeout fun(self: HL.Notification, ...): any +local __HL_Notification = {} + +---@class HL.Timer +---@field is_enabled fun(self: HL.Timer, ...): any +---@field set_enabled fun(self: HL.Timer, ...): any +---@field set_timeout fun(self: HL.Timer, ...): any +local __HL_Timer = {} + +---@class HL.Window +---@field accepts_input boolean +---@field active boolean|nil +---@field address string +---@field at integer|table +---@field class string +---@field content_type string +---@field floating boolean +---@field focus_history_id integer +---@field fullscreen integer +---@field fullscreen_client integer +---@field group HL.Group|nil +---@field hidden boolean +---@field inhibiting_idle boolean +---@field initial_class string +---@field initial_title string +---@field layout HL.Window|boolean|integer|number|string|table|nil +---@field mapped boolean +---@field monitor HL.Monitor|nil +---@field over_fullscreen boolean +---@field pid integer +---@field pinned boolean +---@field size integer|table +---@field stable_id integer +---@field swallowing HL.Window|nil +---@field tags string|table +---@field title string +---@field visible boolean +---@field workspace HL.Workspace|nil +---@field xdg_description string|nil +---@field xdg_tag string|nil +---@field xwayland boolean +local __HL_Window = {} + +---@class HL.WindowRule +---@field is_enabled fun(self: HL.WindowRule, ...): any +---@field set_enabled fun(self: HL.WindowRule, ...): any +local __HL_WindowRule = {} + +---@class HL.Workspace +---@field get_groups fun(self: HL.Workspace, ...): any +---@field get_windows fun(self: HL.Workspace, ...): any +---@field active boolean +---@field config_name string +---@field fullscreen_mode integer +---@field fullscreen_window HL.Window|nil +---@field groups integer|nil +---@field has_fullscreen boolean +---@field has_urgent boolean +---@field id integer +---@field is_empty boolean +---@field is_persistent boolean +---@field last_window HL.Window|nil +---@field monitor HL.Monitor|nil +---@field name string +---@field special boolean +---@field tiled_layout string +---@field visible boolean +---@field windows integer +local __HL_Workspace = {} + +---@class HL.API +---@field animation fun(...): any +---@field bind fun(keys: string, dispatcher: HL.Dispatcher|function, opts?: HL.BindOptions): HL.Keybind +---@field config fun(config: table): nil +---@field curve fun(...): any +---@field define_submap fun(name: string, reset_or_fn: string|function, fn?: function): nil +---@field device fun(spec: HL.DeviceSpec): nil +---@field dispatch fun(dispatcher: HL.Dispatcher|function): any +---@field env fun(...): any +---@field exec_cmd fun(cmd: string, rules?: table): nil +---@field gesture fun(spec: HL.GestureSpec): nil +---@field get_active_monitor fun(): HL.Monitor|nil +---@field get_active_special_workspace fun(monitor?: HL.MonitorSelector): HL.Workspace|nil +---@field get_active_window fun(): HL.Window|nil +---@field get_active_workspace fun(monitor?: HL.MonitorSelector): HL.Workspace|nil +---@field get_config fun(key: HL.ConfigKey|string): any, string? +---@field get_current_submap fun(): string +---@field get_cursor_pos fun(): HL.Vec2|nil +---@field get_last_window fun(): HL.Window|nil +---@field get_last_workspace fun(monitor?: HL.MonitorSelector): HL.Workspace|nil +---@field get_layers fun(filters?: HL.LayerQueryFilter): HL.LayerSurface[] +---@field get_loaded_plugins fun(...): any +---@field get_monitor fun(selector: HL.MonitorSelector): HL.Monitor|nil +---@field get_monitor_at fun(x: number|HL.Vec2, y?: number): HL.Monitor|nil +---@field get_monitor_at_cursor fun(): HL.Monitor|nil +---@field get_monitors fun(): HL.Monitor[] +---@field get_urgent_window fun(): HL.Window|nil +---@field get_window fun(selector: HL.WindowSelector): HL.Window|nil +---@field get_windows fun(filters?: HL.WindowQueryFilter): HL.Window[] +---@field get_workspace fun(selector: HL.WorkspaceSelector): HL.Workspace|nil +---@field get_workspace_windows fun(workspace: HL.WorkspaceSelector): HL.Window[] +---@field get_workspaces fun(): HL.Workspace[] +---@field layer_rule fun(spec: HL.LayerRuleSpec): HL.LayerRule +---@field monitor fun(spec: HL.MonitorSpec): nil +---@field on fun(event: HL.EventName, cb: fun(...)): HL.EventSubscription +---@field permission fun(spec: HL.PermissionSpec): nil +---@field timer fun(callback: function, opts: HL.TimerOptions): HL.Timer +---@field unbind fun(...): any +---@field version fun(...): any +---@field window_rule fun(spec: HL.WindowRuleSpec): HL.WindowRule +---@field workspace_rule fun(spec: HL.WorkspaceRuleSpec): nil +---@field dsp HL.DspNamespace +---@field layout HL.LayoutNamespace +---@field notification HL.NotificationNamespace +---@field plugin HL.PluginNamespace +local __HL_API = {} + +---@class HL.DspNamespace +---@field dpms fun(...): HL.Dispatcher +---@field event fun(...): HL.Dispatcher +---@field exec_cmd fun(...): HL.Dispatcher +---@field exec_raw fun(...): HL.Dispatcher +---@field exit fun(...): HL.Dispatcher +---@field focus fun(...): HL.Dispatcher +---@field force_idle fun(...): HL.Dispatcher +---@field force_renderer_reload fun(...): HL.Dispatcher +---@field global fun(...): HL.Dispatcher +---@field layout fun(...): HL.Dispatcher +---@field no_op fun(...): HL.Dispatcher +---@field pass fun(...): HL.Dispatcher +---@field send_key_state fun(...): HL.Dispatcher +---@field send_shortcut fun(...): HL.Dispatcher +---@field submap fun(...): HL.Dispatcher +---@field cursor HL.DspCursorNamespace +---@field group HL.DspGroupNamespace +---@field window HL.DspWindowNamespace +---@field workspace HL.DspWorkspaceNamespace +local __HL_DspNamespace = {} + +---@class HL.DspCursorNamespace +---@field move fun(...): HL.Dispatcher +---@field move_to_corner fun(...): HL.Dispatcher +local __HL_DspCursorNamespace = {} + +---@class HL.DspGroupNamespace +---@field active fun(...): HL.Dispatcher +---@field lock fun(...): HL.Dispatcher +---@field lock_active fun(...): HL.Dispatcher +---@field move_window fun(...): HL.Dispatcher +---@field next fun(...): HL.Dispatcher +---@field prev fun(...): HL.Dispatcher +---@field toggle fun(...): HL.Dispatcher +local __HL_DspGroupNamespace = {} + +---@class HL.DspWindowNamespace +---@field alter_zorder fun(...): HL.Dispatcher +---@field bring_to_top fun(...): HL.Dispatcher +---@field center fun(...): HL.Dispatcher +---@field clear_tags fun(...): HL.Dispatcher +---@field close fun(...): HL.Dispatcher +---@field cycle_next fun(...): HL.Dispatcher +---@field deny_from_group fun(...): HL.Dispatcher +---@field drag fun(...): HL.Dispatcher +---@field float fun(...): HL.Dispatcher +---@field fullscreen fun(...): HL.Dispatcher +---@field fullscreen_state fun(...): HL.Dispatcher +---@field kill fun(...): HL.Dispatcher +---@field move fun(...): HL.Dispatcher +---@field pin fun(...): HL.Dispatcher +---@field pseudo fun(...): HL.Dispatcher +---@field resize fun(...): HL.Dispatcher +---@field set_prop fun(...): HL.Dispatcher +---@field signal fun(...): HL.Dispatcher +---@field swap fun(...): HL.Dispatcher +---@field tag fun(...): HL.Dispatcher +---@field toggle_swallow fun(...): HL.Dispatcher +local __HL_DspWindowNamespace = {} + +---@class HL.DspWorkspaceNamespace +---@field move fun(...): HL.Dispatcher +---@field rename fun(...): HL.Dispatcher +---@field swap_monitors fun(...): HL.Dispatcher +---@field toggle_special fun(...): HL.Dispatcher +local __HL_DspWorkspaceNamespace = {} + +---@class HL.LayoutNamespace +---@field register fun(name: string, provider: HL.LayoutProvider): nil +local __HL_LayoutNamespace = {} + +---@class HL.NotificationNamespace +---@field create fun(opts?: HL.NotificationOptions): HL.Notification +---@field get fun(): HL.Notification[] +local __HL_NotificationNamespace = {} + +---@class HL.PluginNamespace +---@field load fun(...): any +---@field [string] any +local __HL_PluginNamespace = {} + +---@type HL.API +hl = {} + +---@class HL.ConfigValueTypes +---@field ['animations.enabled'] boolean +---@field ['animations.workspace_wraparound'] boolean +---@field ['binds.allow_pin_fullscreen'] boolean +---@field ['binds.allow_workspace_cycles'] boolean +---@field ['binds.disable_keybind_grabbing'] boolean +---@field ['binds.drag_threshold'] integer|boolean +---@field ['binds.focus_preferred_method'] integer|boolean +---@field ['binds.hide_special_on_workspace_change'] boolean +---@field ['binds.ignore_group_lock'] boolean +---@field ['binds.movefocus_cycles_fullscreen'] boolean +---@field ['binds.movefocus_cycles_groupfirst'] boolean +---@field ['binds.pass_mouse_when_bound'] boolean +---@field ['binds.scroll_event_delay'] integer|boolean +---@field ['binds.window_direction_monitor_fallback'] boolean +---@field ['binds.workspace_back_and_forth'] boolean +---@field ['binds.workspace_center_on'] integer|boolean +---@field ['cursor.default_monitor'] string +---@field ['cursor.enable_hyprcursor'] boolean +---@field ['cursor.hide_on_key_press'] boolean +---@field ['cursor.hide_on_tablet'] boolean +---@field ['cursor.hide_on_touch'] boolean +---@field ['cursor.hotspot_padding'] integer|boolean +---@field ['cursor.inactive_timeout'] number|boolean +---@field ['cursor.invisible'] boolean +---@field ['cursor.min_refresh_rate'] integer|boolean +---@field ['cursor.no_break_fs_vrr'] integer|boolean +---@field ['cursor.no_hardware_cursors'] integer|boolean +---@field ['cursor.no_warps'] boolean +---@field ['cursor.persistent_warps'] boolean +---@field ['cursor.sync_gsettings_theme'] boolean +---@field ['cursor.use_cpu_buffer'] integer|boolean +---@field ['cursor.warp_back_after_non_mouse_input'] boolean +---@field ['cursor.warp_on_change_workspace'] integer|boolean +---@field ['cursor.warp_on_toggle_special'] integer|boolean +---@field ['cursor.zoom_detached_camera'] boolean +---@field ['cursor.zoom_disable_aa'] boolean +---@field ['cursor.zoom_factor'] number|boolean +---@field ['cursor.zoom_rigid'] boolean +---@field ['debug.colored_stdout_logs'] boolean +---@field ['debug.damage_blink'] boolean +---@field ['debug.damage_tracking'] integer|boolean +---@field ['debug.disable_logs'] boolean +---@field ['debug.disable_scale_checks'] boolean +---@field ['debug.disable_time'] boolean +---@field ['debug.ds_handle_same_buffer'] boolean +---@field ['debug.ds_handle_same_buffer_fifo'] boolean +---@field ['debug.enable_stdout_logs'] boolean +---@field ['debug.error_limit'] integer|boolean +---@field ['debug.error_position'] integer|boolean +---@field ['debug.fifo_pending_workaround'] boolean +---@field ['debug.full_cm_proto'] boolean +---@field ['debug.gl_debugging'] boolean +---@field ['debug.invalidate_fp16'] integer|boolean +---@field ['debug.log_damage'] boolean +---@field ['debug.manual_crash'] integer|boolean +---@field ['debug.overlay'] boolean +---@field ['debug.pass'] boolean +---@field ['debug.render_solitary_wo_damage'] boolean +---@field ['debug.suppress_errors'] boolean +---@field ['debug.vfr'] boolean +---@field ['decoration.active_opacity'] number|boolean +---@field ['decoration.blur.brightness'] number|boolean +---@field ['decoration.blur.contrast'] number|boolean +---@field ['decoration.blur.enabled'] boolean +---@field ['decoration.blur.ignore_opacity'] boolean +---@field ['decoration.blur.input_methods'] boolean +---@field ['decoration.blur.input_methods_ignorealpha'] number|boolean +---@field ['decoration.blur.new_optimizations'] boolean +---@field ['decoration.blur.noise'] number|boolean +---@field ['decoration.blur.passes'] integer|boolean +---@field ['decoration.blur.popups'] boolean +---@field ['decoration.blur.popups_ignorealpha'] number|boolean +---@field ['decoration.blur.size'] integer|boolean +---@field ['decoration.blur.special'] boolean +---@field ['decoration.blur.vibrancy'] number|boolean +---@field ['decoration.blur.vibrancy_darkness'] number|boolean +---@field ['decoration.blur.xray'] boolean +---@field ['decoration.border_part_of_window'] boolean +---@field ['decoration.dim_around'] number|boolean +---@field ['decoration.dim_inactive'] boolean +---@field ['decoration.dim_modal'] boolean +---@field ['decoration.dim_special'] number|boolean +---@field ['decoration.dim_strength'] number|boolean +---@field ['decoration.fullscreen_opacity'] number|boolean +---@field ['decoration.glow.color'] string +---@field ['decoration.glow.color_inactive'] string +---@field ['decoration.glow.enabled'] boolean +---@field ['decoration.glow.range'] integer|boolean +---@field ['decoration.glow.render_power'] integer|boolean +---@field ['decoration.inactive_opacity'] number|boolean +---@field ['decoration.rounding'] integer|boolean +---@field ['decoration.rounding_power'] number|boolean +---@field ['decoration.screen_shader'] string +---@field ['decoration.shadow.color'] string +---@field ['decoration.shadow.color_inactive'] string +---@field ['decoration.shadow.enabled'] boolean +---@field ['decoration.shadow.offset'] HL.Vec2Like +---@field ['decoration.shadow.range'] integer|boolean +---@field ['decoration.shadow.render_power'] integer|boolean +---@field ['decoration.shadow.scale'] number|boolean +---@field ['decoration.shadow.sharp'] boolean +---@field ['dwindle.default_split_ratio'] number|boolean +---@field ['dwindle.force_split'] integer|boolean +---@field ['dwindle.permanent_direction_override'] boolean +---@field ['dwindle.precise_mouse_move'] boolean +---@field ['dwindle.preserve_split'] boolean +---@field ['dwindle.smart_resizing'] boolean +---@field ['dwindle.smart_split'] boolean +---@field ['dwindle.special_scale_factor'] number|boolean +---@field ['dwindle.split_bias'] integer|boolean +---@field ['dwindle.split_width_multiplier'] number|boolean +---@field ['dwindle.use_active_for_splits'] boolean +---@field ['ecosystem.enforce_permissions'] boolean +---@field ['ecosystem.no_donation_nag'] boolean +---@field ['ecosystem.no_update_news'] boolean +---@field ['experimental.wp_cm_1_2'] boolean +---@field ['general.allow_tearing'] boolean +---@field ['general.border_size'] integer|boolean +---@field ['general.col.active_border'] string|HL.Gradient +---@field ['general.col.inactive_border'] string|HL.Gradient +---@field ['general.col.nogroup_border'] string|HL.Gradient +---@field ['general.col.nogroup_border_active'] string|HL.Gradient +---@field ['general.extend_border_grab_area'] integer|boolean +---@field ['general.float_gaps'] integer|HL.CssGap +---@field ['general.gaps_in'] integer|HL.CssGap +---@field ['general.gaps_out'] integer|HL.CssGap +---@field ['general.gaps_workspaces'] integer|boolean +---@field ['general.hover_icon_on_border'] boolean +---@field ['general.layout'] string +---@field ['general.locale'] string +---@field ['general.modal_parent_blocking'] boolean +---@field ['general.no_focus_fallback'] boolean +---@field ['general.resize_corner'] integer|boolean +---@field ['general.resize_on_border'] boolean +---@field ['general.snap.border_overlap'] boolean +---@field ['general.snap.enabled'] boolean +---@field ['general.snap.monitor_gap'] integer|boolean +---@field ['general.snap.respect_gaps'] boolean +---@field ['general.snap.window_gap'] integer|boolean +---@field ['gestures.close_max_timeout'] integer|boolean +---@field ['gestures.scrolling.move_snap_cursor'] boolean +---@field ['gestures.scrolling.move_snap_to_grid'] boolean +---@field ['gestures.workspace_swipe_cancel_ratio'] number|boolean +---@field ['gestures.workspace_swipe_create_new'] boolean +---@field ['gestures.workspace_swipe_direction_lock'] boolean +---@field ['gestures.workspace_swipe_direction_lock_threshold'] integer|boolean +---@field ['gestures.workspace_swipe_distance'] integer|boolean +---@field ['gestures.workspace_swipe_forever'] boolean +---@field ['gestures.workspace_swipe_invert'] boolean +---@field ['gestures.workspace_swipe_min_speed_to_force'] integer|boolean +---@field ['gestures.workspace_swipe_touch'] boolean +---@field ['gestures.workspace_swipe_touch_invert'] boolean +---@field ['gestures.workspace_swipe_use_r'] boolean +---@field ['group.auto_group'] boolean +---@field ['group.col.border_active'] string|HL.Gradient +---@field ['group.col.border_inactive'] string|HL.Gradient +---@field ['group.col.border_locked_active'] string|HL.Gradient +---@field ['group.col.border_locked_inactive'] string|HL.Gradient +---@field ['group.drag_into_group'] integer|boolean +---@field ['group.focus_removed_window'] boolean +---@field ['group.group_on_movetoworkspace'] boolean +---@field ['group.groupbar.blur'] boolean +---@field ['group.groupbar.col.active'] string|HL.Gradient +---@field ['group.groupbar.col.inactive'] string|HL.Gradient +---@field ['group.groupbar.col.locked_active'] string|HL.Gradient +---@field ['group.groupbar.col.locked_inactive'] string|HL.Gradient +---@field ['group.groupbar.enabled'] boolean +---@field ['group.groupbar.font_family'] string +---@field ['group.groupbar.font_size'] integer|boolean +---@field ['group.groupbar.font_weight_active'] integer|string +---@field ['group.groupbar.font_weight_inactive'] integer|string +---@field ['group.groupbar.gaps_in'] integer|boolean +---@field ['group.groupbar.gaps_out'] integer|boolean +---@field ['group.groupbar.gradient_round_only_edges'] boolean +---@field ['group.groupbar.gradient_rounding'] integer|boolean +---@field ['group.groupbar.gradient_rounding_power'] number|boolean +---@field ['group.groupbar.gradients'] boolean +---@field ['group.groupbar.height'] integer|boolean +---@field ['group.groupbar.indicator_gap'] integer|boolean +---@field ['group.groupbar.indicator_height'] integer|boolean +---@field ['group.groupbar.keep_upper_gap'] boolean +---@field ['group.groupbar.middle_click_close'] boolean +---@field ['group.groupbar.priority'] integer|boolean +---@field ['group.groupbar.render_titles'] boolean +---@field ['group.groupbar.round_only_edges'] boolean +---@field ['group.groupbar.rounding'] integer|boolean +---@field ['group.groupbar.rounding_power'] number|boolean +---@field ['group.groupbar.scrolling'] boolean +---@field ['group.groupbar.stacked'] boolean +---@field ['group.groupbar.text_color'] string +---@field ['group.groupbar.text_color_inactive'] string +---@field ['group.groupbar.text_color_locked_active'] string +---@field ['group.groupbar.text_color_locked_inactive'] string +---@field ['group.groupbar.text_offset'] integer|boolean +---@field ['group.groupbar.text_padding'] integer|boolean +---@field ['group.insert_after_current'] boolean +---@field ['group.merge_floated_into_tiled_on_groupbar'] boolean +---@field ['group.merge_groups_on_drag'] boolean +---@field ['group.merge_groups_on_groupbar'] boolean +---@field ['input.accel_profile'] string +---@field ['input.emulate_discrete_scroll'] integer|boolean +---@field ['input.float_switch_override_focus'] integer|boolean +---@field ['input.focus_on_close'] integer|boolean +---@field ['input.follow_mouse'] integer|boolean +---@field ['input.follow_mouse_shrink'] integer|boolean +---@field ['input.follow_mouse_threshold'] number|boolean +---@field ['input.force_no_accel'] boolean +---@field ['input.kb_file'] string +---@field ['input.kb_layout'] string +---@field ['input.kb_model'] string +---@field ['input.kb_options'] string +---@field ['input.kb_rules'] string +---@field ['input.kb_variant'] string +---@field ['input.left_handed'] boolean +---@field ['input.mouse_refocus'] boolean +---@field ['input.natural_scroll'] boolean +---@field ['input.numlock_by_default'] boolean +---@field ['input.off_window_axis_events'] integer|boolean +---@field ['input.repeat_delay'] integer|boolean +---@field ['input.repeat_rate'] integer|boolean +---@field ['input.resolve_binds_by_sym'] boolean +---@field ['input.rotation'] integer|boolean +---@field ['input.scroll_button'] integer|boolean +---@field ['input.scroll_button_lock'] boolean +---@field ['input.scroll_factor'] number|boolean +---@field ['input.scroll_method'] string +---@field ['input.scroll_points'] string +---@field ['input.sensitivity'] number|boolean +---@field ['input.special_fallthrough'] boolean +---@field ['input.tablet.absolute_region_position'] boolean +---@field ['input.tablet.active_area_position'] HL.Vec2Like +---@field ['input.tablet.active_area_size'] HL.Vec2Like +---@field ['input.tablet.left_handed'] boolean +---@field ['input.tablet.output'] string +---@field ['input.tablet.region_position'] HL.Vec2Like +---@field ['input.tablet.region_size'] HL.Vec2Like +---@field ['input.tablet.relative_input'] boolean +---@field ['input.tablet.transform'] integer|boolean +---@field ['input.tablettool.eraser_button_mode'] integer|boolean +---@field ['input.tablettool.eraser_button_override'] integer|boolean +---@field ['input.tablettool.pressure_range_max'] number|boolean +---@field ['input.tablettool.pressure_range_min'] number|boolean +---@field ['input.touchdevice.enabled'] boolean +---@field ['input.touchdevice.output'] string +---@field ['input.touchdevice.transform'] integer|boolean +---@field ['input.touchpad.clickfinger_behavior'] boolean +---@field ['input.touchpad.disable_while_typing'] boolean +---@field ['input.touchpad.drag_3fg'] integer|boolean +---@field ['input.touchpad.drag_lock'] integer|boolean +---@field ['input.touchpad.flip_x'] boolean +---@field ['input.touchpad.flip_y'] boolean +---@field ['input.touchpad.middle_button_emulation'] boolean +---@field ['input.touchpad.natural_scroll'] boolean +---@field ['input.touchpad.scroll_factor'] number|boolean +---@field ['input.touchpad.tap_and_drag'] boolean +---@field ['input.touchpad.tap_button_map'] string +---@field ['input.touchpad.tap_to_click'] boolean +---@field ['input.virtualkeyboard.release_pressed_on_close'] boolean +---@field ['input.virtualkeyboard.share_states'] integer|boolean +---@field ['layout.single_window_aspect_ratio'] HL.Vec2Like +---@field ['layout.single_window_aspect_ratio_tolerance'] number|boolean +---@field ['master.allow_small_split'] boolean +---@field ['master.always_keep_position'] boolean +---@field ['master.center_ignores_reserved'] boolean +---@field ['master.center_master_fallback'] string +---@field ['master.drop_at_cursor'] boolean +---@field ['master.focus_master_on_close'] boolean +---@field ['master.mfact'] number|boolean +---@field ['master.new_on_active'] string +---@field ['master.new_on_top'] boolean +---@field ['master.new_status'] string +---@field ['master.orientation'] string +---@field ['master.slave_count_for_center_master'] integer|boolean +---@field ['master.smart_resizing'] boolean +---@field ['master.special_scale_factor'] number|boolean +---@field ['misc.allow_session_lock_restore'] boolean +---@field ['misc.always_follow_on_dnd'] boolean +---@field ['misc.animate_manual_resizes'] boolean +---@field ['misc.animate_mouse_windowdragging'] boolean +---@field ['misc.anr_missed_pings'] integer|boolean +---@field ['misc.background_color'] string +---@field ['misc.close_special_on_empty'] boolean +---@field ['misc.col.splash'] string +---@field ['misc.disable_autoreload'] boolean +---@field ['misc.disable_hyprland_guiutils_check'] boolean +---@field ['misc.disable_hyprland_logo'] boolean +---@field ['misc.disable_scale_notification'] boolean +---@field ['misc.disable_splash_rendering'] boolean +---@field ['misc.disable_watchdog_warning'] boolean +---@field ['misc.disable_xdg_env_checks'] boolean +---@field ['misc.enable_anr_dialog'] boolean +---@field ['misc.enable_swallow'] boolean +---@field ['misc.exit_window_retains_fullscreen'] boolean +---@field ['misc.focus_on_activate'] boolean +---@field ['misc.font_family'] string +---@field ['misc.force_default_wallpaper'] integer|boolean +---@field ['misc.initial_workspace_tracking'] integer|boolean +---@field ['misc.key_press_enables_dpms'] boolean +---@field ['misc.layers_hog_keyboard_focus'] boolean +---@field ['misc.lockdead_screen_delay'] integer|boolean +---@field ['misc.middle_click_paste'] boolean +---@field ['misc.mouse_move_enables_dpms'] boolean +---@field ['misc.mouse_move_focuses_monitor'] boolean +---@field ['misc.name_vk_after_proc'] boolean +---@field ['misc.on_focus_under_fullscreen'] integer|boolean +---@field ['misc.render_unfocused_fps'] integer|boolean +---@field ['misc.screencopy_force_8b'] boolean +---@field ['misc.session_lock_xray'] boolean +---@field ['misc.size_limits_tiled'] boolean +---@field ['misc.splash_font_family'] string +---@field ['misc.swallow_exception_regex'] string +---@field ['misc.swallow_regex'] string +---@field ['misc.vrr'] integer|boolean +---@field ['opengl.nvidia_anti_flicker'] boolean +---@field ['quirks.prefer_hdr'] integer|boolean +---@field ['quirks.skip_non_kms_dmabuf_formats'] boolean +---@field ['render.cm_auto_hdr'] integer|boolean +---@field ['render.cm_enabled'] boolean +---@field ['render.cm_sdr_eotf'] string +---@field ['render.commit_timing_enabled'] boolean +---@field ['render.ctm_animation'] integer|boolean +---@field ['render.direct_scanout'] integer|boolean +---@field ['render.expand_undersized_textures'] boolean +---@field ['render.fp16_sdr_tf'] integer|boolean +---@field ['render.icc_vcgt_enabled'] boolean +---@field ['render.keep_unmodified_copy'] integer|boolean +---@field ['render.new_render_scheduling'] boolean +---@field ['render.non_shader_cm'] integer|boolean +---@field ['render.non_shader_cm_interop'] integer|boolean +---@field ['render.send_content_type'] boolean +---@field ['render.use_fp16'] integer|boolean +---@field ['render.use_shader_blur_blend'] boolean +---@field ['render.xp_mode'] boolean +---@field ['scrolling.column_width'] number|boolean +---@field ['scrolling.direction'] string +---@field ['scrolling.explicit_column_widths'] string +---@field ['scrolling.focus_fit_method'] integer|boolean +---@field ['scrolling.follow_focus'] boolean +---@field ['scrolling.follow_min_visible'] number|boolean +---@field ['scrolling.fullscreen_on_one_column'] boolean +---@field ['scrolling.wrap_focus'] boolean +---@field ['scrolling.wrap_swapcol'] boolean +---@field ['xwayland.create_abstract_socket'] boolean +---@field ['xwayland.enabled'] boolean +---@field ['xwayland.force_zero_scaling'] boolean +---@field ['xwayland.use_nearest_neighbor'] boolean +local __HL_ConfigValueTypes = {} diff --git a/homemanager/hyprland/hyprland.conf b/homemanager/hyprland/hyprland.conf deleted file mode 100644 index 9c83437..0000000 --- a/homemanager/hyprland/hyprland.conf +++ /dev/null @@ -1,298 +0,0 @@ -# This is an example Hyprland config file. -# Refer to the wiki for more information. -# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ - -# Please note not all available settings / options are set here. -# For a full list, see the wiki - -# You can split this configuration into multiple files -# Create your files separately and then link them to this file like this: -# source = ~/.config/hypr/myColors.conf - - -################ -### MONITORS ### -################ - -source = ~/.config/hypr/hyprland.hardware.conf -source = ~/.config/hypr/nix.conf - -################### -### MY PROGRAMS ### -################### - -# See https://wiki.hyprland.org/Configuring/Keywords/ - -# Set programs that you use -$terminal = ghostty -$fileManager = nautilus -$browser = zen-beta -$menu = walker - -################# -### AUTOSTART ### -################# - -exec-once = nextcloud --background & steam -silent -exec-once = exec "$POOLKIT_AGENT" -exec-once = hyprpaper -exec-once = hypridle -exec-once = elephant -exec-once = walker --gapplication-service -exec-once = noctalia-shell -exec-once = gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Classic' -exec-once = gsettings set org.gnome.desktop.interface cursor-size 24 -exec-once = kdeconnectd -exec-once = kdeconnect-indicator - -# This requires gpu-screen-recorder to be installed. I installed it with this https://wiki.nixos.org/wiki/Gpu-screen-recorder. -exec-once = ~/.config/hypr/scripts/gpu-screen-recorder/start-replay.sh - -exec-once = spotify & signal-desktop & thunderbird & gnome-calendar & bitwarden & $browser & discord & steam-silent - -exec-once = [workspace 1 silent] ghostty -e tmux new-session -A -s main - -windowrule = match:class ^(zen-beta)$, workspace 2 silent -windowrule = match:class ^(org.gnome.Calendar)$, workspace 3 silent -windowrule = match:class ^(Bitwarden)$, workspace 3 silent -windowrule = match:class ^(discord)$, workspace 4 silent -windowrule = match:class ^(thunderbird)$, workspace 4 silent -windowrule = match:class ^(signal)$, workspace 4 silent -windowrule = match:class ^(spotify)$, workspace 4 silent - - -env = HYPRCURSOR_SIZE,28 -env = HYPRCURSOR_THEME,rose-pine-hyprcursor -env = GTK_PRIMARY_SELECTION,0 - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -# See https://wiki.hyprland.org/Configuring/Environment-variables/ - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 - - -##################### -### LOOK AND FEEL ### -##################### - -# Refer to https://wiki.hyprland.org/Configuring/Variables/ - -# https://wiki.hyprland.org/Configuring/Variables/#general -general { - gaps_in = 5 - gaps_out = 20 - - border_size = 2 - - # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) - - # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = false - - # layout = dwindle -} - -# https://wiki.hyprland.org/Configuring/Variables/#decoration -decoration { - rounding = 10 - - # Change transparency of focused and unfocused windows - active_opacity = 1.0 - inactive_opacity = 1.0 - - shadow { - enabled = true - range = 4 - render_power = 3 - color = rgba(1a1a1aee) - } - - # https://wiki.hyprland.org/Configuring/Variables/#blur - blur { - enabled = true - size = 3 - passes = 1 - - vibrancy = 0.1696 - } -} - -# https://wiki.hyprland.org/Configuring/Variables/#animations -animations { - enabled = true - - # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, default, popin 80% - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default -} - -# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more -dwindle { - # pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # You probably want this -} - -# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more -master { - new_status = master -} - -# https://wiki.hyprland.org/Configuring/Variables/#misc -misc { - force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( -} - - -############# -### INPUT ### -############# - -# https://wiki.hyprland.org/Configuring/Variables/#input -input { - kb_layout = us,de - kb_variant = - kb_model = - kb_options = - kb_rules = - - follow_mouse = 1 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = true - tap-to-click = false - clickfinger_behavior = true - scroll_factor = 0.5 - } - -} - -gestures { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - # workspace_swipe = true - workspace_swipe_touch = true -} - -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more -device { - name = epic-mouse-v1 - sensitivity = -0.5 -} - -misc { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers -} - - -################### -### Gestures ###### -################### - -gesture = 3, horizontal, workspace - -################### -### KEYBINDINGS ### -################### - -# See https://wiki.hyprland.org/Configuring/Keywords/ -$mainMod = SUPER # Sets "Windows" key as main modifier - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, T, exec, $terminal -bind = $mainMod SHIFT, T, exec, ghostty -e tmux new-session -A -s main -bind = $mainMod, B, exec, $browser -bind = $mainMod, I, exec, noctalia-shell ipc call bar toggle -bind = $mainMod, C, killactive, -bind = $mainMod SHIFT, Q, exec, noctalia-shell ipc call sessionMenu toggle -bind = $mainMod, F, fullscreen, 1 -bind = $mainMod ALT, F, fullscreen, 0 -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, Space, exec, $menu -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod SHIFT, D, exec, discord -# bind = $mainMod, J, togglesplit, # dwindle -bind = SUPER_ALT,L, exec, noctalia-shell ipc call lockScreen lock -bind = ,F10, exec, noctalia-shell ipc call lockScreen lock -bind = $mainMod ALT, Space, exec, hyprctl switchxkblayout current next -bind = $mainMod SHIFT, S, exec, hyprshot -m region -z -# This requires gpu-screen-recorder to be installed. I installed it with this https://wiki.nixos.org/wiki/Gpu-screen-recorder. -bind = $mainMod SHIFT, V, exec, ~/.config/hypr/scripts/gpu-screen-recorder/save-replay.sh -bind = $mainMod SHIFT, C, exec, hyprpicker | wl-copy -bind = $mainMod, Y, exec, firefox - -# Move focus with mainMod + vim -bind = $mainMod, H, movefocus, l -bind = $mainMod, l, movefocus, r -bind = $mainMod, K, movefocus, u -bind = $mainMod, J, movefocus, d - -# Move window with mod + vim -bind = $mainMod SHIFT, H, movewindow, l -bind = $mainMod SHIFT, l, movewindow, r -bind = $mainMod SHIFT, K, movewindow, u -bind = $mainMod SHIFT, J, movewindow, d - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# Media Keys -binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ -bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindle=, XF86MonBrightnessUp, exec, bri --up -bindle=, XF86MonBrightnessDown, exec, bri --down -bindle=, XF86Search, exec, launchpad -# bindl=, XF86AudioMute, exec, amixer set Master toggle -bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindl=, XF86AudioPlay, exec, playerctl play-pause # the stupid key is called play , but it toggles -bindl=, XF86AudioNext, exec, playerctl next -bindl=, XF86AudioPrev, exec, playerctl previous diff --git a/homemanager/hyprland/hyprland.lua b/homemanager/hyprland/hyprland.lua new file mode 100644 index 0000000..7416ccf --- /dev/null +++ b/homemanager/hyprland/hyprland.lua @@ -0,0 +1,369 @@ +require('hyprland_hardware') +------------------ +---- MONITORS ---- +------------------ + +-- See https://wiki.hypr.land/Configuring/Basics/Monitors/ +hl.monitor({ + output = "", + mode = "highres@highrr", + position = "auto", + scale = "auto", +}) + +--------------------- +---- MY PROGRAMS ---- +--------------------- + +-- Set programs that you use +local terminal = "ghostty" +local fileManager = "nautilus" +local menu = "walker" +local browser = "zen-beta" + + +------------------- +---- AUTOSTART ---- +------------------- + +-- See https://wiki.hypr.land/Configuring/Basics/Autostart/ + +-- Autostart necessary processes (like notifications daemons, status bars, etc.) +-- Or execute your favorite apps at launch like this: +-- + +local autostart_background = { + "steam -silent", + "nextcloud --background", + "hypridle", + "elephant", + "walker --gapplication-service", + "noctalia-shell", + "kdeconnectd", + "kdeconnect-indicator", + + "exec $POOLKIT_AGENT", + "discord", -- this will be moved to the correct workspace using a window rule + + -- This requires gpu-screen-recorder to be installed. I installed it with this https://wiki.nixos.org/wiki/Gpu-screen-recorder. + "~/.config/hypr/scripts/gpu-screen-recorder/start-replay.sh", +} + +local autostart_workspaces = { + { workspace = "1", cmd = terminal }, + { workspace = "2", cmd = browser }, + { workspace = "4", cmd = "signal-desktop" }, + { workspace = "4", cmd = "thunderbird"}, + -- { workspace = "4", cmd = "thunderbird"} (this will be done using the window rules) +} + +hl.on("hyprland.start", function () + for _, cmd in ipairs(autostart_background) do + hl.exec_cmd(cmd) + end + + for _, program in ipairs(autostart_workspaces) do + hl.exec_cmd(program.cmd, { workspace = string.format("%s silent", program.workspace) }) + end +end) + +hl.window_rule({ + name = "discord_workspace_4", + match = { class = "^(discord)$" }, + workspace = "4" +}) + +------------------------------- +---- ENVIRONMENT VARIABLES ---- +------------------------------- + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/ + +hl.env("XCURSOR_SIZE", "28") +hl.env("HYPRCURSOR_SIZE", "28") +hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor") +hl.env("GTK_PRIMARY_SELECTION", "0") + + +----------------------- +----- PERMISSIONS ----- +----------------------- + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/ +-- Please note permission changes here require a Hyprland restart and are not applied on-the-fly +-- for security reasons + +-- hl.config({ +-- ecosystem = { +-- enforce_permissions = true, +-- }, +-- }) + +-- hl.permission("/usr/(bin|local/bin)/grim", "screencopy", "allow") +-- hl.permission("/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", "screencopy", "allow") +-- hl.permission("/usr/(bin|local/bin)/hyprpm", "plugin", "allow") + + +----------------------- +---- LOOK AND FEEL ---- +----------------------- + +-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables/ +hl.config({ + general = { + gaps_in = 5, + gaps_out = 20, + + border_size = 2, + + col = { + active_border = { colors = {"rgba(33ccffee)", "rgba(00ff99ee)"}, angle = 45 }, + inactive_border = "rgba(595959aa)", + }, + + -- Set to true to enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false, + + -- Please see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Tearing/ before you turn this on + allow_tearing = false, + + layout = "dwindle", + }, + + decoration = { + rounding = 10, + rounding_power = 2, + + -- Change transparency of focused and unfocused windows + active_opacity = 1.0, + inactive_opacity = 1.0, + + shadow = { + enabled = true, + range = 4, + render_power = 3, + color = 0xee1a1a1a, + }, + + blur = { + enabled = true, + size = 3, + passes = 1, + vibrancy = 0.1696, + }, + }, + + animations = { + enabled = true, + }, +}) + +-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ +hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } }) +hl.curve("easeInOutCubic", { type = "bezier", points = { {0.65, 0.05}, {0.36, 1} } }) +hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } }) +hl.curve("almostLinear", { type = "bezier", points = { {0.5, 0.5}, {0.75, 1} } }) +hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } }) + +-- Default springs +hl.curve("easy", { type = "spring", mass = 1, stiffness = 71.2633, dampening = 15.8273644 }) + +hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" }) +hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) +hl.animation({ leaf = "windows", enabled = true, speed = 4.79, spring = "easy" }) +hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", style = "popin 87%" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" }) +hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" }) +hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" }) +hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" }) +hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" }) +hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" }) +hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" }) +hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" }) +hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" }) +hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" }) +hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" }) +hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" }) + +-- Ref https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ +-- "Smart gaps" / "No gaps when only" +-- uncomment all if you wish to use that. +-- hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 }) +-- hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 }) +-- hl.window_rule({ +-- name = "no-gaps-wtv1", +-- match = { float = false, workspace = "w[tv1]" }, +-- border_size = 0, +-- rounding = 0, +-- }) +-- hl.window_rule({ +-- name = "no-gaps-f1", +-- match = { float = false, workspace = "f[1]" }, +-- border_size = 0, +-- rounding = 0, +-- }) + +-- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more +hl.config({ + dwindle = { + preserve_split = true, -- You probably want this + }, +}) + +-- See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more +hl.config({ + master = { + new_status = "master", + }, +}) + +-- See https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/ for more +hl.config({ + scrolling = { + fullscreen_on_one_column = true, + }, +}) + +---------------- +---- MISC ---- +---------------- + +hl.config({ + misc = { + force_default_wallpaper = 0, -- Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true, -- If true disables the random hyprland logo / anime girl background. :( + }, +}) + + +--------------- +---- INPUT ---- +--------------- + +hl.config({ + input = { + kb_layout = "us, de", + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + + follow_mouse = 1, + + sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = true, + tap_to_click = false, + clickfinger_behavior = true, + scroll_factor = 0.5, + }, + }, +}) + +hl.gesture({ + fingers = 3, + direction = "horizontal", + action = "workspace" +}) + +--------------------- +---- KEYBINDINGS ---- +--------------------- + +local mainMod = "SUPER" -- Sets "Windows" key as main modifier + +-- Example binds, see https://wiki.hypr.land/Configuring/Basics/Binds/ for more +hl.bind(mainMod .. " + T", hl.dsp.exec_cmd(terminal)) +hl.bind(mainMod .. " + C", hl.dsp.window.close()) +hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'")) +hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd("noctalia-shell ipc call sessionMenu toggle")) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) +hl.bind(mainMod .. " + B", hl.dsp.exec_cmd(browser)) +hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(menu)) +hl.bind(mainMod .. " + P", hl.dsp.window.pseudo()) +hl.bind(mainMod .. " + SHIFT + J", hl.dsp.layout("togglesplit")) -- dwindle only +hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ action = "toggle", mode = "maximized" })) +hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.fullscreen({ action = "toggle", mode = "fullscreen" })) + +-- Layout stwitching +hl.bind(mainMod .. " + ALT + Space", hl.dsp.exec_cmd("hyprctl switchxkblayout current next")) + +-- Capturing something from the screen + +hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("hyprshot -m region -z")) +hl.bind(mainMod .. " + SHIFT + C", hl.dsp.exec_cmd("hyprpicker | wl-copy")) +-- This requires gpu-screen-recorder to be installed. I installed it with this https://wiki.nixos.org/wiki/Gpu-screen-recorder. +hl.bind(mainMod .. " + SHIFT + V", hl.dsp.exec_cmd("~/.config/hypr/scripts/gpu-screen-recorder/save-replay.sh")) + +-- Noctalia Shell goodies + +hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("noctalia-shell ipc call lockScreen lock")) +hl.bind("F10", hl.dsp.exec_cmd("noctalia-shell ipc call lockScreen lock")) +hl.bind(mainMod .. " + I", hl.dsp.exec_cmd("noctalia-shell ipc call bar toggle")) + + +-- Move focus with mainMod + arrow keys +hl.bind(mainMod .. " + H", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + L", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + K", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + J", hl.dsp.focus({ direction = "down" })) + +hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" })) +hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" })) +hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" })) +hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" })) + +for i = 1, 10 do + local key = i % 10 -- 10 maps to key 0 + hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i})) + hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) +end + +-- Example special workspace (scratchpad) +hl.bind(mainMod .. " + 0", hl.dsp.workspace.toggle_special("magic")) +hl.bind(mainMod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = "special:magic" })) + +-- Scroll through existing workspaces with mainMod + scroll +hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Move/resize windows with mainMod + LMB/RMB and dragging +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- Laptop multimedia keys for volume and LCD brightness +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true }) + +-- Requires playerctl +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) + + +-------------------------------- +---- WINDOWS AND WORKSPACES ---- +-------------------------------- + +hl.window_rule({ + -- Fix some dragging issues with XWayland + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + + no_focus = true, +}) diff --git a/homemanager/hyprland/hyprlaptop.conf b/homemanager/hyprland/hyprlaptop.conf deleted file mode 100644 index 37b1bde..0000000 --- a/homemanager/hyprland/hyprlaptop.conf +++ /dev/null @@ -1,105 +0,0 @@ -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more -# device { -# name = epic-mouse-v1 -# sensitivity = -0.5 -# } - -# Example windowrule v1 -# windowrule = float, ^(kitty)$ -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. - -windowrulev2 = noanim,class:ulauncher -windowrulev2 = noborder,class:ulauncher -windowrulev2 = noblur,class:ulauncher -windowrulev2 = noshadow,class:ulauncher - - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more -$mainMod = SUPER - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, Q, exec, hyprctl dispatch exit -bind = $mainMod, T, exec, $terminal -bind = $mainMod, C, killactive, -bind = $mainMod, M, exit, -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, Space, exec, $menu -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, J, togglesplit, # dwindle - -# Move focus with mainMod + arrow keys -bind = $mainMod, h, movefocus, l -bind = $mainMod, l, movefocus, r -bind = $mainMod, k, movefocus, u -bind = $mainMod, j, movefocus, d - -# Move windows -bind = $mainMod SHIFT, H, movewindow, l -bind = $mainMod SHIFT, L, movewindow, r -bind = $mainMod SHIFT, K, movewindow, u -bind = $mainMod SHIFT, J, movewindow, d - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# Waybar -bindr = $mainMod, I, exec, killall waybar || waybar - -# Example special workspace (scratchpad) -bind = $mainMod, S, togglespecialworkspace, magic -bind = $mainMod SHIFT, S, movetoworkspace, special:magic - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# Media Keys -binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ -bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindle=, XF86MonBrightnessUp, exec, bri --up -bindle=, XF86MonBrightnessDown, exec, bri --down -bindle=, XF86Search, exec, launchpad -# bindl=, XF86AudioMute, exec, amixer set Master toggle -bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindl=, XF86AudioPlay, exec, playerctl play-pause # the stupid key is called play , but it toggles -bindl=, XF86AudioNext, exec, playerctl next -bindl=, XF86AudioPrev, exec, playerctl previous - - -# nvidia - -env = LIBVA_DRIVER_NAME,nvidia -env = XDG_SESSION_TYPE,wayland -env = GBM_BACKEND,nvidia-drm -env = __GLX_VENDOR_LIBRARY_NAME,nvidia -env = WLR_NO_HARDWARE_CURSORS,1 \ No newline at end of file diff --git a/homemanager/hyprland/hyprlock.conf b/homemanager/hyprland/hyprlock.conf deleted file mode 100644 index 078a572..0000000 --- a/homemanager/hyprland/hyprlock.conf +++ /dev/null @@ -1,142 +0,0 @@ -source = /home/justin/.cache/wal/colors-hyprland.conf - -$foreground = rgba(255, 255, 255, 0.75) - -# BACKGROUND -background { - monitor = - #path = screenshot - path = ~/.config/backgrounds/gnome_blobs.png - #color = $background - blur_passes = 2 - contrast = 1 - brightness = 0.5 - vibrancy = 0.2 - vibrancy_darkness = 0.2 -} - -# GENERAL -general { - no_fade_in = true - no_fade_out = true - hide_cursor = false - grace = 0 - disable_loading_bar = true -} - -# INPUT FIELD -input-field { - monitor = - size = 250, 60 - outline_thickness = 2 - dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.35 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = true - outer_color = rgba(0, 0, 0, 0) - inner_color = rgba(0, 0, 0, 0.2) - font_color = $foreground - fade_on_empty = false - rounding = -1 - check_color = rgb(204, 136, 34) - placeholder_text = Input Password... - hide_input = false - position = 0, -200 - halign = center - valign = center -} - -# DATE -label { - monitor = - text = cmd[update:1000] echo "$(date +"%A, %B %d")" - color = rgba(242, 243, 244, 0.75) - font_size = 22 - font_family = JetBrains Mono - position = 0, 300 - halign = center - valign = center -} - -# TIME -label { - monitor = - text = cmd[update:1000] echo "$(date +"%-I:%M")" - color = rgba(242, 243, 244, 0.75) - font_size = 95 - font_family = JetBrains Mono Extrabold - position = 0, 200 - halign = center - valign = center -} - - - -# Profile Picture -image { - monitor = - path = /home/justin/Pictures/profile_pictures/justin_square.png - size = 100 - border_size = 2 - border_color = $foreground - position = 0, -100 - halign = center - valign = center -} - -# Desktop Environment -image { - monitor = - path = /home/justin/Pictures/profile_pictures/hypr.png - size = 75 - border_size = 2 - border_color = $foreground - position = -50, 50 - halign = right - valign = bottom -} - -# CURRENT SONG -label { - monitor = - text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/whatsong.sh)" - color = $foreground - #color = rgba(255, 255, 255, 0.6) - font_size = 18 - font_family = Metropolis Light, Font Awesome 6 Free Solid - position = 0, 50 - halign = center - valign = bottom -} - -label { - monitor = - text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/whoami.sh)" - color = $foreground - font_size = 14 - font_family = JetBrains Mono - position = 0, -10 - halign = center - valign = top -} - -label { - monitor = - text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/battery.sh)" - color = $foreground - font_size = 24 - font_family = JetBrains Mono - position = -90, -10 - halign = right - valign = top -} - -label { - monitor = - text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/network-status.sh)" - color = $foreground - font_size = 24 - font_family = JetBrains Mono - position = -20, -10 - halign = right - valign = top -} diff --git a/homemanager/hyprland/hyprpaper.conf b/homemanager/hyprland/hyprpaper.conf deleted file mode 100644 index e9508ea..0000000 --- a/homemanager/hyprland/hyprpaper.conf +++ /dev/null @@ -1,9 +0,0 @@ -# preload = ~/.config/backgrounds/qingce.jpg -# preload = ~/.config/backgrounds/nature.jpg -# preload = ~/.config/backgrounds/gnome_blobs.png -preload = ~/.config/backgrounds/mountains.jpg - -wallpaper = ,~/.config/backgrounds/mountains.jpg -splash = false - -source = ~/.config/hypr/hyprpaper.hardware.conf