158 lines
5.3 KiB
Lua
158 lines
5.3 KiB
Lua
-- Hyprland config — Antergos NeXT dark theme
|
|
-- See https://wiki.hypr.land/Configuring/Start/
|
|
|
|
-- Monitor
|
|
hl.monitor({
|
|
output = "",
|
|
mode = "preferred",
|
|
position = "auto",
|
|
scale = "auto",
|
|
})
|
|
|
|
-- Autostart
|
|
hl.on("hyprland.start", function()
|
|
hl.exec_cmd("waybar")
|
|
hl.exec_cmd("dunst")
|
|
hl.exec_cmd("swww init")
|
|
hl.exec_cmd("nm-applet")
|
|
hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1")
|
|
end)
|
|
|
|
-- Env
|
|
hl.env("XCURSOR_SIZE", "24")
|
|
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
|
|
|
-- General config
|
|
hl.config({
|
|
input = {
|
|
kb_layout = "us",
|
|
follow_mouse = 1,
|
|
touchpad = {
|
|
natural_scroll = false,
|
|
},
|
|
sensitivity = 0,
|
|
},
|
|
general = {
|
|
gaps_in = 5,
|
|
gaps_out = 10,
|
|
border_size = 2,
|
|
col = {
|
|
active_border = "rgba(4a9effff)",
|
|
inactive_border = "rgba(32373eff)",
|
|
nogroup_border = "rgba(32373eff)",
|
|
},
|
|
layout = "dwindle",
|
|
no_border_on_floating = false,
|
|
},
|
|
decoration = {
|
|
rounding = 10,
|
|
active_opacity = 1.0,
|
|
inactive_opacity = 1.0,
|
|
shadow = {
|
|
enabled = true,
|
|
range = 4,
|
|
render_power = 3,
|
|
color = "rgba(1a1e24ee)",
|
|
},
|
|
blur = {
|
|
enabled = true,
|
|
size = 3,
|
|
passes = 1,
|
|
},
|
|
},
|
|
animations = {
|
|
enabled = true,
|
|
},
|
|
dwindle = {
|
|
pseudotile = true,
|
|
preserve_split = true,
|
|
},
|
|
master = {
|
|
mfact = 0.55,
|
|
new_status = "slave",
|
|
},
|
|
gestures = {
|
|
workspace_swipe = true,
|
|
},
|
|
})
|
|
|
|
-- Curves
|
|
hl.curve("myBezier", { type = "bezier", points = { {0.05, 0.9}, {0.1, 1.05} } })
|
|
|
|
-- Animations
|
|
hl.animation({ leaf = "windows", enabled = true, speed = 7, bezier = "myBezier" })
|
|
hl.animation({ leaf = "windowsOut", enabled = true, speed = 7, bezier = "default" })
|
|
hl.animation({ leaf = "fade", enabled = true, speed = 7, bezier = "default" })
|
|
hl.animation({ leaf = "workspaces", enabled = true, speed = 6, bezier = "default" })
|
|
hl.animation({ leaf = "border", enabled = true, speed = 10, bezier = "default" })
|
|
|
|
-- Window rules
|
|
hl.windowrule("float", "class:(pavucontrol)")
|
|
hl.windowrule("float", "class:(blueman-manager)")
|
|
hl.windowrule("float", "class:(qt5ct)")
|
|
hl.windowrule("float", "class:(qt6ct)")
|
|
hl.windowrule("float", "class:(imv)")
|
|
hl.windowrule("float", "class:(mpv)")
|
|
hl.windowrule("float", "title:(File Operation Progress)")
|
|
hl.windowrule("float", "title:(Picture-in-Picture)")
|
|
hl.windowrule("opacity 0.95 0.95", "class:(kitty)")
|
|
|
|
-- Keybinds
|
|
local mainMod = "SUPER"
|
|
|
|
-- Terminal
|
|
hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd("kitty"))
|
|
-- Kill active
|
|
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
|
-- Exit
|
|
hl.bind(mainMod .. " + M", hl.dsp.exit())
|
|
-- Launcher
|
|
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd("rofi -show drun"))
|
|
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd("rofi -show run"))
|
|
-- Window ops
|
|
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
|
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
|
|
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))
|
|
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen())
|
|
|
|
-- Focus movement (vim keys: h left, j down, k up, l right)
|
|
hl.bind(mainMod .. " + H", hl.dsp.focus({ direction = "l" }))
|
|
hl.bind(mainMod .. " + J", hl.dsp.focus({ direction = "d" }))
|
|
hl.bind(mainMod .. " + K", hl.dsp.focus({ direction = "u" }))
|
|
hl.bind(mainMod .. " + L", hl.dsp.focus({ direction = "r" }))
|
|
|
|
-- Move window
|
|
hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "l" }))
|
|
hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "d" }))
|
|
hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "u" }))
|
|
hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "r" }))
|
|
|
|
-- Workspaces
|
|
for i = 1, 10 do
|
|
local key = i % 10
|
|
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i }))
|
|
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
|
|
end
|
|
|
|
-- Mouse binds (drag / resize)
|
|
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
|
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
|
|
|
-- Media keys
|
|
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @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 set +5%"), { locked = true, repeating = true })
|
|
hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true })
|
|
|
|
-- Screenshots
|
|
hl.bind("Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\""))
|
|
hl.bind("SHIFT + Print", hl.dsp.exec_cmd("grim"))
|
|
|
|
-- Clipboard screenshot
|
|
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | wl-copy"))
|
|
|
|
-- Reload config
|
|
hl.bind(mainMod .. " + SHIFT + C", hl.dsp.exec_cmd("hyprctl reload"))
|