diff options
Diffstat (limited to 'home')
| -rw-r--r-- | home/apps/caelestia/scheme.nix | 5 | ||||
| -rw-r--r-- | home/desktops/hyprland/hyprland.lua | 284 | ||||
| -rw-r--r-- | home/gpg.nix | 2 | ||||
| -rw-r--r-- | home/ssh/default.nix | 2 |
4 files changed, 141 insertions, 152 deletions
diff --git a/home/apps/caelestia/scheme.nix b/home/apps/caelestia/scheme.nix index 06991d9..ac4042c 100644 --- a/home/apps/caelestia/scheme.nix +++ b/home/apps/caelestia/scheme.nix @@ -1,11 +1,10 @@ { lib, config, - inputs, ... -}: -with inputs.self.lib; let +}: let inherit (lib) mkIf; + inherit (lib.colors) mixColor; cfg = config.apps.caelestia; theme = config.theme.colors; in { diff --git a/home/desktops/hyprland/hyprland.lua b/home/desktops/hyprland/hyprland.lua index c9596ca..8079bbc 100644 --- a/home/desktops/hyprland/hyprland.lua +++ b/home/desktops/hyprland/hyprland.lua @@ -1,7 +1,7 @@ --[[ - Hyprland Configuration - Copyright (c) Freya Murphy 2026 + Hyprland Configuration + Copyright (c) Freya Murphy 2026 ]]-- @@ -12,68 +12,66 @@ local hy3 = hl.plugin.hy3 --[[ LIB ]]-- local function exec(cmd) - return hl.dsp.exec_cmd(cmd) + return hl.dsp.exec_cmd(cmd) end local function bind(keys, cb, opts) - hl.bind(table.concat(keys, " + "), cb, opts or {}) + hl.bind(table.concat(keys, " + "), cb, opts or {}) end local function rgb(color) - return "rgb(" .. color .. ")" + return "rgb(" .. color .. ")" end local function animation(leaf, speed, bezier, style) - hl.animation({ - leaf = leaf, - enabled = true, - speed = speed, - bezier = bezier, - style = style, - }) + hl.animation({ + leaf = leaf, + enabled = true, + speed = speed, + bezier = bezier, + style = style, + }) end --[[ GENERAL ]]-- hl.config({ - general = { - layout = "hy3", - resize_on_border = true, - extend_border_grab_area = 20, - }, + general = { + resize_on_border = true, + extend_border_grab_area = 20, + }, }) - --[[ MONITORS ]]-- for _,monitor in pairs(config.monitors) do - local opts = { - scale = monitor.scale, - bitdepth = monitor.bitdepth, - } + local opts = { + scale = monitor.scale, + bitdepth = monitor.bitdepth, + } - -- output - if monitor.desc == "" then - opts.output = monitor.port - else - opts.output = "desc:" .. monitor.desc - end + -- output + if monitor.desc == "" then + opts.output = monitor.port + else + opts.output = "desc:" .. monitor.desc + end - -- mode - if monitor.size.enabled then - opts.mode = monitor.size.x .. "x" .. monitor.size.y - else - opts.mode = "preferred" - end + -- mode + if monitor.size.enabled then + opts.mode = monitor.size.x .. "x" .. monitor.size.y + else + opts.mode = "preferred" + end - -- position - if monitor.position.enabled then - opts.position = monitor.position.x .. "x" .. monitor.position.y - else - opts.position = "auto" - end + -- position + if monitor.position.enabled then + opts.position = monitor.position.x .. "x" .. monitor.position.y + else + opts.position = "auto" + end - hl.monitor(opts) + hl.monitor(opts) end --[[ ENVIRONMENT ]]-- @@ -81,8 +79,6 @@ end hl.env("XDG_CURRENT_DESKTOP", "Hyprland") hl.env("XDG_SESSION_TYPE", "wayland") hl.env("XDG_SESSION_DESKTOP", "Hyprland") -hl.env("MOZ_ENABLE_WAYLAND", "1") -hl.env("NIXOS_OZONE_WL", "1") hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor") hl.env("HYPRCURSOR_SIZE", "24") @@ -110,18 +106,18 @@ bind({mod, "J"}, hl.dsp.layout("togglesplit")) -- Move focus with mod + arrow keys -- Move window across workspace with mod + arrow keys for _,direction in pairs({"left", "right", "up", "down"}) do - bind({mod, direction}, hl.dsp.focus({ direction = direction })) - bind({mod, "SHIFT", direction}, hy3.move_focus(direction)) + bind({mod, direction}, hy3.move_focus(direction)) + bind({mod, "SHIFT", direction}, hy3.move_window(direction)) end -- Switch workspaces with mod + [0-9] -- Move active window to a workspace with mod + SHIFT + [0-9] -- Move to tab in tab group for i = 1, 10 do - local key = i % 10 - bind({mod, key}, hl.dsp.focus({ workspace = i })) - bind({mod, "SHIFT", key}, hl.dsp.window.move({ workspace = i })) - bind({"ALT", key}, hy3.focus_tab({ index = i })) + local key = i % 10 + bind({mod, key}, hl.dsp.focus({ workspace = i })) + bind({mod, "SHIFT", key}, hl.dsp.window.move({ workspace = i, follow = false })) + bind({"ALT", key}, hy3.focus_tab({ index = i })) end -- Hy3 groups and tab groups @@ -159,75 +155,70 @@ bind({"XF86MonBrightnessUp"}, exec("brightnessctl set 5%+")) --[[ THEME ]]-- hl.config({ - general = { - gaps_in = config.theme.innerGap, - gaps_out = config.theme.outerGap, - border_size = config.theme.borderWidth, - - col = { - active_border = rgb(config.theme.colors.primary), - inactive_border = rgb(config.theme.colors.surface), - }, - }, - - decoration = { - rounding = config.theme.outerRadius, - shadow = { - enabled = true, - }, - blur = { - enabled = config.theme.blur, - size = 4, - passes = 2, - noise = 0.008, - contrast = 0.8916, - brightness = 0.8, - }, - }, + general = { + gaps_in = config.theme.innerGap, + gaps_out = config.theme.outerGap, + border_size = config.theme.borderWidth, + col = { + active_border = rgb(config.theme.colors.primary), + inactive_border = rgb(config.theme.colors.surface), + }, + }, + decoration = { + rounding = config.theme.outerRadius, + shadow = { + enabled = true, + }, + blur = { + enabled = config.theme.blur, + size = 4, + passes = 2, + noise = 0.008, + contrast = 0.8916, + brightness = 0.8, + }, + }, }) --[[ INPUT ]]-- hl.config({ - input = { - kb_layout = "us", - kb_variant = "", - kb_model = "", - kb_options = "gtp:alt_shift_toggle, compose:ralt", - kb_rules = "", - - follow_mouse = 1, - - sensitivity = 0, - - touchpad = { - natural_scroll = true, - }, - }, + input = { + kb_layout = "us", + kb_variant = "", + kb_model = "", + kb_options = "gtp:alt_shift_toggle, compose:ralt", + kb_rules = "", + follow_mouse = 1, + sensitivity = 0, + touchpad = { + natural_scroll = true, + }, + }, }) --[[ GESTURES ]]-- -- Allow 3 finger swipe on trackpad to seek workspaces hl.gesture({ - fingers = 3, - direction = "horizontal", - action = "workspace", + fingers = 3, + direction = "horizontal", + action = "workspace", }) --[[ ANIMATIONS ]]-- hl.config({ - animations = { - enabled = true, - }, + animations = { + enabled = true, + }, }) hl.curve("default", { type = "bezier", points = {{0.12, 0.92}, {0.08, 1.00}} }) hl.curve("overshot", { type = "bezier", points = {{0.18, 0.95}, {0.22, 1.03}} }) hl.curve("linear", { type = "bezier", points = {{1.00, 1.00}, {1.00, 1.00}} }) -animation("windows", 5, "default", "popin 60%") +animation("windows", 5, "default", "popin 60%") animation("windowsIn", 6, "overshot", "popin 60%") animation("windowsOut", 4, "overshot", "popin 60%") animation("windowsMove", 4, "overshot", "slide") @@ -242,12 +233,12 @@ animation("workspaces", 5, "overshot", "slide") animation("border", 1, "linear", nil) animation("borderangle", 24, "linear", "loop") --- [[ LAYER RULES ]]-- +--[[ LAYER RULES ]]-- -- Fix wierd borders for _,namespace in pairs({"wofi", "notification"}) do - hl.layer_rule({ blur = true, match = { namespace = namespace } }) - hl.layer_rule({ ignore_alpha = 0, match = { namespace = namespace } }) + hl.layer_rule({ blur = true, match = { namespace = namespace } }) + hl.layer_rule({ ignore_alpha = 0, match = { namespace = namespace } }) end hl.layer_rule({ no_anim = true, match = { namespace = "selection" } }) @@ -255,67 +246,66 @@ hl.layer_rule({ no_anim = true, match = { namespace = "selection" } }) --[[ XWAYLAND ]]-- hl.config({ - xwayland = { - force_zero_scaling = true, - use_nearest_neighbor = false, - }, + xwayland = { + force_zero_scaling = true, + use_nearest_neighbor = false, + }, }) --[[ HY3 ]]-- hl.config({ - plugin = { - hy3 = { - - -- Tabs - tabs = { - height = 24, - text_height = 9, - text_padding = 10, - padding = 2, - render_text = true, - text_font = "monospace", - radius = config.theme.outerRadius, - border_width = config.theme.borderWidth, - colors = { - active = rgb(config.theme.colors.base), - active_border = rgb(config.theme.colors.primary), - active_text = rgb(config.theme.colors.text), - inactive = rgb(config.theme.colors.base), - inactive_border = rgb(config.theme.colors.surface), - inactive_text = rgb(config.theme.colors.text), - } - }, - - autotile = { - enable = true, - }, - } - } + general = { + layout = "hy3", + }, + plugin = { + hy3 = { + tabs = { + height = 24, + text_height = 9, + text_padding = 10, + padding = 2, + render_text = true, + text_font = "monospace", + radius = config.theme.outerRadius, + border_width = config.theme.borderWidth, + colors = { + active = rgb(config.theme.colors.base), + active_border = rgb(config.theme.colors.primary), + active_text = rgb(config.theme.colors.text), + inactive = rgb(config.theme.colors.base), + inactive_border = rgb(config.theme.colors.surface), + inactive_text = rgb(config.theme.colors.text), + } + }, + autotile = { + enable = true, + }, + } + } }) --[[ MISC ]]-- hl.config({ - misc = { - disable_hyprland_logo = true, - disable_splash_rendering = true, - key_press_enables_dpms = true, - mouse_move_enables_dpms = true, - enable_anr_dialog = false, - vrr = 1, - }, - - ecosystem = { - no_update_news = true, - no_donation_nag = true, - }, + misc = { + disable_hyprland_logo = true, + disable_splash_rendering = true, + key_press_enables_dpms = true, + mouse_move_enables_dpms = true, + enable_anr_dialog = false, + vrr = 1, + }, + ecosystem = { + no_update_news = true, + no_donation_nag = true, + }, }) --[[ AUTOSTART ]]-- hl.on("hyprland.start", function() - for _,app in config.autoRun do - hl.exec_cmd(app) - end + for _,app in pairs(config.autoRun) do + hl.exec_cmd(app) + end end) diff --git a/home/gpg.nix b/home/gpg.nix index ae2614c..bbfbbeb 100644 --- a/home/gpg.nix +++ b/home/gpg.nix @@ -14,7 +14,7 @@ # source = path; # trust = 5; # }) - # inputs.self.lib.gpgKeys; + # lib.files.gpgKeys; }; # global gpg agent diff --git a/home/ssh/default.nix b/home/ssh/default.nix index 19909c9..2ad9220 100644 --- a/home/ssh/default.nix +++ b/home/ssh/default.nix @@ -3,7 +3,7 @@ programs.ssh = { enable = true; enableDefaultConfig = false; - matchBlocks."*" = {}; + settings."*" = {}; extraConfig = lib.fileContents ./config; }; } |