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

@@ -1,24 +1,16 @@
{ lib, pkgs, ... }: {
# services.flatpak.enable = true;
# xdg.portal.enable = true;
# # install the xdg-desktop-portal-gtk package
# # to enable the portal service
# xdg.portal.extraPortals = with pkgs; [
# xdg-desktop-portal-gtk
# ];
# services.flatpak.update.auto.enable = false;
# services.flatpak.uninstallUnmanaged = false;
services.flatpak.enable = true;
services.flatpak.update.auto.enable = false;
services.flatpak.uninstallUnmanaged = false;
# services.flatpak.packages = [
# "com.calibre_ebook.calibre"
# "com.github.flxzt.rnote"
# "com.github.tchx84.Flatseal"
# "com.spotify.Client"
# "io.podman_desktop.PodmanDesktop"
# "org.pipewire.Helvum"
# "io.github.zen_browser.zen"
# "im.riot.Riot"
# ];
services.flatpak.packages = [
"com.calibre_ebook.calibre"
"com.github.flxzt.rnote"
"com.github.tchx84.Flatseal"
"com.spotify.Client"
"io.podman_desktop.PodmanDesktop"
"org.pipewire.Helvum"
"io.github.zen_browser.zen"
"im.riot.Riot"
];
}

View File

@@ -1,87 +0,0 @@
{pkgs, lib, ...}:
with lib.hm.gvariant;
{
## Gnome extensions
programs.gnome-shell = {
enable = true;
extensions = [
{
package = pkgs.gnomeExtensions.dash-to-dock;
}
{
id = "tilingshell@ferrarodomenico.com";
package = pkgs.gnome-shell-extensions;
}
{
id = "search-light@icedman.github.com";
package = pkgs.gnome-shell-extensions;
}
{
package = pkgs.gnomeExtensions.window-gestures;
}
{
package = pkgs.gnomeExtensions.random-wallpaper;
}
];
};
## And their settings (stored in dconf)
dconf.settings."org/gnome/shell/extensions/tilingshell" = {
inner-gaps = mkUint32 8;
layouts-json = ''
[{"id":"Layout 2","tiles":[{"x":0,"y":0,"width":0.22,"height":1,"groups":[1]},{"x":0.22,"y":0,"width":0.56,"height":1,"groups":[1,2]},{"x":0.78,"y":0,"width":0.22,"height":1,"groups":[2]}]},{"id":"Layout 3","tiles":[{"x":0,"y":0,"width":0.33,"height":1,"groups":[1]},{"x":0.33,"y":0,"width":0.67,"height":1,"groups":[1]}]},{"id":"Layout 4","tiles":[{"x":0,"y":0,"width":0.67,"height":1,"groups":[1]},{"x":0.67,"y":0,"width":0.33,"height":1,"groups":[1]}]},{"id":"2732837","tiles":[{"x":0,"y":0,"width":0.5002604166666667,"height":1,"groups":[1]},{"x":0.5002604166666667,"y":0,"width":0.49973958333333335,"height":1,"groups":[1]}]},{"id":"241562","tiles":[{"x":0,"y":0,"width":0.3328488372093023,"height":1,"groups":[1]},{"x":0.3328488372093023,"y":0,"width":0.33430232558139533,"height":1,"groups":[2,1]},{"x":0.6671511627906976,"y":0,"width":0.3328488372093023,"height":1,"groups":[2]}]}]
'';
outer-gaps = mkUint32 0;
overridden-settings = ''
{"org.gnome.mutter.keybindings":{"toggle-tiled-right":"['<Super>Right']","toggle-tiled-left":"['<Super>Left']"},"org.gnome.desktop.wm.keybindings":{"maximize":"['<Super>Up']","unmaximize":"['<Super>Down', '<Alt>F5']"},"org.gnome.mutter":{"edge-tiling":"true"}}
'';
selected-layouts = [ "Layout 4" ];
};
dconf.settings."org/gnome/shell/extensions/search-light" = {
background-color = mkTuple [ 0.20333333313465118 0.20333333313465118 0.20333333313465118 0.80236488580703735 ];
blur-background = false;
entry-font-size = 1;
monitor-count = 1;
scale-height = 0.10000000000000001;
scale-width = 0.20000000000000001;
shortcut-search = [ "<Control><Alt>space" ];
popup-at-cursor-monitor = true;
show-panel-icon = false;
};
dconf.settings."org/gnome/shell/extensions/windowgestures" = {
pinch-enable = false;
swipe4-left = 9;
swipe4-right = 8;
swipe4-updown = 0;
three-finger = true;
};
dconf.settings."org/gnome/shell/extensions/dash-to-dock" = {
background-opacity = 0.80000000000000004;
custom-theme-shrink = true;
dash-max-icon-size = 40;
dock-position = "BOTTOM";
height-fraction = 0.90000000000000002;
preview-size-scale = 0.29999999999999999;
show-running = true;
show-trash = false;
show-windows-preview = true;
};
dconf.settings."org/gnome/mutter" = {
dynamic-workspaces = true;
edge-tiling = false;
workspaces-only-on-primary = true;
};
dconf.settings."org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
show-battery-percentage = true;
};
}

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 @@
'';
};
}