256 lines
7.9 KiB
Lua
256 lines
7.9 KiB
Lua
------------------
|
|
---- MONITORS ----
|
|
------------------
|
|
|
|
-- monitor = DP-3, preferred, 0x0 ,auto
|
|
hl.monitor({
|
|
output = "DP-3",
|
|
mode = "preferred",
|
|
position = "0x0",
|
|
scale = "auto",
|
|
})
|
|
|
|
-- monitor = HDMI-A-1, preferred, -1080x0, auto, transform, 3
|
|
hl.monitor({
|
|
output = "HDMI-A-1",
|
|
mode = "preferred",
|
|
position = "-1080x0",
|
|
scale = "auto",
|
|
transform = 3,
|
|
})
|
|
|
|
-- xwayland { force_zero_scaling = true }
|
|
hl.config({
|
|
xwayland = {
|
|
force_zero_scaling = true,
|
|
},
|
|
})
|
|
|
|
---------------------
|
|
---- MY PROGRAMS ----
|
|
---------------------
|
|
|
|
local terminal = "kitty"
|
|
local fileManager = "dolphin"
|
|
local menu = "tofi-drun --drun-launch=true"
|
|
|
|
-------------------
|
|
---- AUTOSTART ----
|
|
-------------------
|
|
|
|
hl.on("hyprland.start", function()
|
|
-- exec-once & exec commands
|
|
hl.exec_cmd("systemctl --user start hyprpolkitagent")
|
|
hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme 'YOUR_DARK_GTK3_THEME'")
|
|
hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'")
|
|
hl.exec_cmd("eww daemon & eww open-many bar widget_window resource_monitor")
|
|
hl.exec_cmd("steam & discord")
|
|
|
|
-- Wallpapers
|
|
hl.exec_cmd("awww-daemon")
|
|
hl.exec_cmd("awww img -o 'DP-3' /home/Downloads/Wallpapers/oceanside.png")
|
|
hl.exec_cmd("awww img -o 'HDMI-A-1' /home/Downloads/Wallpapers/arch.png")
|
|
end)
|
|
|
|
-------------------------------
|
|
---- ENVIRONMENT VARIABLES ----
|
|
-------------------------------
|
|
|
|
hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor")
|
|
hl.env("HYPRCURSOR_SIZE", "30")
|
|
hl.env("QT_QPA_PLATFORMTHEME", "qt6ct")
|
|
|
|
-----------------------
|
|
----- LOOK AND FEEL ----
|
|
-----------------------
|
|
|
|
hl.config({
|
|
general = {
|
|
gaps_in = 2,
|
|
gaps_out = 5,
|
|
border_size = 2,
|
|
col = {
|
|
active_border = "rgba(ffffffee)",
|
|
inactive_border = "rgba(696969aa)",
|
|
},
|
|
resize_on_border = false,
|
|
allow_tearing = false,
|
|
layout = "dwindle",
|
|
snap = {
|
|
enabled = true,
|
|
monitor_gap = 20,
|
|
respect_gaps = true,
|
|
},
|
|
},
|
|
|
|
decoration = {
|
|
rounding = 9,
|
|
rounding_power = 5,
|
|
active_opacity = 1.0,
|
|
inactive_opacity = 0.90,
|
|
|
|
shadow = {
|
|
enabled = true,
|
|
range = 8,
|
|
render_power = 2,
|
|
color = "rgba(000000ee)",
|
|
color_inactive = "rgba(00000000)",
|
|
},
|
|
|
|
blur = {
|
|
enabled = false,
|
|
size = 3,
|
|
passes = 1,
|
|
vibrancy = 0.1696,
|
|
},
|
|
},
|
|
|
|
animations = {
|
|
enabled = true,
|
|
},
|
|
|
|
dwindle = {
|
|
preserve_split = true,
|
|
},
|
|
|
|
master = {
|
|
orientation = "bottom",
|
|
always_keep_position = true,
|
|
},
|
|
|
|
misc = {
|
|
force_default_wallpaper = -1,
|
|
disable_hyprland_logo = true,
|
|
vrr = 3,
|
|
},
|
|
|
|
})
|
|
|
|
-----------------------
|
|
---- BEZIER CURVES ----
|
|
-----------------------
|
|
|
|
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} } })
|
|
|
|
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "easeOutQuint" })
|
|
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
|
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, bezier = "easeOutQuint" })
|
|
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, bezier = "easeOutQuint", 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" })
|
|
|
|
-----------------------
|
|
---- INPUT ----
|
|
-----------------------
|
|
|
|
hl.config({
|
|
input = {
|
|
kb_layout = "us",
|
|
kb_variant = "",
|
|
kb_model = "",
|
|
kb_options = "",
|
|
kb_rules = "",
|
|
follow_mouse = 1,
|
|
sensitivity = 0,
|
|
-- accel_profile = "flat",
|
|
scroll_factor = 1.2,
|
|
},
|
|
})
|
|
|
|
---------------------
|
|
---- KEYBINDINGS ----
|
|
---------------------
|
|
|
|
local mainMod = "SUPER"
|
|
|
|
hl.bind(mainMod .. " + CTRL + RETURN", hl.dsp.exec_cmd(terminal))
|
|
hl.bind(mainMod .. " + ESCAPE", hl.dsp.window.close())
|
|
hl.bind(mainMod .. " + SHIFT + E", hl.dsp.exit())
|
|
hl.bind(mainMod .. " + F", hl.dsp.exec_cmd(fileManager))
|
|
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
|
hl.bind(mainMod .. " + RETURN", hl.dsp.exec_cmd(menu))
|
|
hl.bind(mainMod .. " + TAB", hl.dsp.focus({ workspace = "previous" }))
|
|
hl.bind(mainMod .. " + S", hl.dsp.layout("togglesplit"))
|
|
hl.bind(mainMod .. " + CTRL + E", hl.dsp.exec_cmd("hyprshutdown -p 'shutdown now'"))
|
|
hl.bind(mainMod .. " + CTRL + R", hl.dsp.exec_cmd("hyprshutdown -p 'reboot'"))
|
|
|
|
-- Move focus with mainMod + arrow keys
|
|
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
|
|
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
|
|
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" }))
|
|
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" }))
|
|
|
|
-- Switch workspaces with mainMod + [0-9]
|
|
-- Move active window to a workspace with mainMod + SHIFT + [0-9]
|
|
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
|
|
|
|
-- 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 })
|
|
|
|
|
|
--------------------------------
|
|
---- WINDOWS AND WORKSPACES ----
|
|
--------------------------------
|
|
|
|
-- Fix some dragging issues with XWayland
|
|
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 = "move-hyprland-run",
|
|
match = { class = "hyprland-run" },
|
|
move = "20 monitor_h-120",
|
|
float = true,
|
|
})
|
|
|
|
hl.window_rule({
|
|
name = "second_monitor",
|
|
match = { workspace = 10 },
|
|
float = true,
|
|
size = {"monitor_w - 8", 850},
|
|
move = {4, 500},
|
|
opacity = "1.0 override 0.9 override",
|
|
})
|
|
|
|
|
|
hl.workspace_rule({
|
|
workspace = "10",
|
|
monitor = "HDMI-A-1",
|
|
default = true,
|
|
layout = "master",
|
|
layout_opts = {orientation = "bottom"},
|
|
})
|