diff options
Diffstat (limited to 'hypr')
| -rw-r--r-- | hypr/hypridle.conf | 16 | ||||
| -rw-r--r-- | hypr/hyprland.lua | 210 | ||||
| -rw-r--r-- | hypr/hyprlock.conf | 66 |
3 files changed, 292 insertions, 0 deletions
diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf new file mode 100644 index 0000000..9f6cc4b --- /dev/null +++ b/hypr/hypridle.conf @@ -0,0 +1,16 @@ +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session + after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({action = "on"})' +} + +listener { + timeout = 600 # 10 min - lock the session + on-timeout = loginctl lock-session +} + +listener { + timeout = 720 # 12 min - blank the display + on-timeout = hyprctl dispatch 'hl.dsp.dpms({action = "off"})' + on-resume = hyprctl dispatch 'hl.dsp.dpms({action = "on"})' +} diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua new file mode 100644 index 0000000..5ea8ec0 --- /dev/null +++ b/hypr/hyprland.lua @@ -0,0 +1,210 @@ +local terminal = "ghostty" +local fileManager = "dolphin" + +local menu = "wofi -G -I -i -n --show drun" + +local wallpaper = os.getenv("HOME") .. "/Pictures/wallhaven-8gdrq2_2560x1440.png" + +local font = "FiraCode Nerd Font" + + +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = "auto", +}) + + +hl.on("hyprland.start", function() + hl.exec_cmd("waybar") + hl.exec_cmd("mako") + hl.exec_cmd("swaybg -m fill -i " .. wallpaper) + hl.exec_cmd("hypridle") + hl.exec_cmd("/usr/libexec/kf6/polkit-kde-authentication-agent-1") +end) + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") + +hl.env("QT_QPA_PLATFORM", "wayland") +hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1") +hl.env("MOZ_ENABLE_WAYLAND", "1") + +hl.config({ + general = { + gaps_in = 5, + gaps_out = 0, + + border_size = 2, + + col = { + active_border = "rgba(f4bb82ff)", + inactive_border = "rgba(575757ff)", + }, + + resize_on_border = false, + allow_tearing = false, + layout = "dwindle", + }, + + decoration = { + rounding = 0, + + active_opacity = 1.0, + inactive_opacity = 1.0, + + shadow = { enabled = false }, + blur = { enabled = false }, + }, + + animations = { + enabled = true, + }, + + binds = { + workspace_back_and_forth = true, + }, + + dwindle = { + preserve_split = true, + }, + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + }, +}) + +hl.config({ + group = { + col = { + border_active = "rgba(f4bb82ff)", + border_inactive = "rgba(575757ff)", + }, + groupbar = { + enabled = true, + font_family = font, + font_size = 11, + col = { + active = "rgba(2f337fff)", + inactive = "rgba(575757ff)", + }, + }, + }, +}) + +hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } }) + +hl.animation({ leaf = "global", enabled = true, speed = 8, bezier = "easeOutQuint" }) +hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 4, bezier = "easeOutQuint", style = "slide" }) + +hl.config({ + input = { + kb_layout = "us", + + follow_mouse = 1, + + sensitivity = 0, + }, +}) + + +local mod = "SUPER" + +local left, down, up, right = "H", "J", "K", "L" + +hl.bind(mod .. " + Return", hl.dsp.exec_cmd(terminal)) +hl.bind(mod .. " + Q", hl.dsp.window.close()) +hl.bind(mod .. " + D", hl.dsp.exec_cmd(menu)) +hl.bind(mod .. " + E", hl.dsp.exec_cmd(fileManager)) +hl.bind(mod .. " + SHIFT + C", hl.dsp.exec_cmd("hyprctl reload")) + +hl.bind(mod .. " + SHIFT + E", hl.dsp.exit()) + +hl.bind(mod .. " + Escape", hl.dsp.exec_cmd("hyprlock")) + +hl.bind(mod .. " + " .. left, hl.dsp.focus({ direction = "left" })) +hl.bind(mod .. " + " .. down, hl.dsp.focus({ direction = "down" })) +hl.bind(mod .. " + " .. up, hl.dsp.focus({ direction = "up" })) +hl.bind(mod .. " + " .. right, hl.dsp.focus({ direction = "right" })) +hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" })) +hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" })) +hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" })) +hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" })) + +hl.bind(mod .. " + SHIFT + " .. left, hl.dsp.window.move({ direction = "left" })) +hl.bind(mod .. " + SHIFT + " .. down, hl.dsp.window.move({ direction = "down" })) +hl.bind(mod .. " + SHIFT + " .. up, hl.dsp.window.move({ direction = "up" })) +hl.bind(mod .. " + SHIFT + " .. right, hl.dsp.window.move({ direction = "right" })) +hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" })) +hl.bind(mod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" })) +hl.bind(mod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" })) +hl.bind(mod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" })) + +for i = 1, 10 do + local key = i % 10 + hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i })) + hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) +end + +hl.bind(mod .. " + B", hl.dsp.layout("orientationright")) +hl.bind(mod .. " + V", hl.dsp.layout("orientationbottom")) + +hl.bind(mod .. " + S", hl.dsp.layout("togglesplit")) + +hl.bind(mod .. " + T", hl.dsp.group.toggle()) + +hl.bind(mod .. " + Tab", hl.dsp.group.next()) +hl.bind(mod .. " + SHIFT + Tab", hl.dsp.group.prev()) + +hl.bind(mod .. " + F", hl.dsp.window.fullscreen()) +hl.bind(mod .. " + SHIFT + space", hl.dsp.window.float({ action = "toggle" })) + +hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +hl.bind("Print", hl.dsp.exec_cmd("grim - | wl-copy")) +hl.bind("SHIFT + Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | wl-copy")) + +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 }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true }) +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 }) + + +hl.window_rule({ + name = "suppress-maximize-events", + match = { class = ".*" }, + suppress_event = "maximize", +}) + +hl.window_rule({ + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + no_focus = true, +}) + +hl.window_rule({ + name = "float-pavucontrol", + match = { class = "^(pavucontrol)$" }, + float = true, +}) + +hl.window_rule({ + name = "float-polkit-agent", + match = { class = "^(org\\.kde\\.polkit-kde-authentication-agent-1)$" }, + float = true, +}) diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf new file mode 100644 index 0000000..2732dc6 --- /dev/null +++ b/hypr/hyprlock.conf @@ -0,0 +1,66 @@ +$font = FiraCode Nerd Font + +general { + hide_cursor = false +} + +animations { + enabled = true + bezier = linear, 1, 1, 0, 0 + animation = fadeIn, 1, 5, linear + animation = fadeOut, 1, 5, linear + animation = inputFieldDots, 1, 2, linear +} + +background { + monitor = + path = screenshot + blur_passes = 3 +} + +input-field { + monitor = + size = 20%, 5% + outline_thickness = 3 + inner_color = rgba(0, 0, 0, 0.0) # no fill + + outer_color = rgba(79a8ffff) + check_color = rgba(f78fe7ff) + fail_color = rgba(a60000ff) + + font_color = rgb(255, 255, 255) + fade_on_empty = false + rounding = 0 + + font_family = $font + placeholder_text = Input password... + fail_text = $PAMFAIL$FPRINTFAIL + + dots_spacing = 0.3 + + position = 0, -20 + halign = center + valign = center +} + +label { + monitor = + text = $TIME # https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution + font_size = 90 + font_family = $font + + position = -30, 0 + halign = right + valign = top +} + + monitor = + text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds + font_size = 25 + font_family = $font + + position = -30, -150 + halign = right + valign = top +} + |