This commit is contained in:
unexplrd
2025-02-19 18:01:37 +02:00
parent 59a265abd8
commit 267b293b0b

View File

@ -7,6 +7,7 @@
}: let
cfg = config.desktop.hyprland;
hostname = osConfig.networking.hostName;
cursor_size = toString config.stylix.cursor.size;
keyboard =
if hostname == "eldrid"
then "chromeos"
@ -73,7 +74,7 @@ in {
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"QT_QPA_PLATFORM,wayland"
"QT_QPA_PLATFORMTHEME,gtk3"
"XCURSOR_SIZE,24"
"XCURSOR_SIZE,${cursor_size}"
#"GTK_THEME,adw-gtk3"
"GSK_RENDERER,ngl"
# "DISPLAY,:123"
@ -229,13 +230,11 @@ in {
"$modCtrl, B, exec, $webBrowser"
"$modCtrl, V, exec, $clipboardManager"
# ", Print, exec, flameshot gui" #${xdg.userDirs.pictures}/screenshots/"
", Print, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -o -r -c '\#\#00000000')\" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ${xdgPictures}/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png"
# ", Print, exec, grimblast --freeze copy area" #${xdg.userDirs.pictures}/screenshots/"
# "CTRL, Print, exec, grimblast --freeze copy active" #${xdg.userDirs.pictures}/screenshots/"
# "SHIFT, Print, exec, grimblast --freeze copy output" #${xdg.userDirs.pictures}/screenshots/"
# navigation
#"$modCtrl, N,"
# ", Print, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -o -r -c '\#\#00000000')\" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ${xdgPictures}/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png"
", Print, exec, hyprshot -z -m region -o ${config.xdg.userDirs.pictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
"CTRL, Print, exec, hyprshot -z -m window -o ${config.xdg.userDirs.pictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
"SHIFT, Print, exec, hyprshot -z -m output -o ${config.xdg.userDirs.pictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
## navigation
"$mod, $left, hy3:movefocus, l"
"$mod, $down, hy3:movefocus, d"
"$mod, $up, hy3:movefocus, u"
@ -1471,7 +1470,7 @@ in {
notification-icon-size = 32;
notification-body-image-height = 100;
notification-body-image-width = 200;
notification-window-width = 300;
notification-window-width = 400;
# Control center settings
control-center-positionX = "right";
@ -1722,7 +1721,6 @@ in {
{
monitor = "";
text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +'%m/%d %a %T')";
#text = "$TIME
text_align = "center";
font_size = 16;
font_family = "${config.stylix.fonts.serif.name}";
@ -1751,21 +1749,6 @@ in {
notify = true;
tray = "auto";
};
services.flameshot = {
enable = false;
settings = {
General = {
buttons = "@Variant(000x7f000vQList<int>0000x130000000x1000x2000x3000x4000x5000x6000x12000xf000x13000b000 000x10000000v000x17000xe000f000x11)";
filenamePattern = "screenshot-%F_%H-%M-%S";
saveAsFileExtension = "png";
savePath = "/home/user/pics/screenshots";
uiColor = "#${config.lib.stylix.colors.base0D}";
showStartupLaunchMessage = false;
showDesktopNotification = false;
showHelp = false;
};
};
};
home.packages = with pkgs; [
brightnessctl
nautilus
@ -1776,8 +1759,7 @@ in {
celluloid
mission-center
dconf
glib
grimblast
hyprshot
grim
slurp
libnotify
@ -1786,7 +1768,6 @@ in {
pwvucontrol
wl-clipboard-rs
libqalculate
#papirus-icon-theme
];
xdg.mime.enable = true;
xdg.mimeApps = {
@ -1813,101 +1794,46 @@ in {
"x-scheme-handler/unknown" = web_browser;
};
};
systemd.user.settings.Manager.DefaultEnvironment = {
QT_QPA_PLATFORMTHEME = "gtk3";
QT_QPA_PLATFORM = "wayland";
};
systemd.user.targets.tray = {
# workaround for udiskie
Unit = {
Description = "Home Manager System Tray";
};
};
systemd.user = {
services = {
udiskie = {
Unit = {
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["hyprland-session.target"];
};
};
waybar = {
Unit = {
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["hyprland-session.target"];
};
};
copyq = {
Unit = {
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["hyprland-session.target"];
};
Service = {
Environment = lib.mkForce "QT_QPA_PLATFORM=wayland";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
network-manager-applet = {
Unit = {
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["hyprland-session.target"];
};
};
# gnome-polkit-agent = {
# Unit = {
# PartOf = ["graphical-session.target"];
# After = ["graphical-session.target"];
# Requisite = ["graphical-session.target"];
# };
# Install = {
# WantedBy = ["hyprland-session.target"];
# };
# Service = {
# Type = "simple";
# ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
# Restart = "on-failure";
# RestartSec = 1;
# TimeoutStopSec = 10;
# };
# };
hyprpolkitagent = {
settings.Manager.DefaultEnvironment = {
QT_QPA_PLATFORM = "wayland";
};
targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie
services = let
mkGraphicalService = config: graphicalService // config;
graphicalService = {
Install.WantedBy = ["hyprland-session.target"];
Service = {
Type = "simple";
ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
wlsunset = {
Unit = {
Requisite = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["hyprland-session.target"];
Service = {
Restart = "on-failure";
TimeoutStopSec = 10;
RestartSec = 1;
};
};
in {
# udiskie = mkGraphicalService {};
# waybar = mkGraphicalService {};
# wlsunset = mkGraphicalService {};
# network-manager-applet = mkGraphicalService {};
copyq = mkGraphicalService {
Service =
graphicalService.Service
// {
Environment = lib.mkForce "QT_QPA_PLATFORM=wayland";
};
};
hyprpolkitagent = mkGraphicalService {
Service =
graphicalService.Service
// {
Type = "simple";
ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent";
};
};
};
};
};