338 lines
8.6 KiB
Lua
338 lines
8.6 KiB
Lua
|
|
-- Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||
|
|
|
||
|
|
local colors = require("config/colors")
|
||
|
|
|
||
|
|
-- https://wiki.hyprland.org/Configuring/Variables/#general
|
||
|
|
|
||
|
|
hl.config({
|
||
|
|
general = {
|
||
|
|
gaps_in = 1,
|
||
|
|
gaps_out = 1,
|
||
|
|
border_size = 1,
|
||
|
|
-- https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||
|
|
-- Resizing windows by clicking and dragging on borders and gaps
|
||
|
|
resize_on_border = true,
|
||
|
|
-- Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||
|
|
allow_tearing = false,
|
||
|
|
layout = "dwindle",
|
||
|
|
col = {
|
||
|
|
active_border = active_color,
|
||
|
|
inactive_border = inactive_color,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
-- https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||
|
|
hl.config({
|
||
|
|
decoration = {
|
||
|
|
rounding = 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 = "rgba(1a1a1aee)",
|
||
|
|
},
|
||
|
|
-- https://wiki.hyprland.org/Configuring/Variables/#blur
|
||
|
|
blur = {
|
||
|
|
enabled = true,
|
||
|
|
size = 6,
|
||
|
|
passes = 4,
|
||
|
|
vibrancy = 0.1696,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
-- Layer rules
|
||
|
|
|
||
|
|
hl.layer_rule({
|
||
|
|
match = {
|
||
|
|
namespace = "^(swaync-control-center)$",
|
||
|
|
},
|
||
|
|
blur = true,
|
||
|
|
ignore_alpha = 0.2,
|
||
|
|
animation = "slide right",
|
||
|
|
dim_around = true,
|
||
|
|
})
|
||
|
|
|
||
|
|
hl.layer_rule({
|
||
|
|
match = {
|
||
|
|
namespace = "^(rofi)$",
|
||
|
|
},
|
||
|
|
blur = false,
|
||
|
|
animation = "popin 90%",
|
||
|
|
})
|
||
|
|
|
||
|
|
hl.layer_rule({
|
||
|
|
match = {
|
||
|
|
namespace = "^(waybar)$",
|
||
|
|
},
|
||
|
|
blur = false,
|
||
|
|
animation = "slide up",
|
||
|
|
})
|
||
|
|
|
||
|
|
hl.layer_rule({
|
||
|
|
match = {
|
||
|
|
namespace = "^(selection)$",
|
||
|
|
},
|
||
|
|
blur = false,
|
||
|
|
animation = "fade",
|
||
|
|
})
|
||
|
|
|
||
|
|
hl.layer_rule({
|
||
|
|
match = {
|
||
|
|
namespace = "^(hyprpicker)$",
|
||
|
|
},
|
||
|
|
blur = false,
|
||
|
|
animation = "fade",
|
||
|
|
})
|
||
|
|
|
||
|
|
-------------------
|
||
|
|
---- ANIMATIONS ---
|
||
|
|
-------------------
|
||
|
|
|
||
|
|
hl.config({
|
||
|
|
animations = {
|
||
|
|
enabled = true,
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
-- 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}, { 0, 1 } } })
|
||
|
|
hl.curve( "almostLinear", { type = "bezier", points = { {0.5, 0.5}, { 0.75, 1.0} } })
|
||
|
|
hl.curve( "quick", { type = "bezier", points = { {0.15, 0}, { 0.1, 1} } })
|
||
|
|
hl.curve( "easeInOutExpo", { type = "bezier", points = { {0.87, 0}, { 0.13, 1} } })
|
||
|
|
|
||
|
|
hl.animation({ leaf="global", enabled=true, speed=10, bezier="default" })
|
||
|
|
hl.animation({ leaf="border", enabled=true, speed=4, bezier="easeOutQuint" })
|
||
|
|
|
||
|
|
hl.animation({ leaf="windows", enabled=true, speed=3.5, bezier="easeOutQuint" })
|
||
|
|
hl.animation({ leaf="windowsIn", enabled=true, speed=3.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="easeOutQuint" })
|
||
|
|
hl.animation({ leaf="fadeOut", enabled=true, speed=1.46, bezier="easeOutQuint" })
|
||
|
|
hl.animation({ leaf="fade", enabled=true, speed=3.03, bezier="easeOutQuint" })
|
||
|
|
|
||
|
|
hl.animation({ leaf="layers", enabled=true, speed=3, bezier="easeOutQuint" })
|
||
|
|
hl.animation({ leaf="layersIn", enabled=true, speed=2.4, bezier="easeOutQuint", style="fade" })
|
||
|
|
hl.animation({ leaf="layersOut", enabled=true, speed=2.4, bezier="easeOutQuint", style="fade" })
|
||
|
|
hl.animation({ leaf="fadeLayersIn", enabled=true, speed=2, bezier="easeOutQuint" })
|
||
|
|
hl.animation({ leaf="fadeLayersOut", enabled=true, speed=2, bezier="easeOutQuint" })
|
||
|
|
|
||
|
|
hl.animation({ leaf="workspaces", enabled=true, speed=2.8, bezier="easeOutQuint", style="slidefadevert" })
|
||
|
|
hl.animation({ leaf="workspacesIn", enabled=true, speed=2.6, bezier="easeOutQuint", style="slide" })
|
||
|
|
hl.animation({ leaf="workspacesOut", enabled=true, speed=2.6, bezier="easeOutQuint", style="slide" })
|
||
|
|
|
||
|
|
-- Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
|
||
|
|
|
||
|
|
-- "Smart gaps" / "No gaps when only"
|
||
|
|
-- uncomment all if you wish to use that.
|
||
|
|
-- workspace = w[tv1], gapsout:0, gapsin:0
|
||
|
|
-- workspace = f[1], gapsout:0, gapsin:0
|
||
|
|
-- windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
|
||
|
|
-- windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
|
||
|
|
-- windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
|
||
|
|
-- windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
|
||
|
|
|
||
|
|
-- See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||
|
|
hl.config({
|
||
|
|
dwindle = {
|
||
|
|
preserve_split = true,
|
||
|
|
-- You probably want this
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
-- See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||
|
|
hl.config({
|
||
|
|
master = {
|
||
|
|
new_status = "master",
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
-- https://wiki.hyprland.org/Configuring/Variables/#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. :(
|
||
|
|
disable_splash_rendering = true, -- Disable default wallpapers rendering
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
|
||
|
|
-------------------------------
|
||
|
|
---- WINDOWS AND WORKSPACES ---
|
||
|
|
-------------------------------
|
||
|
|
|
||
|
|
-- See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||
|
|
-- See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||
|
|
|
||
|
|
-- Ignore maximize requests from apps. You'll probably like this.
|
||
|
|
hl.window_rule({
|
||
|
|
name = "suppress-maximize-events",
|
||
|
|
match = { class = ".*" },
|
||
|
|
|
||
|
|
suppress_event = "maximize",
|
||
|
|
})
|
||
|
|
|
||
|
|
|
||
|
|
-- Fix some dragging issues with XWayland
|
||
|
|
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,
|
||
|
|
})
|
||
|
|
|
||
|
|
|
||
|
|
-- Albert
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "albert",
|
||
|
|
match = {
|
||
|
|
class = "^(albert)$",
|
||
|
|
},
|
||
|
|
border_size = 0,
|
||
|
|
no_blur = true,
|
||
|
|
no_shadow = true,
|
||
|
|
float = true,
|
||
|
|
stay_focused = true,
|
||
|
|
no_dim = true,
|
||
|
|
})
|
||
|
|
|
||
|
|
-- Prism Launcher
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "prismlauncher-all",
|
||
|
|
match = {
|
||
|
|
class = "(org.prismlauncher.PrismLauncher)",
|
||
|
|
},
|
||
|
|
pseudo = true,
|
||
|
|
})
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "prismlauncher-main",
|
||
|
|
match = {
|
||
|
|
class = "(org.prismlauncher.PrismLauncher)",
|
||
|
|
title = "^(Prism Launcher.*)$",
|
||
|
|
},
|
||
|
|
size = { "(monitor_w*0.65)", "(monitor_h*0.7)" },
|
||
|
|
})
|
||
|
|
|
||
|
|
-- Nautilus
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "nautilus-main",
|
||
|
|
match = {
|
||
|
|
class = "(org.gnome.Nautilus)",
|
||
|
|
},
|
||
|
|
pseudo = true,
|
||
|
|
size = { "(monitor_w*0.65)", "(monitor_h*0.7)" },
|
||
|
|
})
|
||
|
|
|
||
|
|
-- GTK file picker
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "gtk-file-picker",
|
||
|
|
match = {
|
||
|
|
class = "(xdg-desktop-portal-gtk)",
|
||
|
|
},
|
||
|
|
float = true,
|
||
|
|
size = { "(monitor_w*0.65)", "(monitor_h*0.7)" },
|
||
|
|
})
|
||
|
|
|
||
|
|
-- Vivado
|
||
|
|
|
||
|
|
--# Loading screen
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "vivado-loading-screen",
|
||
|
|
match = {
|
||
|
|
class = "(ui-PlanAhead)",
|
||
|
|
},
|
||
|
|
float = true,
|
||
|
|
center = true,
|
||
|
|
})
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "vivado-loading-screen-2",
|
||
|
|
match = {
|
||
|
|
class = "(ui-PlanAhead) title:^(win0)$",
|
||
|
|
},
|
||
|
|
size = { 397, 295 },
|
||
|
|
})
|
||
|
|
|
||
|
|
--# Main window
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "vivado-main",
|
||
|
|
match = {
|
||
|
|
class = "(Vivado)",
|
||
|
|
},
|
||
|
|
tile = true,
|
||
|
|
})
|
||
|
|
|
||
|
|
-- Kdenlive
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "kdenlive-all",
|
||
|
|
match = {
|
||
|
|
class = "(org.kde.kdenlive)",
|
||
|
|
},
|
||
|
|
pseudo = true,
|
||
|
|
})
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "kdenlive-welcome",
|
||
|
|
match = {
|
||
|
|
class = "(org.kde.kdenlive)",
|
||
|
|
},
|
||
|
|
size = { "(512)", "(544)" },
|
||
|
|
})
|
||
|
|
|
||
|
|
-- Gnome characters
|
||
|
|
|
||
|
|
hl.window_rule({
|
||
|
|
name = "gnome-characters",
|
||
|
|
match = {
|
||
|
|
class = "(org.gnome.Characters)",
|
||
|
|
},
|
||
|
|
float = true,
|
||
|
|
size = { "(849)", "(566)" },
|
||
|
|
})
|
||
|
|
|
||
|
|
|
||
|
|
-- Legacy disabled code
|
||
|
|
|
||
|
|
-- Mullvad VPN
|
||
|
|
-- hl.window_rule({
|
||
|
|
-- name = "mullvad-vpn",
|
||
|
|
-- float = "on",
|
||
|
|
-- size = (320) (568),
|
||
|
|
-- # move = "{ (monitor_w - window_w - 4), (monitor_h - window_h - 4) }",
|
||
|
|
-- match:class = (Mullvad VPN),
|
||
|
|
-- })
|
||
|
|
|
||
|
|
-- TODO Automatically fullscreen single apps
|
||
|
|
-- - Seems impossible for now (try mixing with workspace rules)
|
||
|
|
|
||
|
|
-- Default size for floating windows
|
||
|
|
--# TODO
|
||
|
|
--windowrulev2 = size 100 100,floating:1
|
||
|
|
|
||
|
|
-- Increase gaps for single apps
|
||
|
|
--# Usless since I changed the default gap but may be useful if you decide to reset it to 0
|
||
|
|
--workspace=w[t1], gapsout:2
|