This commit is contained in:
Hadi
2024-08-29 14:29:05 +02:00
parent 90e8d5577e
commit 55a5c52c51
21 changed files with 139 additions and 1178 deletions

View File

@@ -1,7 +1,12 @@
{ pkgs, config, inputs, ... }: {
imports =
[ ./hyprlock/macos.nix ./hypridle.nix ./hyprpaper.nix ./hyprcursor.nix ];
imports = [
./hyprlock/macos.nix
./hypridle.nix
./hyprpaper.nix
./hyprcursor.nix
./hyprpanel.nix
];
home.packages = with pkgs; [
hyprshot
@@ -9,14 +14,13 @@
swappy
imv
wf-recorder
xdg-desktop-portal-hyprland
wlr-randr
wl-clipboard
brightnessctl
gnome-themes-extra
wlsunset
xwayland
xdg-desktop-portal-gtk
# xwayland
# xdg-desktop-portal-gtk
qt5ct
libva
dconf
@@ -29,21 +33,36 @@
enable = true;
xwayland.enable = true;
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
# plugins = [ inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo ]; # TODO: Fix, stack overflow
plugins = [ inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo ];
settings = {
"$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
exec-once = [
"startup"
"${pkgs.hypridle}/bin/hypridle"
"${pkgs.hyprpaper}/bin/hyprpaper"
"${pkgs.bitwarden}/bin/bitwarden"
"[[ ${
toString config.var.sops
} == 1 ]] && systemctl --user start sops-nix"
];
monitor = [ "eDP-2,highres,0x0,1" ",prefered,auto,1" ];
plugin = {
hyprexpo = {
columns = 2;
gap_size = 5;
bg_col = "rgb(111111)";
workspace_method =
"center current"; # [center/first] [workspace] e.g. first 1 or center m+1
enable_gesture = true; # laptop touchpad
gesture_fingers = 3; # 3 or 4
gesture_distance = 300; # how far is the "max"
gesture_positive = true; # positive = swipe down. Negative = swipe up.
};
};
bind = [
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty" # Kitty
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar
@@ -53,6 +72,7 @@
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod, X, exec, powermenu" # Powermenu
"$mod, SPACE, exec, menu" # Launcher
"$shiftMod, SPACE, hyprexpo:expo, toggle" # HyprExpo
"$mod, Q, killactive," # Close window
"$mod, T, togglefloating," # Toggle Floating

View File

@@ -1,4 +1,6 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland.settings.exec-once =
[ "${pkgs.hypridle}/bin/hypridle" ];
services.hypridle = {
enable = true;

View File

@@ -1,84 +0,0 @@
{ config, ... }: {
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 5;
no_fade_in = true;
no_fade_out = true;
};
background = {
monitor = "";
path = "$HOME/wallpapers/${config.var.theme.wallpaper}";
color = "rgb(${config.var.theme.colors.bg})";
blur_size = 4;
blur_passes = 3;
noise = 1.17e-2;
contrast = 1.3;
brightness = 0.8;
vibrancy = 0.21;
vibrancy_darkness = 0.0;
};
input-field = [{
monitor = "";
size = "250, 50";
outline_thickness = 3;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "rgb(${config.var.theme.colors.accent})";
inner_color = "rgb(${config.var.theme.colors.bg})";
font_color = "rgb(${config.var.theme.colors.fg})";
fade_on_empty = true;
placeholder_text =
"Password..."; # Text rendered in the input box when it's empty.
position = "0, 80";
halign = "center";
valign = "bottom";
}];
label = [
# Current time
{
monitor = "";
text =
''cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"'';
color = "rgb(${config.var.theme.colors.fg})";
font_size = 64;
font_family = config.var.theme.font;
position = "0, 16";
halign = "center";
valign = "center";
}
# User label
{
monitor = "";
text = ''
Hey <span text_transform="capitalize" size="larger">$USER</span>'';
color = "rgb(${config.var.theme.colors.fg})";
font_size = config.var.theme.font-size;
font_family = config.var.theme.font;
position = "0, 0";
halign = "center";
valign = "center";
}
# Type to unlock
{
monitor = "";
text = "Type to unlock!";
color = "rgb(${config.var.theme.colors.fg})";
font_size = config.var.theme.font-size;
font_family = config.var.theme.font;
position = "0, 30";
halign = "center";
valign = "bottom";
}
];
};
};
}

View File

@@ -1,86 +0,0 @@
{ config, ... }: {
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 5;
no_fade_in = true;
no_fade_out = true;
};
background = {
monitor = "";
color = "rgb(${config.var.theme.colors.bg})";
};
input-field = [{
monitor = "";
size = "250, 50";
outline_thickness = 3;
dots_size = 0.2;
dots_spacing = 0.64;
dots_center = false;
outer_color = "rgb(${config.var.theme.colors.bg})";
inner_color = "rgb(${config.var.theme.colors.bg})";
font_color = "rgb(${config.var.theme.colors.fg})";
fade_on_empty = false;
placeholder_text = "";
position = "1190, -50";
halign = "left";
valign = "center";
}];
shape = [{
monitor = "";
size = "520, 200";
color = "rgb(${config.var.theme.colors.bg})";
rounding = "0";
border_size = "3";
border_color = "rgba(255, 255, 255, 1.0)";
rotate = "0";
xray = "false";
position = "0, 0";
halign = "center";
valign = "center";
}];
label = [
# Current time
{
monitor = "";
text = ''cmd[update:900] echo "time: $(date +"%H:%M:%S")"'';
color = "rgb(${config.var.theme.colors.fg})";
font_size = config.var.theme.font-size;
font_family = config.var.theme.font-mono;
position = "1100, 50";
halign = "left";
valign = "center";
}
# Username
{
monitor = "";
text = "username: ${config.var.username}";
color = "rgb(${config.var.theme.colors.fg})";
font_size = config.var.theme.font-size;
font_family = config.var.theme.font-mono;
position = "1100, 0";
halign = "left";
valign = "center";
}
# Password
{
monitor = "";
text = "password: ";
color = "rgb(${config.var.theme.colors.fg})";
font_size = config.var.theme.font-size;
font_family = config.var.theme.font-mono;
position = "1100, -50";
halign = "left";
valign = "center";
}
];
};
};
}

View File

@@ -0,0 +1,6 @@
{ pkgs, config, ... }: {
wayland.windowManager.hyprland.settings.exec-once =
[ "${pkgs.hyprpanel}/bin/hyprpanel" ];
home.packages = with pkgs; [ hyprpanel ];
}

View File

@@ -1,4 +1,7 @@
{ config, ... }: {
{ pkgs, config, ... }: {
wayland.windowManager.hyprland.settings.exec-once =
[ "${pkgs.hyprpaper}/bin/hyprpaper" ];
services.hyprpaper = {
enable = true;
settings = {