init: firstCommit
This commit is contained in:
@@ -0,0 +1,261 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
recursiveUpdate
|
||||
types
|
||||
optionals
|
||||
;
|
||||
rosePineHyprcursor = pkgs.callPackage ./rose-pine-hyprcursor.nix { };
|
||||
|
||||
defaultInput = {
|
||||
kb_layout = "us";
|
||||
kb_variant = "";
|
||||
kb_model = "";
|
||||
kb_options = "";
|
||||
kb_rules = "";
|
||||
|
||||
follow_mouse = true;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
|
||||
natural_scroll = false;
|
||||
sensitivity = 0.0;
|
||||
};
|
||||
|
||||
wallpaperCommand = config.hare.hyprland.wallpaperCommand;
|
||||
|
||||
baseSettings = {
|
||||
exec-once = [
|
||||
# "/usr/lib/polkit-kde-authentication-agent-1"
|
||||
# "dunst"
|
||||
"swww-daemon"
|
||||
# "copyq --start-server"
|
||||
# "wl-paste --type text --watch cliphist store"
|
||||
# "wl-paste --type image --watch cliphist store"
|
||||
"eww daemon"
|
||||
"eww open bar"
|
||||
"eww open roundedEdge"
|
||||
];
|
||||
exec =
|
||||
optionals (wallpaperCommand != null) [
|
||||
wallpaperCommand
|
||||
]
|
||||
++ [
|
||||
"dconf write /org/gnome/desktop/interface/gtk-theme 'Adwaita Dark'"
|
||||
"dconf write /org/gnome/desktop/interface/icon-theme 'Adwaita Dark'"
|
||||
"dconf write /org/gnome/desktop/interface/document-font-name 'Noto Sans Medium 11'"
|
||||
"dconf write /org/gnome/desktop/interface/font-name 'Noto Sans Medium 11'"
|
||||
"dconf write /org/gnome/desktop/interface/monospace-font-name 'Noto Sans Mono Medium 11'"
|
||||
];
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
];
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
|
||||
input = defaultInput;
|
||||
|
||||
general = {
|
||||
layout = "dwindle";
|
||||
allow_tearing = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = false;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
"animation windowsIn 0, match:title ^(.*wofi.*)$"
|
||||
"float on, match:title ^(.*feh.*)$"
|
||||
"center on, match:title ^(.*feh.*)$"
|
||||
"float on, match:title ^(Picture.*)$"
|
||||
"pin on, match:title ^(Picture.*)$"
|
||||
"immediate on, match:class ^(Terraria)$"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"1, monitor:DP-2, default:true"
|
||||
"r[2-9], monitor:DP-2"
|
||||
"name:sub, monitor:DP-1, default:true"
|
||||
];
|
||||
|
||||
"$menu" = "uwsm app -- $(tofi-drun)";
|
||||
"$terminal" = "wezterm";
|
||||
"$lock" = "hyprlock";
|
||||
bindm = [
|
||||
# Window Movement & Resizing
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
bind = [
|
||||
# basic
|
||||
"SUPER, return, exec, $menu"
|
||||
"SUPER, E, exec, $terminal"
|
||||
"SUPER, Q, killactive,"
|
||||
"SUPER, L, exec, $lock"
|
||||
"SUPER_SHIFT, M, exec, loginctl terminate-user $USER"
|
||||
|
||||
# prsc
|
||||
", Print, exec, hyprshot -m window -m active --clipboard-only"
|
||||
|
||||
# Clipboard
|
||||
"SUPER, C, exec, copyq show"
|
||||
"SUPER, V, exec, clipman pick -t dmenu"
|
||||
|
||||
# Window navigation
|
||||
"SUPER, F, fullscreen,"
|
||||
"SUPER, Y, pin"
|
||||
"SUPER, I, togglefloating,"
|
||||
"SUPER, O, togglesplit," # dwindle
|
||||
"SUPER, P, pseudo," # dwindle
|
||||
|
||||
# Window focus
|
||||
"SUPER, mouse_down, cyclenext, next"
|
||||
"SUPER, mouse_up, cyclenext, prev"
|
||||
|
||||
"SUPER, left, movefocus, l"
|
||||
"SUPER, right, movefocus, r"
|
||||
"SUPER, up, movefocus, u"
|
||||
"SUPER, down, movefocus, d"
|
||||
|
||||
"SUPER_SHIFT, left, movewindow, l"
|
||||
"SUPER_SHIFT, right, movewindow, r"
|
||||
"SUPER_SHIFT, up, movewindow, u"
|
||||
"SUPER_SHIFT, down, movewindow, d"
|
||||
|
||||
# workspaces
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
|
||||
"SUPER_CTRL, left, workspace, m-1"
|
||||
"SUPER_CTRL, right, workspace, m+1"
|
||||
"SUPER_CTRL_SHIFT, left, workspace, r-1"
|
||||
"SUPER_CTRL_SHIFT, right, workspace, r+1"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
i:
|
||||
let
|
||||
ws = i + 1;
|
||||
in
|
||||
[
|
||||
"SUPER, code:1${toString i}, workspace, ${toString ws}"
|
||||
"SUPER SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||
]
|
||||
) 9
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
defaultStyle = {
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 7;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(6e848cee) rgba(eeeeffee) 90deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
};
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 2;
|
||||
noise = 0.01;
|
||||
contrast = 0.8;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.25;
|
||||
vibrancy_darkness = 0.1;
|
||||
};
|
||||
shadow = {
|
||||
enabled = false;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
dim_inactive = false;
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windowsIn, 1, 1, default, popin 90%"
|
||||
"windowsOut, 1, 100, default, popin 80%"
|
||||
"windowsMove, 1, 3, default"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 5, default, slidefade 10%"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
styleSettings = recursiveUpdate defaultStyle config.hare.hyprland.style;
|
||||
inputSettings = recursiveUpdate defaultInput config.hare.hyprland.input;
|
||||
in
|
||||
{
|
||||
options.hare.hyprland.style = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
description = "Overlay of Hyprland style tweaks that will be merged on top of the base settings.";
|
||||
};
|
||||
|
||||
options.hare.hyprland.input = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
description = "Overrides for the Hyprland input block (e.g., sensitivity, accel profiles).";
|
||||
};
|
||||
options.hare.hyprland.wallpaperCommand = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Command to set the wallpaper (e.g., \"swww img <path>\"); appended to Hyprland's exec list when provided.";
|
||||
};
|
||||
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
settings = recursiveUpdate (recursiveUpdate baseSettings styleSettings) {
|
||||
input = inputSettings;
|
||||
};
|
||||
plugins = [
|
||||
];
|
||||
};
|
||||
home.packages = [
|
||||
rosePineHyprcursor
|
||||
]
|
||||
++ (with pkgs; [
|
||||
swww
|
||||
eww
|
||||
hyprshot
|
||||
]);
|
||||
home.sessionVariables = {
|
||||
HYPRCURSOR_THEME = "rose-pine-hyprcursor";
|
||||
HYPRCURSOR_SIZE = "24";
|
||||
XCURSOR_SIZE = "24";
|
||||
GTK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
fetchzip,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "rose-pine-hyprcursor";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/ndom91/rose-pine-hyprcursor/archive/refs/tags/v${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-ArUX5qlqAXUqcRqHz4QxXy3KgkfasTPA/Qwf6D2kV0U=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
target=$out/share/icons/${finalAttrs.pname}
|
||||
mkdir -p "$target"
|
||||
cp -r hyprcursors hyprcursors_uncompressed manifest.hl "$target"
|
||||
# include docs for reference
|
||||
cp README.md LICENSE "$target"/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Rose Pine themed Hyprcursor set";
|
||||
homepage = "https://github.com/ndom91/rose-pine-hyprcursor";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,43 @@
|
||||
{ lib }:
|
||||
{
|
||||
general = lib.mkForce {
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(6e848cee) rgba(eeeeffee) 90deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = true;
|
||||
};
|
||||
|
||||
decoration = lib.mkForce {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 2;
|
||||
noise = 0.01;
|
||||
contrast = 0.8;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.25;
|
||||
vibrancy_darkness = 0.1;
|
||||
};
|
||||
shadow = {
|
||||
enabled = false;
|
||||
};
|
||||
dim_inactive = false;
|
||||
};
|
||||
|
||||
animations = lib.mkForce {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windowsIn, 1, 1, default, popin 90%"
|
||||
"windowsOut, 1, 100, default, popin 80%"
|
||||
"windowsMove, 1, 3, default"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 5, default, slidefade 10%"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user