better styling, qol fixes

This commit is contained in:
2025-03-07 11:44:00 +01:00
parent eb20634def
commit 3f7924651e
11 changed files with 165 additions and 1253 deletions

View File

@@ -3,6 +3,8 @@
./cursor.nix
./hyprland-customization.nix
./hyprpaper.nix
./hyprlock.nix
./hypridle.nix
./waybar.nix
];
}

View File

@@ -0,0 +1,38 @@
{inputs, pkgs, ...}:
{
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
};
listener = [
{
# dim screen after 4 minutes
timeout = 240;
on-timeout = "brightnessctl -s set 10";
# set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "brightnessctl -r";
# monitor backlight restore.
}
{
# lock screen after 5 minutes
timeout = 300;
on-timeout = "loginctl lock-session";
}
{
# turnoff screen after 10 minutes
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
# TODO - suspend after some time
];
};
};
}

View File

@@ -6,6 +6,7 @@
pkgs.nautilus
pkgs.gnome-control-center
pkgs.brightnessctl
pkgs.cliphist
];
@@ -26,10 +27,14 @@
"$mod, b, exec, $browser"
"$mod, s, exec, $ide"
"$mod, e, exec, nautilus"
# Overview
# "$mod, , overview:toggle"
# Lock screen
"$mod+Shift, l, exec, hyprlock"
# Clipboard management
"$mod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
"$mod+Shift, Q, killactive," # Close window
"$mod, f, togglefloating," # Toggle Floating
@@ -39,6 +44,9 @@
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
# Alt-tab alternative
"$mod, Tab, cyclenext,"
"$mod, Tab, bringactivetotop,"
# Move the window
"$mod+Shift, left, movewindow, l"
@@ -46,19 +54,39 @@
"$mod+Shift, up, movewindow, u"
"$mod+Shift, down, movewindow, d"
# Switch workspace
"$mod+Ctrl, left, workspace, -1"
"$mod+Ctrl, right, workspace, +1"
"$mod+Ctrl, left, movetoworkspace, -1"
"$mod+Ctrl, right, movetoworkspace, +1"
# # Switch workspace
# "$mod+Ctrl, left, workspace, -1"
# "$mod+Ctrl, right, workspace, +1"
# Screenshot
"$mod, Print, exec, hyprshot -m region -o ~/Pictures/Screenshots"
"$mod+Shift, Print, exec, hyprshot -m window -o ~/Pictures/Screenshots"
];
binde = [
# Fn keys
", code:232, exec, brightnessctl set +5%"
", code:233, exec, brightnessctl set -5%"
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
];
# bindl = [
# ", switch:on:Lid Switch, exec, hyprctl dispatch dpms off"
# ", switch:off:Lid Switch, exec, hyprctl dispatch dpms on"
# ];
exec-once = [
# "${pkgs.hyprpaper}/bin/hyprpaper"
# hyprpaper is handled as its own service
"${pkgs.waybar}/bin/waybar"
# listen to clipboard events and send them to cliphist
"wl-paste --watch cliphist stores"
"${pkgs.waybar}/bin/hypridle"
# # Fixes cursor themes in gnome apps under hyprland
# "gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'"
# "gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}"
@@ -125,9 +153,16 @@
"DP-2, 3840x2160, 0x-1440, 1.5"
", preferred, auto, 1" # automatically add any newly detected monitor
];
env = [
"NIXOS_OZONE_WL,1"
"ELECTRON_OZONE_PLATFORM_HINT,wayland"
];
};
plugins = [
# Global overview
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
# Touch gestures: https://github.com/horriblename/hyprgrass
# inputs.hyprgrass.packages.${pkgs.system}.default
# Virtual desktops: https://github.com/levnikmyskin/hyprland-virtual-desktops
@@ -136,41 +171,6 @@
};
programs.hyprlock = {
enable = true;
settings = {
general = {
grace = 5;
no_fade_in = false;
disable_loading_bar = false;
};
auth = {
"pam:enabled" = true;
};
background = {
blur_passes = 3;
blur_size = 10;
};
input-field = {
size = "20%, 5%";
outline_thickness = 3;
inner_color = "rgba(0, 0, 0, 0.0)";
outer_color = "rgba(33ccffee) rgba(00ff99ee) 45deg";
check_color = "rgba(00ff99ee) rgba(ff6633ee) 120deg";
fail_color = "rgba(ff6633ee) rgba(ff0066ee) 40deg";
font_color = "rgb(143, 143, 143)";
fade_on_empty = false;
rounding = 15;
position = "0, -20";
halign = "center";
valign = "center";
};
};
# Style the lock screen
};
services.network-manager-applet = {
enable = true;

View File

@@ -0,0 +1,38 @@
{inputs, pkgs, ...}:
{
programs.hyprlock = {
enable = true;
settings = {
general = {
grace = 5;
no_fade_in = false;
disable_loading_bar = false;
};
auth = {
"pam:enabled" = true;
};
background = {
blur_passes = 3;
blur_size = 10;
};
input-field = {
size = "20%, 5%";
outline_thickness = 3;
inner_color = "rgba(0, 0, 0, 0.0)";
outer_color = "rgba(33ccffee) rgba(00ff99ee) 45deg";
check_color = "rgba(00ff99ee) rgba(ff6633ee) 120deg";
fail_color = "rgba(ff6633ee) rgba(ff0066ee) 40deg";
font_color = "rgb(143, 143, 143)";
fade_on_empty = false;
rounding = 15;
position = "0, -20";
halign = "center";
valign = "center";
};
};
# Style the lock screen
};
}

View File

@@ -18,30 +18,26 @@
programs.waybar.enable = true;
programs.waybar = {
settings = {
mainBar = {
margin-top = 5;
margin-bottom = 5;
margin-top = 2;
margin-bottom = 2;
margin-left = 5;
margin-right = 5;
# height = 42;
layer = "top";
position = "top";
spacing = 5;
# height = 30;
# output = [
# "eDP-1"
# "HDMI-A-1"
# ];
modules-left = [
"hyprland/workspaces"
"hyprland/window"
];
modules-center = [
"clock"
"custom/notification"
];
modules-right = [
"tray"
# "temperature"
@@ -55,6 +51,7 @@
"idle_inhibitor"
];
# module specific settings
"hyprland/workspaces" = {
format = "{icon}";
@@ -68,7 +65,6 @@
"separate-outputs" = true;
"format" = "{}";
};
"clock" = {
format = "{:%H:%M}";
interval = 1;
@@ -79,7 +75,6 @@
};
};
};
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
@@ -113,13 +108,12 @@
format-plugged = "{capacity}% 󰂄 ";
format-icons = [ "󰁻" "󰁼" "󰁾" "󰂀" "󰂂" "󰁹" ];
};
"wireplumber" = {
scroll-step = 10;
format = "{icon} {volume}%";# {format_source}";
format-bluetooth = "{volume}% {icon}";# {format_source}";
format-bluetooth-muted = " {icon}";# {format_source}";
format-muted = "";# {format_source}";
format-bluetooth-muted = " {icon}";# {format_source}";
format-muted = " Muted";# {format_source}";
# format-source = " {volume}%";
# format-source-muted = "";
format-icons = {
@@ -160,16 +154,15 @@
escape = true;
};
"network" = {
# interface = "wlp0s20f3";
format = "{ifname}";
format-wifi = " {essid} ({signalStrength}%)";
format = "󰤭";
format-wifi = "{icon} {essid}";
format-icons = [ "󰤯" "󰤟" "󰤢" "󰤥" "󰤨" ];
format-ethernet = "󰊗 {ipaddr}/{cidr}";
format-disconnected = "";
tooltip-format = "󰊗 {ifname} via {gwaddr}";
tooltip-format-wifi = " {essid} ({signalStrength}%)";
tooltip-format-wifi = "SSID: {essid}({signalStrength}%), {frequency} MHz\nInterface: {ifname}\nIP: {ipaddr}\nGW: {gwaddr}\n\n<span color='#a6da95'>{bandwidthUpBits}</span>\t<span color='#ee99a0'>{bandwidthDownBits}</span>\t<span color='#c6a0f6'>󰹹{bandwidthTotalBits}</span>";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 5;
};
};
};
@@ -212,4 +205,3 @@
'';
};
}