This commit is contained in:
Kopatz
2024-05-21 08:57:45 +02:00
parent 933eacd440
commit e2b6c1bb25
5 changed files with 160 additions and 29 deletions

View File

@@ -3,5 +3,6 @@
./hyprland-settings.nix
./hyprland-xwaylandvideobridge.nix
./waybar.nix
./hyprlock.nix
];
}

View File

@@ -25,11 +25,11 @@ in {
# laptop
"eDP-1,3840x2160@60,0x0,2"
"DP-3,1920x1080@60,1920x0,1"
] else
[
# Default
",preferred,auto,auto"
];
",preferred,auto,auto"
] else [
# Default
",preferred,auto,auto"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -146,11 +146,13 @@ in {
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
swaylock = "${pkgs.swaylock}/bin/swaylock";
hyprlock = "${pkgs.hyprlock}/bin/hyprlock";
playerctl = "${pkgs.playerctl}/bin/playerctl";
in [
"$mainMod, Q, exec, ${kitty}"
"$mainMod, C, killactive"
"$mainMod, L, exec, ${swaylock} -f -c 000000"
#"$mainMod, L, exec, ${swaylock} -f -c 000000"
"$mainMod, L, exec, ${hyprlock}"
"$mainMod, M, exit,"
"$mainMod, E, exec, ${thunar}"
"$mainMod, F, fullscreen"

View File

@@ -0,0 +1,88 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
with lib;
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config = lib.mkIf cfg.enable {
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
disable_loading_bar = true;
grace = 0;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "/synced/default/dinge/Bg/yuyukowallpaper1809.png";
blur_passes = 3;
blur_size = 8;
}
];
# TIME
#label = {
# monitor = "";
# text = "cmd[update:30000] echo \"$(date +\"%R\")\"";
# color = "${config.colorScheme.colors.base05}";
# #font_size = 90;
# #font_family = "$font";
# position = "-130, -100";
# halign = "right";
# valign = "top";
# shadow_passes = 2;
#};
#
## DATE
#label = {
# monitor = "";
# text = "cmd[update:43200000] echo \"$(date +\"%A, %d %B %Y\")\"";
# color = "${config.colorScheme.colors.base05}";
# #font_size = "25";
# #font_family = "$font";
# position = "-130, -250";
# halign = "right";
# valign = "top";
# shadow_passes = 2;
#};
input-field = [
{
size = "400, 100";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password...";
shadow_passes = 2;
}
];
};
services.hypridle.enable = true;
services.hypridle.settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 900;
on-timeout = "hyprlock";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}

View File

@@ -55,27 +55,65 @@ in {
auth include login
'';
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# hyprland stuff
dunst
swww
rofi-wayland
libnotify
networkmanagerapplet
wayland
wl-clipboard
#qt5.qtwayland
#qt6.qmake
#qt6.qtwayland
#waybar
#xdg-desktop-portal-hyprland
#xdg-desktop-portal-gtk
#xdg-utils
#xwayland
];
environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS="1";
#WLR_DRM_NO_ATOMIC="1";
#WLR_DRM_DEVICES = "/dev/dri/card0";
LIBVA_DRIVER_NAME="nvidia";
# black screen :(
#XDG_SESSION_TYPE = "wayland";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_RENDERER_ALLOW_SOFTWARE="1";
};
hardware = {
# Opengl
opengl.enable = true;
# Most wayland compositors need this
nvidia.modesetting.enable = true;
};
xdg.portal.enable = true;
xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk ];
programs.hyprland = {
enable = true;
package = pkgs.unstable.hyprland;
};
security.pam.services = {
swaylock = {
fprintAuth = false;
text = ''
auth include login
'';
};
};
security.pam.services.hyprlock = {};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# hyprland stuff
patchedWaybar
dunst
swww
rofi-wayland
libnotify
networkmanagerapplet
wayland
wl-clipboard
#qt5.qtwayland
#qt6.qmake
#qt6.qtwayland
#waybar
#xdg-desktop-portal-hyprland
#xdg-desktop-portal-gtk
#xdg-utils
#xwayland
];
};
}

2
search.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
pdfgrep -h -i -C 10 "$1" /synced/fh/cloud_computing/scriptum/*