163 lines
4.2 KiB
Nix
163 lines
4.2 KiB
Nix
{ hyprsplit, ... }:
|
|
|
|
let
|
|
# Replace these with your pywal colors or import them from another file.
|
|
# wal = {
|
|
# color11 = "#...";
|
|
# color14 = "#...";
|
|
# };
|
|
in
|
|
{
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
device = [
|
|
{
|
|
name = "glorious-model-o-wireless";
|
|
sensitivity = -1.0;
|
|
}
|
|
];
|
|
|
|
config = {
|
|
input = {
|
|
kb_layout = "de";
|
|
follow_mouse = 1;
|
|
repeat_delay = 300;
|
|
repeat_rate = 35;
|
|
scroll_factor = 1.3;
|
|
sensitivity = -1.0;
|
|
};
|
|
|
|
general = {
|
|
gaps_in = 4;
|
|
gaps_out = 12;
|
|
border_size = 2;
|
|
|
|
# "col.active_border" = "rgb(${wal.color11}) rgb(${wal.color14}) 45deg";
|
|
# "col.active_border" = "rgba(80808077) rgba(80808077) 45deg";
|
|
|
|
# "col.inactive_border" = "rgba(80808077) rgba(80808077) 45deg";
|
|
|
|
resize_on_border = false;
|
|
allow_tearing = false;
|
|
layout = "dwindle";
|
|
};
|
|
|
|
decoration = {
|
|
rounding = 2;
|
|
|
|
active_opacity = 0.65;
|
|
inactive_opacity = 0.65;
|
|
|
|
shadow = {
|
|
enabled = true;
|
|
range = 50;
|
|
render_power = 4;
|
|
color = "0xaf1a1a1a";
|
|
};
|
|
|
|
blur = {
|
|
enabled = true;
|
|
size = 3;
|
|
passes = 4;
|
|
brightness = 0.473;
|
|
contrast = 1.0;
|
|
vibrancy = 0.1696;
|
|
vibrancy_darkness = 0.2;
|
|
ignore_opacity = true;
|
|
popups = true;
|
|
};
|
|
};
|
|
|
|
master = {
|
|
new_status = "master";
|
|
new_on_top = true;
|
|
mfact = 0.5;
|
|
orientation = "center";
|
|
};
|
|
|
|
misc = {
|
|
force_default_wallpaper = 0;
|
|
disable_hyprland_logo = true;
|
|
enable_anr_dialog = false;
|
|
};
|
|
|
|
xwayland = {
|
|
force_zero_scaling = true;
|
|
};
|
|
};
|
|
|
|
# animations = {
|
|
# enabled = false;
|
|
# };
|
|
|
|
# bezier = [
|
|
# "md3_standard,0.2,0,0,1"
|
|
# "md3_decel,0.05,0.7,0.1,1"
|
|
# "md3_accel,0.3,0,0.8,0.15"
|
|
# "overshot,0.05,0.9,0.1,1.02"
|
|
#
|
|
# # Hyprland supports spring curves as strings.
|
|
# "spring_snappy,1,80,16"
|
|
#
|
|
# "weighted_decel,0.05,0.9,0.1,1"
|
|
# "snap_curve,0.1,1,0,1"
|
|
# "winIn,0.1,1,0.1,1"
|
|
# "winOut,0.1,1,0.1,1"
|
|
# ];
|
|
#
|
|
# animation = [
|
|
# "windows,1,4,spring_snappy"
|
|
# "windowsIn,1,3,md3_decel,popin 70%"
|
|
# "windowsOut,1,4,md3_accel,popin 70%"
|
|
# "windowsMove,1,4,overshot"
|
|
#
|
|
# "fade,1,3,md3_decel"
|
|
#
|
|
# "layers,1,4.5,md3_standard,fade"
|
|
# "layersIn,1,4.5,winIn,slide"
|
|
# "layersOut,1,5,winOut,slide"
|
|
#
|
|
# "workspaces,1,5,md3_decel,slide"
|
|
# "workspacesIn,1,7,winIn,slide"
|
|
# "workspacesOut,1,7,winOut,slide"
|
|
#
|
|
# "specialWorkspace,1,4,winIn,slidevert"
|
|
# ];
|
|
};
|
|
|
|
extraLuaFiles = {
|
|
# create a symlink to `.config/hypr/hyprsplit/init.lua`.
|
|
"hyprsplit/init" = {
|
|
autoLoad = false;
|
|
content = builtins.readFile "${hyprsplit}/init.lua";
|
|
};
|
|
# Finally, use it directly in Lua.
|
|
"hyprload" = {
|
|
autoLoad = true;
|
|
content = ''
|
|
local hs = require("hyprsplit")
|
|
hs.config({ num_workspaces = 10 })
|
|
|
|
local mod = "SUPER"
|
|
|
|
for i = 1, 10 do
|
|
local key = (i == 10) and "0" or tostring(i)
|
|
hl.bind(mod .. " + " .. key, hs.dsp.focus({ workspace = i }))
|
|
hl.bind(mod .. " + " .. key, hs.dsp.window.move({ workspace = i }))
|
|
hl.bind("SUPER + " .. key, hs.dsp.focus({ workspace = i }))
|
|
hl.bind("SUPER + SHIFT + " .. key, hs.dsp.window.move({ workspace = i, follow = true }))
|
|
end
|
|
'';
|
|
};
|
|
};
|
|
extraConfig = ''
|
|
hl.monitor({ output = "DP-1", mode = "1920x1080@60", position = "3840x0", scale = "auto" })
|
|
hl.monitor({ output = "DP-2", mode = "1920x1080@144", position = "1920x0", scale = "auto", bitdepth = 10 })
|
|
hl.monitor({ output = "HDMI-A-1", mode = "1920x1080@60", position = "0x0", scale = "auto" })
|
|
'';
|
|
};
|
|
}
|